type Alt b = (AltCon, [b], Expr b) -- (DEFAULT, [], rhs) is the default alternative
-data AltCon = DataAlt DataCon
+data AltCon = DataAlt DataCon -- Invariant: the DataCon is always from
+ -- a *data* type, and never from a *newtype*
| LitAlt Literal
| DEFAULT
deriving (Eq, Ord)
mkLams :: [b] -> Expr b -> Expr b
mkLit lit = Lit lit
-mkConApp con args = pprTrace "mkConApp" (ppr con) $ mkApps (Var (dataConWorkId con)) args
+mkConApp con args = mkApps (Var (dataConWorkId con)) args
mkLams binders body = foldr Lam body binders
mkLets binds body = foldr Let body binds