Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data HsWrapper
- (<.>) :: HsWrapper -> HsWrapper -> HsWrapper
- mkWpTyApps :: [Type] -> HsWrapper
- mkWpEvApps :: [EvTerm] -> HsWrapper
- mkWpEvVarApps :: [EvVar] -> HsWrapper
- mkWpTyLams :: [TyVar] -> HsWrapper
- mkWpLams :: [Var] -> HsWrapper
- mkWpLet :: TcEvBinds -> HsWrapper
- mkWpCastN :: TcCoercionN -> HsWrapper
- mkWpCastR :: TcCoercionR -> HsWrapper
- collectHsWrapBinders :: HsWrapper -> ([Var], HsWrapper)
- mkWpFun :: HsWrapper -> HsWrapper -> Scaled TcType -> TcType -> SDoc -> HsWrapper
- idHsWrapper :: HsWrapper
- isIdHsWrapper :: HsWrapper -> Bool
- pprHsWrapper :: HsWrapper -> (Bool -> SDoc) -> SDoc
- hsWrapDictBinders :: HsWrapper -> Bag DictId
- data TcEvBinds
- = TcEvBinds EvBindsVar
- | EvBinds (Bag EvBind)
- data EvBindsVar
- newtype EvBindMap = EvBindMap {}
- emptyEvBindMap :: EvBindMap
- extendEvBinds :: EvBindMap -> EvBind -> EvBindMap
- lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind
- evBindMapBinds :: EvBindMap -> Bag EvBind
- foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a
- nonDetStrictFoldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a
- filterEvBindMap :: (EvBind -> Bool) -> EvBindMap -> EvBindMap
- isEmptyEvBindMap :: EvBindMap -> Bool
- evBindMapToVarSet :: EvBindMap -> VarSet
- varSetMinusEvBindMap :: VarSet -> EvBindMap -> VarSet
- data EvBind = EvBind {}
- emptyTcEvBinds :: TcEvBinds
- isEmptyTcEvBinds :: TcEvBinds -> Bool
- mkGivenEvBind :: EvVar -> EvTerm -> EvBind
- mkWantedEvBind :: EvVar -> EvTerm -> EvBind
- evBindVar :: EvBind -> EvVar
- isCoEvBindsVar :: EvBindsVar -> Bool
- data EvTerm
- type EvExpr = CoreExpr
- evId :: EvId -> EvExpr
- evCoercion :: TcCoercion -> EvTerm
- evCast :: EvExpr -> TcCoercion -> EvTerm
- evDFunApp :: DFunId -> [Type] -> [EvExpr] -> EvTerm
- evDataConApp :: DataCon -> [Type] -> [EvExpr] -> EvTerm
- evSelector :: Id -> [Type] -> [EvExpr] -> EvExpr
- mkEvCast :: EvExpr -> TcCoercion -> EvTerm
- evVarsOfTerm :: EvTerm -> VarSet
- mkEvScSelectors :: Class -> [TcType] -> [(TcPredType, EvExpr)]
- evTypeable :: Type -> EvTypeable -> EvTerm
- findNeededEvVars :: EvBindMap -> VarSet -> VarSet
- evTermCoercion :: EvTerm -> TcCoercion
- evTermCoercion_maybe :: EvTerm -> Maybe TcCoercion
- data EvCallStack
- data EvTypeable
- type TcCoercion = Coercion
- type TcCoercionR = CoercionR
- type TcCoercionN = CoercionN
- type TcCoercionP = CoercionP
- data CoercionHole
- type TcMCoercion = MCoercion
- data Role
- data LeftOrRight
- pickLR :: LeftOrRight -> (a, a) -> a
- mkTcReflCo :: Role -> TcType -> TcCoercion
- mkTcNomReflCo :: TcType -> TcCoercionN
- mkTcRepReflCo :: TcType -> TcCoercionR
- mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion
- mkTcAppCo :: TcCoercion -> TcCoercionN -> TcCoercion
- mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion -> TcCoercion
- mkTcAxInstCo :: Role -> CoAxiom br -> BranchIndex -> [TcType] -> [TcCoercion] -> TcCoercion
- mkTcUnbranchedAxInstCo :: CoAxiom Unbranched -> [TcType] -> [TcCoercion] -> TcCoercionR
- mkTcForAllCo :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcForAllCos :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion
- mkTcSymCo :: TcCoercion -> TcCoercion
- mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion
- mkTcNthCo :: Role -> Int -> TcCoercion -> TcCoercion
- mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion
- mkTcSubCo :: TcCoercionN -> TcCoercionR
- maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion
- tcDowngradeRole :: Role -> Role -> TcCoercion -> TcCoercion
- mkTcAxiomRuleCo :: CoAxiomRule -> [TcCoercion] -> TcCoercionR
- mkTcGReflRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion
- mkTcGReflLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion
- mkTcPhantomCo :: TcCoercionN -> TcType -> TcType -> TcCoercionP
- mkTcCoherenceLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcCoherenceRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcKindCo :: TcCoercion -> TcCoercionN
- tcCoercionKind :: TcCoercion -> Pair TcType
- mkTcCoVarCo :: CoVar -> TcCoercion
- mkTcFamilyTyConAppCo :: TyCon -> [TcCoercionN] -> TcCoercionN
- isTcReflCo :: TcCoercion -> Bool
- isTcReflexiveCo :: TcCoercion -> Bool
- tcCoercionRole :: TcCoercion -> Role
- unwrapIP :: Type -> CoercionR
- wrapIP :: Type -> CoercionR
- data QuoteWrapper = QuoteWrapper EvVar Type
- applyQuoteWrapper :: QuoteWrapper -> HsWrapper
- quoteWrapperTyVarTy :: QuoteWrapper -> Type
HsWrapper
Instances
Data HsWrapper # | |
Defined in GHC.Tc.Types.Evidence 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 # | |
mkWpTyApps :: [Type] -> HsWrapper Source #
mkWpEvApps :: [EvTerm] -> HsWrapper Source #
mkWpEvVarApps :: [EvVar] -> HsWrapper Source #
mkWpTyLams :: [TyVar] -> HsWrapper Source #
mkWpCastN :: TcCoercionN -> HsWrapper Source #
mkWpCastR :: TcCoercionR -> HsWrapper Source #
isIdHsWrapper :: HsWrapper -> Bool Source #
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
Instances
Data TcEvBinds # | |
Defined in GHC.Tc.Types.Evidence 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 # | |
data EvBindsVar Source #
Instances
Outputable EvBindsVar # | |
Defined in GHC.Tc.Types.Evidence | |
Uniquable EvBindsVar # | |
Defined in GHC.Tc.Types.Evidence getUnique :: EvBindsVar -> Unique Source # |
foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a Source #
nonDetStrictFoldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a Source #
isEmptyEvBindMap :: EvBindMap -> Bool Source #
evBindMapToVarSet :: EvBindMap -> VarSet Source #
isEmptyTcEvBinds :: TcEvBinds -> Bool Source #
isCoEvBindsVar :: EvBindsVar -> Bool Source #
EvTerm (already a CoreExpr)
Instances
Data EvTerm # | |
Defined in GHC.Tc.Types.Evidence 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 # | |
evCoercion :: TcCoercion -> EvTerm Source #
evVarsOfTerm :: EvTerm -> VarSet Source #
mkEvScSelectors :: Class -> [TcType] -> [(TcPredType, EvExpr)] Source #
evTypeable :: Type -> EvTypeable -> EvTerm Source #
evTermCoercion :: EvTerm -> TcCoercion Source #
data EvCallStack Source #
Evidence for CallStack
implicit parameters.
EvCsEmpty | |
EvCsPushCall Name RealSrcSpan EvExpr |
|
Instances
Data EvCallStack # | |
Defined in GHC.Tc.Types.Evidence 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 # | |
Defined in GHC.Tc.Types.Evidence |
data EvTypeable Source #
Instructions on how to make a Typeable
dictionary.
See Note [Typeable evidence terms]
EvTypeableTyCon TyCon [EvTerm] | Dictionary for |
EvTypeableTyApp EvTerm EvTerm | Dictionary for |
EvTypeableTrFun EvTerm EvTerm EvTerm | Dictionary for |
EvTypeableTyLit EvTerm | Dictionary for a type literal,
e.g. |
Instances
Data EvTypeable # | |
Defined in GHC.Tc.Types.Evidence 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 # | |
Defined in GHC.Tc.Types.Evidence |
TcCoercion
type TcCoercion = Coercion Source #
type TcCoercionR = CoercionR Source #
type TcCoercionN = CoercionN Source #
type TcCoercionP = CoercionP Source #
data CoercionHole Source #
A coercion to be filled in by the type-checker. See Note [Coercion holes]
Instances
Data CoercionHole # | |
Defined in GHC.Core.TyCo.Rep 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 # | |
Defined in GHC.Core.TyCo.Rep |
type TcMCoercion = MCoercion Source #
Instances
Eq Role # | |
Data Role # | |
Defined in GHC.Core.Coercion.Axiom 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 # | |
Ord Role # | |
Outputable Role # | |
Binary Role # | |
data LeftOrRight Source #
Instances
Eq LeftOrRight # | |
Defined in GHC.Types.Basic (==) :: LeftOrRight -> LeftOrRight -> Bool # (/=) :: LeftOrRight -> LeftOrRight -> Bool # | |
Data LeftOrRight # | |
Defined in GHC.Types.Basic 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 # | |
Outputable LeftOrRight # | |
Defined in GHC.Types.Basic | |
Binary LeftOrRight # | |
Defined in GHC.Utils.Binary put_ :: BinHandle -> LeftOrRight -> IO () Source # put :: BinHandle -> LeftOrRight -> IO (Bin LeftOrRight) Source # |
pickLR :: LeftOrRight -> (a, a) -> a Source #
mkTcReflCo :: Role -> TcType -> TcCoercion Source #
mkTcNomReflCo :: TcType -> TcCoercionN Source #
mkTcRepReflCo :: TcType -> TcCoercionR Source #
mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion Source #
mkTcAppCo :: TcCoercion -> TcCoercionN -> TcCoercion Source #
mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion -> TcCoercion Source #
mkTcAxInstCo :: Role -> CoAxiom br -> BranchIndex -> [TcType] -> [TcCoercion] -> TcCoercion Source #
mkTcUnbranchedAxInstCo :: CoAxiom Unbranched -> [TcType] -> [TcCoercion] -> TcCoercionR Source #
mkTcForAllCo :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion Source #
mkTcForAllCos :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion Source #
mkTcSymCo :: TcCoercion -> TcCoercion Source #
mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion Source #
mkTcNthCo :: Role -> Int -> TcCoercion -> TcCoercion Source #
mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion Source #
mkTcSubCo :: TcCoercionN -> TcCoercionR 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.
tcDowngradeRole :: Role -> Role -> TcCoercion -> TcCoercion Source #
mkTcAxiomRuleCo :: CoAxiomRule -> [TcCoercion] -> TcCoercionR Source #
mkTcGReflRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion Source #
mkTcGReflLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion Source #
mkTcPhantomCo :: TcCoercionN -> TcType -> TcType -> TcCoercionP Source #
mkTcCoherenceLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion Source #
mkTcCoherenceRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion Source #
mkTcKindCo :: TcCoercion -> TcCoercionN Source #
tcCoercionKind :: TcCoercion -> Pair TcType Source #
mkTcCoVarCo :: CoVar -> TcCoercion Source #
mkTcFamilyTyConAppCo :: TyCon -> [TcCoercionN] -> TcCoercionN Source #
isTcReflCo :: TcCoercion -> Bool Source #
isTcReflexiveCo :: TcCoercion -> Bool Source #
This version does a slow check, calculating the related types and seeing if they are equal.
tcCoercionRole :: TcCoercion -> Role Source #
unwrapIP :: Type -> CoercionR Source #
Create a Expr
that unwraps an implicit-parameter or
overloaded-label dictionary to expose the underlying value. We
expect the Expr
to have the form `IP sym ty` or `IsLabel sym ty`,
and return a Expr
`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.
QuoteWrapper
data QuoteWrapper Source #
Instances
Data QuoteWrapper # | |
Defined in GHC.Tc.Types.Evidence 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.