Copyright | Andrew G. Seniuk 2014-2015 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Andrew Seniuk <rasfar@gmail.com> |
Stability | provisional |
Portability | GHC (uses SOP) |
Safe Haskell | None |
Language | Haskell2010 |
This module provides generic functions rnf_
, force_
and seq_
,
for efficient switching between n=0
and n=2
in the corresponding
'rnfn n', 'forcen n' and 'deepseqn n' (of NFDataN
). This is useful for
connecting units of forcing (propagating demand). It was motivated
for use with auto-instrumentation, where seq_
can be injected
at every node of the AST (refer to the seqaid project).
Each SeqNode
carries a couple bits of information, determining which
depth (0 or 2) is in effect, and whether to spark parallel evaluation
when the depth is 2. This state can be configured statically
or dynamically.