on master help sign in
cosmetic: make case branches more consistent
commit2a2e58c3289274df7b7696fd49ba958c6427423b authorEvan Czaplicki <evancz@users.noreply.github.com> dateFri 12 Jan 2018, 16:06 (9 years ago) parent71ee7d2
1 file changed+9−13
src/Type/Unify.hs+9−13
src/Type/Unify.hs+9−13
@@ -542,19 +542,15 @@ unifyStructure context flatType content otherContent =
542542
543543 Structure otherFlatType ->
544544 case (flatType, otherFlatType) of
545− (App1 home name args, App1 otherHome otherName otherArgs) ->
546− if home == otherHome && name == otherName then
547− Unify $ \vars ok err ->
548− let
549− ok1 vars1 () =
550− case merge context otherContent of
551− Unify k ->
552− k vars1 ok err
553− in
554− unifyArgs vars context args otherArgs ok1 err
555−
556− else
557− mismatch
545+ (App1 home name args, App1 otherHome otherName otherArgs) | home == otherHome && name == otherName ->
546+ Unify $ \vars ok err ->
547+ let
548+ ok1 vars1 () =
549+ case merge context otherContent of
550+ Unify k ->
551+ k vars1 ok err
552+ in
553+ unifyArgs vars context args otherArgs ok1 err
558554
559555 (Fun1 arg1 res1, Fun1 arg2 res2) ->
560556 do try2