[commit: ghc] wip/ttypeable: Fix showTypeable (622eb75)
git at git.haskell.org
git at git.haskell.org
Sun Jan 29 20:19:38 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ttypeable
Link : http://ghc.haskell.org/trac/ghc/changeset/622eb750ddeb4e6a6bbc3aa61d4f760efe22ebb8/ghc
>---------------------------------------------------------------
commit 622eb750ddeb4e6a6bbc3aa61d4f760efe22ebb8
Author: Ben Gamari <ben at smart-cactus.org>
Date: Fri Jul 15 01:00:20 2016 +0200
Fix showTypeable
>---------------------------------------------------------------
622eb750ddeb4e6a6bbc3aa61d4f760efe22ebb8
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