ghc-7.0.4: The GHC API

TcSMonad

# Documentation

type CanonicalCts = Bag CanonicalCt

emptyCCan :: CanonicalCts

andCCan :: CanonicalCts -> CanonicalCts -> CanonicalCts

andCCans :: [CanonicalCts] -> CanonicalCts

singleCCan :: CanonicalCt -> CanonicalCts

extendCCans :: CanonicalCts -> CanonicalCt -> CanonicalCts

isEmptyCCan :: CanonicalCts -> Bool

isCTyEqCan :: CanonicalCt -> Bool

isCDictCan_Maybe :: CanonicalCt -> Maybe Class

isCIPCan_Maybe :: CanonicalCt -> Maybe (IPName Name)

isCFunEqCan_Maybe :: CanonicalCt -> Maybe TyCon

isCFrozenErr :: CanonicalCt -> Bool

data CanonicalCt

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

tyVarsOfCanonical :: CanonicalCt -> TcTyVarSet

tyVarsOfCanonicals :: CanonicalCts -> TcTyVarSet

tyVarsOfCDicts :: CanonicalCts -> TcTyVarSet

deCanonicalise :: CanonicalCt -> FlavoredEvVar

mkFrozenError :: CtFlavor -> EvVar -> CanonicalCt

isWanted :: CtFlavor -> Bool

isGiven :: CtFlavor -> Bool

isDerived :: CtFlavor -> Bool

isGivenCt :: CanonicalCt -> Bool

isWantedCt :: CanonicalCt -> Bool

isDerivedCt :: CanonicalCt -> Bool

pprFlavorArising :: CtFlavor -> SDoc

isFlexiTcsTv :: TyVar -> Bool

canRewrite :: CtFlavor -> CtFlavor -> Bool

canSolve :: CtFlavor -> CtFlavor -> Bool

combineCtLoc :: CtFlavor -> CtFlavor -> WantedLoc

mkGivenFlavor :: CtFlavor -> SkolemInfo -> CtFlavor

mkWantedFlavor :: CtFlavor -> CtFlavor

getWantedLoc :: CanonicalCt -> WantedLoc

data TcS a

Instances

Monad TcS |
Functor TcS |

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

failTcS :: SDoc -> TcS a

panicTcS :: SDoc -> TcS a

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

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

bumpStepCountTcS :: TcS ()

tryTcS :: TcS a -> TcS a

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

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

wrapErrTcS :: TcM a -> TcS a

wrapWarnTcS :: TcM a -> TcS a

data SimplContext

Constructors

SimplInfer |
SimplRuleLhs |
SimplInteractive |
SimplCheck |

Instances

Eq SimplContext |
Outputable SimplContext |

isInteractive :: SimplContext -> Bool

simplEqsOnly :: SimplContext -> Bool

performDefaulting :: SimplContext -> Bool

newEvVar :: TcPredType -> TcS EvVar

newCoVar :: TcType -> TcType -> TcS EvVar

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

newDerivedId :: TcPredType -> TcS EvVar

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

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

newKindConstraint :: TcTyVar -> Kind -> TcS CoVar

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

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

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

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

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

getInstEnvs :: TcS (InstEnv, InstEnv)

getFamInstEnvs :: TcS (FamInstEnv, FamInstEnv)

getTopEnv :: TcS HscEnv

getGblEnv :: TcS TcGblEnv

getTcEvBinds :: TcS EvBindsVar

getUntouchables :: TcS TcsUntouchables

getTcEvBindsBag :: TcS EvBindMap

getTcSContext :: TcS SimplContext

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

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

newFlattenSkolemTy :: TcType -> TcS TcType

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

instDFunConstraints :: TcThetaType -> TcS [EvVar]

newFlexiTcSTy :: Kind -> TcS TcType

instFlexiTcS :: TyVar -> TcS TcTyVar

compatKind :: Kind -> Kind -> Bool

type TcsUntouchables = (Untouchables, TcTyVarSet)

isTouchableMetaTyVar :: TcTyVar -> TcS Bool

isTouchableMetaTyVar_InRange :: TcsUntouchables -> TcTyVar -> Bool

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

getDynFlags :: TcS DynFlags

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

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

data MatchInstResult mi

Constructors

MatchInstNo |
MatchInstSingle mi |
MatchInstMany |

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

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

pprEq :: TcType -> TcType -> SDoc