@@ -117,20 +117,17 @@ toReport err =
118unboundTypeVars :: String -> String -> [String] -> String -> Report.Report
118unboundTypeVars :: String -> String -> [String] -> String -> Report.Report
119unboundTypeVars typeName tvar tvars revisedDeclaration =
119unboundTypeVars typeName tvar tvars revisedDeclaration =
121− s = if null tvars then "" else "s"
123− Report.simple
120+ Report.simple
124− ("Type '" ++ typeName ++ "' uses unbound type variable" ++ s ++ ": "
121+ ( "Not all type variables in '" ++ typeName ++ "' are listed, making sneaky\n"
125− ++ List.intercalate ", " (tvar:tvars)
122+ ++ "type errors possible. Unbound type variables include: "
126− )
123+ ++ List.intercalate ", " (tvar:tvars)
127− ("All type variables must be listed to avoid sneaky type errors.\n"
124+ )
128− ++ "Imagine one '" ++ typeName ++ "' where '" ++ tvar ++ "' is an Int and\n"
125+ ( "Here's the problem. Imagine one '" ++ typeName ++ "' where '" ++ tvar ++ "' is an Int and\n"
129− ++ "another where it is a Bool. They both look like a '" ++ typeName ++ "'\n"
126+ ++ "another where it is a Bool. They both look like a '" ++ typeName ++ "' to the type\n"
130− ++ "to the type checker, but they are actually different types!\n\n"
127+ ++ "checker, but they are actually different types!\n\n"
131− ++ "Maybe you want a definition like this?\n"
128+ ++ "Maybe you want a definition like this?\n"
132− ++ concatMap ("\n "++) (lines revisedDeclaration)
129+ ++ concatMap ("\n "++) (lines revisedDeclaration)
136parseErrorHint :: Parsec.Message -> String
133parseErrorHint :: Parsec.Message -> String