on master help sign in
Limit tuple size to 3 in AST.Type

This now matches the limits in AST.Expression.Canonical

commit45aaf5687a75f2f98bad69a185177cf0ebe52de1 authorEvan Czaplicki <evancz@users.noreply.github.com> dateThu 2 Nov 2017, 18:32 (9 years ago) parent5a63520
1 file changed+5−5
src/AST/Type.hs+5−5
src/AST/Type.hs+5−5
@@ -44,7 +44,7 @@ data Canonical
4444 | Type ModuleName.Canonical Name [Canonical]
4545 | Record (Map.Map Name Canonical) (Maybe Canonical)
4646 | Unit
47− | Tuple Canonical Canonical [Canonical]
47+ | Tuple Canonical Canonical (Maybe Canonical)
4848 | Aliased ModuleName.Canonical Name [(Name, Canonical)] (Aliased Canonical)
4949 deriving (Eq, Ord)
5050
@@ -106,8 +106,8 @@ deepDealias tipe =
106106 Unit ->
107107 Unit
108108
109− Tuple a b cs ->
110− Tuple (deepDealias a) (deepDealias b) (map deepDealias cs)
109+ Tuple a b c ->
110+ Tuple (deepDealias a) (deepDealias b) (fmap deepDealias c)
111111
112112
113113iteratedDealias :: Canonical -> Canonical
@@ -155,8 +155,8 @@ dealiasHelp typeTable tipe =
155155 Unit ->
156156 Unit
157157
158− Tuple a b cs ->
159− Tuple (go a) (go b) (map go cs)
158+ Tuple a b c ->
159+ Tuple (go a) (go b) (fmap go c)
160160
161161
162162