ghc-9.4.0.20220721: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Tc.Solver.InertSet

Synopsis

The work list

data WorkList Source #

Constructors

WL 

Fields

Instances

Instances details
Outputable WorkList Source # 
Instance details

Defined in GHC.Tc.Solver.InertSet

Methods

ppr :: WorkList -> SDoc Source #

The inert set

data InertCans Source #

Constructors

IC 

Fields

Instances

Instances details
Outputable InertCans Source # 
Instance details

Defined in GHC.Tc.Solver.InertSet

Methods

ppr :: InertCans -> SDoc Source #

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 GHC.Tc.Solver.Interact

Inert equalities

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

Kick-out

Cycle breaker vars

type CycleBreakerVarStack Source #

Arguments

 = NonEmpty [(TcTyVar, TcType)]

a stack of (CycleBreakerTv, original family applications) lists first element in the stack corresponds to current implication; later elements correspond to outer implications used to undo the cycle-breaking needed to handle Note [Type equality cycles] in GHC.Tc.Solver.Canonical Why store the outer implications? For the use in mightEqualLater (only)

pushCycleBreakerVarStack :: CycleBreakerVarStack -> CycleBreakerVarStack Source #

Push a fresh environment onto the cycle-breaker var stack. Useful when entering a nested implication.

insertCycleBreakerBinding Source #

Arguments

:: TcTyVar

cbv, must be a CycleBreakerTv

-> TcType

cbv's expansion

-> CycleBreakerVarStack 
-> CycleBreakerVarStack 

Add a new cycle-breaker binding to the top environment on the stack.

forAllCycleBreakerBindings_ :: Monad m => CycleBreakerVarStack -> (TcTyVar -> TcType -> m ()) -> m () Source #

Perform a monadic operation on all pairs in the top environment in the stack.