diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-08-21 08:07:52 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-08-21 08:07:52 +0100 |
commit | ccb2e6e02f39f6cf5f7beb4aa64bec948a8c7edf (patch) | |
tree | 0c5f4964972cdfb8d03f0d2e4100e04c9fc3e300 /src/Compiler.hs | |
parent | 0961ef6728abea4f3926fbf34539f4a98583d0c7 (diff) | |
download | micro-lang-hs-ccb2e6e02f39f6cf5f7beb4aa64bec948a8c7edf.tar.gz micro-lang-hs-ccb2e6e02f39f6cf5f7beb4aa64bec948a8c7edf.zip |
Qualified undefined variable error, added test
Diffstat (limited to 'src/Compiler.hs')
-rw-r--r-- | src/Compiler.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compiler.hs b/src/Compiler.hs index 0228b90..bdbc5f3 100644 --- a/src/Compiler.hs +++ b/src/Compiler.hs @@ -131,7 +131,7 @@ compile x = do (ev, errs) <- get case getSym ev ident of Just (_, t, _) -> return $ Right $ Just t - Nothing -> addError $ Error GenericError ("undefined variable \"" ++ ident ++ "\"") pos + Nothing -> addError $ Error Undefined ("undefined variable \"" ++ ident ++ "\"") pos compileAll :: [A.Expr] -> State CompState CompResult compileAll (x : xs) = do |