ghc-9.6.0.20230128: 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 #

noMatchableGivenDicts :: InertSet -> CtLoc -> Class -> [TcType] -> Bool Source #

Returns True iff there are no Given constraints that might, potentially, match the given class consraint. 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

prohibitedSuperClassSolve Source #

Arguments

:: CtLoc

is it loopy to use this one ...

-> CtLoc

... to solve this one?

-> Bool

True ==> don't solve it See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance, (sc2)

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.