aboutsummaryrefslogtreecommitdiff
path: root/src/Env.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-08-17 22:30:42 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-08-17 22:30:42 +0100
commit593d78ebd7e2d10c609a4e5e363ed89386ab27cf (patch)
treeaf46824bc65ae1fdc4dd25a9e6c395a92ba9479f /src/Env.hs
parentacbe62d01a76e5adb29ff479cca01588c65cf561 (diff)
downloadmicro-lang-hs-593d78ebd7e2d10c609a4e5e363ed89386ab27cf.tar.gz
micro-lang-hs-593d78ebd7e2d10c609a4e5e363ed89386ab27cf.zip
More sensible error types
Diffstat (limited to 'src/Env.hs')
-rw-r--r--src/Env.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Env.hs b/src/Env.hs
index 380addc..d4c4fa3 100644
--- a/src/Env.hs
+++ b/src/Env.hs
@@ -57,6 +57,6 @@ addEnv env = Env Map.empty $ Just env
addSymUniq :: Env -> Sym -> Either Error Env
addSymUniq ev (id, typ, pos) = case getSyml ev id of
Nothing -> Right $ addSym ev sym
- Just (_, _, p) -> Left $ Error ("\"" ++ id ++ "\" already defined in " ++ show p) pos
+ Just (_, _, p) -> Left $ Error AlreadyDefined ("symbol \"" ++ id ++ "\" already defined in " ++ show p) pos
where
sym = (id, typ, pos)