aboutsummaryrefslogtreecommitdiff
path: root/src/Compiler.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-08-14 17:46:17 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-08-14 17:46:17 +0100
commit28dff65744f89de563ae41ba717d60fc7e300f29 (patch)
tree4c41fc22cbd6f5c2b871a73c0825ce3cc03d0c5c /src/Compiler.hs
parent0118394558cef840c47952c1dd997a235c279ada (diff)
downloadmicro-lang-hs-28dff65744f89de563ae41ba717d60fc7e300f29.tar.gz
micro-lang-hs-28dff65744f89de563ae41ba717d60fc7e300f29.zip
Missing case
Also removed unused as-pattern.
Diffstat (limited to 'src/Compiler.hs')
-rw-r--r--src/Compiler.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Compiler.hs b/src/Compiler.hs
index 602490e..f86c973 100644
--- a/src/Compiler.hs
+++ b/src/Compiler.hs
@@ -109,11 +109,12 @@ compile x = do
(A.Call ident args pos) -> do
r <- compile ident
case r of
- p@(Right (Just (A.FuncType params rtyp))) -> do
+ Right (Just (A.FuncType params rtyp)) -> do
r <- typecheckCall args params
case r of
Just err -> addError $ Error err pos
Nothing -> return $ Right rtyp
+ _ -> return $ Right Nothing
(A.Return value pos) -> do
(ev, errs) <- get
case getSyml ev "$fn$" of