[commit: packages/deepseq] master, typeable-with-kinds: `NFData` instance for `StableName` (676ea70)

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


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

On branches: master,typeable-with-kinds
Link       : http://git.haskell.org/packages/deepseq.git/commitdiff/676ea7031e91d730da79ad6b9a7fd9c5c101f85a

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

commit 676ea7031e91d730da79ad6b9a7fd9c5c101f85a
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Tue Nov 25 12:10:26 2014 +0100

    `NFData` instance for `StableName`


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

676ea7031e91d730da79ad6b9a7fd9c5c101f85a
 Control/DeepSeq.hs | 6 ++++++
 changelog.md       | 1 +
 2 files changed, 7 insertions(+)

diff --git a/Control/DeepSeq.hs b/Control/DeepSeq.hs
index aaef007..aad5c9c 100644
--- a/Control/DeepSeq.hs
+++ b/Control/DeepSeq.hs
@@ -67,6 +67,8 @@ import Data.Fixed
 import Data.Version
 import Data.Monoid
 
+import System.Mem.StableName ( StableName )
+
 #if MIN_VERSION_base(4,7,0)
 import Data.Proxy ( Proxy(Proxy) )
 #endif
@@ -330,6 +332,10 @@ instance NFData a => NFData (Sum a) where
 instance NFData a => NFData (Product a) where
     rnf = rnf . getProduct
 
+-- |/Since: 1.4.0.0/
+instance NFData (StableName a) where
+    rnf !_ = ()
+
 #if MIN_VERSION_base(4,8,0)
 -- | __NOTE__: Only defined for @base-4.8.0.0@ and later
 --
diff --git a/changelog.md b/changelog.md
index 8b14bd9..b938e4c 100644
--- a/changelog.md
+++ b/changelog.md
@@ -26,6 +26,7 @@
      - `Data.Typeable.Internal.TypeRep`
      - `GHC.Fingerprint.Type.Fingerprint`
      - `Numeric.Natural.Natural`
+     - `System.Mem.StableName.StableName`
 
 ## 1.3.0.2  *Nov 2013*
 



More information about the ghc-commits mailing list