deepseq-bounded: Bounded deepseq, including support for generic deriving
This package provides methods for partially (or fully) evaluating data structures ("bounded deep evaluation").
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.
rnfnbounds the forced evaluation by depth of recursion.
rnfpforces based on patterns (static or dynamic).
[Skip to Readme]
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...)
We can selectively use par instead of seq, which is interesting.
The SOP generic function is probably more performant, anyway! (This will be forced False if HASKELL98_FRAGMENT is True.)
Depend on deepseq and deepseq-generics, to provide conditional deep forcing. This is optional.
For NFDataP, if a pattern match fails a warning is output to stderr.
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!...).
A flag to assist debugging, affecting a few modules.
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
|Versions [RSS]||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 (>=0.5 && <0.6), base (>=4 && <5), deepseq (>=1.3 && <1.4), deepseq-generics (>=0.1 && <0.2), generics-sop (>=0.1 && <0.2), parallel (>=3.2 && <3.3), random (==1.1), syb (<=0.4.2) [details]|
|Author||Andrew G. Seniuk|
|Maintainer||Andrew Seniuk <email@example.com>|
|Bug tracker||Andrew Seniuk <firstname.lastname@example.org>|
|Uploaded||by AndrewSeniuk at 2014-12-21T07:10:28Z|
|Reverse Dependencies||2 direct, 0 indirect [details]|
|Downloads||10280 total (37 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
|Status||Docs uploaded by user
Build status unknown [no reports yet]