@@ -7,6 +7,7 @@ module AST.Expression.Canonical
77 , Args(..), Arg(..)
88 , Match(..)
99 , Pattern, Pattern_(..)
10+ , PatternCtorArg(..)
1011 , Destructors
1112 , Destructor(..)
1213 -- decls
@@ -122,10 +123,18 @@ data Pattern_
122123 , _p_type :: N.Name
123124 , _p_vars :: [N.Name]
124125 , _p_name :: N.Name
125− , _p_args :: [(Index.ZeroBased, Type.Canonical, Pattern)]
126+ , _p_args :: [PatternCtorArg]
126127 }
127128
128129
130+data PatternCtorArg =
131+ PatternCtorArg
132+ { _index :: Index.ZeroBased
133+ , _type :: Type.Canonical
134+ , _arg :: Pattern
135+ }
136+
137+
129138type Destructors = Map.Map N.Name (A.Located Destructor)
130139
131140data Destructor