Safe Haskell | None |
---|---|
Language | Haskell2010 |
IfaceType
Synopsis
- type IfExtName = Name
- type IfLclName = FastString
- data IfaceType
- = IfaceFreeTyVar TyVar
- | IfaceTyVar IfLclName
- | IfaceLitTy IfaceTyLit
- | IfaceAppTy IfaceType IfaceType
- | IfaceFunTy IfaceType IfaceType
- | IfaceDFunTy IfaceType IfaceType
- | IfaceForAllTy IfaceForAllBndr IfaceType
- | IfaceTyConApp IfaceTyCon IfaceTcArgs
- | IfaceCastTy IfaceType IfaceCoercion
- | IfaceCoercionTy IfaceCoercion
- | IfaceTupleTy TupleSort IsPromoted IfaceTcArgs
- type IfacePredType = IfaceType
- type IfaceKind = IfaceType
- data IfaceCoercion
- = IfaceReflCo Role IfaceType
- | IfaceFunCo Role IfaceCoercion IfaceCoercion
- | IfaceTyConAppCo Role IfaceTyCon [IfaceCoercion]
- | IfaceAppCo IfaceCoercion IfaceCoercion
- | IfaceForAllCo IfaceTvBndr IfaceCoercion IfaceCoercion
- | IfaceCoVarCo IfLclName
- | IfaceAxiomInstCo IfExtName BranchIndex [IfaceCoercion]
- | IfaceUnivCo IfaceUnivCoProv Role IfaceType IfaceType
- | IfaceSymCo IfaceCoercion
- | IfaceTransCo IfaceCoercion IfaceCoercion
- | IfaceNthCo Int IfaceCoercion
- | IfaceLRCo LeftOrRight IfaceCoercion
- | IfaceInstCo IfaceCoercion IfaceCoercion
- | IfaceCoherenceCo IfaceCoercion IfaceCoercion
- | IfaceKindCo IfaceCoercion
- | IfaceSubCo IfaceCoercion
- | IfaceAxiomRuleCo IfLclName [IfaceCoercion]
- | IfaceFreeCoVar CoVar
- | IfaceHoleCo CoVar
- data IfaceUnivCoProv
- data IfaceTyCon = IfaceTyCon {}
- data IfaceTyConInfo = IfaceTyConInfo {}
- data IfaceTyConSort
- data IsPromoted
- data IfaceTyLit
- data IfaceTcArgs
- type IfaceContext = [IfacePredType]
- data IfaceBndr
- data IfaceOneShot
- type IfaceLamBndr = (IfaceBndr, IfaceOneShot)
- type IfaceTvBndr = (IfLclName, IfaceKind)
- type IfaceIdBndr = (IfLclName, IfaceType)
- type IfaceTyConBinder = TyVarBndr IfaceTvBndr TyConBndrVis
- type IfaceForAllBndr = TyVarBndr IfaceTvBndr ArgFlag
- data ArgFlag
- data ShowForAllFlag
- ifForAllBndrTyVar :: IfaceForAllBndr -> IfaceTvBndr
- ifForAllBndrName :: IfaceForAllBndr -> IfLclName
- ifTyConBinderTyVar :: IfaceTyConBinder -> IfaceTvBndr
- ifTyConBinderName :: IfaceTyConBinder -> IfLclName
- isIfaceLiftedTypeKind :: IfaceKind -> Bool
- tcArgsIfaceTypes :: IfaceTcArgs -> [IfaceType]
- pprIfaceType :: IfaceType -> SDoc
- pprParendIfaceType :: IfaceType -> SDoc
- pprPrecIfaceType :: TyPrec -> IfaceType -> SDoc
- pprIfaceContext :: TyPrec -> [IfacePredType] -> SDoc
- pprIfaceContextArr :: [IfacePredType] -> SDoc
- pprIfaceIdBndr :: IfaceIdBndr -> SDoc
- pprIfaceLamBndr :: IfaceLamBndr -> SDoc
- pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc
- pprIfaceTyConBinders :: [IfaceTyConBinder] -> SDoc
- pprIfaceBndrs :: [IfaceBndr] -> SDoc
- pprIfaceTcArgs :: IfaceTcArgs -> SDoc
- pprParendIfaceTcArgs :: IfaceTcArgs -> 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 :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
- pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc
- pprIfaceCoTcApp :: TyPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc
- pprTyTcApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
- pprIfacePrefixApp :: TyPrec -> SDoc -> [SDoc] -> SDoc
- suppressIfaceInvisibles :: DynFlags -> [IfaceTyConBinder] -> [a] -> [a]
- stripIfaceInvisVars :: DynFlags -> [IfaceTyConBinder] -> [IfaceTyConBinder]
- stripInvisArgs :: DynFlags -> IfaceTcArgs -> IfaceTcArgs
- mkIfaceTySubst :: [(IfLclName, IfaceType)] -> IfaceTySubst
- substIfaceTyVar :: IfaceTySubst -> IfLclName -> IfaceType
- substIfaceTcArgs :: IfaceTySubst -> IfaceTcArgs -> IfaceTcArgs
- inDomIfaceTySubst :: IfaceTySubst -> IfaceTvBndr -> Bool
Documentation
type IfLclName = FastString #
Constructors
Instances
Outputable IfaceType # | |
Binary IfaceType # | |
Binary (DefMethSpec IfaceType) # | |
type IfacePredType = IfaceType #
data IfaceCoercion #
Constructors
Instances
Outputable IfaceCoercion # | |
Defined in IfaceType | |
Binary IfaceCoercion # | |
Defined in IfaceType Methods put_ :: BinHandle -> IfaceCoercion -> IO () # put :: BinHandle -> IfaceCoercion -> IO (Bin IfaceCoercion) # get :: BinHandle -> IO IfaceCoercion # |
data IfaceUnivCoProv #
Constructors
IfaceUnsafeCoerceProv | |
IfacePhantomProv IfaceCoercion | |
IfaceProofIrrelProv IfaceCoercion | |
IfacePluginProv String |
Instances
Binary IfaceUnivCoProv # | |
Defined in IfaceType Methods put_ :: BinHandle -> IfaceUnivCoProv -> IO () # put :: BinHandle -> IfaceUnivCoProv -> IO (Bin IfaceUnivCoProv) # get :: BinHandle -> IO IfaceUnivCoProv # |
data IfaceTyCon #
Constructors
IfaceTyCon | |
Fields |
Instances
Eq IfaceTyCon # | |
Defined in IfaceType | |
Outputable IfaceTyCon # | |
Defined in IfaceType | |
Binary IfaceTyCon # | |
Defined in IfaceType Methods put_ :: BinHandle -> IfaceTyCon -> IO () # put :: BinHandle -> IfaceTyCon -> IO (Bin IfaceTyCon) # get :: BinHandle -> IO IfaceTyCon # |
data IfaceTyConInfo #
Constructors
IfaceTyConInfo | |
Fields |
Instances
Eq IfaceTyConInfo # | |
Defined in IfaceType Methods (==) :: IfaceTyConInfo -> IfaceTyConInfo -> Bool # (/=) :: IfaceTyConInfo -> IfaceTyConInfo -> Bool # | |
Binary IfaceTyConInfo # | |
Defined in IfaceType Methods put_ :: BinHandle -> IfaceTyConInfo -> IO () # put :: BinHandle -> IfaceTyConInfo -> IO (Bin IfaceTyConInfo) # get :: BinHandle -> IO IfaceTyConInfo # |
data IfaceTyConSort #
The various types of TyCons which have special, built-in syntax.
Constructors
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 Methods (==) :: IfaceTyConSort -> IfaceTyConSort -> Bool # (/=) :: IfaceTyConSort -> IfaceTyConSort -> Bool # | |
Binary IfaceTyConSort # | |
Defined in IfaceType Methods put_ :: BinHandle -> IfaceTyConSort -> IO () # put :: BinHandle -> IfaceTyConSort -> IO (Bin IfaceTyConSort) # get :: BinHandle -> IO IfaceTyConSort # |
data IsPromoted #
Is a TyCon a promoted data constructor or just a normal type constructor?
Constructors
IsNotPromoted | |
IsPromoted |
Instances
Eq IsPromoted # | |
Defined in IfaceType | |
Binary IsPromoted # | |
Defined in IfaceType Methods put_ :: BinHandle -> IsPromoted -> IO () # put :: BinHandle -> IsPromoted -> IO (Bin IsPromoted) # get :: BinHandle -> IO IsPromoted # |
data IfaceTyLit #
Constructors
IfaceNumTyLit Integer | |
IfaceStrTyLit FastString |
Instances
Eq IfaceTyLit # | |
Defined in IfaceType | |
Outputable IfaceTyLit # | |
Defined in IfaceType | |
Binary IfaceTyLit # | |
Defined in IfaceType Methods put_ :: BinHandle -> IfaceTyLit -> IO () # put :: BinHandle -> IfaceTyLit -> IO (Bin IfaceTyLit) # get :: BinHandle -> IO IfaceTyLit # |
data IfaceTcArgs #
Constructors
ITC_Nil | |
ITC_Vis IfaceType IfaceTcArgs | |
ITC_Invis IfaceKind IfaceTcArgs |
Instances
Semigroup IfaceTcArgs # | |
Defined in IfaceType Methods (<>) :: IfaceTcArgs -> IfaceTcArgs -> IfaceTcArgs Source # sconcat :: NonEmpty IfaceTcArgs -> IfaceTcArgs Source # stimes :: Integral b => b -> IfaceTcArgs -> IfaceTcArgs Source # | |
Monoid IfaceTcArgs # | |
Defined in IfaceType Methods mempty :: IfaceTcArgs Source # mappend :: IfaceTcArgs -> IfaceTcArgs -> IfaceTcArgs Source # mconcat :: [IfaceTcArgs] -> IfaceTcArgs Source # | |
Outputable IfaceTcArgs # | |
Defined in IfaceType | |
Binary IfaceTcArgs # | |
Defined in IfaceType Methods put_ :: BinHandle -> IfaceTcArgs -> IO () # put :: BinHandle -> IfaceTcArgs -> IO (Bin IfaceTcArgs) # get :: BinHandle -> IO IfaceTcArgs # |
type IfaceContext = [IfacePredType] #
Constructors
IfaceIdBndr !IfaceIdBndr | |
IfaceTvBndr !IfaceTvBndr |
data IfaceOneShot #
Constructors
IfaceNoOneShot | |
IfaceOneShot |
Instances
Binary IfaceOneShot # | |
Defined in IfaceType Methods put_ :: BinHandle -> IfaceOneShot -> IO () # put :: BinHandle -> IfaceOneShot -> IO (Bin IfaceOneShot) # get :: BinHandle -> IO IfaceOneShot # |
type IfaceLamBndr = (IfaceBndr, IfaceOneShot) #
type IfaceTvBndr = (IfLclName, IfaceKind) #
type IfaceIdBndr = (IfLclName, IfaceType) #
type IfaceForAllBndr = TyVarBndr IfaceTvBndr ArgFlag #
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 [TyVarBndrs, TyVarBinders, TyConBinders, and visibility] in TyCoRep
Instances
Eq ArgFlag # | |
Data ArgFlag # | |
Defined in Var Methods 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 :: (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 # | |
Outputable ArgFlag # | |
Binary ArgFlag # | |
Outputable tv => Outputable (TyVarBndr tv ArgFlag) # | |
data ShowForAllFlag #
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.
Constructors
ShowForAllMust | |
ShowForAllWhen |
ifForAllBndrTyVar :: IfaceForAllBndr -> IfaceTvBndr #
Extract an IfaceTvBndr
from an IfaceForAllBndr
.
ifForAllBndrName :: IfaceForAllBndr -> IfLclName #
Extract the variable name from an IfaceForAllBndr
.
ifTyConBinderTyVar :: IfaceTyConBinder -> IfaceTvBndr #
Extract an IfaceTvBndr
from an IfaceTyConBinder
.
ifTyConBinderName :: IfaceTyConBinder -> IfLclName #
Extract the variable name from an IfaceTyConBinder
.
isIfaceLiftedTypeKind :: IfaceKind -> Bool #
tcArgsIfaceTypes :: IfaceTcArgs -> [IfaceType] #
pprIfaceType :: IfaceType -> SDoc #
pprParendIfaceType :: IfaceType -> SDoc #
pprPrecIfaceType :: TyPrec -> IfaceType -> SDoc #
pprIfaceContext :: TyPrec -> [IfacePredType] -> SDoc #
Prints a context or ()
if empty
You give it the context precedence
pprIfaceContextArr :: [IfacePredType] -> SDoc #
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 #
pprIfaceLamBndr :: IfaceLamBndr -> SDoc #
pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc #
pprIfaceTyConBinders :: [IfaceTyConBinder] -> SDoc #
pprIfaceBndrs :: [IfaceBndr] -> SDoc #
pprIfaceTcArgs :: IfaceTcArgs -> SDoc #
pprParendIfaceTcArgs :: IfaceTcArgs -> SDoc #
pprIfaceForAllPart :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc #
pprIfaceForAllPartMust :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc #
Like pprIfaceForAllPart
, but always uses an explicit forall
.
pprIfaceForAll :: [IfaceForAllBndr] -> SDoc #
Render the "forall ... ." or "forall ... ->" bit of a type.
pprIfaceSigmaType :: ShowForAllFlag -> IfaceType -> SDoc #
pprIfaceTyLit :: IfaceTyLit -> SDoc #
pprIfaceCoercion :: IfaceCoercion -> SDoc #
splitIfaceSigmaTy :: IfaceType -> ([IfaceForAllBndr], [IfacePredType], IfaceType) #
pprIfaceTypeApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc #
pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc #
pprIfaceCoTcApp :: TyPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc #
pprTyTcApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc #
suppressIfaceInvisibles :: DynFlags -> [IfaceTyConBinder] -> [a] -> [a] #
stripIfaceInvisVars :: DynFlags -> [IfaceTyConBinder] -> [IfaceTyConBinder] #
stripInvisArgs :: DynFlags -> IfaceTcArgs -> IfaceTcArgs #
mkIfaceTySubst :: [(IfLclName, IfaceType)] -> IfaceTySubst #
substIfaceTyVar :: IfaceTySubst -> IfLclName -> IfaceType #
substIfaceTcArgs :: IfaceTySubst -> IfaceTcArgs -> IfaceTcArgs #
inDomIfaceTySubst :: IfaceTySubst -> IfaceTvBndr -> Bool #