Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data HsWrapper
- (<.>) :: HsWrapper -> HsWrapper -> HsWrapper
- mkWpTyApps :: [Type] -> HsWrapper
- mkWpEvApps :: [EvTerm] -> HsWrapper
- mkWpEvVarApps :: [EvVar] -> HsWrapper
- mkWpTyLams :: [TyVar] -> HsWrapper
- mkWpEvLams :: [Var] -> HsWrapper
- mkWpLet :: TcEvBinds -> HsWrapper
- mkWpFun :: HsWrapper -> HsWrapper -> Scaled TcTypeFRR -> TcType -> HsWrapper
- mkWpCastN :: TcCoercionN -> HsWrapper
- mkWpCastR :: TcCoercionR -> HsWrapper
- mkWpEta :: [Id] -> HsWrapper -> HsWrapper
- collectHsWrapBinders :: HsWrapper -> ([Var], 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
- data HoleExprRef = HER (IORef EvTerm) TcType Unique
- type TcCoercion = Coercion
- type TcCoercionR = CoercionR
- type TcCoercionN = CoercionN
- type TcCoercionP = CoercionP
- data CoercionHole
- type TcMCoercion = MCoercion
- type TcMCoercionN = MCoercionN
- type TcMCoercionR = MCoercionR
- data Role
- data LeftOrRight
- pickLR :: LeftOrRight -> (a, a) -> a
- maybeSymCo :: SwapFlag -> TcCoercion -> TcCoercion
- unwrapIP :: Type -> CoercionR
- wrapIP :: Type -> CoercionR
- data QuoteWrapper = QuoteWrapper EvVar Type
- applyQuoteWrapper :: QuoteWrapper -> HsWrapper
- quoteWrapperTyVarTy :: QuoteWrapper -> Type
HsWrapper
Instances
Data HsWrapper Source # | |
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 # | |
Monoid HsWrapper Source # | |
Semigroup HsWrapper Source # | The Semigroup instance is a bit fishy, since (a <> b) <> c ?= a <> (b <> c) >(a `WpCompose` b) `WpCompose` c /= @ a `WpCompose` (b `WpCompose` c) However these two associations are are "semantically equal" in the sense
that they produce equal functions when passed to
|
Outputable HsWrapper Source # | |
mkWpTyApps :: [Type] -> HsWrapper Source #
mkWpEvApps :: [EvTerm] -> HsWrapper Source #
mkWpEvVarApps :: [EvVar] -> HsWrapper Source #
mkWpTyLams :: [TyVar] -> HsWrapper Source #
mkWpEvLams :: [Var] -> 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 Source # | |
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 Source # | |
data EvBindsVar Source #
Instances
Uniquable EvBindsVar Source # | |
Defined in GHC.Tc.Types.Evidence getUnique :: EvBindsVar -> Unique Source # | |
Outputable EvBindsVar Source # | |
Defined in GHC.Tc.Types.Evidence ppr :: EvBindsVar -> SDoc Source # |
Instances
foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a Source #
nonDetStrictFoldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a Source #
isEmptyEvBindMap :: EvBindMap -> Bool Source #
evBindMapToVarSet :: EvBindMap -> VarSet Source #
Instances
isEmptyTcEvBinds :: TcEvBinds -> Bool Source #
isCoEvBindsVar :: EvBindsVar -> Bool Source #
EvTerm (already a CoreExpr)
Instances
Data EvTerm Source # | |
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 Source # | |
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 FastString RealSrcSpan EvExpr |
|
Instances
Data EvCallStack Source # | |
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 Source # | |
Defined in GHC.Tc.Types.Evidence ppr :: EvCallStack -> SDoc Source # |
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 Source # | |
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 Source # | |
Defined in GHC.Tc.Types.Evidence ppr :: EvTypeable -> SDoc Source # |
HoleExprRef
data HoleExprRef Source #
Where to store evidence for expression holes See Note [Holes] in GHC.Tc.Types.Constraint
Instances
Data HoleExprRef Source # | |
Defined in GHC.Tc.Types.Evidence gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HoleExprRef -> c HoleExprRef Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HoleExprRef Source # toConstr :: HoleExprRef -> Constr Source # dataTypeOf :: HoleExprRef -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HoleExprRef) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HoleExprRef) Source # gmapT :: (forall b. Data b => b -> b) -> HoleExprRef -> HoleExprRef Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HoleExprRef -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HoleExprRef -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HoleExprRef -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HoleExprRef -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HoleExprRef -> m HoleExprRef Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HoleExprRef -> m HoleExprRef Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HoleExprRef -> m HoleExprRef Source # | |
Outputable HoleExprRef Source # | |
Defined in GHC.Tc.Types.Evidence ppr :: HoleExprRef -> SDoc Source # |
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 Source # | |
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 # | |
Uniquable CoercionHole Source # | |
Defined in GHC.Core.TyCo.Rep getUnique :: CoercionHole -> Unique Source # | |
Outputable CoercionHole Source # | |
Defined in GHC.Core.TyCo.Rep ppr :: CoercionHole -> SDoc Source # |
type TcMCoercion = MCoercion Source #
type TcMCoercionN = MCoercionN Source #
type TcMCoercionR = MCoercionR Source #
See Note [Roles] in GHC.Core.Coercion
Order of constructors matters: the Ord instance coincides with the *super*typing relation on roles.
Instances
Data Role Source # | |
Defined in Language.Haskell.Syntax.Basic 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 # | |
Outputable Role Source # | |
Eq Role Source # | |
Ord Role Source # | |
type Anno (Maybe Role) Source # | |
type Anno (Maybe Role) Source # | |
data LeftOrRight Source #
Instances
pickLR :: LeftOrRight -> (a, a) -> a Source #
maybeSymCo :: SwapFlag -> TcCoercion -> TcCoercion Source #
QuoteWrapper
data QuoteWrapper Source #
Instances
Data QuoteWrapper Source # | |
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.