Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data StgArg
- data GenStgTopBinding (pass :: StgPass)
- = StgTopLifted (GenStgBinding pass)
- | StgTopStringLit Id ByteString
- data GenStgBinding (pass :: StgPass)
- data GenStgExpr (pass :: StgPass)
- = StgApp Id [StgArg]
- | StgLit Literal
- | StgConApp DataCon ConstructorNumber [StgArg] [[PrimRep]]
- | 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 :: StgPass)
- = StgRhsClosure (XRhsClosure pass) CostCentreStack !UpdateFlag [BinderP pass] (GenStgExpr pass) Type
- | StgRhsCon CostCentreStack DataCon ConstructorNumber [StgTickish] [StgArg] Type
- data GenStgAlt (pass :: StgPass) = 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 :: StgPass) = (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 :: forall (pass :: StgPass). XRhsClosure pass ~ DIdSet => GenStgRhs pass -> DIdSet
- isDllConApp :: Platform -> Bool -> Module -> DataCon -> [StgArg] -> Bool
- stgArgType :: StgArg -> Type
- stgArgRep :: StgArg -> [PrimRep]
- stgArgRep1 :: StgArg -> PrimOrVoidRep
- stgArgRepU :: StgArg -> PrimRep
- stgArgRep_maybe :: StgArg -> Maybe [PrimRep]
- stgCaseBndrInScope :: AltType -> Bool -> Bool
- data StgPprOpts = StgPprOpts {
- stgSccEnabled :: !Bool
- panicStgPprOpts :: StgPprOpts
- shortStgPprOpts :: StgPprOpts
- pprStgArg :: StgArg -> SDoc
- pprStgExpr :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgExpr pass -> SDoc
- pprStgRhs :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc
- pprStgBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgBinding pass -> SDoc
- pprStgAlt :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> Bool -> GenStgAlt pass -> SDoc
- pprGenStgTopBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
- pprStgTopBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
- pprGenStgTopBindings :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
- pprStgTopBindings :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
Documentation
Instances
data GenStgTopBinding (pass :: StgPass) Source #
A top-level binding.
data GenStgBinding (pass :: StgPass) Source #
Instances
OutputablePass pass => Outputable (GenStgBinding pass) Source # | |
Defined in GHC.Stg.Syntax ppr :: GenStgBinding pass -> SDoc Source # |
data GenStgExpr (pass :: StgPass) Source #
StgApp Id [StgArg] | |
StgLit Literal | |
StgConApp DataCon ConstructorNumber [StgArg] [[PrimRep]] | |
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) Source # | |
Defined in GHC.Stg.Syntax ppr :: GenStgExpr pass -> SDoc Source # |
data GenStgRhs (pass :: StgPass) Source #
StgRhsClosure | |
| |
StgRhsCon CostCentreStack DataCon ConstructorNumber [StgTickish] [StgArg] Type |
Instances
OutputablePass pass => Outputable (GenStgRhs pass) Source # | |
Instances
Used as a data type index for the stgSyn AST
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) Source #
Instances
type BinderP 'CodeGen Source # | |
Defined in GHC.Stg.Syntax | |
type BinderP 'InferTagged Source # | |
Defined in GHC.Stg.Syntax | |
type BinderP 'InferTaggedBinders Source # | |
Defined in GHC.Stg.Syntax | |
type BinderP 'LiftLams Source # | |
Defined in GHC.Stg.Syntax | |
type BinderP 'Vanilla Source # | |
Defined in GHC.Stg.Syntax |
type family XRhsClosure (pass :: StgPass) Source #
Instances
type XRhsClosure 'CodeGen Source # | Code gen needs to track non-global free vars |
Defined in GHC.Stg.Syntax | |
type XRhsClosure 'InferTagged Source # | |
Defined in GHC.Stg.Syntax | |
type XRhsClosure 'InferTaggedBinders Source # | |
Defined in GHC.Stg.Syntax | |
type XRhsClosure 'LiftLams Source # | |
Defined in GHC.Stg.Syntax | |
type XRhsClosure 'Vanilla Source # | |
Defined in GHC.Stg.Syntax |
type family XLet (pass :: StgPass) Source #
Instances
type XLet 'CodeGen Source # | |
Defined in GHC.Stg.Syntax | |
type XLet 'InferTagged Source # | |
Defined in GHC.Stg.Syntax | |
type XLet 'InferTaggedBinders Source # | |
Defined in GHC.Stg.Syntax | |
type XLet 'LiftLams Source # | |
Defined in GHC.Stg.Syntax | |
type XLet 'Vanilla Source # | |
Defined in GHC.Stg.Syntax |
type family XLetNoEscape (pass :: StgPass) Source #
Instances
type XLetNoEscape 'CodeGen Source # | |
Defined in GHC.Stg.Syntax | |
type XLetNoEscape 'InferTagged Source # | |
Defined in GHC.Stg.Syntax | |
type XLetNoEscape 'InferTaggedBinders Source # | |
Defined in GHC.Stg.Syntax | |
type XLetNoEscape 'LiftLams Source # | |
Defined in GHC.Stg.Syntax | |
type XLetNoEscape 'Vanilla Source # | |
Defined in GHC.Stg.Syntax |
data NoExtFieldSilent Source #
Like NoExtField
, but with an Outputable
instance that
returns empty
.
Instances
noExtFieldSilent :: NoExtFieldSilent Source #
Used when constructing a term with an unused extension point that should not appear in pretty-printed output at all.
type OutputablePass (pass :: StgPass) = (Outputable (XLet pass), Outputable (XLetNoEscape pass), Outputable (XRhsClosure pass), OutputableBndr (BinderP pass)) Source #
data UpdateFlag Source #
Instances
Outputable UpdateFlag Source # | |
Defined in GHC.Stg.Syntax ppr :: UpdateFlag -> SDoc Source # |
isUpdatable :: UpdateFlag -> Bool Source #
data ConstructorNumber Source #
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 Source # | |
Defined in GHC.Stg.Syntax ppr :: ConstructorNumber -> SDoc Source # |
type StgTopBinding = GenStgTopBinding 'Vanilla Source #
type StgBinding = GenStgBinding 'Vanilla Source #
type StgExpr = GenStgExpr 'Vanilla Source #
type CgStgTopBinding = GenStgTopBinding 'CodeGen Source #
type CgStgBinding = GenStgBinding 'CodeGen Source #
type CgStgExpr = GenStgExpr 'CodeGen Source #
type TgStgTopBinding = GenStgTopBinding 'CodeGen Source #
type TgStgBinding = GenStgBinding 'CodeGen Source #
type TgStgExpr = GenStgExpr 'CodeGen Source #
type LlStgTopBinding = GenStgTopBinding 'LiftLams Source #
type LlStgBinding = GenStgBinding 'LiftLams Source #
type LlStgExpr = GenStgExpr 'LiftLams Source #
type InStgTopBinding = StgTopBinding Source #
type InStgBinding = StgBinding Source #
type OutStgTopBinding = StgTopBinding Source #
type OutStgBinding = StgBinding Source #
type OutStgExpr = StgExpr Source #
Instances
stgRhsArity :: StgRhs -> Int Source #
freeVarsOfRhs :: forall (pass :: StgPass). XRhsClosure pass ~ DIdSet => GenStgRhs pass -> DIdSet Source #
isDllConApp :: Platform -> Bool -> Module -> DataCon -> [StgArg] -> Bool Source #
Does this constructor application refer to anything in a different *Windows* DLL? If so, we can't allocate it statically
stgArgType :: StgArg -> Type Source #
Type of an StgArg
Very half baked because we have lost the type arguments.
This function should be avoided: in STG we aren't supposed to
look at types, but only PrimReps.
Use stgArgRep
, stgArgRep_maybe
, stgArgRep1
instaed.
stgArgRep1 :: StgArg -> PrimOrVoidRep Source #
Assumes that the argument has at most one PrimRep, which holds after unarisation. See Note [Post-unarisation invariants] in GHC.Stg.Unarise. See Note [VoidRep] in GHC.Types.RepType.
stgArgRepU :: StgArg -> PrimRep Source #
Assumes that the argument has exactly one PrimRep. See Note [VoidRep] in GHC.Types.RepType.
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] in GHC.Stg.Unarise.
data StgPprOpts Source #
STG pretty-printing options
StgPprOpts | |
|
panicStgPprOpts :: StgPprOpts Source #
STG pretty-printing options used for panic messages
shortStgPprOpts :: StgPprOpts Source #
STG pretty-printing options used for short messages
pprStgExpr :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgExpr pass -> SDoc Source #
pprStgRhs :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc Source #
pprStgBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgBinding pass -> SDoc Source #
pprStgAlt :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> Bool -> GenStgAlt pass -> SDoc Source #
pprGenStgTopBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc Source #
pprStgTopBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc Source #
pprGenStgTopBindings :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc Source #
pprStgTopBindings :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc Source #