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

GHC.Tc.Types.Evidence

Synopsis

HsWrapper

data HsWrapper Source #

Instances

Instances details
Data HsWrapper Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWrapper -> c HsWrapper Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsWrapper Source #

toConstr :: HsWrapper -> Constr Source #

dataTypeOf :: HsWrapper -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsWrapper) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsWrapper) Source #

gmapT :: (forall b. Data b => b -> b) -> HsWrapper -> HsWrapper Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWrapper -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWrapper -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> HsWrapper -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWrapper -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper Source #

Outputable HsWrapper Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

hsWrapDictBinders :: HsWrapper -> Bag DictId Source #

Identifies the lambda-bound dictionaries of an HsWrapper. This is used (only) to allow the pattern-match overlap checker to know what Given dictionaries are in scope.

We specifically do not collect dictionaries bound in a WpLet. These are either superclasses of lambda-bound ones, or (extremely numerous) results of binding Wanted dictionaries. We definitely don't want all those cluttering up the Given dictionaries for pattern-match overlap checking!

Evidence bindings

data TcEvBinds Source #

Instances

Instances details
Data TcEvBinds Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcEvBinds -> c TcEvBinds Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcEvBinds Source #

toConstr :: TcEvBinds -> Constr Source #

dataTypeOf :: TcEvBinds -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcEvBinds) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcEvBinds) Source #

gmapT :: (forall b. Data b => b -> b) -> TcEvBinds -> TcEvBinds Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcEvBinds -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcEvBinds -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> TcEvBinds -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TcEvBinds -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds Source #

Outputable TcEvBinds Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

newtype EvBindMap Source #

Constructors

EvBindMap 

Instances

Instances details
Outputable EvBindMap Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a Source #

nonDetStrictFoldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a Source #

data EvBind Source #

Constructors

EvBind 

Instances

Instances details
Outputable EvBind Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

EvTerm (already a CoreExpr)

data EvTerm Source #

Instances

Instances details
Data EvTerm Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvTerm -> c EvTerm Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvTerm Source #

toConstr :: EvTerm -> Constr Source #

dataTypeOf :: EvTerm -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvTerm) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvTerm) Source #

gmapT :: (forall b. Data b => b -> b) -> EvTerm -> EvTerm Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvTerm -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvTerm -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> EvTerm -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EvTerm -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm Source #

Outputable EvTerm Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

evId :: EvId -> EvExpr Source #

Any sort of evidence Id, including coercions

data EvCallStack Source #

Evidence for CallStack implicit parameters.

Constructors

EvCsEmpty 
EvCsPushCall Name RealSrcSpan EvExpr

EvCsPushCall name loc stk represents a call to name, occurring at loc, in a calling context stk.

Instances

Instances details
Data EvCallStack Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvCallStack -> c EvCallStack Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvCallStack Source #

toConstr :: EvCallStack -> Constr Source #

dataTypeOf :: EvCallStack -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvCallStack) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvCallStack) Source #

gmapT :: (forall b. Data b => b -> b) -> EvCallStack -> EvCallStack Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvCallStack -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvCallStack -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> EvCallStack -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EvCallStack -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack Source #

Outputable EvCallStack Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

data EvTypeable Source #

Instructions on how to make a Typeable dictionary. See Note [Typeable evidence terms]

Constructors

EvTypeableTyCon TyCon [EvTerm]

Dictionary for Typeable T where T is a type constructor with all of its kind variables saturated. The [EvTerm] is Typeable evidence for the applied kinds..

EvTypeableTyApp EvTerm EvTerm

Dictionary for Typeable (s t), given a dictionaries for s and t.

EvTypeableTrFun EvTerm EvTerm EvTerm

Dictionary for Typeable (s # w -> t), given a dictionaries for w, s, and t.

EvTypeableTyLit EvTerm

Dictionary for a type literal, e.g. Typeable "foo" or Typeable 3 The EvTerm is evidence of, e.g., KnownNat 3 (see #10348)

Instances

Instances details
Data EvTypeable Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvTypeable -> c EvTypeable Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvTypeable Source #

toConstr :: EvTypeable -> Constr Source #

dataTypeOf :: EvTypeable -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvTypeable) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvTypeable) Source #

gmapT :: (forall b. Data b => b -> b) -> EvTypeable -> EvTypeable Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvTypeable -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvTypeable -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> EvTypeable -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EvTypeable -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable Source #

Outputable EvTypeable Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

TcCoercion

data CoercionHole Source #

A coercion to be filled in by the type-checker. See Note [Coercion holes]

Instances

Instances details
Data CoercionHole Source # 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoercionHole -> c CoercionHole Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoercionHole Source #

toConstr :: CoercionHole -> Constr Source #

dataTypeOf :: CoercionHole -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CoercionHole) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoercionHole) Source #

gmapT :: (forall b. Data b => b -> b) -> CoercionHole -> CoercionHole Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> CoercionHole -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CoercionHole -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole Source #

Outputable CoercionHole Source # 
Instance details

Defined in GHC.Core.TyCo.Rep

data Role Source #

Instances

Instances details
Data Role Source # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role Source #

toConstr :: Role -> Constr Source #

dataTypeOf :: Role -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) Source #

gmapT :: (forall b. Data b => b -> b) -> Role -> Role Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role Source #

Binary Role Source # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Outputable Role Source # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Eq Role Source # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

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

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

Ord Role Source # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

compare :: Role -> Role -> Ordering #

(<) :: Role -> Role -> Bool #

(<=) :: Role -> Role -> Bool #

(>) :: Role -> Role -> Bool #

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

max :: Role -> Role -> Role #

min :: Role -> Role -> Role #

data LeftOrRight Source #

Constructors

CLeft 
CRight 

Instances

Instances details
Data LeftOrRight Source # 
Instance details

Defined in GHC.Types.Basic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LeftOrRight -> c LeftOrRight Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LeftOrRight Source #

toConstr :: LeftOrRight -> Constr Source #

dataTypeOf :: LeftOrRight -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LeftOrRight) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LeftOrRight) Source #

gmapT :: (forall b. Data b => b -> b) -> LeftOrRight -> LeftOrRight Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> LeftOrRight -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LeftOrRight -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight Source #

Binary LeftOrRight Source # 
Instance details

Defined in GHC.Utils.Binary

Outputable LeftOrRight Source # 
Instance details

Defined in GHC.Types.Basic

Eq LeftOrRight Source # 
Instance details

Defined in GHC.Types.Basic

pickLR :: LeftOrRight -> (a, a) -> a Source #

maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion Source #

If the EqRel is ReprEq, makes a SubCo; otherwise, does nothing. Note that the input coercion should always be nominal.

isTcReflexiveCo :: TcCoercion -> Bool Source #

This version does a slow check, calculating the related types and seeing if they are equal.

unwrapIP :: Type -> CoercionR Source #

Create a Coercion that unwraps an implicit-parameter or overloaded-label dictionary to expose the underlying value. We expect the Type to have the form `IP sym ty` or `IsLabel sym ty`, and return a Coercion `co :: IP sym ty ~ ty` or `co :: IsLabel sym ty ~ Proxy# sym -> ty`. See also Note [Type-checking overloaded labels] in GHC.Tc.Gen.Expr.

wrapIP :: Type -> CoercionR Source #

Create a Coercion that wraps a value in an implicit-parameter dictionary. See unwrapIP.

QuoteWrapper

data QuoteWrapper Source #

Constructors

QuoteWrapper EvVar Type 

Instances

Instances details
Data QuoteWrapper Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QuoteWrapper -> c QuoteWrapper Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c QuoteWrapper Source #

toConstr :: QuoteWrapper -> Constr Source #

dataTypeOf :: QuoteWrapper -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c QuoteWrapper) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c QuoteWrapper) Source #

gmapT :: (forall b. Data b => b -> b) -> QuoteWrapper -> QuoteWrapper Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QuoteWrapper -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QuoteWrapper -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> QuoteWrapper -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> QuoteWrapper -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> QuoteWrapper -> m QuoteWrapper Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QuoteWrapper -> m QuoteWrapper Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QuoteWrapper -> m QuoteWrapper Source #

applyQuoteWrapper :: QuoteWrapper -> HsWrapper Source #

Convert the QuoteWrapper into a normal HsWrapper which can be used to apply its contents.