|
|
|
|
|
Description |
GHC uses several kinds of name internally:
- OccName.OccName: see OccName
- RdrName.RdrName: see RdrName
- Name: see Name
- Id.Id represents names that not only have a Name but also a TypeRep.Type and some additional
details (a IdInfo and one of Var.LocalIdDetails or IdInfo.GlobalIdDetails) that
are added, modified and inspected by various compiler passes. These Var names may either
be global or local, see Var
- Var: see Var
|
|
Synopsis |
|
|
|
|
The main types
|
|
|
|
|
|
Simple construction
|
|
|
For an explanation of global vs. local Ids, see Var
|
|
|
Make a global Id without any extra information at all
|
|
|
Make a global Id with no global information but some generic IdInfo
|
|
|
For an explanation of global vs. local Ids, see Var
|
|
|
|
|
Create a local Id that is marked as exported.
This prevents things attached to it from being removed as dead code.
|
|
|
Create a system local Id. These are local Ids (see Var)
that are created by the compiler out of thin air
|
|
|
|
|
Create a user local Id. These are local Ids (see Var) with a name and location that the user might recognize
|
|
|
|
|
Create a template local for a series of types
|
|
|
Create a template local for a series of type, but start from a specified template local
|
|
|
Create a template local: a family of system local Ids in bijection with Ints, typically used in unfoldings
|
|
|
Workers get local names. CoreTidy will externalise these if necessary
|
|
Taking an Id apart
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If the Id is that for a record selector, extract the sel_tycon and label. Panic otherwise
|
|
Modifying an Id
|
|
|
|
|
|
|
Not only does this set the Id Type, it also evaluates the type to try and
reduce space usage
|
|
|
|
|
|
|
If it's a local, make it global
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Predicates on Ids
|
|
|
isImplicitId tells whether an Ids 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.
|
|
|
|
|
|
|
This predicate says whether the Id has a strict demand placed on it or
has a type such that it can always be evaluated strictly (e.g., an
unlifted type, but see the comment for isStrictType). We need to
check separately whether the Id has a so-called "strict type" because if
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.
|
|
|
isExportedIdVar means "don't throw this away"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
Returns true if an application to n args would diverge
|
|
|
|
|
|
|
|
|
Returns True of an Id which may not have a
binding, even though it is defined in this module.
|
|
Inline pragma stuff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
One-shot lambdas
|
|
|
Returns whether the lambda associated with the Id is certainly applied at most once
OR we are applying the "state hack" which makes it appear as if theis is the case for
lambdas used in IO. You should prefer using this over isOneShotLambda
|
|
|
Returns whether the lambda associated with the Id is certainly applied at most once.
You probably want to use isOneShotBndr instead
|
|
|
Should we apply the state hack to values of this Type?
|
|
|
|
|
|
Reading IdInfo fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Writing IdInfo fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.6.1 |