The generic-deepseq package

[Tags: bsd3, library]

This package provides a deepseq function analogous to seq, except that it traverses the entire data structure, evaluating it fully, 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

Changes in version 2.0.0.0:

Changes in version 2.0.1.0:


Properties

Versions1.0.0.0, 2.0.0.0, 2.0.1.0, 2.0.1.1
Dependenciesbase (>=3 && <5), ghc-prim (>=0.2)
LicenseBSD3
Copyright2012, Maxime Henrion
AuthorMaxime Henrion
MaintainerMaxime Henrion <mhenrion@gmail.com>
CategoryControl, Generics
Bug trackerhttp://bitbucket.org/mumux/generic-deepseq/issues/
Source repositoryhead: hg clone http://bitbucket.org/mumux/generic-deepseq/
Upload dateSat Feb 25 11:00:47 UTC 2012
Uploaded byMaximeHenrion
Downloads201 total (23 in last 30 days)

Modules

Downloads

Maintainers' corner

For package maintainers and hackage trustees