import MatchLit ( dsLit )
import DsBinds ( dsMonoBinds, AutoScc(..) )
import DsGRHSs ( dsGuarded )
import MatchLit ( dsLit )
import DsBinds ( dsMonoBinds, AutoScc(..) )
import DsGRHSs ( dsGuarded )
import DsListComp ( dsListComp, dsPArrComp )
import DsUtils ( mkErrorAppDs, mkStringLit, mkConsExpr, mkNilExpr,
mkCoreTupTy, selectMatchVar,
import DsListComp ( dsListComp, dsPArrComp )
import DsUtils ( mkErrorAppDs, mkStringLit, mkConsExpr, mkNilExpr,
mkCoreTupTy, selectMatchVar,
#endif
import HsSyn ( HsExpr(..), Pat(..), ArithSeqInfo(..),
#endif
import HsSyn ( HsExpr(..), Pat(..), ArithSeqInfo(..),
returnDs (bindNonRec y_id y_core $
Lam x_id (mkApps core_op [Var x_id, Var y_id]))
returnDs (bindNonRec y_id y_core $
Lam x_id (mkApps core_op [Var x_id, Var y_id]))
-dsExpr (HsCCall lbl args may_gc is_asm result_ty)
- = mapDs dsExpr args `thenDs` \ core_args ->
- dsCCall lbl core_args may_gc is_asm result_ty
- -- dsCCall does all the unboxification, etc.
-
returnDs (mkApps (Var toP) [Type ty, coreList])
dsExpr (ExplicitTuple expr_list boxity)
returnDs (mkApps (Var toP) [Type ty, coreList])
dsExpr (ExplicitTuple expr_list boxity)
returnDs (mkConApp (tupleCon boxity (length expr_list))
(map (Type . exprType) core_exprs ++ core_exprs))
returnDs (mkConApp (tupleCon boxity (length expr_list))
(map (Type . exprType) core_exprs ++ core_exprs))
- then mapDs unlabelled_bottom arg_tys
- else mapDs mk_arg (zipEqual "dsExpr:RecordCon" arg_tys labels))
+ then mappM unlabelled_bottom arg_tys
+ else mappM mk_arg (zipEqual "dsExpr:RecordCon" arg_tys labels))
-- and the right hand sides with applications of the wrapper Id
-- so that everything works when we are doing fancy unboxing on the
-- constructor aguments.
-- and the right hand sides with applications of the wrapper Id
-- so that everything works when we are doing fancy unboxing on the
-- constructor aguments.
matchWrapper RecUpd alts `thenDs` \ ([discrim_var], matching_code) ->
returnDs (bindNonRec discrim_var record_expr' matching_code)
matchWrapper RecUpd alts `thenDs` \ ([discrim_var], matching_code) ->
returnDs (bindNonRec discrim_var record_expr' matching_code)