on master help sign in
cosmetic: make case branches more consistent
2a2e58cEvan Czaplicki
src/Type/Unify.hs+9−13
@@ -542,19 +542,15 @@ unifyStructure context flatType content otherContent =
542
542
543 Structure otherFlatType ->
543 Structure otherFlatType ->
544 case (flatType, otherFlatType) of
544 case (flatType, otherFlatType) of
545− (App1 home name args, App1 otherHome otherName otherArgs) ->
545+ (App1 home name args, App1 otherHome otherName otherArgs) | home == otherHome && name == otherName ->
546− if home == otherHome && name == otherName then
547− Unify $ \vars ok err ->
546+ Unify $ \vars ok err ->
548− let
547+ let
549− ok1 vars1 () =
548+ ok1 vars1 () =
550− case merge context otherContent of
549+ case merge context otherContent of
551− Unify k ->
550+ Unify k ->
552− k vars1 ok err
551+ k vars1 ok err
553− in
552+ in
554− unifyArgs vars context args otherArgs ok1 err
553+ unifyArgs vars context args otherArgs ok1 err
555−
556− else
557− mismatch
558
554
559 (Fun1 arg1 res1, Fun1 arg2 res2) ->
555 (Fun1 arg1 res1, Fun1 arg2 res2) ->
560 do try2
556 do try2