[commit: packages/deepseq] master: Merge PR #32 (e7fdd00)

git at git.haskell.org git at git.haskell.org
Wed Jul 19 21:59:50 UTC 2017


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

On branch  : master
Link       : http://git.haskell.org/packages/deepseq.git/commitdiff/e7fdd00099854aa0a35cdcf55b044dc450352e69

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

commit e7fdd00099854aa0a35cdcf55b044dc450352e69
Merge: 02909d3 af54b3e
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Apr 16 09:40:13 2017 +0200

    Merge PR #32
    
    ...this required to update C.D.BackDoor



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

e7fdd00099854aa0a35cdcf55b044dc450352e69
 Control/DeepSeq.hs          | 22 ++++++++++++++++++++++
 Control/DeepSeq/BackDoor.hs |  9 ++++++++-
 changelog.md                |  2 ++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --cc Control/DeepSeq.hs
index f4c8488,26167af..97e040a
--- a/Control/DeepSeq.hs
+++ b/Control/DeepSeq.hs
@@@ -93,8 -92,9 +93,14 @@@ import Control.DeepSeq.BackDoor ( Down(
  
  #if MIN_VERSION_base(4,7,0)
  import Data.Proxy ( Proxy(Proxy) )
 -import Data.Type.Equality
 +#endif
 +
++#if MIN_VERSION_base(4,10,0)
++import Data.Type.Equality ( (:~:), (:~~:) )
++#elif MIN_VERSION_base(4,7,0)
++import Control.DeepSeq.BackDoor ( (:~:) )
+ #endif
+ 
  #if MIN_VERSION_base(4,8,0)
  import Data.Functor.Identity ( Identity(..) )
  import Data.Typeable ( TypeRep, TyCon, rnfTypeRep, rnfTyCon )
diff --cc Control/DeepSeq/BackDoor.hs
index 147a848,0000000..c231245
mode 100644,000000..100644
--- a/Control/DeepSeq/BackDoor.hs
+++ b/Control/DeepSeq/BackDoor.hs
@@@ -1,18 -1,0 +1,25 @@@
 +{-# LANGUAGE CPP #-}
 +
- #if MIN_VERSION_base(4,6,0)
++#if MIN_VERSION_base(4,10,0)
 +{-# LANGUAGE Safe #-}
 +#else
 +{-# LANGUAGE Trustworthy #-}
 +#endif
 +
 +-- | Hack to keep Control.DeepSeq SAFE-inferred
 +module Control.DeepSeq.BackDoor
 +    ( module X
 +    ) where
 +
 +#if MIN_VERSION_base(4,6,0)
++-- SAFE
 +import Data.Ord as X ( Down(Down) )
 +#else
++-- not SAFE
 +import GHC.Exts as X ( Down(Down) )
 +#endif
++
++#if MIN_VERSION_base(4,7,0)
++-- Data.Type.Equality wasn't SAFE before base-4.10
++import Data.Type.Equality as X ( (:~:) )
++#endif
diff --cc changelog.md
index 83f9997,fef1ead..4da3e7c
--- a/changelog.md
+++ b/changelog.md
@@@ -15,9 -15,8 +15,11 @@@
    * Add `NFData1` and `NFData2` type classes ([#8](https://github.com/haskell/deepseq/issues/8))
    * Add `NFData1` and `NFData` instances for `Data.Functor.{Compose,Sum,Product}`
      ([#30](https://github.com/haskell/deepseq/pull/30))
+   * Add `NFData`, `NFData1`, and `NFData2` instances for `(:~:)` and `(:~~:)`
+     from `Data.Type.Equality` ([#31](https://github.com/haskell/deepseq/issues/31))
 +  * Add `NFData` instance for `Foreign.C.Types.CBool`
 +  * Drop support for GHC 7.0 & GHC 7.2
 +  * Expose `NFData` instance for `Down` on earlier versions of `base`
  
  ## 1.4.2.0  *Apr 2016*
  



More information about the ghc-commits mailing list