The generic-deepseq package

[ Tags: bsd3, control, generics, library ] [ Propose Tags ]

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:

Changes in version 2.0.1.1:

Properties

Versions 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]
License BSD3
Copyright 2012, Maxime Henrion
Author Maxime Henrion
Maintainer Maxime Henrion <mhenrion@gmail.com>
Category Control, Generics
Bug tracker http://bitbucket.org/mux/generic-deepseq/issues/
Source repository head: hg clone http://bitbucket.org/mux/generic-deepseq/
Uploaded Tue Feb 28 20:53:40 UTC 2012 by MaximeHenrion
Updated Sat May 9 12:17:48 UTC 2015 by AdamBergmark to revision 1
Distributions NixOS:2.0.1.1
Downloads 1030 total (5 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees