aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-09-11 16:42:47 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-09-11 16:42:47 +0100
commit3139a5a2ef1668549b2247ad832c59cc89d9758e (patch)
tree8caf8e44644839506074a955958eb4932232ebe2
parentfe408149b91b9afe7aaccdbd17e6c665494f8433 (diff)
downloadmicro-lang-hs-3139a5a2ef1668549b2247ad832c59cc89d9758e.tar.gz
micro-lang-hs-3139a5a2ef1668549b2247ad832c59cc89d9758e.zip
Comment
-rw-r--r--src/Micro/Compiler.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Micro/Compiler.hs b/src/Micro/Compiler.hs
index 71d9400..85e4037 100644
--- a/src/Micro/Compiler.hs
+++ b/src/Micro/Compiler.hs
@@ -157,7 +157,7 @@ compileOne x = do
put st {stEnv = ev}
rbody <- case r of
Right (_, xs) -> pure $ xs
- Left _ -> pure $ body
+ Left _ -> pure $ body -- there was an error, so just keep the old body
return $ typeResult (Just ftype) (A.Func ident params ret rbody priv anon pos)
where
ftype = A.toFuncType params ret