[project @ 2004-08-26 15:44:50 by simonpj]
authorsimonpj <unknown>
Thu, 26 Aug 2004 15:45:08 +0000 (15:45 +0000)
committersimonpj <unknown>
Thu, 26 Aug 2004 15:45:08 +0000 (15:45 +0000)
commitbb88e732b7383c10496c0f60c3bdea2c22362cc6
tree633e8b6fd02211c685aaebff6692cabef45b42ed
parentf5eaddd403cee4691d326a256649477d6891fefb
[project @ 2004-08-26 15:44:50 by simonpj]
-------------------------------
Print built-in sytax right
-------------------------------

Built-in syntax, like (:) and [], is not "in scope" via the GlobalRdrEnv
in the usual way.  When we print it out, we should also print it in unqualified
form, even though it's not in the environment.

I've finally bitten the (not very big) bullet, and added to Name the information
about whether or not a name is one of these built-in ones.  That entailed changing
the calls to mkWiredInName, but those are exactly the places where you have to
decide whether it's built-in or not, which is fine.

Built-in syntax => It's a syntactic form, not "in scope" (e.g. [])

Wired-in thing  => The thing (Id, TyCon) is fully known to the compiler,
   not read from an interface file.
   E.g. Bool, True, Int, Float, and many others

All built-in syntax is for wired-in things.
ghc/compiler/basicTypes/MkId.lhs
ghc/compiler/basicTypes/Name.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/prelude/PrelNames.lhs
ghc/compiler/prelude/TysPrim.lhs
ghc/compiler/prelude/TysWiredIn.lhs
ghc/compiler/rename/RnNames.lhs
ghc/compiler/types/TypeRep.lhs