[commit: haddock] wip/D2418: Disable NFData instances for GHC types when GHC >= 8.2 (1c942c8)

git at git.haskell.org git at git.haskell.org
Tue Nov 28 11:47:53 UTC 2017


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

On branch  : wip/D2418
Link       : http://git.haskell.org/haddock.git/commitdiff/1c942c8eb8876b074a87a14ff02281027556b999

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

commit 1c942c8eb8876b074a87a14ff02281027556b999
Author: Simon Marlow <smarlow at fb.com>
Date:   Fri Jul 22 02:55:04 2016 -0700

    Disable NFData instances for GHC types when GHC >= 8.2


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

1c942c8eb8876b074a87a14ff02281027556b999
 haddock-api/src/Haddock/Types.hs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index 1a7a0b6..5220e6e 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving, TypeFamilies, RecordWildCards #-}
+{-# LANGUAGE CPP, DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving, TypeFamilies, RecordWildCards #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]
                                       -- in module GHC.PlaceHolder
@@ -451,10 +451,12 @@ instance (NFData a, NFData mod)
     DocExamples a             -> a `deepseq` ()
     DocHeader a               -> a `deepseq` ()
 
-
+#if __GLASGOW_HASKELL__ < 801
+-- These were added to GHC itself in 8.2.1
 instance NFData Name where rnf x = seq x ()
 instance NFData OccName where rnf x = seq x ()
 instance NFData ModuleName where rnf x = seq x ()
+#endif
 
 instance NFData id => NFData (Header id) where
   rnf (Header a b) = a `deepseq` b `deepseq` ()



More information about the ghc-commits mailing list