shithub: MicroHs

Download patch

ref: cac797ad216aeb60f82e7ee137bf0b4fedf0082f
parent: 54e753fc3251f55b637ff97e12f56e07f8ddb230
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Wed Sep 27 06:46:17 EDT 2023

Better error message.

--- a/src/MicroHs/TypeCheck.hs
+++ b/src/MicroHs/TypeCheck.hs
@@ -493,10 +493,10 @@
 tLookup msg i = T.do
   env <- gets valueTable
   case M.lookup i env of
-    Nothing -> tcError (getSLocIdent i) $ ": undefined " ++ msg ++ ": " ++ showIdent i
+    Nothing -> tcError (getSLocIdent i) $ "undefined " ++ msg ++ ": " ++ showIdent i
                -- ++ "\n" ++ show env ;
     Just [Entry e s] -> T.return (setSLocExpr (getSLocIdent i) e, s)
-    Just _ -> tcError (getSLocIdent i) $ ": ambiguous " ++ showIdent i
+    Just _ -> tcError (getSLocIdent i) $ "ambiguous " ++ showIdent i
 
 tInst :: ETypeScheme -> T EType
 tInst as =
--