Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
GHC.Stg.Syntax
Synopsis
- data StgArg
- data GenStgTopBinding pass
- = StgTopLifted (GenStgBinding pass)
- | StgTopStringLit Id ByteString
- data GenStgBinding pass
- data GenStgExpr pass
- = StgApp Id [StgArg]
- | StgLit Literal
- | StgConApp DataCon ConstructorNumber [StgArg] [Type]
- | StgOpApp StgOp [StgArg] Type
- | StgCase (GenStgExpr pass) (BinderP pass) AltType [GenStgAlt pass]
- | StgLet (XLet pass) (GenStgBinding pass) (GenStgExpr pass)
- | StgLetNoEscape (XLetNoEscape pass) (GenStgBinding pass) (GenStgExpr pass)
- | StgTick StgTickish (GenStgExpr pass)
- data GenStgRhs pass
- = StgRhsClosure (XRhsClosure pass) CostCentreStack !UpdateFlag [BinderP pass] (GenStgExpr pass) Type
- | StgRhsCon CostCentreStack DataCon ConstructorNumber [StgTickish] [StgArg] Type
- data GenStgAlt pass = GenStgAlt {}
- data AltType
- data StgPass
- type family BinderP (pass :: StgPass)
- type family XRhsClosure (pass :: StgPass)
- type family XLet (pass :: StgPass)
- type family XLetNoEscape (pass :: StgPass)
- data NoExtFieldSilent
- noExtFieldSilent :: NoExtFieldSilent
- type OutputablePass pass = (Outputable (XLet pass), Outputable (XLetNoEscape pass), Outputable (XRhsClosure pass), OutputableBndr (BinderP pass))
- data UpdateFlag
- isUpdatable :: UpdateFlag -> Bool
- data ConstructorNumber
- type StgTopBinding = GenStgTopBinding 'Vanilla
- type StgBinding = GenStgBinding 'Vanilla
- type StgExpr = GenStgExpr 'Vanilla
- type StgRhs = GenStgRhs 'Vanilla
- type StgAlt = GenStgAlt 'Vanilla
- type CgStgTopBinding = GenStgTopBinding 'CodeGen
- type CgStgBinding = GenStgBinding 'CodeGen
- type CgStgExpr = GenStgExpr 'CodeGen
- type CgStgRhs = GenStgRhs 'CodeGen
- type CgStgAlt = GenStgAlt 'CodeGen
- type TgStgTopBinding = GenStgTopBinding 'CodeGen
- type TgStgBinding = GenStgBinding 'CodeGen
- type TgStgExpr = GenStgExpr 'CodeGen
- type TgStgRhs = GenStgRhs 'CodeGen
- type TgStgAlt = GenStgAlt 'CodeGen
- type LlStgTopBinding = GenStgTopBinding 'LiftLams
- type LlStgBinding = GenStgBinding 'LiftLams
- type LlStgExpr = GenStgExpr 'LiftLams
- type LlStgRhs = GenStgRhs 'LiftLams
- type LlStgAlt = GenStgAlt 'LiftLams
- type InStgArg = StgArg
- type InStgTopBinding = StgTopBinding
- type InStgBinding = StgBinding
- type InStgExpr = StgExpr
- type InStgRhs = StgRhs
- type InStgAlt = StgAlt
- type OutStgArg = StgArg
- type OutStgTopBinding = StgTopBinding
- type OutStgBinding = StgBinding
- type OutStgExpr = StgExpr
- type OutStgRhs = StgRhs
- type OutStgAlt = StgAlt
- data StgOp
- stgRhsArity :: StgRhs -> Int
- freeVarsOfRhs :: XRhsClosure pass ~ DIdSet => GenStgRhs pass -> DIdSet
- isDllConApp :: Platform -> Bool -> Module -> DataCon -> [StgArg] -> Bool
- stgArgType :: StgArg -> Type
- stgCaseBndrInScope :: AltType -> Bool -> Bool
- data StgPprOpts = StgPprOpts {
- stgSccEnabled :: !Bool
- panicStgPprOpts :: StgPprOpts
- shortStgPprOpts :: StgPprOpts
- pprStgArg :: StgArg -> SDoc
- pprStgExpr :: OutputablePass pass => StgPprOpts -> GenStgExpr pass -> SDoc
- pprStgRhs :: OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc
- pprStgBinding :: OutputablePass pass => StgPprOpts -> GenStgBinding pass -> SDoc
- pprStgAlt :: OutputablePass pass => StgPprOpts -> Bool -> GenStgAlt pass -> SDoc
- pprGenStgTopBinding :: OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
- pprStgTopBinding :: OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
- pprGenStgTopBindings :: OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
- pprStgTopBindings :: OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
Documentation
Instances
Outputable StgArg # | |
Defined in GHC.Stg.Syntax |
data GenStgTopBinding pass #
A top-level binding.
Constructors
StgTopLifted (GenStgBinding pass) | |
StgTopStringLit Id ByteString |
data GenStgBinding pass #
Instances
OutputablePass pass => Outputable (GenStgBinding pass) # | |
Defined in GHC.Stg.Syntax Methods ppr :: GenStgBinding pass -> SDoc # |
data GenStgExpr pass #
Constructors
StgApp Id [StgArg] | |
StgLit Literal | |
StgConApp DataCon ConstructorNumber [StgArg] [Type] | |
StgOpApp StgOp [StgArg] Type | |
StgCase (GenStgExpr pass) (BinderP pass) AltType [GenStgAlt pass] | |
StgLet (XLet pass) (GenStgBinding pass) (GenStgExpr pass) | |
StgLetNoEscape (XLetNoEscape pass) (GenStgBinding pass) (GenStgExpr pass) | |
StgTick StgTickish (GenStgExpr pass) |
Instances
OutputablePass pass => Outputable (GenStgExpr pass) # | |
Defined in GHC.Stg.Syntax Methods ppr :: GenStgExpr pass -> SDoc # |
Constructors
StgRhsClosure | |
Fields
| |
StgRhsCon CostCentreStack DataCon ConstructorNumber [StgTickish] [StgArg] Type |
Instances
OutputablePass pass => Outputable (GenStgRhs pass) # | |
Defined in GHC.Stg.Syntax |
Instances
Outputable AltType # | |
Defined in GHC.Stg.Syntax |
Used as a data type index for the stgSyn AST
Constructors
Vanilla | |
LiftLams | Use internally by the lambda lifting pass |
InferTaggedBinders | Tag inference information on binders. See Note [Tag inference passes] in GHC.Stg.InferTags |
InferTagged | Tag inference information put on relevant StgApp nodes See Note [Tag inference passes] in GHC.Stg.InferTags |
CodeGen |
type family BinderP (pass :: StgPass) #
Instances
type BinderP 'CodeGen # | |
Defined in GHC.Stg.Syntax | |
type BinderP 'InferTagged # | |
Defined in GHC.Stg.Syntax | |
type BinderP 'InferTaggedBinders # | |
Defined in GHC.Stg.Syntax | |
type BinderP 'LiftLams # | |
Defined in GHC.Stg.Syntax | |
type BinderP 'Vanilla # | |
Defined in GHC.Stg.Syntax |
type family XRhsClosure (pass :: StgPass) #
Instances
type XRhsClosure 'CodeGen # | Code gen needs to track non-global free vars |
Defined in GHC.Stg.Syntax | |
type XRhsClosure 'InferTagged # | |
Defined in GHC.Stg.Syntax | |
type XRhsClosure 'InferTaggedBinders # | |
Defined in GHC.Stg.Syntax | |
type XRhsClosure 'LiftLams # | |
Defined in GHC.Stg.Syntax | |
type XRhsClosure 'Vanilla # | |
Defined in GHC.Stg.Syntax |
type family XLet (pass :: StgPass) #
Instances
type XLet 'CodeGen # | |
Defined in GHC.Stg.Syntax | |
type XLet 'InferTagged # | |
Defined in GHC.Stg.Syntax | |
type XLet 'InferTaggedBinders # | |
Defined in GHC.Stg.Syntax | |
type XLet 'LiftLams # | |
Defined in GHC.Stg.Syntax | |
type XLet 'Vanilla # | |
Defined in GHC.Stg.Syntax |
type family XLetNoEscape (pass :: StgPass) #
Instances
type XLetNoEscape 'CodeGen # | |
Defined in GHC.Stg.Syntax | |
type XLetNoEscape 'InferTagged # | |
Defined in GHC.Stg.Syntax | |
type XLetNoEscape 'InferTaggedBinders # | |
Defined in GHC.Stg.Syntax | |
type XLetNoEscape 'LiftLams # | |
Defined in GHC.Stg.Syntax | |
type XLetNoEscape 'Vanilla # | |
Defined in GHC.Stg.Syntax |
data NoExtFieldSilent #
Like NoExtField
, but with an Outputable
instance that
returns empty
.
Instances
Data NoExtFieldSilent # | |
Defined in GHC.Stg.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtFieldSilent -> c NoExtFieldSilent gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtFieldSilent toConstr :: NoExtFieldSilent -> Constr dataTypeOf :: NoExtFieldSilent -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtFieldSilent) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtFieldSilent) gmapT :: (forall b. Data b => b -> b) -> NoExtFieldSilent -> NoExtFieldSilent gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtFieldSilent -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtFieldSilent -> r gmapQ :: (forall d. Data d => d -> u) -> NoExtFieldSilent -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtFieldSilent -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtFieldSilent -> m NoExtFieldSilent gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtFieldSilent -> m NoExtFieldSilent gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtFieldSilent -> m NoExtFieldSilent | |
Outputable NoExtFieldSilent # | |
Defined in GHC.Stg.Syntax Methods ppr :: NoExtFieldSilent -> SDoc # | |
Eq NoExtFieldSilent # | |
Defined in GHC.Stg.Syntax Methods (==) :: NoExtFieldSilent -> NoExtFieldSilent -> Bool # (/=) :: NoExtFieldSilent -> NoExtFieldSilent -> Bool # | |
Ord NoExtFieldSilent # | |
Defined in GHC.Stg.Syntax Methods compare :: NoExtFieldSilent -> NoExtFieldSilent -> Ordering # (<) :: NoExtFieldSilent -> NoExtFieldSilent -> Bool # (<=) :: NoExtFieldSilent -> NoExtFieldSilent -> Bool # (>) :: NoExtFieldSilent -> NoExtFieldSilent -> Bool # (>=) :: NoExtFieldSilent -> NoExtFieldSilent -> Bool # max :: NoExtFieldSilent -> NoExtFieldSilent -> NoExtFieldSilent # min :: NoExtFieldSilent -> NoExtFieldSilent -> NoExtFieldSilent # |
noExtFieldSilent :: NoExtFieldSilent #
Used when constructing a term with an unused extension point that should not appear in pretty-printed output at all.
type OutputablePass pass = (Outputable (XLet pass), Outputable (XLetNoEscape pass), Outputable (XRhsClosure pass), OutputableBndr (BinderP pass)) #
data UpdateFlag #
Constructors
ReEntrant | |
Updatable | |
SingleEntry |
Instances
Outputable UpdateFlag # | |
Defined in GHC.Stg.Syntax Methods ppr :: UpdateFlag -> SDoc # |
isUpdatable :: UpdateFlag -> Bool #
data ConstructorNumber #
When `-fdistinct-constructor-tables` is turned on then each usage of a constructor is given an unique number and an info table is generated for each different constructor.
Instances
Outputable ConstructorNumber # | |
Defined in GHC.Stg.Syntax Methods ppr :: ConstructorNumber -> SDoc # |
type StgTopBinding = GenStgTopBinding 'Vanilla #
type StgBinding = GenStgBinding 'Vanilla #
type StgExpr = GenStgExpr 'Vanilla #
type CgStgTopBinding = GenStgTopBinding 'CodeGen #
type CgStgBinding = GenStgBinding 'CodeGen #
type CgStgExpr = GenStgExpr 'CodeGen #
type TgStgTopBinding = GenStgTopBinding 'CodeGen #
type TgStgBinding = GenStgBinding 'CodeGen #
type TgStgExpr = GenStgExpr 'CodeGen #
type LlStgTopBinding = GenStgTopBinding 'LiftLams #
type LlStgBinding = GenStgBinding 'LiftLams #
type LlStgExpr = GenStgExpr 'LiftLams #
type InStgTopBinding = StgTopBinding #
type InStgBinding = StgBinding #
type OutStgTopBinding = StgTopBinding #
type OutStgBinding = StgBinding #
type OutStgExpr = StgExpr #
Constructors
StgPrimOp PrimOp | |
StgPrimCallOp PrimCall | |
StgFCallOp ForeignCall Type |
Instances
Outputable StgOp # | |
Defined in GHC.Stg.Syntax |
stgRhsArity :: StgRhs -> Int #
freeVarsOfRhs :: XRhsClosure pass ~ DIdSet => GenStgRhs pass -> DIdSet #
isDllConApp :: Platform -> Bool -> Module -> DataCon -> [StgArg] -> Bool #
Does this constructor application refer to anything in a different *Windows* DLL? If so, we can't allocate it statically
stgArgType :: StgArg -> Type #
Type of an StgArg
Very half baked because we have lost the type arguments.
Given an alt type and whether the program is unarised, return whether the case binder is in scope.
Case binders of unboxed tuple or unboxed sum type always dead after the unariser has run. See Note [Post-unarisation invariants].
data StgPprOpts #
STG pretty-printing options
Constructors
StgPprOpts | |
Fields
|
panicStgPprOpts :: StgPprOpts #
STG pretty-printing options used for panic messages
shortStgPprOpts :: StgPprOpts #
STG pretty-printing options used for short messages
pprStgExpr :: OutputablePass pass => StgPprOpts -> GenStgExpr pass -> SDoc #
pprStgRhs :: OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc #
pprStgBinding :: OutputablePass pass => StgPprOpts -> GenStgBinding pass -> SDoc #
pprStgAlt :: OutputablePass pass => StgPprOpts -> Bool -> GenStgAlt pass -> SDoc #
pprGenStgTopBinding :: OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc #
pprStgTopBinding :: OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc #
pprGenStgTopBindings :: OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc #
pprStgTopBindings :: OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc #