Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type IfExtName = Name
- type IfLclName = FastString
- data IfaceType
- = IfaceFreeTyVar TyVar
- | IfaceTyVar IfLclName
- | IfaceLitTy IfaceTyLit
- | IfaceAppTy IfaceType IfaceAppArgs
- | IfaceFunTy IfaceType IfaceType
- | IfaceDFunTy IfaceType IfaceType
- | IfaceForAllTy IfaceForAllBndr IfaceType
- | IfaceTyConApp IfaceTyCon IfaceAppArgs
- | IfaceCastTy IfaceType IfaceCoercion
- | IfaceCoercionTy IfaceCoercion
- | IfaceTupleTy TupleSort PromotionFlag IfaceAppArgs
- type IfacePredType = IfaceType
- type IfaceKind = IfaceType
- data IfaceCoercion
- = IfaceReflCo IfaceType
- | IfaceGReflCo Role IfaceType IfaceMCoercion
- | IfaceFunCo Role IfaceCoercion IfaceCoercion
- | IfaceTyConAppCo Role IfaceTyCon [IfaceCoercion]
- | IfaceAppCo IfaceCoercion IfaceCoercion
- | IfaceForAllCo IfaceBndr IfaceCoercion IfaceCoercion
- | IfaceCoVarCo IfLclName
- | IfaceAxiomInstCo IfExtName BranchIndex [IfaceCoercion]
- | IfaceAxiomRuleCo IfLclName [IfaceCoercion]
- | IfaceUnivCo IfaceUnivCoProv Role IfaceType IfaceType
- | IfaceSymCo IfaceCoercion
- | IfaceTransCo IfaceCoercion IfaceCoercion
- | IfaceNthCo Int IfaceCoercion
- | IfaceLRCo LeftOrRight IfaceCoercion
- | IfaceInstCo IfaceCoercion IfaceCoercion
- | IfaceKindCo IfaceCoercion
- | IfaceSubCo IfaceCoercion
- | IfaceFreeCoVar CoVar
- | IfaceHoleCo CoVar
- data IfaceMCoercion
- data IfaceUnivCoProv
- data IfaceTyCon = IfaceTyCon {}
- data IfaceTyConInfo = IfaceTyConInfo {}
- data IfaceTyConSort
- data IfaceTyLit
- data IfaceAppArgs
- type IfaceContext = [IfacePredType]
- data IfaceBndr
- data IfaceOneShot
- type IfaceLamBndr = (IfaceBndr, IfaceOneShot)
- type IfaceTvBndr = (IfLclName, IfaceKind)
- type IfaceIdBndr = (IfLclName, IfaceType)
- type IfaceTyConBinder = VarBndr IfaceBndr TyConBndrVis
- type IfaceForAllBndr = VarBndr IfaceBndr ArgFlag
- data ArgFlag
- data ShowForAllFlag
- mkIfaceForAllTvBndr :: ArgFlag -> IfaceTvBndr -> IfaceForAllBndr
- ifForAllBndrVar :: IfaceForAllBndr -> IfaceBndr
- ifForAllBndrName :: IfaceForAllBndr -> IfLclName
- ifaceBndrName :: IfaceBndr -> IfLclName
- ifTyConBinderVar :: IfaceTyConBinder -> IfaceBndr
- ifTyConBinderName :: IfaceTyConBinder -> IfLclName
- isIfaceLiftedTypeKind :: IfaceKind -> Bool
- appArgsIfaceTypes :: IfaceAppArgs -> [IfaceType]
- appArgsIfaceTypesArgFlags :: IfaceAppArgs -> [(IfaceType, ArgFlag)]
- pprIfaceType :: IfaceType -> SDoc
- pprParendIfaceType :: IfaceType -> SDoc
- pprPrecIfaceType :: PprPrec -> IfaceType -> SDoc
- pprIfaceContext :: PprPrec -> [IfacePredType] -> SDoc
- pprIfaceContextArr :: [IfacePredType] -> SDoc
- pprIfaceIdBndr :: IfaceIdBndr -> SDoc
- pprIfaceLamBndr :: IfaceLamBndr -> SDoc
- pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc
- pprIfaceTyConBinders :: [IfaceTyConBinder] -> SDoc
- pprIfaceBndrs :: [IfaceBndr] -> SDoc
- pprIfaceAppArgs :: IfaceAppArgs -> SDoc
- pprParendIfaceAppArgs :: IfaceAppArgs -> SDoc
- pprIfaceForAllPart :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc
- pprIfaceForAllPartMust :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc
- pprIfaceForAll :: [IfaceForAllBndr] -> SDoc
- pprIfaceSigmaType :: ShowForAllFlag -> IfaceType -> SDoc
- pprIfaceTyLit :: IfaceTyLit -> SDoc
- pprIfaceCoercion :: IfaceCoercion -> SDoc
- pprParendIfaceCoercion :: IfaceCoercion -> SDoc
- splitIfaceSigmaTy :: IfaceType -> ([IfaceForAllBndr], [IfacePredType], IfaceType)
- pprIfaceTypeApp :: PprPrec -> IfaceTyCon -> IfaceAppArgs -> SDoc
- pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc
- pprIfaceCoTcApp :: PprPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc
- pprTyTcApp :: PprPrec -> IfaceTyCon -> IfaceAppArgs -> SDoc
- pprIfacePrefixApp :: PprPrec -> SDoc -> [SDoc] -> SDoc
- suppressIfaceInvisibles :: DynFlags -> [IfaceTyConBinder] -> [a] -> [a]
- stripIfaceInvisVars :: DynFlags -> [IfaceTyConBinder] -> [IfaceTyConBinder]
- stripInvisArgs :: DynFlags -> IfaceAppArgs -> IfaceAppArgs
- mkIfaceTySubst :: [(IfLclName, IfaceType)] -> IfaceTySubst
- substIfaceTyVar :: IfaceTySubst -> IfLclName -> IfaceType
- substIfaceAppArgs :: IfaceTySubst -> IfaceAppArgs -> IfaceAppArgs
- inDomIfaceTySubst :: IfaceTySubst -> IfaceTvBndr -> Bool
Documentation
type IfLclName = FastString Source #
A kind of universal type, used for types and kinds.
Any time a Type
is pretty-printed, it is first converted to an IfaceType
before being printed. See Note [Pretty printing via IfaceSyn] in PprTyThing
Instances
type IfacePredType = IfaceType Source #
data IfaceCoercion Source #
Instances
data IfaceMCoercion Source #
Instances
data IfaceUnivCoProv Source #
IfaceUnsafeCoerceProv | |
IfacePhantomProv IfaceCoercion | |
IfaceProofIrrelProv IfaceCoercion | |
IfacePluginProv String |
Instances
data IfaceTyCon Source #
Instances
Eq IfaceTyCon # | |
Defined in IfaceType (==) :: IfaceTyCon -> IfaceTyCon -> Bool # (/=) :: IfaceTyCon -> IfaceTyCon -> Bool # | |
Outputable IfaceTyCon # | |
Binary IfaceTyCon # | |
data IfaceTyConInfo Source #
Instances
Eq IfaceTyConInfo # | |
Defined in IfaceType (==) :: IfaceTyConInfo -> IfaceTyConInfo -> Bool # (/=) :: IfaceTyConInfo -> IfaceTyConInfo -> Bool # | |
Binary IfaceTyConInfo # | |
data IfaceTyConSort Source #
The various types of TyCons which have special, built-in syntax.
IfaceNormalTyCon | a regular tycon |
IfaceTupleTyCon !Arity !TupleSort | e.g. |
IfaceSumTyCon !Arity | e.g. |
IfaceEqualityTyCon | A heterogeneous equality TyCon (i.e. eqPrimTyCon, eqReprPrimTyCon, heqTyCon) that is actually being applied to two types of the same kind. This affects pretty-printing only: see Note [Equality predicates in IfaceType] |
Instances
Eq IfaceTyConSort # | |
Defined in IfaceType (==) :: IfaceTyConSort -> IfaceTyConSort -> Bool # (/=) :: IfaceTyConSort -> IfaceTyConSort -> Bool # | |
Binary IfaceTyConSort # | |
data IfaceTyLit Source #
Instances
Eq IfaceTyLit # | |
Defined in IfaceType (==) :: IfaceTyLit -> IfaceTyLit -> Bool # (/=) :: IfaceTyLit -> IfaceTyLit -> Bool # | |
Outputable IfaceTyLit # | |
Binary IfaceTyLit # | |
data IfaceAppArgs Source #
Stores the arguments in a type application as a list.
See Note [Suppressing invisible arguments]
.
Instances
Semigroup IfaceAppArgs # | |
Defined in IfaceType (<>) :: IfaceAppArgs -> IfaceAppArgs -> IfaceAppArgs Source # sconcat :: NonEmpty IfaceAppArgs -> IfaceAppArgs Source # stimes :: Integral b => b -> IfaceAppArgs -> IfaceAppArgs Source # | |
Monoid IfaceAppArgs # | |
Defined in IfaceType mempty :: IfaceAppArgs Source # mappend :: IfaceAppArgs -> IfaceAppArgs -> IfaceAppArgs Source # mconcat :: [IfaceAppArgs] -> IfaceAppArgs Source # | |
Outputable IfaceAppArgs # | |
Binary IfaceAppArgs # | |
type IfaceContext = [IfacePredType] Source #
data IfaceOneShot Source #
Instances
type IfaceLamBndr = (IfaceBndr, IfaceOneShot) Source #
type IfaceTvBndr = (IfLclName, IfaceKind) Source #
type IfaceIdBndr = (IfLclName, IfaceType) Source #
Argument Flag
Is something required to appear in source Haskell (Required
),
permitted by request (Specified
) (visible type application), or
prohibited entirely from appearing in source Haskell (Inferred
)?
See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep
Instances
Eq ArgFlag # | |
Data ArgFlag # | |
Defined in Var gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArgFlag -> c ArgFlag Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArgFlag Source # toConstr :: ArgFlag -> Constr Source # dataTypeOf :: ArgFlag -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArgFlag) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArgFlag) Source # gmapT :: (forall b. Data b => b -> b) -> ArgFlag -> ArgFlag Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ArgFlag -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArgFlag -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag Source # | |
Ord ArgFlag # | |
Outputable ArgFlag # | |
Binary ArgFlag # | |
Outputable tv => Outputable (VarBndr tv ArgFlag) # | |
data ShowForAllFlag Source #
Show forall flag
Unconditionally show the forall quantifier with (ShowForAllMust
)
or when (ShowForAllWhen
) the names used are free in the binder
or when compiling with -fprint-explicit-foralls.
mkIfaceForAllTvBndr :: ArgFlag -> IfaceTvBndr -> IfaceForAllBndr Source #
Make an IfaceForAllBndr
from an IfaceTvBndr
.
ifForAllBndrVar :: IfaceForAllBndr -> IfaceBndr Source #
Extract an IfaceBndr
from an IfaceForAllBndr
.
ifForAllBndrName :: IfaceForAllBndr -> IfLclName Source #
Extract the variable name from an IfaceForAllBndr
.
ifaceBndrName :: IfaceBndr -> IfLclName Source #
ifTyConBinderVar :: IfaceTyConBinder -> IfaceBndr Source #
Extract an IfaceBndr
from an IfaceTyConBinder
.
ifTyConBinderName :: IfaceTyConBinder -> IfLclName Source #
Extract the variable name from an IfaceTyConBinder
.
appArgsIfaceTypes :: IfaceAppArgs -> [IfaceType] Source #
appArgsIfaceTypesArgFlags :: IfaceAppArgs -> [(IfaceType, ArgFlag)] Source #
pprIfaceType :: IfaceType -> SDoc Source #
pprParendIfaceType :: IfaceType -> SDoc Source #
pprIfaceContext :: PprPrec -> [IfacePredType] -> SDoc Source #
Prints a context or ()
if empty
You give it the context precedence
pprIfaceContextArr :: [IfacePredType] -> SDoc Source #
Prints "(C a, D b) =>", including the arrow.
Used when we want to print a context in a type, so we
use funPrec
to decide whether to parenthesise a singleton
predicate; e.g. Num a => a -> a
pprIfaceIdBndr :: IfaceIdBndr -> SDoc Source #
pprIfaceLamBndr :: IfaceLamBndr -> SDoc Source #
pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc Source #
pprIfaceTyConBinders :: [IfaceTyConBinder] -> SDoc Source #
pprIfaceBndrs :: [IfaceBndr] -> SDoc Source #
pprIfaceAppArgs :: IfaceAppArgs -> SDoc Source #
pprIfaceForAllPart :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc Source #
pprIfaceForAllPartMust :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc Source #
Like pprIfaceForAllPart
, but always uses an explicit forall
.
pprIfaceForAll :: [IfaceForAllBndr] -> SDoc Source #
Render the "forall ... ." or "forall ... ->" bit of a type.
pprIfaceSigmaType :: ShowForAllFlag -> IfaceType -> SDoc Source #
pprIfaceTyLit :: IfaceTyLit -> SDoc Source #
pprIfaceCoercion :: IfaceCoercion -> SDoc Source #
splitIfaceSigmaTy :: IfaceType -> ([IfaceForAllBndr], [IfacePredType], IfaceType) Source #
pprIfaceTypeApp :: PprPrec -> IfaceTyCon -> IfaceAppArgs -> SDoc Source #
pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc Source #
pprIfaceCoTcApp :: PprPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc Source #
pprTyTcApp :: PprPrec -> IfaceTyCon -> IfaceAppArgs -> SDoc Source #
suppressIfaceInvisibles :: DynFlags -> [IfaceTyConBinder] -> [a] -> [a] Source #
stripIfaceInvisVars :: DynFlags -> [IfaceTyConBinder] -> [IfaceTyConBinder] Source #
stripInvisArgs :: DynFlags -> IfaceAppArgs -> IfaceAppArgs Source #
mkIfaceTySubst :: [(IfLclName, IfaceType)] -> IfaceTySubst Source #
substIfaceTyVar :: IfaceTySubst -> IfLclName -> IfaceType Source #
substIfaceAppArgs :: IfaceTySubst -> IfaceAppArgs -> IfaceAppArgs Source #
inDomIfaceTySubst :: IfaceTySubst -> IfaceTvBndr -> Bool Source #