Skip to content

Commit

Permalink
Merge pull request #84 from Bodigrim/master
Browse files Browse the repository at this point in the history
Add NFData instance for MutableByteArray (@Bodigrim)
  • Loading branch information
mixphix committed May 4, 2022
2 parents b7e9791 + eb0692d commit f241315
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Control/DeepSeq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ import GHC.Tuple (Solo (..))
#endif

#if BYTEARRAY_IN_BASE
import Data.Array.Byte (ByteArray(..))
import Data.Array.Byte (ByteArray(..), MutableByteArray(..))
#endif

-- | Hidden internal type-class
Expand Down Expand Up @@ -968,7 +968,11 @@ instance (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFDa
-- ByteArray

#if BYTEARRAY_IN_BASE
-- |@since 1.4.6.0
-- |@since 1.4.7.0
instance NFData ByteArray where
rnf (ByteArray _) = ()

-- |@since 1.4.8.0
instance NFData (MutableByteArray s) where
rnf (MutableByteArray _) = ()
#endif
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog for [`deepseq` package](http://hackage.haskell.org/package/deepseq)

## 1.4.8.0

* Add `NFData` instance for `MutableByteArray`
([#84](https://github.com/haskell/deepseq/pull/84))

## 1.4.7.0

* Add instances for `Solo` (GHC-9)
Expand Down
2 changes: 1 addition & 1 deletion deepseq.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12
name: deepseq
version: 1.4.7.0
version: 1.4.8.0
-- NOTE: Don't forget to update ./changelog.md

license: BSD3
Expand Down

0 comments on commit f241315

Please sign in to comment.