The directory fptools/ghc/compiler/basicTypes/
contains modules that define some of the essential types definition for
the compiler - such as, identifiers, variables, modules, and unique
names.
Id
s
An Id
(defined in Id.lhs
essentially records information about value and data constructor
identifiers -- to be precise, in the case of data constructors, two
Id
s are used to represent the worker and wrapper functions
for the data constructor, respectively. The information maintained in
the Id
abstraction includes among other items strictness,
occurrence, specialisation, and unfolding information.
Due to the way Id
s are used for data constructors,
all Id
s are represented as variables, which contain a
varInfo
field of abstract type IdInfo.IdInfo
.
This is where the information about Id
s is really stored.
The following is a (currently, partial) list of the various items in an
IdInfo
:
OccInfo
data type is defined in the module BasicTypes.lhs
.
Apart from the trivial NoOccInfo
, it distinguishes
between variables that do not occur at all (IAmDead
),
occur just once (OneOcc
), or a loop breakers
(IAmALoopBreaker
).
Last modified: Wed Aug 8 19:23:01 EST 2001