git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Improve error message for row typecheck failures

Adds parens again, to avoid messages like `Cannot unify with | s2403`

commit90203865cd6f55b9db8b2c09e1bba0b9fe2aa587 authorGary Burgess <gary.burgess@gmail.com> dateSun 16 Feb 2014, 18:52 (13 years ago) parentad10190
1 file changed+1−1
src/Language/PureScript/TypeChecker/Types.hs+1−1
src/Language/PureScript/TypeChecker/Types.hs+1−1
@@ -152,7 +152,7 @@ unifyRows r1 r2 =
152152 unifyRows' [] REmpty [] REmpty = return ()
153153 unifyRows' [] (TypeVar v1) [] (TypeVar v2) | v1 == v2 = return ()
154154 unifyRows' [] (Skolem s1 _) [] (Skolem s2 _) | s1 == s2 = return ()
155− unifyRows' sd3 r3 sd4 r4 = throwError $ "Cannot unify " ++ prettyPrintRow (rowFromList (sd3, r3)) ++ " with " ++ prettyPrintRow (rowFromList (sd4, r4)) ++ "."
155+ unifyRows' sd3 r3 sd4 r4 = throwError $ "Cannot unify (" ++ prettyPrintRow (rowFromList (sd3, r3)) ++ ") with (" ++ prettyPrintRow (rowFromList (sd4, r4)) ++ ")."
156156
157157-- |
158158-- Ensure type constructors are equal after canonicalization