on master help sign in
Only merge if all the subparts match, otherwise type diff messes up
commit9c1239a7d81fb91c0a10d7e19b1a259a641b6c6c authorEvan Czaplicki <info@elm-lang.org> dateThu 22 Oct 2015, 18:02 (11 years ago) parentacedd9c
1 file changed+4−4
src/Type/Unify.hs+4−4
src/Type/Unify.hs+4−4
@@ -542,14 +542,14 @@ unifyStructure context term otherContent =
542542 Structure otherTerm ->
543543 case (term, otherTerm) of
544544 (App1 func arg, App1 otherFunc otherArg) ->
545− do merge context otherContent
546− subUnify context func otherFunc
545+ do subUnify context func otherFunc
547546 subUnify context arg otherArg
547+ merge context otherContent
548548
549549 (Fun1 arg result, Fun1 otherArg otherResult) ->
550− do merge context otherContent
551− subUnify context arg otherArg
550+ do subUnify context arg otherArg
552551 subUnify context result otherResult
552+ merge context otherContent
553553
554554 (EmptyRecord1, EmptyRecord1) ->
555555 merge context otherContent