deepseq-bounded: Bounded deepseq, including support for generic deriving

[ bsd3, control, library ] [ Propose Tags ]

This package provides methods for partially (or fully) evaluating data structures ("bounded deep evaluation").

More information is available on the project homepage. There may be activity on this reddit discussion, where your comments are invited.

Quoting comments from the deepseq package:

"Artificial forcing is often used for adding strictness to a program, e.g. in order to force pending exceptions, remove space leaks, or force lazy IO to happen. It is also useful in parallel programs, to ensure work does not migrate to the wrong thread."

Sometimes we don't want to, or cannot, force all the way. Any infinite recursive type is an example. Also, bounded forcing bridges the theoretical axis between shallow seq and full deepseq.

We provide two new classes NFDataN and NFDataP. Instances of these provide bounded deep evaluation for arbitrary polytypic terms:

Instances of NFDataN and NFDataP can be automatically derived via Generics.SOP, backed by the GNFDataN and GNFDataP modules.

Another approach is Seqable, which is similar to NFDataN, but optimised for use as a dynamically-reconfigurable forcing harness in the seqaid auto-instrumentation tool.

Recent developments supporting parallelisation control (in Pattern and Seqable modules) may justify renaming this library to something which emcompasses both strictness and parallelism aspects.


[Skip to Readme]
Versions [RSS] [faq] 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.0.0, 0.6.0.1, 0.6.0.2, 0.6.0.3, 0.6.1.0, 0.6.2.0, 0.7.0.0, 0.7.0.1, 0.7.0.2, 0.8.0.0 (info)
Dependencies array, base (<5), deepseq, deepseq-generics, generics-sop, parallel, random, syb [details]
License BSD-3-Clause
Author Andrew G. Seniuk
Maintainer Andrew Seniuk <rasfar@gmail.com>
Category Control
Home page http://fremissant.net/deepseq-bounded
Bug tracker Andrew Seniuk <rasfar@gmail.com>
Uploaded by AndrewSeniuk at 2014-12-20T18:21:32Z
Distributions NixOS:0.8.0.0
Downloads 9563 total (54 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Manual Flags

NameDescriptionDefault
Automatic Flags
NameDescriptionDefault
haskell98_fragment

Sacrifice generic deriving, the NFDataPDyn module, and a couple functions from the PatAlg module, in exchange for true Haskell98 conformance (portability). You need to set PARALLELISM_EXPERIMENT, USE_WW_DEEPSEQ, USE_SOP, and NFDATA_INSTANCE_PATTERN to False if you set HASKELL98_FRAGMENT to True. (One thing it insists on is -XPatternGuards, although this could be relieved in the obvious way...)

Disabled
parallelism_experiment

We can selectively use par instead of seq, which is interesting.

Enabled
just_alias_gseqable

The SOP generic function is probably more performant, anyway! (This will be forced False if HASKELL98_FRAGMENT is True.)

Enabled
use_ww_deepseq

Depend on deepseq and deepseq-generics, to provide conditional deep forcing. This is optional.

Enabled
warn_pattern_match_failure

For NFDataP, if a pattern match fails a warning is output to stderr.

Disabled
use_sop

Use the generics-sop package instead of GHC.Generics (in GNFDataN) and instead of SYB (in NFDataPDyn). If USE_SOP is False, and NFDataPDyn, GNFDataP, and GSeqable modules will not be available. Also, if USE_SOP is False, then JUST_ALIAS_GSEQABLE must be False (this is not done for you; the language of Cabal flags makes it hard to write such logic, probably by design!...).

Enabled
nfdata_instance_pattern

A flag to assist debugging, affecting a few modules.

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for deepseq-bounded-0.5.2

[back to package description]
For additional documentation, browse to ./HTML
(or http://www.fremissant.net/deepseq-bounded).