diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-08-17 22:30:42 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-08-17 22:30:42 +0100 |
commit | 593d78ebd7e2d10c609a4e5e363ed89386ab27cf (patch) | |
tree | af46824bc65ae1fdc4dd25a9e6c395a92ba9479f /src/Env.hs | |
parent | acbe62d01a76e5adb29ff479cca01588c65cf561 (diff) | |
download | micro-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.hs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |