From: Anders Mörtberg Date: Sun, 29 Mar 2015 17:05:49 +0000 (+0200) Subject: Fix error message when path constructors are written without the type in X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=78b64e87c131dade66dd7d88698fabc78b024b83;p=cubicaltt.git Fix error message when path constructors are written without the type in curly braces --- diff --git a/Resolver.hs b/Resolver.hs index a13817f..40fd0ec 100644 --- a/Resolver.hs +++ b/Resolver.hs @@ -138,7 +138,10 @@ resolveVar (AIdent (l,x)) case lookup x vars of Just Variable -> return $ CTT.Var x Just Constructor -> return $ CTT.Con x [] - Just PConstructor -> undefined -- error! + Just PConstructor -> throwError $ "The path constructor " ++ x ++ " is used as a" + ++ " variable at " ++ show l ++ " in " ++ modName + ++ " (path constructors should have their type in" + ++ " curly braces as first argument)" Just Name -> throwError $ "Name " ++ x ++ " used as a variable at position " ++ show l ++ " in module " ++ modName