on master help sign in
Add cases for unifying tuples
commit66183f1bb927ab3d6be3d44d787b05cd1e0ab55c authorEvan Czaplicki <evancz@users.noreply.github.com> dateWed 20 Dec 2017, 01:18 (9 years ago) parent9b630c1
1 file changed+9
src/Type/Unify.hs+9
src/Type/Unify.hs+9
@@ -689,6 +689,15 @@ unifyStructure context flatType content otherContent =
689689 Unify k ->
690690 k vars ok err
691691
692+ (Tuple1 a b Nothing, Tuple1 x y Nothing) ->
693+ do subUnify context a x
694+ subUnify context b y
695+
696+ (Tuple1 a b (Just c), Tuple1 x y (Just z)) ->
697+ do subUnify context a x
698+ subUnify context b y
699+ subUnify context c z
700+
692701 _ ->
693702 mismatch context Nothing
694703