GHC.Stg.Lift.Types

ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Stg.Lift.Types

Synopsis

- data Skeleton
  - = ClosureSk !Id !DIdSet !Skeleton
  - | RhsSk !Card !Skeleton
  - | AltSk !Skeleton !Skeleton
  - | BothSk !Skeleton !Skeleton
  - | NilSk
- bothSk :: Skeleton -> Skeleton -> Skeleton
- altSk :: Skeleton -> Skeleton -> Skeleton
- rhsSk :: Card -> Skeleton -> Skeleton
- data BinderInfo
  - = BindsClosure !Id !Bool
  - | BoringBinder !Id
- binderInfoBndr :: BinderInfo -> Id
- binderInfoOccursAsArg :: BinderInfo -> Maybe Bool

# Documentation

data Skeleton #

Captures details of the syntax tree relevant to the cost model, such as closures, multi-shot lambdas and case expressions.

Constructors

ClosureSk |
Fields !Id !DIdSet free vars !Skeleton
RhsSk |
Fields !Card how often the RHS was entered !Skeleton
AltSk !Skeleton !Skeleton |
BothSk !Skeleton !Skeleton |
NilSk |

#### Instances

Instances details

Outputable Skeleton # |
Instance details Defined in GHC.Stg.Lift.Types Methods ppr :: Skeleton -> SDoc #

bothSk :: Skeleton -> Skeleton -> Skeleton #

altSk :: Skeleton -> Skeleton -> Skeleton #

rhsSk :: Card -> Skeleton -> Skeleton #

data BinderInfo #

The type used in binder positions in `GenStgExpr`s.

Constructors

BindsClosure !Id !Bool | Let(-no-escape)-bound thing with a flag indicating whether it occurs as an argument or in a nullary application (see GHC.Stg.Lift.Analysis).
BoringBinder !Id | Every other kind of binder

#### Instances

Instances details

Outputable BinderInfo # |
Instance details Defined in GHC.Stg.Lift.Types Methods ppr :: BinderInfo -> SDoc #
OutputableBndr BinderInfo # |
Instance details Defined in GHC.Stg.Lift.Types Methods pprBndr :: BindingSite -> BinderInfo -> SDoc # pprPrefixOcc :: BinderInfo -> SDoc # pprInfixOcc :: BinderInfo -> SDoc # bndrIsJoin_maybe :: BinderInfo -> JoinPointHood #

binderInfoBndr :: BinderInfo -> Id #

Gets the bound `Id` out a `BinderInfo`.

binderInfoOccursAsArg :: BinderInfo -> Maybe Bool #

Returns `Nothing` for `BoringBinder`s and `Just` the flag indicating occurrences as argument or in a nullary applications otherwise.