Safe Haskell | None |
---|---|
Language | Haskell2010 |
StgSyn
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 [StgArg] [Type]
- | StgOpApp StgOp [StgArg] Type
- | StgLam (NonEmpty (BinderP pass)) StgExpr
- | StgCase (GenStgExpr pass) (BinderP pass) AltType [GenStgAlt pass]
- | StgLet (XLet pass) (GenStgBinding pass) (GenStgExpr pass)
- | StgLetNoEscape (XLetNoEscape pass) (GenStgBinding pass) (GenStgExpr pass)
- | StgTick (Tickish Id) (GenStgExpr pass)
- data GenStgRhs pass
- = StgRhsClosure (XRhsClosure pass) CostCentreStack !UpdateFlag [BinderP pass] (GenStgExpr pass)
- | StgRhsCon CostCentreStack DataCon [StgArg]
- type GenStgAlt pass = (AltCon, [BinderP pass], GenStgExpr pass)
- 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 NoExtSilent
- noExtSilent :: NoExtSilent
- type OutputablePass pass = (Outputable (XLet pass), Outputable (XLetNoEscape pass), Outputable (XRhsClosure pass), OutputableBndr (BinderP pass))
- data UpdateFlag
- isUpdatable :: UpdateFlag -> Bool
- 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 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
- topStgBindHasCafRefs :: GenStgTopBinding pass -> Bool
- stgArgHasCafRefs :: StgArg -> Bool
- stgRhsArity :: StgRhs -> Int
- isDllConApp :: DynFlags -> Module -> DataCon -> [StgArg] -> Bool
- stgArgType :: StgArg -> Type
- stripStgTicksTop :: (Tickish Id -> Bool) -> GenStgExpr p -> ([Tickish Id], GenStgExpr p)
- stgCaseBndrInScope :: AltType -> Bool -> Bool
- pprStgBinding :: StgBinding -> SDoc
- pprGenStgTopBindings :: OutputablePass pass => [GenStgTopBinding pass] -> SDoc
- pprStgTopBindings :: [StgTopBinding] -> SDoc
Documentation
data GenStgTopBinding pass Source #
A top-level binding.
Constructors
StgTopLifted (GenStgBinding pass) | |
StgTopStringLit Id ByteString |
Instances
OutputablePass pass => Outputable (GenStgTopBinding pass) Source # | |
Defined in StgSyn |
data GenStgBinding pass Source #
Instances
OutputablePass pass => Outputable (GenStgBinding pass) Source # | |
Defined in StgSyn |
data GenStgExpr pass Source #
Constructors
StgApp Id [StgArg] | |
StgLit Literal | |
StgConApp DataCon [StgArg] [Type] | |
StgOpApp StgOp [StgArg] Type | |
StgLam (NonEmpty (BinderP pass)) StgExpr | |
StgCase (GenStgExpr pass) (BinderP pass) AltType [GenStgAlt pass] | |
StgLet (XLet pass) (GenStgBinding pass) (GenStgExpr pass) | |
StgLetNoEscape (XLetNoEscape pass) (GenStgBinding pass) (GenStgExpr pass) | |
StgTick (Tickish Id) (GenStgExpr pass) |
Instances
OutputablePass pass => Outputable (GenStgExpr pass) Source # | |
Defined in StgSyn |
Constructors
StgRhsClosure | |
Fields
| |
StgRhsCon CostCentreStack DataCon [StgArg] |
Used as a data type index for the stgSyn AST
type family XRhsClosure (pass :: StgPass) Source #
Instances
type XRhsClosure Vanilla Source # | |
Defined in StgSyn | |
type XRhsClosure LiftLams Source # | |
Defined in StgLiftLams.Analysis | |
type XRhsClosure CodeGen Source # | Code gen needs to track non-global free vars |
Defined in StgSyn |
type family XLetNoEscape (pass :: StgPass) Source #
Instances
type XLetNoEscape Vanilla Source # | |
Defined in StgSyn | |
type XLetNoEscape LiftLams Source # | |
Defined in StgLiftLams.Analysis | |
type XLetNoEscape CodeGen Source # | |
Defined in StgSyn |
data NoExtSilent Source #
Like NoExt
, but with an Outputable
instance that returns
empty
.
Instances
Eq NoExtSilent Source # | |
Defined in StgSyn | |
Data NoExtSilent Source # | |
Defined in StgSyn Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtSilent -> c NoExtSilent # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtSilent # toConstr :: NoExtSilent -> Constr # dataTypeOf :: NoExtSilent -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtSilent) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtSilent) # gmapT :: (forall b. Data b => b -> b) -> NoExtSilent -> NoExtSilent # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtSilent -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtSilent -> r # gmapQ :: (forall d. Data d => d -> u) -> NoExtSilent -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtSilent -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtSilent -> m NoExtSilent # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtSilent -> m NoExtSilent # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtSilent -> m NoExtSilent # | |
Ord NoExtSilent Source # | |
Defined in StgSyn Methods compare :: NoExtSilent -> NoExtSilent -> Ordering # (<) :: NoExtSilent -> NoExtSilent -> Bool # (<=) :: NoExtSilent -> NoExtSilent -> Bool # (>) :: NoExtSilent -> NoExtSilent -> Bool # (>=) :: NoExtSilent -> NoExtSilent -> Bool # max :: NoExtSilent -> NoExtSilent -> NoExtSilent # min :: NoExtSilent -> NoExtSilent -> NoExtSilent # | |
Outputable NoExtSilent Source # | |
Defined in StgSyn |
noExtSilent :: NoExtSilent Source #
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)) Source #
data UpdateFlag Source #
Constructors
ReEntrant | |
Updatable | |
SingleEntry |
Instances
Outputable UpdateFlag Source # | |
Defined in StgSyn |
isUpdatable :: UpdateFlag -> Bool Source #
type StgTopBinding = GenStgTopBinding Vanilla Source #
type StgBinding = GenStgBinding Vanilla Source #
type StgExpr = GenStgExpr Vanilla Source #
type CgStgBinding = GenStgBinding CodeGen Source #
type CgStgExpr = GenStgExpr CodeGen 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 #
Constructors
StgPrimOp PrimOp | |
StgPrimCallOp PrimCall | |
StgFCallOp ForeignCall Unique |
topStgBindHasCafRefs :: GenStgTopBinding pass -> Bool Source #
stgArgHasCafRefs :: StgArg -> Bool Source #
stgRhsArity :: StgRhs -> Int Source #
isDllConApp :: DynFlags -> 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.
stripStgTicksTop :: (Tickish Id -> Bool) -> GenStgExpr p -> ([Tickish Id], GenStgExpr p) Source #
Strip ticks of a given type from an STG expression
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].
pprStgBinding :: StgBinding -> SDoc Source #
pprGenStgTopBindings :: OutputablePass pass => [GenStgTopBinding pass] -> SDoc Source #
pprStgTopBindings :: [StgTopBinding] -> SDoc Source #