@@ -80,11 +80,11 @@ actuallyUnify span variable1 variable2 = do
8080 unifyNumber svar name
8181 | name `elem` ["Int","Float","number"] = flexAndUnify svar
8282 | otherwise = TS.addError span (Just hint) variable1 variable2
83− where hint = "A number must be an Int or Float"
83+ where hint = "A number must be an Int or Float."
8484
8585 comparableError maybe =
8686 TS.addError span (Just $ Maybe.fromMaybe msg maybe) variable1 variable2
87− where msg = "A comparable must be an Int, Float, Char, String, list, or tuple"
87+ where msg = "A comparable must be an Int, Float, Char, String, list, or tuple."
8888
8989 unifyComparable var name
9090 | name `elem` ["Int","Float","Char","String","comparable"] = flexAndUnify var
@@ -98,7 +98,7 @@ actuallyUnify span variable1 variable2 = do
9898 unify' v =<< liftIO (var $ Is Comparable)
9999 Tuple vs
100100 | length vs > 6 ->
101− comparableError $ Just "Cannot compare a tuple with more than 6 elements"
101+ comparableError $ Just "Cannot compare a tuple with more than 6 elements."
102102 | otherwise ->
103103 do flexAndUnify varSuper
104104 cmpVars <- liftIO $ forM [1..length vs] $ \_ -> var (Is Comparable)
@@ -113,13 +113,8 @@ actuallyUnify span variable1 variable2 = do
113113 rigidError variable = TS.addError span (Just hint) variable1 variable2
114114 where
115115 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" ]
116+ hint = "Cannot unify rigid type variable " ++ var ++
117+ ".\nThe problem probably relates to a type annotation."
123118
124119 superUnify =
125120 case (flex desc1, flex desc2, name desc1, name desc2) of