-tcIfaceExpr (IfaceLet (IfaceNonRec bndr rhs) body)
- = do { rhs' <- tcIfaceExpr rhs
- ; id <- tcIfaceLetBndr bndr
- ; body' <- extendIfaceIdEnv [id] (tcIfaceExpr body)
- ; return (Let (NonRec id rhs') body') }
-
-tcIfaceExpr (IfaceLet (IfaceRec pairs) body)
- = do { ids <- mapM tcIfaceLetBndr bndrs
- ; extendIfaceIdEnv ids $ do
- { rhss' <- mapM tcIfaceExpr rhss
- ; body' <- tcIfaceExpr body
- ; return (Let (Rec (ids `zip` rhss')) body') } }
+ extendIfaceIdEnv [case_bndr'] $ do
+ alts' <- mapM (tcIfaceAlt scrut' tc_app) alts
+ ty' <- tcIfaceType ty
+ return (Case scrut' case_bndr' ty' alts')
+
+tcIfaceExpr (IfaceLet (IfaceNonRec bndr rhs) body) = do
+ rhs' <- tcIfaceExpr rhs
+ id <- tcIfaceLetBndr bndr
+ body' <- extendIfaceIdEnv [id] (tcIfaceExpr body)
+ return (Let (NonRec id rhs') body')
+
+tcIfaceExpr (IfaceLet (IfaceRec pairs) body) = do
+ ids <- mapM tcIfaceLetBndr bndrs
+ extendIfaceIdEnv ids $ do
+ rhss' <- mapM tcIfaceExpr rhss
+ body' <- tcIfaceExpr body
+ return (Let (Rec (ids `zip` rhss')) body')