summaryrefslogtreecommitdiff
path: root/src/Parser/Expr.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-09-27 20:30:25 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-09-27 21:03:29 +0200
commitafd550dc8245e61ab6b148c72cdf133e6b7836d1 (patch)
tree9ceff9a181af372a35c9b906cacca11c7c26b18b /src/Parser/Expr.hs
parent213e3523aead4c18b65ac85886203d2508b9b27e (diff)
Default and context-provided values for function arguments
Diffstat (limited to 'src/Parser/Expr.hs')
-rw-r--r--src/Parser/Expr.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Parser/Expr.hs b/src/Parser/Expr.hs
index 8ae0f77..4b1a89e 100644
--- a/src/Parser/Expr.hs
+++ b/src/Parser/Expr.hs
@@ -355,9 +355,9 @@ variable = label "variable" $ do
SomeExpr e'@(FunVariable (FunctionArguments argTypes) _ _) -> do
let check poff kw expr = do
case M.lookup kw argTypes of
- Just expected -> do
+ Just (SomeArgumentType (_ :: ArgumentType expected)) -> do
withRecovery registerParseError $ do
- void $ unify poff expected (someExprType expr)
+ void $ unify poff (ExprTypePrim (Proxy @expected)) (someExprType expr)
return expr
Nothing -> do
registerParseError $ FancyError poff $ S.singleton $ ErrorFail $ T.unpack $