[commit: ghc] wip/ttypeable: TcTypeable: Clarify comment (63d611b)

git at git.haskell.org git at git.haskell.org
Sun Jan 29 20:20:09 UTC 2017


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

On branch  : wip/ttypeable
Link       : http://ghc.haskell.org/trac/ghc/changeset/63d611b69f21748bcb5cb68feb8d9b2a7873f42c/ghc

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

commit 63d611b69f21748bcb5cb68feb8d9b2a7873f42c
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Fri Jul 22 13:16:05 2016 +0200

    TcTypeable: Clarify comment


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

63d611b69f21748bcb5cb68feb8d9b2a7873f42c
 compiler/typecheck/TcTypeable.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcTypeable.hs b/compiler/typecheck/TcTypeable.hs
index 2bbf522..62a4202 100644
--- a/compiler/typecheck/TcTypeable.hs
+++ b/compiler/typecheck/TcTypeable.hs
@@ -215,7 +215,11 @@ ghcPrimTypeableTyCons = filter (not . definedManually) $ concat
     , primTyCons
     ]
   where
-    definedManually tc = tyConName tc `elemNameEnv` primTypeableTcCons
+    -- Some things, like TYPE, have mutually recursion kind relationships and
+    -- therefore have manually-defined representations. See Note [Mutually
+    -- recursive representations of primitive types] in Data.Typeable.Internal
+    -- and Note [Grand plan for Typeable] for details.
+    definedManually tc = tyConName tc `elemNameEnv` primTypeableTyCons
 
 -- | Generate bindings for the type representation of the wired-in TyCons defined
 -- by the virtual "GHC.Prim" module. This differs from the usual



More information about the ghc-commits mailing list