[commit: ghc] wip/occname: TysWiredIn: Notes (45a2505)

git at git.haskell.org git at git.haskell.org
Tue Jul 12 15:23:47 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/occname
Link       : http://ghc.haskell.org/trac/ghc/changeset/45a25050ecfa44d6784d449ebdce532d9a39d63e/ghc

>---------------------------------------------------------------

commit 45a25050ecfa44d6784d449ebdce532d9a39d63e
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Jul 12 00:12:45 2016 +0200

    TysWiredIn: Notes


>---------------------------------------------------------------

45a25050ecfa44d6784d449ebdce532d9a39d63e
 compiler/prelude/TysWiredIn.hs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs
index 65abdd8..609234f 100644
--- a/compiler/prelude/TysWiredIn.hs
+++ b/compiler/prelude/TysWiredIn.hs
@@ -637,9 +637,12 @@ decl in GHC.Classes, so I think this part may not work properly. But
 it's unused I think.
 -}
 
+-- | 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
--- Built in syntax isn't "in scope" so these OccNames
--- map to wired-in Names with BuiltInSyntax
 isBuiltInOcc_maybe occ =
     case name of
       "[]"   -> Just $ choose_ns listTyConName nilDataConName



More information about the ghc-commits mailing list