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

CopyrightAndrew G. Seniuk 2014-2015
LicenseBSD-style (see the file LICENSE)
MaintainerAndrew Seniuk <rasfar@gmail.com>
Stabilityprovisional
PortabilityGHC (uses SOP)
Safe HaskellNone
LanguageHaskell2010

Control.DeepSeq.Bounded.Seqable

Description

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.

Documentation

rnf_ :: forall a. Generic a => SeqNode -> a -> () Source

force_ :: forall a. Generic a => SeqNode -> a -> a Source

seq_ :: forall a b. Generic a => SeqNode -> a -> b -> b Source

data SeqNode Source

Constructors

Insulate 
Propagate 
Spark 

Instances