@@ -111,9 +111,15 @@ actuallyUnify span variable1 variable2 = do
111111 _ -> comparableError Nothing
112112
113113 rigidError variable = TS.addError span (Just hint) variable1 variable2
114− where hint = "There is a problem with the '" ++
115− render (pretty Never variable) ++
116− "' in the type signature. It currently is not possible to unify type variables that appear in top-level declarations and again in subexpressions"
114+ where
115+ var = "'" ++ render (pretty Never variable) ++ "'"
116+ hint = concat
117+ [ "This probably relates to a type annotation. A type "
118+ , "annotation may say ", var, " but should be a more "
119+ , "specific type. Also, type variables are not "
120+ , "shared between type annotations, so ", var, " in one "
121+ , "is not the same as " ++ var ++ " in another. "
122+ , "Something like that happened" ]
117123
118124 superUnify =
119125 case (flex desc1, flex desc2, name desc1, name desc2) of