[commit: packages/deepseq] master: Change TypeRep and TyCon instances to use new internal GHC utilities (5cbc7d1)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 11:36:11 UTC 2015


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

On branch  : master
Link       : http://git.haskell.org/packages/deepseq.git/commitdiff/5cbc7d1c1d51838b5a147b3fb2d4b6f87b0eda09

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

commit 5cbc7d1c1d51838b5a147b3fb2d4b6f87b0eda09
Author: Austin Seipp <austin at well-typed.com>
Date:   Thu Mar 5 13:31:03 2015 -0600

    Change TypeRep and TyCon instances to use new internal GHC utilities
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


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

5cbc7d1c1d51838b5a147b3fb2d4b6f87b0eda09
 Control/DeepSeq.hs | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Control/DeepSeq.hs b/Control/DeepSeq.hs
index 31a42d7..43edc0b 100644
--- a/Control/DeepSeq.hs
+++ b/Control/DeepSeq.hs
@@ -81,8 +81,7 @@ import Data.Proxy ( Proxy(Proxy) )
 
 #if MIN_VERSION_base(4,8,0)
 import Data.Functor.Identity ( Identity(..) )
--- NB: Data.Typeable.Internal is "Trustworthy" only starting w/ base-4.8
-import Data.Typeable.Internal ( TypeRep(..), TyCon(..) )
+import Data.Typeable ( TypeRep, TyCon, rnfTypeRep, rnfTyCon )
 import Data.Void ( Void, absurd )
 import Numeric.Natural ( Natural )
 #endif
@@ -380,13 +379,13 @@ instance NFData Unique where
 --
 -- /Since: 1.4.0.0/
 instance NFData TypeRep where
-    rnf (TypeRep _ tycon tyrep) = rnf tycon `seq` rnf tyrep
+    rnf tyrep = rnfTypeRep tyrep
 
 -- | __NOTE__: Only defined for @base-4.8.0.0@ and later
 --
 -- /Since: 1.4.0.0/
 instance NFData TyCon where
-    rnf (TyCon _ tcp tcm tcn) = rnf tcp `seq` rnf tcm `seq` rnf tcn
+    rnf tycon = rnfTyCon tycon
 #endif
 
 ----------------------------------------------------------------------------



More information about the ghc-commits mailing list