ghc-lib-parser-9.12.2.20250421: 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 Source #

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 Source # |
Instance details Defined in GHC.Stg.Lift.Types Methods ppr :: Skeleton -> SDoc Source #

bothSk :: Skeleton -> Skeleton -> Skeleton Source #

altSk :: Skeleton -> Skeleton -> Skeleton Source #

rhsSk :: Card -> Skeleton -> Skeleton Source #

data BinderInfo Source #

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 Source # |
Instance details Defined in GHC.Stg.Lift.Types Methods ppr :: BinderInfo -> SDoc Source #
OutputableBndr BinderInfo Source # |
Instance details Defined in GHC.Stg.Lift.Types Methods pprBndr :: BindingSite -> BinderInfo -> SDoc Source # pprPrefixOcc :: BinderInfo -> SDoc Source # pprInfixOcc :: BinderInfo -> SDoc Source # bndrIsJoin_maybe :: BinderInfo -> JoinPointHood Source #

binderInfoBndr :: BinderInfo -> Id Source #

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

binderInfoOccursAsArg :: BinderInfo -> Maybe Bool Source #

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