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 instances for the indexed TypeRep (+ Module) #83

Closed
wants to merge 1 commit into from
Closed
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
11 changes: 9 additions & 2 deletions Control/DeepSeq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ import Data.Array
import Data.Fixed
import Data.Version
import Data.Monoid as Mon
import Data.Typeable ( TypeRep, TyCon )
import Data.Typeable ( TypeRep, rnfTypeRep, TyCon, rnfTyCon )
import qualified Type.Reflection as Reflection
import Data.Unique ( Unique )
import Foreign.Ptr
import Foreign.C.Types
Expand All @@ -117,7 +118,6 @@ import Data.Type.Equality ( (:~:) )
#endif

import Data.Functor.Identity ( Identity(..) )
import Data.Typeable ( rnfTypeRep, rnfTyCon )
import Data.Void ( Void, absurd )
import Numeric.Natural ( Natural )

Expand Down Expand Up @@ -644,6 +644,13 @@ instance NFData TypeRep where
instance NFData TyCon where
rnf tycon = rnfTyCon tycon

-- |@since 1.4.8.0
instance NFData (Reflection.TypeRep a) where
rnf tr = Reflection.rnfTypeRep tr

-- |@since 1.4.8.0
instance NFData Reflection.Module where
rnf modul = Reflection.rnfModule modul

-- | __NOTE__: Only strict in the reference and not the referenced value.
--
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for [`deepseq` package](http://hackage.haskell.org/package/deepseq)

## 1.4.8.0

* Add instances for the indexed `TypeRep`, along with `Module`.

## 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