ghc-8.8.3: The GHC API
Safe HaskellNone
LanguageHaskell2010

TcSMonad

Synopsis

Documentation

data WorkList #

Constructors

WL 

Fields

Instances

Instances details
Outputable WorkList # 
Instance details

Defined in TcSMonad

data TcS a #

Instances

Instances details
Monad TcS # 
Instance details

Defined in TcSMonad

Methods

(>>=) :: TcS a -> (a -> TcS b) -> TcS b Source #

(>>) :: TcS a -> TcS b -> TcS b Source #

return :: a -> TcS a Source #

Functor TcS # 
Instance details

Defined in TcSMonad

Methods

fmap :: (a -> b) -> TcS a -> TcS b Source #

(<$) :: a -> TcS b -> TcS a Source #

MonadFail TcS # 
Instance details

Defined in TcSMonad

Methods

fail :: String -> TcS a Source #

Applicative TcS # 
Instance details

Defined in TcSMonad

Methods

pure :: a -> TcS a Source #

(<*>) :: TcS (a -> b) -> TcS a -> TcS b Source #

liftA2 :: (a -> b -> c) -> TcS a -> TcS b -> TcS c Source #

(*>) :: TcS a -> TcS b -> TcS b Source #

(<*) :: TcS a -> TcS b -> TcS a Source #

MonadUnique TcS # 
Instance details

Defined in TcSMonad

HasModule TcS # 
Instance details

Defined in TcSMonad

Methods

getModule :: TcS Module #

HasDynFlags TcS # 
Instance details

Defined in TcSMonad

MonadThings TcS # 
Instance details

Defined in TcSMonad

runTcS :: TcS a -> TcM (a, EvBindMap) #

runTcSDeriveds :: TcS a -> TcM a #

This variant of runTcS will keep solving, even when only Deriveds are left around. It also doesn't return any evidence, as callers won't need it.

failTcS :: SDoc -> TcS a #

addErrTcS :: SDoc -> TcS () #

runTcSEqualities :: TcS a -> TcM a #

This can deal only with equality constraints.

nestTcS :: TcS a -> TcS a #

checkConstraintsTcS :: SkolemInfo -> [TcTyVar] -> [EvVar] -> TcS (result, Cts) -> TcS (result, TcEvBinds) #

checkTvConstraintsTcS :: SkolemInfo -> [TcTyVar] -> TcS (result, Cts) -> TcS result #

data ClsInstResult #

Instances

Instances details
Outputable ClsInstResult # 
Instance details

Defined in ClsInst

data QCInst #

Constructors

QCI 

Instances

Instances details
Outputable QCInst # 
Instance details

Defined in TcRnTypes

Methods

ppr :: QCInst -> SDoc #

pprPrec :: Rational -> QCInst -> SDoc #

panicTcS :: SDoc -> TcS a #

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

csTraceTcS :: SDoc -> TcS () #

wrapErrTcS :: TcM a -> TcS a #

wrapWarnTcS :: TcM a -> TcS a #

data MaybeNew #

Constructors

Fresh CtEvidence 
Cached EvExpr 

newWantedEq :: CtLoc -> Role -> TcType -> TcType -> TcS (CtEvidence, Coercion) #

Make a new equality CtEvidence

emitNewWantedEq :: CtLoc -> Role -> TcType -> TcType -> TcS Coercion #

Emit a new Wanted equality into the work-list

newBoundEvVarId :: TcPredType -> EvTerm -> TcS EvVar #

Make a new Id of the given type, bound (in the monad's EvBinds) to the given term

setWantedEq :: TcEvDest -> Coercion -> TcS () #

Equalities only

setWantedEvTerm :: TcEvDest -> EvTerm -> TcS () #

Good for both equalities and non-equalities

checkReductionDepth #

Arguments

:: CtLoc 
-> TcType

type being reduced

-> TcS () 

Checks if the depth of the given location is too much. Fails if it's too big, with an appropriate error message.

data InertSet #

Instances

Instances details
Outputable InertSet # 
Instance details

Defined in TcSMonad

data InertCans #

Constructors

IC 

Fields

Instances

Instances details
Outputable InertCans # 
Instance details

Defined in TcSMonad

updInertIrreds :: (Cts -> Cts) -> TcS () #

matchableGivens :: CtLoc -> PredType -> InertSet -> Cts #

Returns Given constraints that might, potentially, match the given pred. This is used when checking to see if a Given might overlap with an instance. See Note [Instance and Given overlap] in TcInteract.

removeInertCts :: [Ct] -> InertCans -> InertCans #

Remove inert constraints from the InertCans, for use when a typechecker plugin wishes to discard a given.

addInertCan :: Ct -> TcS () #

insertFunEq :: FunEqMap a -> TyCon -> [Type] -> a -> FunEqMap a #

emitWork :: [Ct] -> TcS () #

type DictMap a = TcAppMap a #

lookupInertDict :: InertCans -> CtLoc -> Class -> [Type] -> Maybe CtEvidence #

Look up a dictionary inert. NB: the returned CtEvidence might not match the input exactly. Note [Use loose types in inert set].

addDict :: DictMap a -> Class -> [Type] -> a -> DictMap a #

delDict :: DictMap a -> Class -> [Type] -> DictMap a #

foldDicts :: (a -> b -> b) -> DictMap a -> b -> b #

findDict :: DictMap a -> CtLoc -> Class -> [Type] -> Maybe a #

type EqualCtList = [Ct] #

foldTyEqs :: (Ct -> b -> b) -> InertEqs -> b -> b #

lookupSolvedDict :: InertSet -> CtLoc -> Class -> [Type] -> Maybe CtEvidence #

Look up a solved inert. NB: the returned CtEvidence might not match the input exactly. See Note [Use loose types in inert set].

foldIrreds :: (Ct -> b -> b) -> Cts -> b -> b #

updInertFunEqs :: (FunEqMap Ct -> FunEqMap Ct) -> TcS () #

findFunEq :: FunEqMap a -> TyCon -> [Type] -> Maybe a #

findFunEqsByTyCon :: FunEqMap a -> TyCon -> [a] #

data TcLevel #

Instances

Instances details
Eq TcLevel # 
Instance details

Defined in TcType

Methods

(==) :: TcLevel -> TcLevel -> Bool #

(/=) :: TcLevel -> TcLevel -> Bool #

Ord TcLevel # 
Instance details

Defined in TcType

Outputable TcLevel # 
Instance details

Defined in TcType

Methods

ppr :: TcLevel -> SDoc #

pprPrec :: Rational -> TcLevel -> SDoc #

newTcRef :: a -> TcS (TcRef a) #

readTcRef :: TcRef a -> TcS a #

writeTcRef :: TcRef a -> a -> TcS () #

updTcRef :: TcRef a -> (a -> a) -> TcS () #