ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

IfaceSyn

Contents

- Binding names

Synopsis

- module IfaceType
- data IfaceDecl
  - = IfaceId {
    - ifName :: IfaceTopBndr
    - ifType :: IfaceType
    - ifIdDetails :: IfaceIdDetails
    - ifIdInfo :: IfaceIdInfo
    }
  - | IfaceData {
    - ifName :: IfaceTopBndr
    - ifBinders :: [IfaceTyConBinder]
    - ifResKind :: IfaceType
    - ifCType :: Maybe CType
    - ifRoles :: [Role]
    - ifCtxt :: IfaceContext
    - ifCons :: IfaceConDecls
    - ifGadtSyntax :: Bool
    - ifParent :: IfaceTyConParent
    }
  - | IfaceSynonym {
    - ifName :: IfaceTopBndr
    - ifRoles :: [Role]
    - ifBinders :: [IfaceTyConBinder]
    - ifResKind :: IfaceKind
    - ifSynRhs :: IfaceType
    }
  - | IfaceFamily {
    - ifName :: IfaceTopBndr
    - ifResVar :: Maybe IfLclName
    - ifBinders :: [IfaceTyConBinder]
    - ifResKind :: IfaceKind
    - ifFamFlav :: IfaceFamTyConFlav
    - ifFamInj :: Injectivity
    }
  - | 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 :: [IfaceForAllBndr]
    - ifPatExBndrs :: [IfaceForAllBndr]
    - ifPatProvCtxt :: IfaceContext
    - ifPatReqCtxt :: IfaceContext
    - ifPatArgs :: [IfaceType]
    - ifPatTy :: IfaceType
    - ifFieldLabels :: [FieldLabel]
    }
- data IfaceFamTyConFlav
  - = IfaceDataFamilyTyCon
  - | IfaceOpenSynFamilyTyCon
  - | IfaceClosedSynFamilyTyCon (Maybe (IfExtName, [IfaceAxBranch]))
  - | IfaceAbstractClosedSynFamilyTyCon
  - | IfaceBuiltInSynFamTyCon
- data IfaceClassOp = IfaceClassOp IfaceTopBndr IfaceType (Maybe (DefMethSpec IfaceType))
- data IfaceAT = IfaceAT IfaceDecl (Maybe IfaceType)
- data IfaceConDecl = IfCon {
  - ifConName :: IfaceTopBndr
  - ifConWrapper :: Bool
  - ifConInfix :: Bool
  - ifConExTvs :: [IfaceForAllBndr]
  - ifConEqSpec :: IfaceEqSpec
  - ifConCtxt :: IfaceContext
  - ifConArgTys :: [IfaceType]
  - ifConFields :: [FieldLabel]
  - ifConStricts :: [IfaceBang]
  - ifConSrcStricts :: [IfaceSrcBang]
  }
- data IfaceConDecls
  - = IfAbstractTyCon
  - | IfDataTyCon [IfaceConDecl]
  - | IfNewTyCon IfaceConDecl
- 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
- type IfaceAlt = (IfaceConAlt, [IfLclName], IfaceExpr)
- data IfaceLetBndr = IfLetBndr IfLclName IfaceType IfaceIdInfo IfaceJoinInfo
- data IfaceJoinInfo
  - = IfaceNotJoinPoint
  - | IfaceJoinPoint JoinArity
- data IfaceBinding
  - = IfaceNonRec IfaceLetBndr IfaceExpr
  - | IfaceRec [(IfaceLetBndr, IfaceExpr)]
- data IfaceConAlt
  - = IfaceDefault
  - | IfaceDataAlt IfExtName
  - | IfaceLitAlt Literal
- data IfaceIdInfo
  - = NoInfo
  - | HasInfo [IfaceInfoItem]
- data IfaceIdDetails
  - = IfVanillaId
  - | IfRecSelId (Either IfaceTyCon IfaceDecl) Bool
  - | IfDFunId
- data IfaceUnfolding
  - = IfCoreUnfold Bool IfaceExpr
  - | IfCompulsory IfaceExpr
  - | IfInlineRule Arity Bool Bool IfaceExpr
  - | IfDFunUnfold [IfaceBndr] [IfaceExpr]
- data IfaceInfoItem
  - = HsArity Arity
  - | HsStrictness StrictSig
  - | HsInline InlinePragma
  - | HsUnfold Bool IfaceUnfolding
  - | HsNoCafRefs
  - | HsLevity
- data IfaceRule = IfaceRule {
  - ifRuleName :: RuleName
  - ifActivation :: Activation
  - ifRuleBndrs :: [IfaceBndr]
  - ifRuleHead :: IfExtName
  - ifRuleArgs :: [IfaceExpr]
  - ifRuleRhs :: IfaceExpr
  - ifRuleAuto :: Bool
  - ifRuleOrph :: IsOrphan
  }
- data IfaceAnnotation = IfaceAnnotation {
  - ifAnnotatedTarget :: IfaceAnnTarget
  - ifAnnotatedValue :: AnnPayload
  }
- type IfaceAnnTarget = AnnTarget OccName
- data IfaceClsInst = IfaceClsInst {
  - ifInstCls :: IfExtName
  - ifInstTys :: [Maybe IfaceTyCon]
  - ifDFun :: IfExtName
  - ifOFlag :: OverlapFlag
  - ifInstOrph :: IsOrphan
  }
- data IfaceFamInst = IfaceFamInst {
  - ifFamInstFam :: IfExtName
  - ifFamInstTys :: [Maybe IfaceTyCon]
  - ifFamInstAxiom :: IfExtName
  - ifFamInstOrph :: IsOrphan
  }
- data IfaceTickish
  - = IfaceHpcTick Module Int
  - | IfaceSCC CostCentre Bool Bool
  - | IfaceSource RealSrcSpan String
- data IfaceClassBody
  - = IfAbstractClass
  - | IfConcreteClass {
    - ifClassCtxt :: IfaceContext
    - ifATs :: [IfaceAT]
    - ifSigs :: [IfaceClassOp]
    - ifMinDef :: BooleanFormula IfLclName
    }
- data IfaceBang
  - = IfNoBang
  - | IfStrict
  - | IfUnpack
  - | IfUnpackCo IfaceCoercion
- data IfaceSrcBang = IfSrcBang SrcUnpackedness SrcStrictness
- data SrcUnpackedness
  - = SrcUnpack
  - | SrcNoUnpack
  - | NoSrcUnpack
- data SrcStrictness
  - = SrcLazy
  - | SrcStrict
  - | NoSrcStrict
- data IfaceAxBranch = IfaceAxBranch {
  - ifaxbTyVars :: [IfaceTvBndr]
  - ifaxbCoVars :: [IfaceIdBndr]
  - ifaxbLHS :: IfaceTcArgs
  - ifaxbRoles :: [Role]
  - ifaxbRHS :: IfaceType
  - ifaxbIncomps :: [BranchIndex]
  }
- data IfaceTyConParent
  - = IfNoParent
  - | IfDataInstance IfExtName IfaceTyCon IfaceTcArgs
- data IfaceCompleteMatch = IfaceCompleteMatch [IfExtName] IfExtName
- 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 {
  - ss_how_much :: ShowHowMuch
  - ss_forall :: ShowForAllFlag
  }
- data ShowHowMuch
  - = ShowHeader AltPpr
  - | ShowSome [OccName] AltPpr
  - | ShowIface
- showToIface :: ShowSub
- showToHeader :: ShowSub

# Documentation

module IfaceType

data IfaceDecl #

Constructors

IfaceId |

Fields

- ifName :: IfaceTopBndr
- ifType :: IfaceType
- ifIdDetails :: IfaceIdDetails
- ifIdInfo :: IfaceIdInfo

IfaceData |

Fields

- ifName :: IfaceTopBndr
- ifBinders :: [IfaceTyConBinder]
- ifResKind :: IfaceType
- ifCType :: Maybe CType
- ifRoles :: [Role]
- ifCtxt :: IfaceContext
- ifCons :: IfaceConDecls
- ifGadtSyntax :: Bool
- ifParent :: IfaceTyConParent

IfaceSynonym |

Fields

- ifName :: IfaceTopBndr
- ifRoles :: [Role]
- ifBinders :: [IfaceTyConBinder]
- ifResKind :: IfaceKind
- ifSynRhs :: IfaceType

IfaceFamily |

Fields

- ifName :: IfaceTopBndr
- ifResVar :: Maybe IfLclName
- ifBinders :: [IfaceTyConBinder]
- ifResKind :: IfaceKind
- ifFamFlav :: IfaceFamTyConFlav
- ifFamInj :: Injectivity

IfaceClass |

Fields

- ifName :: IfaceTopBndr
- ifRoles :: [Role]
- ifBinders :: [IfaceTyConBinder]
- ifFDs :: [FunDep IfLclName]
- ifBody :: IfaceClassBody

IfaceAxiom |

Fields

- ifName :: IfaceTopBndr
- ifTyCon :: IfaceTyCon
- ifRole :: Role
- ifAxBranches :: [IfaceAxBranch]

IfacePatSyn |

Fields

- ifName :: IfaceTopBndr
- ifPatIsInfix :: Bool
- ifPatMatcher :: (IfExtName, Bool)
- ifPatBuilder :: Maybe (IfExtName, Bool)
- ifPatUnivBndrs :: [IfaceForAllBndr]
- ifPatExBndrs :: [IfaceForAllBndr]
- ifPatProvCtxt :: IfaceContext
- ifPatReqCtxt :: IfaceContext
- ifPatArgs :: [IfaceType]
- ifPatTy :: IfaceType
- ifFieldLabels :: [FieldLabel]

Instances

Outputable IfaceDecl # |
Methods ppr :: IfaceDecl -> SDoc # pprPrec :: Rational -> IfaceDecl -> SDoc #
Binary IfaceDecl # |
Methods put_ :: BinHandle -> IfaceDecl -> IO () # put :: BinHandle -> IfaceDecl -> IO (Bin * IfaceDecl) # get :: BinHandle -> IO IfaceDecl #
HasOccName IfaceDecl # |
Methods occName :: IfaceDecl -> OccName #
NamedThing IfaceDecl # |
Methods getOccName :: IfaceDecl -> OccName # getName :: IfaceDecl -> Name #

data IfaceFamTyConFlav #

Constructors

IfaceDataFamilyTyCon |
IfaceOpenSynFamilyTyCon |
IfaceClosedSynFamilyTyCon (Maybe (IfExtName, [IfaceAxBranch])) | Name of associated axiom and branches for pretty printing purposes, or `Nothing` for an empty closed family without an axiom
IfaceAbstractClosedSynFamilyTyCon |
IfaceBuiltInSynFamTyCon |

Instances

Binary IfaceFamTyConFlav # |
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

Outputable IfaceClassOp # |
Methods ppr :: IfaceClassOp -> SDoc # pprPrec :: Rational -> IfaceClassOp -> SDoc #
Binary IfaceClassOp # |
Methods put_ :: BinHandle -> IfaceClassOp -> IO () # put :: BinHandle -> IfaceClassOp -> IO (Bin * IfaceClassOp) # get :: BinHandle -> IO IfaceClassOp #
HasOccName IfaceClassOp # |
Methods occName :: IfaceClassOp -> OccName #
NamedThing IfaceClassOp # |
Methods getOccName :: IfaceClassOp -> OccName # getName :: IfaceClassOp -> Name #

data IfaceAT #

Constructors

IfaceAT IfaceDecl (Maybe IfaceType) |

Instances

Outputable IfaceAT # |
Methods ppr :: IfaceAT -> SDoc # pprPrec :: Rational -> IfaceAT -> SDoc #
Binary IfaceAT # |
Methods put_ :: BinHandle -> IfaceAT -> IO () # put :: BinHandle -> IfaceAT -> IO (Bin * IfaceAT) # get :: BinHandle -> IO IfaceAT #

data IfaceConDecl #

Constructors

IfCon |

Fields

- ifConName :: IfaceTopBndr
- ifConWrapper :: Bool
- ifConInfix :: Bool
- ifConExTvs :: [IfaceForAllBndr]
- ifConEqSpec :: IfaceEqSpec
- ifConCtxt :: IfaceContext
- ifConArgTys :: [IfaceType]
- ifConFields :: [FieldLabel]
- ifConStricts :: [IfaceBang]
- ifConSrcStricts :: [IfaceSrcBang]

Instances

Binary IfaceConDecl # |
Methods put_ :: BinHandle -> IfaceConDecl -> IO () # put :: BinHandle -> IfaceConDecl -> IO (Bin * IfaceConDecl) # get :: BinHandle -> IO IfaceConDecl #
HasOccName IfaceConDecl # |
Methods occName :: IfaceConDecl -> OccName #
NamedThing IfaceConDecl # |
Methods getOccName :: IfaceConDecl -> OccName # getName :: IfaceConDecl -> Name #

data IfaceConDecls #

Constructors

IfAbstractTyCon |
IfDataTyCon [IfaceConDecl] |
IfNewTyCon IfaceConDecl |

Instances

Binary IfaceConDecls # |
Methods put_ :: BinHandle -> IfaceConDecls -> IO () # put :: BinHandle -> IfaceConDecls -> IO (Bin * IfaceConDecls) # get :: BinHandle -> IO IfaceConDecls #

type IfaceEqSpec = [(IfLclName, IfaceType)] #

data IfaceExpr #

Constructors

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 |

Instances

Outputable IfaceExpr # |
Methods ppr :: IfaceExpr -> SDoc # pprPrec :: Rational -> IfaceExpr -> SDoc #
Binary IfaceExpr # |
Methods put_ :: BinHandle -> IfaceExpr -> IO () # put :: BinHandle -> IfaceExpr -> IO (Bin * IfaceExpr) # get :: BinHandle -> IO IfaceExpr #

type IfaceAlt = (IfaceConAlt, [IfLclName], IfaceExpr) #

data IfaceLetBndr #

Constructors

IfLetBndr IfLclName IfaceType IfaceIdInfo IfaceJoinInfo |

Instances

Binary IfaceLetBndr # |
Methods put_ :: BinHandle -> IfaceLetBndr -> IO () # put :: BinHandle -> IfaceLetBndr -> IO (Bin * IfaceLetBndr) # get :: BinHandle -> IO IfaceLetBndr #

data IfaceJoinInfo #

Constructors

IfaceNotJoinPoint |
IfaceJoinPoint JoinArity |

Instances

Outputable IfaceJoinInfo # |
Methods ppr :: IfaceJoinInfo -> SDoc # pprPrec :: Rational -> IfaceJoinInfo -> SDoc #
Binary IfaceJoinInfo # |
Methods put_ :: BinHandle -> IfaceJoinInfo -> IO () # put :: BinHandle -> IfaceJoinInfo -> IO (Bin * IfaceJoinInfo) # get :: BinHandle -> IO IfaceJoinInfo #

data IfaceBinding #

Constructors

IfaceNonRec IfaceLetBndr IfaceExpr |
IfaceRec [(IfaceLetBndr, IfaceExpr)] |

Instances

Binary IfaceBinding # |
Methods put_ :: BinHandle -> IfaceBinding -> IO () # put :: BinHandle -> IfaceBinding -> IO (Bin * IfaceBinding) # get :: BinHandle -> IO IfaceBinding #

data IfaceConAlt #

Constructors

IfaceDefault |
IfaceDataAlt IfExtName |
IfaceLitAlt Literal |

Instances

Outputable IfaceConAlt # |
Methods ppr :: IfaceConAlt -> SDoc # pprPrec :: Rational -> IfaceConAlt -> SDoc #
Binary IfaceConAlt # |
Methods put_ :: BinHandle -> IfaceConAlt -> IO () # put :: BinHandle -> IfaceConAlt -> IO (Bin * IfaceConAlt) # get :: BinHandle -> IO IfaceConAlt #

data IfaceIdInfo #

Constructors

NoInfo |
HasInfo [IfaceInfoItem] |

Instances

Outputable IfaceIdInfo # |
Methods ppr :: IfaceIdInfo -> SDoc # pprPrec :: Rational -> IfaceIdInfo -> SDoc #
Binary IfaceIdInfo # |
Methods put_ :: BinHandle -> IfaceIdInfo -> IO () # put :: BinHandle -> IfaceIdInfo -> IO (Bin * IfaceIdInfo) # get :: BinHandle -> IO IfaceIdInfo #

data IfaceIdDetails #

Constructors

IfVanillaId |
IfRecSelId (Either IfaceTyCon IfaceDecl) Bool |
IfDFunId |

Instances

Outputable IfaceIdDetails # |
Methods ppr :: IfaceIdDetails -> SDoc # pprPrec :: Rational -> IfaceIdDetails -> SDoc #
Binary IfaceIdDetails # |
Methods put_ :: BinHandle -> IfaceIdDetails -> IO () # put :: BinHandle -> IfaceIdDetails -> IO (Bin * IfaceIdDetails) # get :: BinHandle -> IO IfaceIdDetails #

data IfaceUnfolding #

Constructors

IfCoreUnfold Bool IfaceExpr |
IfCompulsory IfaceExpr |
IfInlineRule Arity Bool Bool IfaceExpr |
IfDFunUnfold [IfaceBndr] [IfaceExpr] |

Instances

Outputable IfaceUnfolding # |
Methods ppr :: IfaceUnfolding -> SDoc # pprPrec :: Rational -> IfaceUnfolding -> SDoc #
Binary IfaceUnfolding # |
Methods put_ :: BinHandle -> IfaceUnfolding -> IO () # put :: BinHandle -> IfaceUnfolding -> IO (Bin * IfaceUnfolding) # get :: BinHandle -> IO IfaceUnfolding #

data IfaceInfoItem #

Constructors

HsArity Arity |
HsStrictness StrictSig |
HsInline InlinePragma |
HsUnfold Bool IfaceUnfolding |
HsNoCafRefs |
HsLevity |

Instances

Outputable IfaceInfoItem # |
Methods ppr :: IfaceInfoItem -> SDoc # pprPrec :: Rational -> IfaceInfoItem -> SDoc #
Binary IfaceInfoItem # |
Methods put_ :: BinHandle -> IfaceInfoItem -> IO () # put :: BinHandle -> IfaceInfoItem -> IO (Bin * IfaceInfoItem) # get :: BinHandle -> IO IfaceInfoItem #

data IfaceRule #

Constructors

IfaceRule |

Fields

- ifRuleName :: RuleName
- ifActivation :: Activation
- ifRuleBndrs :: [IfaceBndr]
- ifRuleHead :: IfExtName
- ifRuleArgs :: [IfaceExpr]
- ifRuleRhs :: IfaceExpr
- ifRuleAuto :: Bool
- ifRuleOrph :: IsOrphan

Instances

Outputable IfaceRule # |
Methods ppr :: IfaceRule -> SDoc # pprPrec :: Rational -> IfaceRule -> SDoc #
Binary IfaceRule # |
Methods put_ :: BinHandle -> IfaceRule -> IO () # put :: BinHandle -> IfaceRule -> IO (Bin * IfaceRule) # get :: BinHandle -> IO IfaceRule #

data IfaceAnnotation #

Constructors

IfaceAnnotation |

Fields

- ifAnnotatedTarget :: IfaceAnnTarget
- ifAnnotatedValue :: AnnPayload

Instances

Outputable IfaceAnnotation # |
Methods ppr :: IfaceAnnotation -> SDoc # pprPrec :: Rational -> IfaceAnnotation -> SDoc #
Binary IfaceAnnotation # |
Methods put_ :: BinHandle -> IfaceAnnotation -> IO () # put :: BinHandle -> IfaceAnnotation -> IO (Bin * IfaceAnnotation) # get :: BinHandle -> IO IfaceAnnotation #

type IfaceAnnTarget = AnnTarget OccName #

data IfaceClsInst #

Constructors

IfaceClsInst |

Fields

- ifInstCls :: IfExtName
- ifInstTys :: [Maybe IfaceTyCon]
- ifDFun :: IfExtName
- ifOFlag :: OverlapFlag
- ifInstOrph :: IsOrphan

Instances

Outputable IfaceClsInst # |
Methods ppr :: IfaceClsInst -> SDoc # pprPrec :: Rational -> IfaceClsInst -> SDoc #
Binary IfaceClsInst # |
Methods put_ :: BinHandle -> IfaceClsInst -> IO () # put :: BinHandle -> IfaceClsInst -> IO (Bin * IfaceClsInst) # get :: BinHandle -> IO IfaceClsInst #

data IfaceFamInst #

Constructors

IfaceFamInst |

Fields

- ifFamInstFam :: IfExtName
- ifFamInstTys :: [Maybe IfaceTyCon]
- ifFamInstAxiom :: IfExtName
- ifFamInstOrph :: IsOrphan

Instances

Outputable IfaceFamInst # |
Methods ppr :: IfaceFamInst -> SDoc # pprPrec :: Rational -> IfaceFamInst -> SDoc #
Binary IfaceFamInst # |
Methods put_ :: BinHandle -> IfaceFamInst -> IO () # put :: BinHandle -> IfaceFamInst -> IO (Bin * IfaceFamInst) # get :: BinHandle -> IO IfaceFamInst #

data IfaceTickish #

Constructors

IfaceHpcTick Module Int |
IfaceSCC CostCentre Bool Bool |
IfaceSource RealSrcSpan String |

Instances

Binary IfaceTickish # |
Methods put_ :: BinHandle -> IfaceTickish -> IO () # put :: BinHandle -> IfaceTickish -> IO (Bin * IfaceTickish) # get :: BinHandle -> IO IfaceTickish #

data IfaceClassBody #

Constructors

IfAbstractClass |
IfConcreteClass |

Fields

- ifClassCtxt :: IfaceContext
- ifATs :: [IfaceAT]
- ifSigs :: [IfaceClassOp]
- ifMinDef :: BooleanFormula IfLclName

data IfaceBang #

This corresponds to an HsImplBang; that is, the final implementation decision about the data constructor arg

Constructors

IfNoBang |
IfStrict |
IfUnpack |
IfUnpackCo IfaceCoercion |

Instances

Binary IfaceBang # |
Methods put_ :: BinHandle -> IfaceBang -> IO () # put :: BinHandle -> IfaceBang -> IO (Bin * IfaceBang) # get :: BinHandle -> IO IfaceBang #

data IfaceSrcBang #

This corresponds to HsSrcBang

Constructors

IfSrcBang SrcUnpackedness SrcStrictness |

Instances

Binary IfaceSrcBang # |
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 | {--} specified
SrcNoUnpack | {--} specified
NoSrcUnpack | no unpack pragma

Instances

Eq SrcUnpackedness # |
Methods (==) :: SrcUnpackedness -> SrcUnpackedness -> Bool # (/=) :: SrcUnpackedness -> SrcUnpackedness -> Bool #
Data SrcUnpackedness # |

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness Source #

toConstr :: SrcUnpackedness -> Constr Source #

dataTypeOf :: SrcUnpackedness -> DataType Source #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness) Source #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness) Source #

gmapT :: (forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> SrcUnpackedness -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness Source #

Outputable SrcUnpackedness # |
Methods ppr :: SrcUnpackedness -> SDoc # pprPrec :: Rational -> SrcUnpackedness -> SDoc #
Binary SrcUnpackedness # |
Methods put_ :: BinHandle -> SrcUnpackedness -> IO () # put :: BinHandle -> SrcUnpackedness -> IO (Bin * SrcUnpackedness) # get :: BinHandle -> IO SrcUnpackedness #

data SrcStrictness #

Source Strictness

What strictness annotation the user wrote

Constructors

SrcLazy | Lazy, ie '~'
SrcStrict | Strict, ie `!`
NoSrcStrict | no strictness annotation

Instances

Eq SrcStrictness # |
Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool #
Data SrcStrictness # |

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness Source #

toConstr :: SrcStrictness -> Constr Source #

dataTypeOf :: SrcStrictness -> DataType Source #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) Source #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) Source #

gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> SrcStrictness -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness Source #

Outputable SrcStrictness # |
Methods ppr :: SrcStrictness -> SDoc # pprPrec :: Rational -> SrcStrictness -> SDoc #
Binary SrcStrictness # |
Methods put_ :: BinHandle -> SrcStrictness -> IO () # put :: BinHandle -> SrcStrictness -> IO (Bin * SrcStrictness) # get :: BinHandle -> IO SrcStrictness #

data IfaceAxBranch #

Constructors

IfaceAxBranch |

Fields

- ifaxbTyVars :: [IfaceTvBndr]
- ifaxbCoVars :: [IfaceIdBndr]
- ifaxbLHS :: IfaceTcArgs
- ifaxbRoles :: [Role]
- ifaxbRHS :: IfaceType
- ifaxbIncomps :: [BranchIndex]

Instances

Binary IfaceAxBranch # |
Methods put_ :: BinHandle -> IfaceAxBranch -> IO () # put :: BinHandle -> IfaceAxBranch -> IO (Bin * IfaceAxBranch) # get :: BinHandle -> IO IfaceAxBranch #

data IfaceTyConParent #

Constructors

IfNoParent |
IfDataInstance IfExtName IfaceTyCon IfaceTcArgs |

Instances

Outputable IfaceTyConParent # |
Methods ppr :: IfaceTyConParent -> SDoc # pprPrec :: Rational -> IfaceTyConParent -> SDoc #
Binary IfaceTyConParent # |
Methods put_ :: BinHandle -> IfaceTyConParent -> IO () # put :: BinHandle -> IfaceTyConParent -> IO (Bin * IfaceTyConParent) # get :: BinHandle -> IO IfaceTyConParent #

data IfaceCompleteMatch #

Constructors

IfaceCompleteMatch [IfExtName] IfExtName |

Instances

Outputable IfaceCompleteMatch # |
Methods ppr :: IfaceCompleteMatch -> SDoc # pprPrec :: Rational -> IfaceCompleteMatch -> SDoc #
Binary IfaceCompleteMatch # |
Methods put_ :: BinHandle -> IfaceCompleteMatch -> IO () # put :: BinHandle -> IfaceCompleteMatch -> IO (Bin * IfaceCompleteMatch) # get :: BinHandle -> IO IfaceCompleteMatch #

# Binding names

type IfaceTopBndr = Name #

A binding top-level `Name` in an interface file (e.g. the name of an `IfaceDecl`).

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 #

Pretty Print an IfaceExpre

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 #

newtype AltPpr #

Constructors

AltPpr (Maybe (OccName -> SDoc)) |

data ShowSub #

Constructors

ShowSub |

Fields

- ss_how_much :: ShowHowMuch
- ss_forall :: ShowForAllFlag

data ShowHowMuch #

Constructors

ShowHeader AltPpr | Header information only, not rhs

ShowSome [OccName] AltPpr

Show only some sub-components. Specifically,

@[
  @] Print all sub-components.
`(n:ns)`
  Print sub-component `n` with `ShowSub = ns`; elide other sub-components to `...` May 14: the list is max 1 element long at the moment

ShowIface | Everything including GHC-internal information (used in --show-iface)

Instances

Outputable ShowHowMuch # |
Methods ppr :: ShowHowMuch -> SDoc # pprPrec :: Rational -> ShowHowMuch -> SDoc #

showToIface :: ShowSub #

showToHeader :: ShowSub #