diff options
author | Simon Marlow <smarlow@fb.com> | 2016-07-22 02:55:04 -0700 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2016-07-22 13:55:48 +0100 |
commit | a3309e797c42dae9bccdeb17ce52fcababbaff8a (patch) | |
tree | 4b0bc333667a3abe3502a6ac7f9912c0ded27a67 | |
parent | cdc81a1b73bd4d1b330a32870d4369e1a2af3610 (diff) |
Disable NFData instances for GHC types when GHC >= 8.2
-rw-r--r-- | haddock-api/src/Haddock/Types.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs index 1a7a0b6f..5220e6e9 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` () |