ghc-7.0.3: The GHC API

TcSMonad

# Documentation

type CanonicalCts = Bag CanonicalCt Source

emptyCCan :: CanonicalCts Source

andCCan :: CanonicalCts -> CanonicalCts -> CanonicalCts Source

andCCans :: [CanonicalCts] -> CanonicalCts Source

singleCCan :: CanonicalCt -> CanonicalCts Source

extendCCans :: CanonicalCts -> CanonicalCt -> CanonicalCts Source

isEmptyCCan :: CanonicalCts -> Bool Source

isCTyEqCan :: CanonicalCt -> Bool Source

isCDictCan_Maybe :: CanonicalCt -> Maybe Class Source

isCIPCan_Maybe :: CanonicalCt -> Maybe (IPName Name)Source

isCFunEqCan_Maybe :: CanonicalCt -> Maybe TyCon Source

isCFrozenErr :: CanonicalCt -> Bool Source

data CanonicalCt Source

Constructors

CDictCan |

Fields

cc_id :: EvVar
cc_flavor :: CtFlavor
cc_class :: Class
cc_tyargs :: [Xi]

CIPCan |

Fields

cc_id :: EvVar
cc_flavor :: CtFlavor
cc_ip_nm :: IPName Name
cc_ip_ty :: TcTauType

CTyEqCan |

Fields

cc_id :: EvVar
cc_flavor :: CtFlavor
cc_tyvar :: TcTyVar
cc_rhs :: Xi

CFunEqCan |

Fields

cc_id :: EvVar
cc_flavor :: CtFlavor
cc_fun :: TyCon
cc_tyargs :: [Xi]
cc_rhs :: Xi

CFrozenErr |

Fields

cc_id :: EvVar
cc_flavor :: CtFlavor

Instances

Outputable CanonicalCt |

type Xi = Type Source

tyVarsOfCanonical :: CanonicalCt -> TcTyVarSet Source

tyVarsOfCanonicals :: CanonicalCts -> TcTyVarSet Source

tyVarsOfCDicts :: CanonicalCts -> TcTyVarSet Source

deCanonicalise :: CanonicalCt -> FlavoredEvVar Source

mkFrozenError :: CtFlavor -> EvVar -> CanonicalCt Source

isWanted :: CtFlavor -> Bool Source

isGiven :: CtFlavor -> Bool Source

isDerived :: CtFlavor -> Bool Source

isGivenCt :: CanonicalCt -> Bool Source

isWantedCt :: CanonicalCt -> Bool Source

isDerivedCt :: CanonicalCt -> Bool Source

pprFlavorArising :: CtFlavor -> SDoc Source

isFlexiTcsTv :: TyVar -> Bool Source

canRewrite :: CtFlavor -> CtFlavor -> Bool Source

canSolve :: CtFlavor -> CtFlavor -> Bool Source

combineCtLoc :: CtFlavor -> CtFlavor -> WantedLoc Source

mkGivenFlavor :: CtFlavor -> SkolemInfo -> CtFlavor Source

mkWantedFlavor :: CtFlavor -> CtFlavor Source

getWantedLoc :: CanonicalCt -> WantedLoc Source

data TcS a Source

Instances

Monad TcS |
Functor TcS |

runTcS :: SimplContext -> Untouchables -> TcS a -> TcM (a, Bag EvBind)Source

failTcS :: SDoc -> TcS aSource

panicTcS :: SDoc -> TcS aSource

traceTcS :: String -> SDoc -> TcS ()Source

traceFireTcS :: Int -> SDoc -> TcS ()Source

bumpStepCountTcS :: TcS ()Source

tryTcS :: TcS a -> TcS aSource

nestImplicTcS :: EvBindsVar -> TcsUntouchables -> TcS a -> TcS aSource

recoverTcS :: TcS a -> TcS a -> TcS aSource

wrapErrTcS :: TcM a -> TcS aSource

wrapWarnTcS :: TcM a -> TcS aSource

data SimplContext Source

Constructors

SimplInfer |
SimplRuleLhs |
SimplInteractive |
SimplCheck |

Instances

Eq SimplContext |
Outputable SimplContext |

isInteractive :: SimplContext -> Bool Source

simplEqsOnly :: SimplContext -> Bool Source

performDefaulting :: SimplContext -> Bool Source

newEvVar :: TcPredType -> TcS EvVar Source

newCoVar :: TcType -> TcType -> TcS EvVar Source

newGivenCoVar :: TcType -> TcType -> Coercion -> TcS EvVar Source

newDerivedId :: TcPredType -> TcS EvVar Source

newIPVar :: IPName Name -> TcType -> TcS EvVar Source

newDictVar :: Class -> [TcType] -> TcS EvVar Source

newKindConstraint :: TcTyVar -> Kind -> TcS CoVar Source

setCoBind :: CoVar -> Coercion -> TcS ()Source

setIPBind :: EvVar -> EvTerm -> TcS ()Source

setDictBind :: EvVar -> EvTerm -> TcS ()Source

setEvBind :: EvVar -> EvTerm -> TcS ()Source

setWantedTyBind :: TcTyVar -> TcType -> TcS ()Source

getInstEnvs :: TcS (InstEnv, InstEnv)Source

getFamInstEnvs :: TcS (FamInstEnv, FamInstEnv)Source

getTopEnv :: TcS HscEnv Source

getGblEnv :: TcS TcGblEnv Source

getTcEvBinds :: TcS EvBindsVar Source

getUntouchables :: TcS TcsUntouchables Source

getTcEvBindsBag :: TcS EvBindMap Source

getTcSContext :: TcS SimplContext Source

getTcSTyBinds :: TcS (IORef (TyVarEnv (TcTyVar, TcType)))Source

getTcSTyBindsMap :: TcS (TyVarEnv (TcTyVar, TcType))Source

newFlattenSkolemTy :: TcType -> TcS TcType Source

instDFunTypes :: [Either TyVar TcType] -> TcS [TcType]Source

instDFunConstraints :: TcThetaType -> TcS [EvVar]Source

newFlexiTcSTy :: Kind -> TcS TcType Source

instFlexiTcS :: TyVar -> TcS TcTyVar Source

compatKind :: Kind -> Kind -> Bool Source

type TcsUntouchables = (Untouchables, TcTyVarSet)Source

isTouchableMetaTyVar :: TcTyVar -> TcS Bool Source

isTouchableMetaTyVar_InRange :: TcsUntouchables -> TcTyVar -> Bool Source

getDefaultInfo :: TcS (SimplContext, [Type], (Bool, Bool))Source

getDynFlags :: TcS DynFlags Source

matchClass :: Class -> [Type] -> TcS (MatchInstResult (DFunId, [Either TyVar TcType]))Source

matchFam :: TyCon -> [Type] -> TcS (MatchInstResult (TyCon, [Type]))Source

data MatchInstResult mi Source

Constructors

MatchInstNo |
MatchInstSingle mi |
MatchInstMany |

checkWellStagedDFun :: PredType -> DFunId -> WantedLoc -> TcS ()Source

warnTcS :: CtLoc orig -> Bool -> SDoc -> TcS ()Source

pprEq :: TcType -> TcType -> SDoc Source