Note [Wired-in Ids]
A "wired-in" Id can be referred to directly in GHC (e.g. 'voidPrimId') rather than by looking it up its name in some environment or fetching it from an interface file. There are several reasons why an Id might appear in the wiredInIds: * ghcPrimIds: see Note [ghcPrimIds (aka pseudoops)] * magicIds: see Note [magicIds] * errorIds, defined in GHC.Core.Make. These error functions (e.g. rUNTIME_ERROR_ID) are wired in because the desugarer generates code that mentions them directly In all cases except ghcPrimIds, there is a definition site in a library module, which may be called (e.g. in higher order situations); but the wired-in version means that the details are never read from that module's interface file; instead, the full definition is right here.
References 2
- ghcPrimIds (aka pseudoops) GHC.Types.Id.Make
- magicIds GHC.Types.Id.Make
Referenced by 1
- Patching magic definitions GHC.HsToCore