[commit: ghc] wip/nfs-locking: Add NFData instances (bf75f42)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:11:29 UTC 2017


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

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/bf75f422b738ae95fb7d3b814d9335c77ef6d6cd/ghc

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

commit bf75f422b738ae95fb7d3b814d9335c77ef6d6cd
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed Dec 16 01:27:04 2015 +0100

    Add NFData instances


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

bf75f422b738ae95fb7d3b814d9335c77ef6d6cd
 src/Builder.hs | 1 +
 src/Package.hs | 1 +
 src/Stage.hs   | 1 +
 src/Way.hs     | 3 +++
 4 files changed, 6 insertions(+)

diff --git a/src/Builder.hs b/src/Builder.hs
index 67be69f..007dae3 100644
--- a/src/Builder.hs
+++ b/src/Builder.hs
@@ -111,3 +111,4 @@ fixAbsolutePathOnWindows path = do
 -- Instances for storing in the Shake database
 instance Binary Builder
 instance Hashable Builder
+instance NFData Builder
diff --git a/src/Package.hs b/src/Package.hs
index a490cb9..f64daee 100644
--- a/src/Package.hs
+++ b/src/Package.hs
@@ -49,3 +49,4 @@ instance Ord Package where
 instance Binary Package
 instance Hashable Package where
     hashWithSalt salt = hashWithSalt salt . show
+instance NFData Package
diff --git a/src/Stage.hs b/src/Stage.hs
index f4e39b0..3aca206 100644
--- a/src/Stage.hs
+++ b/src/Stage.hs
@@ -13,3 +13,4 @@ instance Show Stage where
 -- Instances for storing in the Shake database
 instance Binary Stage
 instance Hashable Stage
+instance NFData Stage
diff --git a/src/Way.hs b/src/Way.hs
index 7f1ca31..095bd52 100644
--- a/src/Way.hs
+++ b/src/Way.hs
@@ -169,3 +169,6 @@ instance Binary Way where
 
 instance Hashable Way where
     hashWithSalt salt = hashWithSalt salt . show
+
+instance NFData Way where
+    rnf (Way s) = s `seq` ()



More information about the ghc-commits mailing list