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