import HsSyn ( HsExpr(..), HsLit(..), ArithSeqInfo(..),
Match, Qual, HsBinds, Stmt, PolyType )
import TcHsSyn ( TypecheckedHsExpr(..), TypecheckedHsBinds(..),
import HsSyn ( HsExpr(..), HsLit(..), ArithSeqInfo(..),
Match, Qual, HsBinds, Stmt, PolyType )
import TcHsSyn ( TypecheckedHsExpr(..), TypecheckedHsBinds(..),
import DsCCall ( dsCCall )
import DsListComp ( dsListComp )
import DsUtils ( mkAppDs, mkConDs, mkPrimDs, dsExprToAtom,
import DsCCall ( dsCCall )
import DsListComp ( dsListComp )
import DsUtils ( mkAppDs, mkConDs, mkPrimDs, dsExprToAtom,
)
import Literal ( mkMachInt, Literal(..) )
import MagicUFs ( MagicUnfoldingFun )
)
import Literal ( mkMachInt, Literal(..) )
import MagicUFs ( MagicUnfoldingFun )
-import PrelInfo ( mkTupleTy, unitTy, nilDataCon, consDataCon,
- charDataCon, charTy, rEC_CON_ERROR_ID,
- rEC_UPD_ERROR_ID
- )
+import PrelVals ( rEC_CON_ERROR_ID, rEC_UPD_ERROR_ID )
import Pretty ( ppShow, ppBesides, ppPStr, ppStr )
import TyCon ( isDataTyCon, isNewTyCon )
import Type ( splitSigmaTy, splitFunTy, typePrimRep,
import Pretty ( ppShow, ppBesides, ppPStr, ppStr )
import TyCon ( isDataTyCon, isNewTyCon )
import Type ( splitSigmaTy, splitFunTy, typePrimRep,
- getAppDataTyCon, getAppTyCon, applyTy
+ getAppDataTyConExpandingDicts, getAppTyCon, applyTy
+ )
+import TysWiredIn ( mkTupleTy, unitTy, nilDataCon, consDataCon,
+ charDataCon, charTy
)
import TyVar ( nullTyVarEnv, addOneToTyVarEnv, GenTyVar{-instance Eq-} )
import Usage ( UVar(..) )
import Util ( zipEqual, pprError, panic, assertPanic )
maybeBoxedPrimType = panic "DsExpr.maybeBoxedPrimType"
)
import TyVar ( nullTyVarEnv, addOneToTyVarEnv, GenTyVar{-instance Eq-} )
import Usage ( UVar(..) )
import Util ( zipEqual, pprError, panic, assertPanic )
maybeBoxedPrimType = panic "DsExpr.maybeBoxedPrimType"
-- for the type of x, we need the type of op's 2nd argument
let
x_ty = case (splitSigmaTy (coreExprType core_op)) of { (_, _, tau_ty) ->
-- for the type of x, we need the type of op's 2nd argument
let
x_ty = case (splitSigmaTy (coreExprType core_op)) of { (_, _, tau_ty) ->
in
newSysLocalDs x_ty `thenDs` \ x_id ->
returnDs (mkValLam [x_id] (core_op `App` y_atom `App` VarArg x_id))
in
newSysLocalDs x_ty `thenDs` \ x_id ->
returnDs (mkValLam [x_id] (core_op `App` y_atom `App` VarArg x_id))
-- for the type of x, we need the type of op's 1st argument
let
x_ty = case (splitSigmaTy (coreExprType core_op)) of { (_, _, tau_ty) ->
-- for the type of x, we need the type of op's 1st argument
let
x_ty = case (splitSigmaTy (coreExprType core_op)) of { (_, _, tau_ty) ->
in
newSysLocalDs x_ty `thenDs` \ x_id ->
returnDs (mkValLam [x_id] (core_op `App` VarArg x_id `App` y_atom))
in
newSysLocalDs x_ty `thenDs` \ x_id ->
returnDs (mkValLam [x_id] (core_op `App` VarArg x_id `App` y_atom))
- (tycon, inst_tys, cons) = _trace "getAppDataTyCon.DsExpr" $ getAppDataTyCon record_ty
+ (tycon, inst_tys, cons) = _trace "DsExpr.getAppDataTyConExpandingDicts" $
+ getAppDataTyConExpandingDicts record_ty