[commit: ghc] wip/binary-bytestring: TysWiredIn: Notes (91a0420)

git at git.haskell.org git at git.haskell.org
Mon Jul 11 22:37:40 UTC 2016


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

On branch  : wip/binary-bytestring
Link       : http://ghc.haskell.org/trac/ghc/changeset/91a04202fb644f8e8afb8e0bd5e4c57a8ec220ce/ghc

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

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

    TysWiredIn: Notes


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

91a04202fb644f8e8afb8e0bd5e4c57a8ec220ce
 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