ghc-8.2.1: The GHC API

Safe HaskellNone




The PrelInfo interface to the compiler's prelude knowledge.

This module serves as the central gathering point for names which the compiler knows something about. This includes functions for,

  • discerning whether a Name is known-key
  • given a Unique, looking up its corresponding known-key Name

See Note [Known-key names] and Note [About wired-in things] for information about the two types of prelude things in GHC.


Known-key names

isKnownKeyName :: Name -> Bool Source #

Is a Name known-key?

lookupKnownKeyName :: Unique -> Maybe Name Source #

Given a Unique lookup its associated Name if it corresponds to a known-key thing.

Internal use

knownKeyNames is exported to seed the original name cache only; if you find yourself wanting to look at it you might consider using lookupKnownKeyName or isKnownKeyName.

knownKeyNames :: [Name] Source #

This list is used to ensure that when you say "" in your source code, or in an interface file, you get a Name with the correct known key (See Note [Known-key names] in PrelNames)


Random other things

Class categories