on master help sign in
Only merge if all the subparts match, otherwise type diff messes up
9c1239aEvan Czaplicki
src/Type/Unify.hs+4−4
@@ -542,14 +542,14 @@ unifyStructure context term otherContent =
542 Structure otherTerm ->
542 Structure otherTerm ->
543 case (term, otherTerm) of
543 case (term, otherTerm) of
544 (App1 func arg, App1 otherFunc otherArg) ->
544 (App1 func arg, App1 otherFunc otherArg) ->
545− do merge context otherContent
546− subUnify context func otherFunc
545+ do subUnify context func otherFunc
547 subUnify context arg otherArg
546 subUnify context arg otherArg
547+ merge context otherContent
548
548
549 (Fun1 arg result, Fun1 otherArg otherResult) ->
549 (Fun1 arg result, Fun1 otherArg otherResult) ->
550− do merge context otherContent
551− subUnify context arg otherArg
550+ do subUnify context arg otherArg
552 subUnify context result otherResult
551 subUnify context result otherResult
552+ merge context otherContent
553
553
554 (EmptyRecord1, EmptyRecord1) ->
554 (EmptyRecord1, EmptyRecord1) ->
555 merge context otherContent
555 merge context otherContent