Feldspar.Core.Frontend.Save

feldspar-language-0.6.0.2: A functional embedded language for DSP and parallelism

Safe Haskell | None

Feldspar.Core.Frontend.Save

Description

Tracing execution of Feldspar expressions

Synopsis

- save :: Syntax a => a -> a
- force :: Syntax a => a -> a

# Documentation

save :: Syntax a => a -> a

An identity function that guarantees that the result will be computed as a sub-result of the whole program. This is useful to prevent certain optimizations.

Exception: Currently constant folding does not respect `save`.

force :: Syntax a => a -> a

Equivalent to `save`. When applied to a lazy data structure, `force` (and `save`) has the effect of forcing evaluation of the whole structure.