Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
GHC.Iface.Syntax
Contents
Synopsis
- module GHC.Iface.Type
- data IfaceDecl
- = IfaceId { }
- | IfaceData { }
- | IfaceSynonym {
- ifName :: IfaceTopBndr
- ifRoles :: [Role]
- ifBinders :: [IfaceTyConBinder]
- ifResKind :: IfaceKind
- ifSynRhs :: IfaceType
- | IfaceFamily { }
- | IfaceClass {
- ifName :: IfaceTopBndr
- ifRoles :: [Role]
- ifBinders :: [IfaceTyConBinder]
- ifFDs :: [FunDep IfLclName]
- ifBody :: IfaceClassBody
- | IfaceAxiom {
- ifName :: IfaceTopBndr
- ifTyCon :: IfaceTyCon
- ifRole :: Role
- ifAxBranches :: [IfaceAxBranch]
- | IfacePatSyn {
- ifName :: IfaceTopBndr
- ifPatIsInfix :: Bool
- ifPatMatcher :: (IfExtName, Bool)
- ifPatBuilder :: Maybe (IfExtName, Bool)
- ifPatUnivBndrs :: [IfaceForAllSpecBndr]
- ifPatExBndrs :: [IfaceForAllSpecBndr]
- ifPatProvCtxt :: IfaceContext
- ifPatReqCtxt :: IfaceContext
- ifPatArgs :: [IfaceType]
- ifPatTy :: IfaceType
- ifFieldLabels :: [FieldLabel]
- data IfaceFamTyConFlav
- data IfaceClassOp = IfaceClassOp IfaceTopBndr IfaceType (Maybe (DefMethSpec IfaceType))
- data IfaceAT = IfaceAT IfaceDecl (Maybe IfaceType)
- data IfaceConDecl = IfCon {
- ifConName :: IfaceTopBndr
- ifConWrapper :: Bool
- ifConInfix :: Bool
- ifConExTCvs :: [IfaceBndr]
- ifConUserTvBinders :: [IfaceForAllSpecBndr]
- ifConEqSpec :: IfaceEqSpec
- ifConCtxt :: IfaceContext
- ifConArgTys :: [(IfaceMult, IfaceType)]
- ifConFields :: [FieldLabel]
- ifConStricts :: [IfaceBang]
- ifConSrcStricts :: [IfaceSrcBang]
- data IfaceConDecls
- type IfaceEqSpec = [(IfLclName, IfaceType)]
- data IfaceExpr
- = IfaceLcl IfLclName
- | IfaceExt IfExtName
- | IfaceType IfaceType
- | IfaceCo IfaceCoercion
- | IfaceTuple TupleSort [IfaceExpr]
- | IfaceLam IfaceLamBndr IfaceExpr
- | IfaceApp IfaceExpr IfaceExpr
- | IfaceCase IfaceExpr IfLclName [IfaceAlt]
- | IfaceECase IfaceExpr IfaceType
- | IfaceLet IfaceBinding IfaceExpr
- | IfaceCast IfaceExpr IfaceCoercion
- | IfaceLit Literal
- | IfaceFCall ForeignCall IfaceType
- | IfaceTick IfaceTickish IfaceExpr
- data IfaceAlt = IfaceAlt IfaceConAlt [IfLclName] IfaceExpr
- data IfaceLetBndr = IfLetBndr IfLclName IfaceType IfaceIdInfo IfaceJoinInfo
- data IfaceJoinInfo
- data IfaceBinding
- data IfaceConAlt
- type IfaceIdInfo = [IfaceInfoItem]
- data IfaceIdDetails
- data IfaceUnfolding
- data IfaceInfoItem
- data IfaceRule = IfaceRule {}
- data IfaceAnnotation = IfaceAnnotation {}
- type IfaceAnnTarget = AnnTarget OccName
- data IfaceClsInst = IfaceClsInst {}
- data IfaceFamInst = IfaceFamInst {}
- data IfaceTickish
- data IfaceClassBody
- = IfAbstractClass
- | IfConcreteClass {
- ifClassCtxt :: IfaceContext
- ifATs :: [IfaceAT]
- ifSigs :: [IfaceClassOp]
- ifMinDef :: BooleanFormula IfLclName
- data IfaceBang
- data IfaceSrcBang = IfSrcBang SrcUnpackedness SrcStrictness
- data SrcUnpackedness
- data SrcStrictness
- data IfaceAxBranch = IfaceAxBranch {
- ifaxbTyVars :: [IfaceTvBndr]
- ifaxbEtaTyVars :: [IfaceTvBndr]
- ifaxbCoVars :: [IfaceIdBndr]
- ifaxbLHS :: IfaceAppArgs
- ifaxbRoles :: [Role]
- ifaxbRHS :: IfaceType
- ifaxbIncomps :: [BranchIndex]
- data IfaceTyConParent
- data IfaceCompleteMatch = IfaceCompleteMatch [IfExtName] (Maybe IfaceTyCon)
- data IfaceLFInfo
- = IfLFReEntrant !RepArity
- | IfLFThunk !Bool !Bool
- | IfLFCon !Name
- | IfLFUnknown !Bool
- | IfLFUnlifted
- type IfaceTopBndr = Name
- putIfaceTopBndr :: BinHandle -> IfaceTopBndr -> IO ()
- getIfaceTopBndr :: BinHandle -> IO IfaceTopBndr
- ifaceDeclImplicitBndrs :: IfaceDecl -> [OccName]
- visibleIfConDecls :: IfaceConDecls -> [IfaceConDecl]
- ifaceDeclFingerprints :: Fingerprint -> IfaceDecl -> [(OccName, Fingerprint)]
- freeNamesIfDecl :: IfaceDecl -> NameSet
- freeNamesIfRule :: IfaceRule -> NameSet
- freeNamesIfFamInst :: IfaceFamInst -> NameSet
- pprIfaceExpr :: (SDoc -> SDoc) -> IfaceExpr -> SDoc
- pprIfaceDecl :: ShowSub -> IfaceDecl -> SDoc
- newtype AltPpr = AltPpr (Maybe (OccName -> SDoc))
- data ShowSub = ShowSub {}
- data ShowHowMuch
- showToIface :: ShowSub
- showToHeader :: ShowSub
Documentation
module GHC.Iface.Type
Constructors
Instances
NFData IfaceDecl # | |
Defined in GHC.Iface.Syntax | |
NamedThing IfaceDecl # | |
Defined in GHC.Iface.Syntax | |
HasOccName IfaceDecl # | |
Defined in GHC.Iface.Syntax | |
Binary IfaceDecl # | |
Outputable IfaceDecl # | |
Defined in GHC.Iface.Syntax |
data IfaceFamTyConFlav #
Constructors
IfaceDataFamilyTyCon | |
IfaceOpenSynFamilyTyCon | |
IfaceClosedSynFamilyTyCon (Maybe (IfExtName, [IfaceAxBranch])) | Name of associated axiom and branches for pretty printing purposes,
or |
IfaceAbstractClosedSynFamilyTyCon | |
IfaceBuiltInSynFamTyCon |
Instances
NFData IfaceFamTyConFlav # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceFamTyConFlav -> () Source # | |
Binary IfaceFamTyConFlav # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceFamTyConFlav -> IO () # put :: BinHandle -> IfaceFamTyConFlav -> IO (Bin IfaceFamTyConFlav) # get :: BinHandle -> IO IfaceFamTyConFlav # |
data IfaceClassOp #
Constructors
IfaceClassOp IfaceTopBndr IfaceType (Maybe (DefMethSpec IfaceType)) |
Instances
NFData IfaceClassOp # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceClassOp -> () Source # | |
NamedThing IfaceClassOp # | |
Defined in GHC.Iface.Syntax | |
HasOccName IfaceClassOp # | |
Defined in GHC.Iface.Syntax Methods occName :: IfaceClassOp -> OccName # | |
Binary IfaceClassOp # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceClassOp -> IO () # put :: BinHandle -> IfaceClassOp -> IO (Bin IfaceClassOp) # get :: BinHandle -> IO IfaceClassOp # | |
Outputable IfaceClassOp # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceClassOp -> SDoc # |
Instances
NFData IfaceAT # | |
Defined in GHC.Iface.Syntax | |
Binary IfaceAT # | |
Outputable IfaceAT # | |
Defined in GHC.Iface.Syntax |
data IfaceConDecl #
Constructors
IfCon | |
Fields
|
Instances
NFData IfaceConDecl # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceConDecl -> () Source # | |
NamedThing IfaceConDecl # | |
Defined in GHC.Iface.Syntax | |
HasOccName IfaceConDecl # | |
Defined in GHC.Iface.Syntax Methods occName :: IfaceConDecl -> OccName # | |
Binary IfaceConDecl # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceConDecl -> IO () # put :: BinHandle -> IfaceConDecl -> IO (Bin IfaceConDecl) # get :: BinHandle -> IO IfaceConDecl # |
data IfaceConDecls #
Constructors
IfAbstractTyCon | |
IfDataTyCon [IfaceConDecl] | |
IfNewTyCon IfaceConDecl |
Instances
NFData IfaceConDecls # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceConDecls -> () Source # | |
Binary IfaceConDecls # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceConDecls -> IO () # put :: BinHandle -> IfaceConDecls -> IO (Bin IfaceConDecls) # get :: BinHandle -> IO IfaceConDecls # |
type IfaceEqSpec = [(IfLclName, IfaceType)] #
Constructors
Instances
NFData IfaceExpr # | |
Defined in GHC.Iface.Syntax | |
Binary IfaceExpr # | |
Outputable IfaceExpr # | |
Defined in GHC.Iface.Syntax |
Constructors
IfaceAlt IfaceConAlt [IfLclName] IfaceExpr |
data IfaceLetBndr #
Constructors
IfLetBndr IfLclName IfaceType IfaceIdInfo IfaceJoinInfo |
Instances
NFData IfaceLetBndr # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceLetBndr -> () Source # | |
Binary IfaceLetBndr # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceLetBndr -> IO () # put :: BinHandle -> IfaceLetBndr -> IO (Bin IfaceLetBndr) # get :: BinHandle -> IO IfaceLetBndr # |
data IfaceJoinInfo #
Constructors
IfaceNotJoinPoint | |
IfaceJoinPoint JoinArity |
Instances
NFData IfaceJoinInfo # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceJoinInfo -> () Source # | |
Binary IfaceJoinInfo # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceJoinInfo -> IO () # put :: BinHandle -> IfaceJoinInfo -> IO (Bin IfaceJoinInfo) # get :: BinHandle -> IO IfaceJoinInfo # | |
Outputable IfaceJoinInfo # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceJoinInfo -> SDoc # |
data IfaceBinding #
Constructors
IfaceNonRec IfaceLetBndr IfaceExpr | |
IfaceRec [(IfaceLetBndr, IfaceExpr)] |
Instances
NFData IfaceBinding # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceBinding -> () Source # | |
Binary IfaceBinding # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceBinding -> IO () # put :: BinHandle -> IfaceBinding -> IO (Bin IfaceBinding) # get :: BinHandle -> IO IfaceBinding # |
data IfaceConAlt #
Constructors
IfaceDefault | |
IfaceDataAlt IfExtName | |
IfaceLitAlt Literal |
Instances
NFData IfaceConAlt # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceConAlt -> () Source # | |
Binary IfaceConAlt # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceConAlt -> IO () # put :: BinHandle -> IfaceConAlt -> IO (Bin IfaceConAlt) # get :: BinHandle -> IO IfaceConAlt # | |
Outputable IfaceConAlt # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceConAlt -> SDoc # |
type IfaceIdInfo = [IfaceInfoItem] #
data IfaceIdDetails #
Constructors
IfVanillaId | |
IfRecSelId (Either IfaceTyCon IfaceDecl) Bool | |
IfDFunId |
Instances
NFData IfaceIdDetails # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceIdDetails -> () Source # | |
Binary IfaceIdDetails # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceIdDetails -> IO () # put :: BinHandle -> IfaceIdDetails -> IO (Bin IfaceIdDetails) # get :: BinHandle -> IO IfaceIdDetails # | |
Outputable IfaceIdDetails # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceIdDetails -> SDoc # |
data IfaceUnfolding #
Constructors
IfCoreUnfold Bool IfaceExpr | |
IfCompulsory IfaceExpr | |
IfInlineRule Arity Bool Bool IfaceExpr | |
IfDFunUnfold [IfaceBndr] [IfaceExpr] |
Instances
NFData IfaceUnfolding # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceUnfolding -> () Source # | |
Binary IfaceUnfolding # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceUnfolding -> IO () # put :: BinHandle -> IfaceUnfolding -> IO (Bin IfaceUnfolding) # get :: BinHandle -> IO IfaceUnfolding # | |
Outputable IfaceUnfolding # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceUnfolding -> SDoc # |
data IfaceInfoItem #
Constructors
HsArity Arity | |
HsStrictness StrictSig | |
HsCpr CprSig | |
HsInline InlinePragma | |
HsUnfold Bool IfaceUnfolding | |
HsNoCafRefs | |
HsLevity | |
HsLFInfo IfaceLFInfo |
Instances
NFData IfaceInfoItem # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceInfoItem -> () Source # | |
Binary IfaceInfoItem # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceInfoItem -> IO () # put :: BinHandle -> IfaceInfoItem -> IO (Bin IfaceInfoItem) # get :: BinHandle -> IO IfaceInfoItem # | |
Outputable IfaceInfoItem # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceInfoItem -> SDoc # |
Constructors
IfaceRule | |
Fields
|
Instances
NFData IfaceRule # | |
Defined in GHC.Iface.Syntax | |
Binary IfaceRule # | |
Outputable IfaceRule # | |
Defined in GHC.Iface.Syntax |
data IfaceAnnotation #
Constructors
IfaceAnnotation | |
Fields |
Instances
NFData IfaceAnnotation # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceAnnotation -> () Source # | |
Binary IfaceAnnotation # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceAnnotation -> IO () # put :: BinHandle -> IfaceAnnotation -> IO (Bin IfaceAnnotation) # get :: BinHandle -> IO IfaceAnnotation # | |
Outputable IfaceAnnotation # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceAnnotation -> SDoc # |
type IfaceAnnTarget = AnnTarget OccName #
data IfaceClsInst #
Constructors
IfaceClsInst | |
Fields
|
Instances
NFData IfaceClsInst # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceClsInst -> () Source # | |
Binary IfaceClsInst # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceClsInst -> IO () # put :: BinHandle -> IfaceClsInst -> IO (Bin IfaceClsInst) # get :: BinHandle -> IO IfaceClsInst # | |
Outputable IfaceClsInst # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceClsInst -> SDoc # |
data IfaceFamInst #
Constructors
IfaceFamInst | |
Fields |
Instances
NFData IfaceFamInst # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceFamInst -> () Source # | |
Binary IfaceFamInst # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceFamInst -> IO () # put :: BinHandle -> IfaceFamInst -> IO (Bin IfaceFamInst) # get :: BinHandle -> IO IfaceFamInst # | |
Outputable IfaceFamInst # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceFamInst -> SDoc # |
data IfaceTickish #
Constructors
IfaceHpcTick Module Int | |
IfaceSCC CostCentre Bool Bool | |
IfaceSource RealSrcSpan String |
Instances
NFData IfaceTickish # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceTickish -> () Source # | |
Binary IfaceTickish # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceTickish -> IO () # put :: BinHandle -> IfaceTickish -> IO (Bin IfaceTickish) # get :: BinHandle -> IO IfaceTickish # |
data IfaceClassBody #
Constructors
IfAbstractClass | |
IfConcreteClass | |
Fields
|
Instances
NFData IfaceClassBody # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceClassBody -> () Source # |
This corresponds to an HsImplBang; that is, the final implementation decision about the data constructor arg
Constructors
IfNoBang | |
IfStrict | |
IfUnpack | |
IfUnpackCo IfaceCoercion |
data IfaceSrcBang #
This corresponds to HsSrcBang
Constructors
IfSrcBang SrcUnpackedness SrcStrictness |
Instances
NFData IfaceSrcBang # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceSrcBang -> () Source # | |
Binary IfaceSrcBang # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceSrcBang -> IO () # put :: BinHandle -> IfaceSrcBang -> IO (Bin IfaceSrcBang) # get :: BinHandle -> IO IfaceSrcBang # |
data SrcUnpackedness #
Source Unpackedness
What unpackedness the user requested
Constructors
SrcUnpack | {-# UNPACK #-} specified |
SrcNoUnpack | {-# NOUNPACK #-} specified |
NoSrcUnpack | no unpack pragma |
Instances
data SrcStrictness #
Source Strictness
What strictness annotation the user wrote
Constructors
SrcLazy | Lazy, ie |
SrcStrict | Strict, ie |
NoSrcStrict | no strictness annotation |
Instances
data IfaceAxBranch #
Constructors
IfaceAxBranch | |
Fields
|
Instances
NFData IfaceAxBranch # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceAxBranch -> () Source # | |
Binary IfaceAxBranch # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceAxBranch -> IO () # put :: BinHandle -> IfaceAxBranch -> IO (Bin IfaceAxBranch) # get :: BinHandle -> IO IfaceAxBranch # |
data IfaceTyConParent #
Constructors
IfNoParent | |
IfDataInstance IfExtName IfaceTyCon IfaceAppArgs |
Instances
NFData IfaceTyConParent # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceTyConParent -> () Source # | |
Binary IfaceTyConParent # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceTyConParent -> IO () # put :: BinHandle -> IfaceTyConParent -> IO (Bin IfaceTyConParent) # get :: BinHandle -> IO IfaceTyConParent # | |
Outputable IfaceTyConParent # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceTyConParent -> SDoc # |
data IfaceCompleteMatch #
Constructors
IfaceCompleteMatch [IfExtName] (Maybe IfaceTyCon) |
Instances
NFData IfaceCompleteMatch # | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceCompleteMatch -> () Source # | |
Binary IfaceCompleteMatch # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceCompleteMatch -> IO () # put :: BinHandle -> IfaceCompleteMatch -> IO (Bin IfaceCompleteMatch) # get :: BinHandle -> IO IfaceCompleteMatch # | |
Outputable IfaceCompleteMatch # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceCompleteMatch -> SDoc # |
data IfaceLFInfo #
Iface type for LambdaFormInfo. Fields not relevant for imported Ids are omitted in this type.
Constructors
IfLFReEntrant !RepArity | |
IfLFThunk !Bool !Bool | |
IfLFCon !Name | |
IfLFUnknown !Bool | |
IfLFUnlifted |
Instances
Binary IfaceLFInfo # | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceLFInfo -> IO () # put :: BinHandle -> IfaceLFInfo -> IO (Bin IfaceLFInfo) # get :: BinHandle -> IO IfaceLFInfo # | |
Outputable IfaceLFInfo # | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceLFInfo -> SDoc # |
Binding names
type IfaceTopBndr = Name #
putIfaceTopBndr :: BinHandle -> IfaceTopBndr -> IO () #
getIfaceTopBndr :: BinHandle -> IO IfaceTopBndr #
ifaceDeclImplicitBndrs :: IfaceDecl -> [OccName] #
visibleIfConDecls :: IfaceConDecls -> [IfaceConDecl] #
ifaceDeclFingerprints :: Fingerprint -> IfaceDecl -> [(OccName, Fingerprint)] #
freeNamesIfDecl :: IfaceDecl -> NameSet #
freeNamesIfRule :: IfaceRule -> NameSet #
pprIfaceExpr :: (SDoc -> SDoc) -> IfaceExpr -> SDoc #
Pretty Print an IfaceExpr
The first argument should be a function that adds parens in context that need an atomic value (e.g. function args)
pprIfaceDecl :: ShowSub -> IfaceDecl -> SDoc #
Constructors
ShowSub | |
Fields |
data ShowHowMuch #
Constructors
ShowHeader AltPpr | Header information only, not rhs |
ShowSome [OccName] AltPpr | Show only some sub-components. Specifically,
|
ShowIface | Everything including GHC-internal information (used in --show-iface) |
Instances
Outputable ShowHowMuch # | |
Defined in GHC.Iface.Syntax Methods ppr :: ShowHowMuch -> SDoc # |
showToIface :: ShowSub #
showToHeader :: ShowSub #