Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NFData instance for MutableByteArray #84

Merged
merged 1 commit into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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