GHC.Types.Id

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

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.Id

Contents

- The main types
- In and Out variants
  - Simple construction
  - Taking an Id apart
  - Modifying an Id
  - Predicates on Ids
  - Join variables
  - Inline pragma stuff
  - One-shot lambdas
  - Reading `IdInfo` fields
  - Writing `IdInfo` fields

Description

GHC uses several kinds of name internally:

- `OccName`: see GHC.Types.Name.Occurrence
- `RdrName`: see GHC.Types.Name.Reader
- `Name`: see GHC.Types.Name
- `Id` represents names that not only have a `Name` but also a `Type` and some additional details (a `IdInfo` and one of LocalIdDetails or GlobalIdDetails) that are added, modified and inspected by various compiler passes. These `Var` names may either be global or local, see GHC.Types.Var
- `Var`: see GHC.Types.Var

Synopsis

- data Var
- type Id = Var
- isId :: Var -> Bool
- type InVar = Var
- type InId = Id
- type OutVar = Var
- type OutId = Id
- mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id
- mkVanillaGlobal :: HasDebugCallStack => Name -> Type -> Id
- mkVanillaGlobalWithInfo :: HasDebugCallStack => Name -> Type -> IdInfo -> Id
- mkLocalId :: HasDebugCallStack => Name -> Mult -> Type -> Id
- mkLocalCoVar :: HasDebugCallStack => Name -> Type -> CoVar
- mkLocalIdOrCoVar :: HasDebugCallStack => Name -> Mult -> Type -> Id
- mkLocalIdWithInfo :: HasDebugCallStack => Name -> Mult -> Type -> IdInfo -> Id
- mkExportedLocalId :: IdDetails -> Name -> Type -> Id
- mkExportedVanillaId :: Name -> Type -> Id
- mkSysLocal :: FastString -> Unique -> Mult -> Type -> Id
- mkSysLocalM :: MonadUnique m => FastString -> Mult -> Type -> m Id
- mkSysLocalOrCoVar :: FastString -> Unique -> Mult -> Type -> Id
- mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Mult -> Type -> m Id
- mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- mkTemplateLocals :: [Type] -> [Id]
- mkTemplateLocalsNum :: Int -> [Type] -> [Id]
- mkTemplateLocal :: Int -> Type -> Id
- mkScaledTemplateLocal :: Int -> Scaled Type -> Id
- mkWorkerId :: Unique -> Id -> Type -> Id
- idName :: Id -> Name
- idType :: Id -> Kind
- idMult :: HasDebugCallStack => Id -> Mult
- idScaledType :: Id -> Scaled Type
- idUnique :: Id -> Unique
- idInfo :: HasDebugCallStack => Id -> IdInfo
- idDetails :: HasCallStack => Id -> IdDetails
- recordSelectorTyCon :: Id -> RecSelParent
- recordSelectorTyCon_maybe :: Id -> Maybe RecSelParent
- setIdName :: Id -> Name -> Id
- setIdUnique :: Id -> Unique -> Id
- setIdType :: Id -> Type -> Id
- setIdMult :: Id -> Mult -> Id
- updateIdTypeButNotMult :: (Type -> Type) -> Id -> Id
- updateIdTypeAndMult :: (Type -> Type) -> Id -> Id
- updateIdTypeAndMultM :: Monad m => (Type -> m Type) -> Id -> m Id
- setIdExported :: Id -> Id
- setIdNotExported :: Id -> Id
- globaliseId :: Id -> Id
- localiseId :: Id -> Id
- setIdInfo :: Id -> IdInfo -> Id
- lazySetIdInfo :: Id -> IdInfo -> Id
- modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- maybeModifyIdInfo :: Maybe IdInfo -> Id -> Id
- zapLamIdInfo :: Id -> Id
- floatifyIdDemandInfo :: Id -> Id
- zapIdUsageInfo :: Id -> Id
- zapIdUsageEnvInfo :: Id -> Id
- zapIdUsedOnceInfo :: Id -> Id
- zapIdTailCallInfo :: Id -> Id
- zapFragileIdInfo :: Id -> Id
- zapIdDmdSig :: Id -> Id
- zapStableUnfolding :: Id -> Id
- transferPolyIdInfo :: Id -> [Var] -> Id -> Id
- scaleIdBy :: Mult -> Id -> Id
- scaleVarBy :: Mult -> Var -> Var
- isImplicitId :: Id -> Bool
- isDeadBinder :: Id -> Bool
- isStrictId :: Id -> Bool
- isExportedId :: Var -> Bool
- isLocalId :: Var -> Bool
- isGlobalId :: Var -> Bool
- isRecordSelector :: Id -> Bool
- isNaughtyRecordSelector :: Id -> Bool
- isPatSynRecordSelector :: Id -> Bool
- isDataConRecordSelector :: Id -> Bool
- isClassOpId :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- isDFunId :: Id -> Bool
- isPrimOpId :: Id -> Bool
- isPrimOpId_maybe :: Id -> Maybe PrimOp
- isFCallId :: Id -> Bool
- isFCallId_maybe :: Id -> Maybe ForeignCall
- isDataConWorkId :: Id -> Bool
- isDataConWorkId_maybe :: Id -> Maybe DataCon
- isDataConWrapId :: Id -> Bool
- isDataConWrapId_maybe :: Id -> Maybe DataCon
- dataConWrapUnfolding_maybe :: Id -> Maybe CoreExpr
- isDataConId :: Id -> Bool
- isDataConId_maybe :: Id -> Maybe DataCon
- idDataCon :: Id -> DataCon
- isConLikeId :: Id -> Bool
- isWorkerLikeId :: Id -> Bool
- isDeadEndId :: Var -> Bool
- idIsFrom :: Module -> Id -> Bool
- hasNoBinding :: Id -> Bool
- type JoinId = Id
- data JoinPointHood
- isJoinId :: Var -> Bool
- idJoinPointHood :: Var -> JoinPointHood
- idJoinArity :: JoinId -> JoinArity
- asJoinId :: Id -> JoinArity -> JoinId
- asJoinId_maybe :: Id -> JoinPointHood -> Id
- zapJoinId :: Id -> Id
- idInlinePragma :: Id -> InlinePragma
- setInlinePragma :: Id -> InlinePragma -> Id
- modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id
- idInlineActivation :: Id -> Activation
- setInlineActivation :: Id -> Activation -> Id
- idRuleMatchInfo :: Id -> RuleMatchInfo
- setOneShotLambda :: Id -> Id
- clearOneShotLambda :: Id -> Id
- updOneShotInfo :: Id -> OneShotInfo -> Id
- setIdOneShotInfo :: Id -> OneShotInfo -> Id
- idArity :: Id -> Arity
- idCallArity :: Id -> Arity
- idFunRepArity :: Id -> RepArity
- idSpecialisation :: Id -> RuleInfo
- idCoreRules :: Id -> [CoreRule]
- idHasRules :: Id -> Bool
- idCafInfo :: Id -> CafInfo
- idLFInfo_maybe :: Id -> Maybe LambdaFormInfo
- idOneShotInfo :: Id -> OneShotInfo
- idOccInfo :: Id -> OccInfo
- type IdUnfoldingFun = Id -> Unfolding
- idUnfolding :: IdUnfoldingFun
- realIdUnfolding :: Id -> Unfolding
- alwaysActiveUnfoldingFun :: IdUnfoldingFun
- whenActiveUnfoldingFun :: (Activation -> Bool) -> IdUnfoldingFun
- noUnfoldingFun :: IdUnfoldingFun
- setIdUnfolding :: Id -> Unfolding -> Id
- zapIdUnfolding :: Id -> Id
- setCaseBndrEvald :: StrictnessMark -> Id -> Id
- setIdArity :: Id -> Arity -> Id
- setIdCallArity :: Id -> Arity -> Id
- setIdSpecialisation :: Id -> RuleInfo -> Id
- setIdCafInfo :: Id -> CafInfo -> Id
- setIdOccInfo :: Id -> OccInfo -> Id
- zapIdOccInfo :: Id -> Id
- setIdLFInfo :: Id -> LambdaFormInfo -> Id
- setIdDemandInfo :: Id -> Demand -> Id
- setIdDmdSig :: Id -> DmdSig -> Id
- setIdCprSig :: Id -> CprSig -> Id
- setIdCbvMarks :: Id -> [CbvMark] -> Id
- idCbvMarks_maybe :: Id -> Maybe [CbvMark]
- idCbvMarkArity :: Id -> Arity
- asWorkerLikeId :: Id -> Id
- asNonWorkerLikeId :: Id -> Id
- idDemandInfo :: Id -> Demand
- idDmdSig :: Id -> DmdSig
- idCprSig :: Id -> CprSig
- idTagSig_maybe :: Id -> Maybe TagSig
- setIdTagSig :: Id -> TagSig -> Id

# The main types

data Var #

Variable

Essentially a typed `Name`, that may also contain some additional information about the `Var` and its use sites.

#### Instances

Instances details

Data Var # |
Instance details Defined in GHC.Types.Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Var -> c Var # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Var # toConstr :: Var -> Constr # dataTypeOf :: Var -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Var) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var) # gmapT :: (forall b. Data b => b -> b) -> Var -> Var # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQ :: (forall d. Data d => d -> u) -> Var -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var #
NamedThing Var # |
Instance details Defined in GHC.Types.Var Methods getOccName :: Var -> OccName # getName :: Var -> Name #
HasOccName Var # |
Instance details Defined in GHC.Types.Var Methods occName :: Var -> OccName #
Uniquable Var # |
Instance details Defined in GHC.Types.Var Methods getUnique :: Var -> Unique #
Outputable Var # |
Instance details Defined in GHC.Types.Var Methods ppr :: Var -> SDoc #
OutputableBndr Var # |
Instance details Defined in GHC.Core.Ppr Methods pprBndr :: BindingSite -> Var -> SDoc # pprPrefixOcc :: Var -> SDoc # pprInfixOcc :: Var -> SDoc # bndrIsJoin_maybe :: Var -> JoinPointHood #
Eq Var # |
Instance details Defined in GHC.Types.Var Methods (==) :: Var -> Var -> Bool # (/=) :: Var -> Var -> Bool #
Ord Var # |
Instance details Defined in GHC.Types.Var Methods compare :: Var -> Var -> Ordering # (<) :: Var -> Var -> Bool # (<=) :: Var -> Var -> Bool # (>) :: Var -> Var -> Bool # (>=) :: Var -> Var -> Bool # max :: Var -> Var -> Var # min :: Var -> Var -> Var #
Eq (DeBruijn CoreAlt) # |
Instance details Defined in GHC.Core.Map.Expr Methods (==) :: DeBruijn CoreAlt -> DeBruijn CoreAlt -> Bool # (/=) :: DeBruijn CoreAlt -> DeBruijn CoreAlt -> Bool #
Eq (DeBruijn CoreExpr) # |
Instance details Defined in GHC.Core.Map.Expr Methods (==) :: DeBruijn CoreExpr -> DeBruijn CoreExpr -> Bool # (/=) :: DeBruijn CoreExpr -> DeBruijn CoreExpr -> Bool #
Eq (DeBruijn Var) # |
Instance details Defined in GHC.Core.Map.Type Methods (==) :: DeBruijn Var -> DeBruijn Var -> Bool # (/=) :: DeBruijn Var -> DeBruijn Var -> Bool #
OutputableBndr (Id, TagSig) # |
Instance details Defined in GHC.Stg.EnforceEpt.TagSig Methods pprBndr :: BindingSite -> (Id, TagSig) -> SDoc # pprPrefixOcc :: (Id, TagSig) -> SDoc # pprInfixOcc :: (Id, TagSig) -> SDoc # bndrIsJoin_maybe :: (Id, TagSig) -> JoinPointHood #
type Anno Id # |
Instance details Defined in GHC.Hs.Extension type Anno Id = SrcSpanAnnN

type Id = Var #

Identifier

isId :: Var -> Bool #

Is this a value-level (i.e., computationally relevant) `Id`entifier? Satisfies `isId = not . isTyVar`.

# In and Out variants

type InVar = Var #

type InId = Id #

type OutVar = Var #

type OutId = Id #

## Simple construction

mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id #

For an explanation of global vs. local `Id`s, see GHC.Types.Var.Var

mkVanillaGlobal :: HasDebugCallStack => Name -> Type -> Id #

Make a global `Id` without any extra information at all

mkVanillaGlobalWithInfo :: HasDebugCallStack => Name -> Type -> IdInfo -> Id #

Make a global `Id` with no global information but some generic `IdInfo`

mkLocalId :: HasDebugCallStack => Name -> Mult -> Type -> Id #

For an explanation of global vs. local `Id`s, see GHC.Types.Var

mkLocalCoVar :: HasDebugCallStack => Name -> Type -> CoVar #

Make a local CoVar

mkLocalIdOrCoVar :: HasDebugCallStack => Name -> Mult -> Type -> Id #

Like `mkLocalId`, but checks the type to see if it should make a covar

mkLocalIdWithInfo :: HasDebugCallStack => Name -> Mult -> Type -> IdInfo -> Id #

mkExportedLocalId :: IdDetails -> Name -> Type -> Id #

Create a local `Id` that is marked as exported. This prevents things attached to it from being removed as dead code. See Note [Exported LocalIds]

mkExportedVanillaId :: Name -> Type -> Id #

mkSysLocal :: FastString -> Unique -> Mult -> Type -> Id #

Create a system local `Id`. These are local `Id`s (see Var) that are created by the compiler out of thin air

mkSysLocalM :: MonadUnique m => FastString -> Mult -> Type -> m Id #

mkSysLocalOrCoVar :: FastString -> Unique -> Mult -> Type -> Id #

Like `mkSysLocal`, but checks to see if we have a covar type

mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Mult -> Type -> m Id #

mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #

Create a user local `Id`. These are local `Id`s (see GHC.Types.Var) with a name and location that the user might recognize

mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #

Like `mkUserLocal`, but checks if we have a coercion type

mkTemplateLocals :: [Type] -> [Id] #

Create a template local for a series of types

mkTemplateLocalsNum :: Int -> [Type] -> [Id] #

Create a template local for a series of type, but start from a specified template local

mkTemplateLocal :: Int -> Type -> Id #

Create a template local: a family of system local `Id`s in bijection with `Int`s, typically used in unfoldings

mkScaledTemplateLocal :: Int -> Scaled Type -> Id #

mkWorkerId :: Unique -> Id -> Type -> Id #

Workers get local names. CoreTidy will externalise these if necessary

## Taking an Id apart

idName :: Id -> Name #

idType :: Id -> Kind #

idMult :: HasDebugCallStack => Id -> Mult #

idScaledType :: Id -> Scaled Type #

idUnique :: Id -> Unique #

idInfo :: HasDebugCallStack => Id -> IdInfo #

idDetails :: HasCallStack => Id -> IdDetails #

recordSelectorTyCon :: Id -> RecSelParent #

If the `Id` is that for a record selector, extract the `sel_tycon`. Panic otherwise.

recordSelectorTyCon_maybe :: Id -> Maybe RecSelParent #

## Modifying an Id

setIdName :: Id -> Name -> Id #

setIdUnique :: Id -> Unique -> Id #

setIdType :: Id -> Type -> Id #

Not only does this set the `Id` `Type`, it also evaluates the type to try and reduce space usage

setIdMult :: Id -> Mult -> Id #

updateIdTypeButNotMult :: (Type -> Type) -> Id -> Id #

updateIdTypeAndMult :: (Type -> Type) -> Id -> Id #

updateIdTypeAndMultM :: Monad m => (Type -> m Type) -> Id -> m Id #

setIdExported :: Id -> Id #

setIdNotExported :: Id -> Id #

globaliseId :: Id -> Id #

If it's a local, make it global

localiseId :: Id -> Id #

setIdInfo :: Id -> IdInfo -> Id #

lazySetIdInfo :: Id -> IdInfo -> Id #

modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id #

maybeModifyIdInfo :: Maybe IdInfo -> Id -> Id #

zapLamIdInfo :: Id -> Id #

floatifyIdDemandInfo :: Id -> Id #

zapIdUsageInfo :: Id -> Id #

zapIdUsageEnvInfo :: Id -> Id #

zapIdUsedOnceInfo :: Id -> Id #

zapIdTailCallInfo :: Id -> Id #

zapFragileIdInfo :: Id -> Id #

zapIdDmdSig :: Id -> Id #

zapStableUnfolding :: Id -> Id #

transferPolyIdInfo :: Id -> [Var] -> Id -> Id #

scaleIdBy :: Mult -> Id -> Id #

scaleVarBy :: Mult -> Var -> Var #

Like `scaleIdBy`, but skips non-Ids. Useful for scaling a mixed list of ids and tyvars.

## Predicates on Ids

isImplicitId :: Id -> Bool #

`isImplicitId` tells whether an `Id`s info is implied by other declarations, so we don't need to put its signature in an interface file, even if it's mentioned in some other interface unfolding.

isDeadBinder :: Id -> Bool #

isStrictId :: Id -> Bool #

`isStrictId` says whether either (a) the `Id` has a strict demand placed on it or (b) definitely has a "strict type", such that it can always be evaluated strictly (i.e an unlifted type) We need to check (b) as well as (a), because when the demand for the given `id` hasn't been computed yet but `id` has a strict type, we still want `isStrictId id` to be `True`. Returns False if the type is levity polymorphic; False is always safe.

isExportedId :: Var -> Bool #

`isExportedIdVar` means "don't throw this away"

isLocalId :: Var -> Bool #

isGlobalId :: Var -> Bool #

isRecordSelector :: Id -> Bool #

isNaughtyRecordSelector :: Id -> Bool #

isPatSynRecordSelector :: Id -> Bool #

isDataConRecordSelector :: Id -> Bool #

isClassOpId :: Id -> Bool #

isClassOpId_maybe :: Id -> Maybe Class #

isDFunId :: Id -> Bool #

isPrimOpId :: Id -> Bool #

isPrimOpId_maybe :: Id -> Maybe PrimOp #

isFCallId :: Id -> Bool #

isFCallId_maybe :: Id -> Maybe ForeignCall #

isDataConWorkId :: Id -> Bool #

isDataConWorkId_maybe :: Id -> Maybe DataCon #

isDataConWrapId :: Id -> Bool #

isDataConWrapId_maybe :: Id -> Maybe DataCon #

dataConWrapUnfolding_maybe :: Id -> Maybe CoreExpr #

isDataConId :: Id -> Bool #

isDataConId_maybe :: Id -> Maybe DataCon #

idDataCon :: Id -> DataCon #

Get from either the worker or the wrapper `Id` to the `DataCon`. Currently used only in the desugarer.

INVARIANT: `idDataCon (dataConWrapId d) = d`: remember, `dataConWrapId` can return either the wrapper or the worker

isConLikeId :: Id -> Bool #

isWorkerLikeId :: Id -> Bool #

An Id for which we might require all callers to pass strict arguments properly tagged + evaluated.

See Note [CBV Function Ids]

isDeadEndId :: Var -> Bool #

Returns true if an application to n args diverges or throws an exception See Note [Dead ends] in GHC.Types.Demand.

idIsFrom :: Module -> Id -> Bool #

hasNoBinding :: Id -> Bool #

Returns `True` of an `Id` which may not have a binding, even though it is defined in this module.

## Join variables

type JoinId = Id #

data JoinPointHood #

#### Instances

Instances details

NFData JoinPointHood # |
Instance details Defined in GHC.Utils.Outputable Methods rnf :: JoinPointHood -> () #
Binary JoinPointHood # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> JoinPointHood -> IO () # put :: WriteBinHandle -> JoinPointHood -> IO (Bin JoinPointHood) # get :: ReadBinHandle -> IO JoinPointHood #
Outputable JoinPointHood # |
Instance details Defined in GHC.Utils.Outputable Methods ppr :: JoinPointHood -> SDoc #
Eq JoinPointHood # |
Instance details Defined in GHC.Utils.Outputable Methods (==) :: JoinPointHood -> JoinPointHood -> Bool # (/=) :: JoinPointHood -> JoinPointHood -> Bool #

isJoinId :: Var -> Bool #

idJoinPointHood :: Var -> JoinPointHood #

Doesn't return strictness marks

idJoinArity :: JoinId -> JoinArity #

asJoinId :: Id -> JoinArity -> JoinId infixl 1 #

asJoinId_maybe :: Id -> JoinPointHood -> Id infixl 1 #

zapJoinId :: Id -> Id #

## Inline pragma stuff

idInlinePragma :: Id -> InlinePragma #

setInlinePragma :: Id -> InlinePragma -> Id infixl 1 #

modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id #

idInlineActivation :: Id -> Activation #

setInlineActivation :: Id -> Activation -> Id infixl 1 #

idRuleMatchInfo :: Id -> RuleMatchInfo #

## One-shot lambdas

setOneShotLambda :: Id -> Id #

clearOneShotLambda :: Id -> Id #

updOneShotInfo :: Id -> OneShotInfo -> Id #

setIdOneShotInfo :: Id -> OneShotInfo -> Id infixl 1 #

## Reading `IdInfo` fields

idArity :: Id -> Arity #

idCallArity :: Id -> Arity #

idFunRepArity :: Id -> RepArity #

This function counts all arguments post-unarisation, which includes arguments with no runtime representation -- see Note [Unarisation and arity]

idSpecialisation :: Id -> RuleInfo #

idCoreRules :: Id -> [CoreRule] #

idHasRules :: Id -> Bool #

idCafInfo :: Id -> CafInfo infixl 1 #

idLFInfo_maybe :: Id -> Maybe LambdaFormInfo #

idOneShotInfo :: Id -> OneShotInfo #

idOccInfo :: Id -> OccInfo #

type IdUnfoldingFun = Id -> Unfolding #

idUnfolding :: IdUnfoldingFun #

Returns the `Id`s unfolding, but does not expose the unfolding of a strong loop breaker. See `unfoldingInfo`.

If you really want the unfolding of a strong loopbreaker, call `realIdUnfolding`.

realIdUnfolding :: Id -> Unfolding #

Expose the unfolding if there is one, including for loop breakers

alwaysActiveUnfoldingFun :: IdUnfoldingFun #

Returns an unfolding only if (a) not a strong loop breaker and (b) always active

whenActiveUnfoldingFun :: (Activation -> Bool) -> IdUnfoldingFun #

Returns an unfolding only if (a) not a strong loop breaker and (b) active in according to is_active

noUnfoldingFun :: IdUnfoldingFun #

## Writing `IdInfo` fields

setIdUnfolding :: Id -> Unfolding -> Id infixl 1 #

zapIdUnfolding :: Id -> Id #

Similar to trimUnfolding, but also removes evaldness info.

setCaseBndrEvald :: StrictnessMark -> Id -> Id #

setIdArity :: Id -> Arity -> Id infixl 1 #

setIdCallArity :: Id -> Arity -> Id infixl 1 #

setIdSpecialisation :: Id -> RuleInfo -> Id infixl 1 #

setIdCafInfo :: Id -> CafInfo -> Id #

setIdOccInfo :: Id -> OccInfo -> Id infixl 1 #

zapIdOccInfo :: Id -> Id #

setIdLFInfo :: Id -> LambdaFormInfo -> Id #

setIdDemandInfo :: Id -> Demand -> Id infixl 1 #

setIdDmdSig :: Id -> DmdSig -> Id infixl 1 #

setIdCprSig :: Id -> CprSig -> Id infixl 1 #

setIdCbvMarks :: Id -> [CbvMark] -> Id infixl 1 #

If all marks are NotMarkedStrict we just set nothing.

idCbvMarks_maybe :: Id -> Maybe [CbvMark] #

idCbvMarkArity :: Id -> Arity #

asWorkerLikeId :: Id -> Id #

Turn this id into a WorkerLikeId if possible.

asNonWorkerLikeId :: Id -> Id #

Remove any cbv marks on arguments from a given Id.

idDemandInfo :: Id -> Demand #

idDmdSig :: Id -> DmdSig #

Accesses the `Id'`s `dmdSigInfo`.

idCprSig :: Id -> CprSig #

idTagSig_maybe :: Id -> Maybe TagSig #

setIdTagSig :: Id -> TagSig -> Id #