summaryrefslogtreecommitdiff
path: root/compiler/prelude/TysWiredIn.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/prelude/TysWiredIn.hs')
-rw-r--r--compiler/prelude/TysWiredIn.hs22
1 files changed, 5 insertions, 17 deletions
diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs
index f7c6720c8a..7111d7a555 100644
--- a/compiler/prelude/TysWiredIn.hs
+++ b/compiler/prelude/TysWiredIn.hs
@@ -608,15 +608,6 @@ Note [How tuples work] See also Note [Known-key names] in PrelNames
BoxedTuple/UnboxedTuple, and then we used BasicTypes.Boxity to distinguish
E.g. tupleTyCon has a Boxity argument
-* Names of tuple TyCons, DataCons, and DataCon workers have a special encoding
- in the interface file symbol table. This allows us to eliminate the need for a
- original-name cache lookup when loading from an interface file. See
- Note [Symbol table representation of names] and
- Note [Built-in syntax and the OrigNameCache].
-
- Unfortunately, Typeable type representations still do need to be included in
- the name cache for tiresome reasons. See [Grand plan for Typeable].
-
* When looking up an OccName in the original-name cache
(IfaceEnv.lookupOrigNameCache), we spot the tuple OccName to make sure
we get the right wired-in name. This guy can't tell the difference
@@ -650,14 +641,11 @@ decl in GHC.Classes, so I think this part may not work properly. But
it's unused I think.
-}
--- | Tuple types aren't included in the original name cache to keep the size of
--- the cache down. This function is responsible for identifying tuple types and
--- mapping them to the appropriate 'Name'.
---
--- This should only be necessary while resolving names produced by Template
--- Haskell splices since we take care to encode built-in syntax names specially
--- in interface files. See Note [Symbol table representation of names].
--- This function should be able to identify everything in GHC.Tuple
+-- | Built in syntax isn't "in scope" so these OccNames map to wired-in Names
+-- with BuiltInSyntax. However, this should only be necessary while resolving
+-- names produced by Template Haskell splices since we take care to encode
+-- built-in syntax names specially in interface files. See
+-- Note [Symbol table representation of names].
isBuiltInOcc_maybe :: OccName -> Maybe Name
isBuiltInOcc_maybe occ =
case name of