[commit: ghc] wip/ttypeable: Render TYPE 'PtrRepLifted as * (ff67285)

git at git.haskell.org git at git.haskell.org
Fri Jul 8 14:31:55 UTC 2016


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

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

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

commit ff67285500aad7ec2d081ea4e612c5ddf3e0dcbb
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Thu Mar 17 01:02:39 2016 +0100

    Render TYPE 'PtrRepLifted as *


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

ff67285500aad7ec2d081ea4e612c5ddf3e0dcbb
 libraries/base/Data/Typeable/Internal.hs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs
index 108aa71..8a58d4e 100644
--- a/libraries/base/Data/Typeable/Internal.hs
+++ b/libraries/base/Data/Typeable/Internal.hs
@@ -323,6 +323,8 @@ typeRepXFingerprint (TypeRepX t) = typeRepFingerprint t
 
 instance Show (TypeRep (a :: k)) where
   showsPrec _ rep
+    | Just HRefl <- rep `eqTypeRep` (typeRep :: TypeRep *) =
+      showChar '*'
     | isListTyCon tc, [ty] <- tys =
       showChar '[' . shows ty . showChar ']'
     | isTupleTyCon tc =



More information about the ghc-commits mailing list