ghc-8.6.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

TcSMonad

Synopsis

Documentation

data WorkList Source #

Constructors

WL 

Fields

Instances
Outputable WorkList # 
Instance details

Defined in TcSMonad

data TcS a Source #

Instances
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 #

fail :: String -> 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

HasDynFlags TcS # 
Instance details

Defined in TcSMonad

MonadThings TcS # 
Instance details

Defined in TcSMonad

runTcSDeriveds :: TcS a -> TcM a Source #

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.

runTcSEqualities :: TcS a -> TcM a Source #

This can deal only with equality constraints.

nestTcS :: TcS a -> TcS a Source #

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

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

data QCInst Source #

Constructors

QCI 
Instances
Outputable QCInst # 
Instance details

Defined in TcRnTypes

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

Make a new equality CtEvidence

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

Emit a new Wanted equality into the work-list

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

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

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

Equalities only

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

Good for both equalities and non-equalities

checkReductionDepth Source #

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 Source #

Instances
Outputable InertSet # 
Instance details

Defined in TcSMonad

data InertCans Source #

Constructors

IC 

Fields

Instances
Outputable InertCans # 
Instance details

Defined in TcSMonad

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

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 Source #

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

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

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

type DictMap a = TcAppMap a Source #

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

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 Source #

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

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

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

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

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 Source #

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

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

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

tcInstType Source #

Arguments

:: ([TyVar] -> TcM (TCvSubst, [TcTyVar]))

How to instantiate the type variables

-> Id

Type to instantiate

-> TcS ([(Name, TcTyVar)], TcThetaType, TcType)

Result (type vars, preds (incl equalities), rho)

data TcLevel Source #

Instances
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

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

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