diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-08-14 17:46:17 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-08-14 17:46:17 +0100 |
commit | 28dff65744f89de563ae41ba717d60fc7e300f29 (patch) | |
tree | 4c41fc22cbd6f5c2b871a73c0825ce3cc03d0c5c | |
parent | 0118394558cef840c47952c1dd997a235c279ada (diff) | |
download | micro-lang-hs-28dff65744f89de563ae41ba717d60fc7e300f29.tar.gz micro-lang-hs-28dff65744f89de563ae41ba717d60fc7e300f29.zip |
Missing case
Also removed unused as-pattern.
-rw-r--r-- | src/Compiler.hs | 3 |
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 |