-data Expr b f -- "b" for the type of binders,
- -- "f" for the flexi slot in types
- = Var (GenId f)
- | Con Con [Arg b f] -- Guaranteed saturated
- | App (Expr b f) (Arg b f)
- | Lam b (Expr b f)
- | Let (Bind b f) (Expr b f)
- | Case (Expr b f) b [Alt b f] -- Binder gets bound to value of scrutinee
- -- DEFAULT case must be last, if it occurs at all
- | Note (Note f) (Expr b f)
- | Type (GenType f) -- This should only show up at the top
- -- level of an Arg
-
-type Arg b f = Expr b f -- Can be a Type
-
-type Alt b f = (Con, [b], Expr b f)
+data Expr b -- "b" for the type of binders,
+ = Var Id
+ | Con Con [Arg b] -- Guaranteed saturated
+ -- The Con can be a DataCon, Literal, PrimOP
+ -- but cannot be DEFAULT
+ | App (Expr b) (Arg b)
+ | Lam b (Expr b)
+ | Let (Bind b) (Expr b)
+ | Case (Expr b) b [Alt b] -- Binder gets bound to value of scrutinee
+ -- DEFAULT case must be last, if it occurs at all
+ | Note Note (Expr b)
+ | Type Type -- This should only show up at the top
+ -- level of an Arg
+
+type Arg b = Expr b -- Can be a Type
+
+type Alt b = (Con, [b], Expr b)