on master help sign in
Add note about no sharing between top-level and let-bound type variables
3686c82Evan Czaplicki
compiler/Type/Unify.hs+2−1
@@ -114,7 +114,8 @@ actuallyUnify span variable1 variable2 = do
114 where
114 where
115 var = "'" ++ render (pretty Never variable) ++ "'"
115 var = "'" ++ render (pretty Never variable) ++ "'"
116 hint = "Cannot unify rigid type variable " ++ var ++
116 hint = "Cannot unify rigid type variable " ++ var ++
117− ".\nThe problem probably relates to a type annotation."
117+ ".\nThe problem probably relates to a type annotation. Note that rigid type\n\
118+ \variables are not shared between a top-level and let-bound type annotations."
118
119
119 superUnify =
120 superUnify =
120 case (flex desc1, flex desc2, name desc1, name desc2) of
121 case (flex desc1, flex desc2, name desc1, name desc2) of