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 I/O 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. (This was once up-to-date, but may have become in need of some attention. 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 SYB for generics. NFDataPDyn and GNFDataP modules will not be available.
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, base (<5), deepseq, deepseq-generics, generics-sop, parallel, random, syb [details]|
|Author||Andrew G. Seniuk|
|Uploaded||by AndrewSeniuk at 2014-12-19T17:26:40Z|
|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]