[commit: haddock] ghc-8.0-facebook: Disable NFData instances for GHC types when GHC >= 8.2 (57b4cee)

git at git.haskell.org git at git.haskell.org
Tue Nov 28 11:48:01 UTC 2017


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

On branch  : ghc-8.0-facebook
Link       : http://git.haskell.org/haddock.git/commitdiff/57b4cee1b3e74fe0342d8a98f8760db7d3847f1f

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

commit 57b4cee1b3e74fe0342d8a98f8760db7d3847f1f
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


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

57b4cee1b3e74fe0342d8a98f8760db7d3847f1f
 haddock-api/src/Haddock/Types.hs | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index eacf447..f64b180 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -1,4 +1,7 @@
-{-# 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
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 -----------------------------------------------------------------------------
 -- |
@@ -447,10 +450,13 @@ instance (NFData a, NFData mod)
     DocExamples a             -> a `deepseq` ()
     DocHeader a               -> a `deepseq` ()
 
-
+#if 0
+-- These were added to GHC itself in 8.2.1
+-- and they are cherry-picked for ghc-8.0-facebook branch
 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