From 593d78ebd7e2d10c609a4e5e363ed89386ab27cf Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Wed, 17 Aug 2022 22:30:42 +0100 Subject: More sensible error types --- src/Env.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Env.hs') 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) -- cgit v1.2.3