From afd550dc8245e61ab6b148c72cdf133e6b7836d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 27 Sep 2024 20:30:25 +0200 Subject: Default and context-provided values for function arguments --- src/Parser/Expr.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Parser/Expr.hs') 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 $ -- cgit v1.2.3