[commit: ghc] wip/ttypeable: Fix showTypeable (c251172)
git at git.haskell.org
git at git.haskell.org
Fri Jul 29 16:29:02 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ttypeable
Link : http://ghc.haskell.org/trac/ghc/changeset/c251172f6c0a76f5e89499da6409caf859aa32fa/ghc
>---------------------------------------------------------------
commit c251172f6c0a76f5e89499da6409caf859aa32fa
Author: Ben Gamari <ben at smart-cactus.org>
Date: Fri Jul 15 01:00:20 2016 +0200
Fix showTypeable
>---------------------------------------------------------------
c251172f6c0a76f5e89499da6409caf859aa32fa
libraries/base/Data/Typeable/Internal.hs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs
index 6e5242b..6237d25 100644
--- a/libraries/base/Data/Typeable/Internal.hs
+++ b/libraries/base/Data/Typeable/Internal.hs
@@ -334,7 +334,7 @@ instance Show (TypeRep (a :: k)) where
showTypeable :: Int -> TypeRep (a :: k) -> ShowS
showTypeable p rep
- | Just HRefl <- star `eqTypeRep` rep =
+ | Just HRefl <- star `eqTypeRep` typeRepKind rep =
showTypeable' 9 rep
| otherwise =
@@ -351,14 +351,13 @@ showTypeable' _ rep
showChar '(' . showArgs (showChar ',') tys . showChar ')'
where (tc, tys) = splitApps rep
showTypeable' p (TrTyCon _ tycon _) = showsPrec p tycon
- --showsPrec p (TRFun x r) =
- -- showParen (p > 8) $
- -- showsPrec 9 x . showString " -> " . showsPrec 8 r
+--showTypeable' p (TRFun x r) =
+-- showParen (p > 8) $
+-- showsPrec 9 x . showString " -> " . showsPrec 8 r
showTypeable' p (TrApp _ (TrApp _ (TrTyCon _ tycon _) x) r)
| isArrowTyCon tycon =
showParen (p > 8) $
- showsPrec 9 x . showString " -> " . showsPrec p r
-
+ showsPrec 9 x . showString " -> " . showsPrec 8 r
showTypeable' p (TrApp _ f x)
| otherwise =
showParen (p > 9) $
More information about the ghc-commits
mailing list