generic-deepseq: Generic deep evaluation of data structures
This package provides a deepseq
function analogous to seq
, except that
it traverses data structures deeply, and not just up to head normal form.
Using lists as an example:
> [1,2,undefined] `seq` 3 3
Whereas with deepseq
:
> [1,2,undefined] `deepseq` 3 *** Exception: Prelude.undefined
Unlike the deepseq
package, this implementation is based on the
GHC.Generics framework as found in GHC >= 7.2, so that it can generate
instances automatically for any datatype that has a Generic
instance,
without further code.
data MyType = MyType String Int (Maybe Double) deriving Generic instance DeepSeq MyType
Downloads
- generic-deepseq-1.0.0.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 1.0.0.0, 2.0.0.0, 2.0.1.0, 2.0.1.1 |
---|---|
Dependencies | base (>=4.4 && <5), ghc-prim (>=0.2) [details] |
Tested with | ghc ==7.4.1 |
License | BSD-3-Clause |
Copyright | 2012, Maxime Henrion |
Author | Maxime Henrion |
Maintainer | Maxime Henrion <mhenrion@gmail.com> |
Revised | Revision 1 made by AdamBergmark at 2015-05-09T12:17:15Z |
Category | Control, Generics |
Bug tracker | http://bitbucket.org/mumux/generic-deepseq/issues/ |
Source repo | head: hg clone http://bitbucket.org/mumux/generic-deepseq/ |
Uploaded | by MaximeHenrion at 2012-02-18T17:25:37Z |
Distributions | NixOS:2.0.1.1 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 3941 total (7 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |