[commit: packages/base] ghc-7.8: Fix recomputation of TypeRep in Typeable instance (#9203) (0f8dac5)
git at git.haskell.org
git at git.haskell.org
Mon Jun 23 07:39:35 UTC 2014
Repository : ssh://git@git.haskell.org/base
On branch : ghc-7.8
Link : http://ghc.haskell.org/trac/ghc/changeset/0f8dac5367af6e611985b958ea1dd4d3e266588a/base
>---------------------------------------------------------------
commit 0f8dac5367af6e611985b958ea1dd4d3e266588a
Author: Austin Seipp <austin at well-typed.com>
Date: Mon Jun 23 02:12:09 2014 -0500
Fix recomputation of TypeRep in Typeable instance (#9203)
Signed-off-by: Austin Seipp <austin at well-typed.com>
>---------------------------------------------------------------
0f8dac5367af6e611985b958ea1dd4d3e266588a
Data/Typeable/Internal.hs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Data/Typeable/Internal.hs b/Data/Typeable/Internal.hs
index 4b9db90..1b3ce75 100644
--- a/Data/Typeable/Internal.hs
+++ b/Data/Typeable/Internal.hs
@@ -252,7 +252,9 @@ type Typeable7 (a :: * -> * -> * -> * -> * -> * -> * -> *) = Typeable a
-- | Kind-polymorphic Typeable instance for type application
instance (Typeable s, Typeable a) => Typeable (s a) where
- typeRep# _ = typeRep# (proxy# :: Proxy# s) `mkAppTy` typeRep# (proxy# :: Proxy# a)
+ typeRep# = \_ -> rep
+ where rep = typeRep# (proxy# :: Proxy# s)
+ `mkAppTy` typeRep# (proxy# :: Proxy# a)
----------------- Showing TypeReps --------------------
More information about the ghc-commits
mailing list