|
|
|
|
|
| Description |
GHC uses several kinds of name internally:
- OccName: see OccName
- RdrName.RdrName: see RdrName
- Name is the type of names that have had their scoping and binding resolved. They
have an OccName but also a Unique that disambiguates Names that have
the same OccName and indeed is used for all Name comparison. Names
also contain information about where they originated from, see Name
- Id.Id: see Id
- Var.Var: see Var
Names are one of:
- External, if they name things declared in other modules. Some external
Names are wired in, i.e. they name primitives defined in the compiler itself
- Internal, if they name things in the module being compiled. Some internal
Names are system names, if they are names manufactured by the compiler
|
|
| Synopsis |
|
|
|
|
| The main types
|
|
|
| A unique, unambigious name for something, containing information about where
that thing originated.
| Instances | |
|
|
|
| BuiltInSyntax is for things like (:), [] and tuples,
which have special syntactic forms. They aren't in scope
as such.
| | Constructors | |
|
|
| Creating Names
|
|
|
| Create a name which is (for now at least) local to the current module and hence
does not need a Module to disambiguate it from other Names
|
|
|
| Create a name brought into being by the compiler
|
|
|
|
|
|
|
| Make a name for a foreign call
|
|
|
| Make the name of an implicit parameter
|
|
|
|
|
| Create a name which definitely originates in the given module
|
|
|
| Create a name which is actually defined by the compiler itself
|
|
| Manipulating and deconstructing Names
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Make the Name into an internal name, regardless of what it was to begin with
|
|
|
|
|
|
|
|
| Predicates on Names
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Class NamedThing and overloaded friends
|
|
| class NamedThing a where | Source |
|
| A class allowing convenient access to the Name of various datatypes
| | | Methods | | | Instances | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| module OccName |
|
| Produced by Haddock version 2.6.1 |