Safe Haskell | Safe-Inferred |
---|
Turn a function lazy in its arguments into a function strict in its arguments.
It should be noted that this does nothing to change the internals of a function. If the function is lazy on the inside, these combinators cannot fix that. They only change the external entry point to the function: the indicated number of arguments will be forced before attempting to evaluate the function.
For finer control over evaluation strategies,
use the parallel
package.
- strictly1 :: (a -> b) -> a -> b
- strictly2 :: (a -> b -> c) -> a -> b -> c
- strictly3 :: (a -> b -> c -> d) -> a -> b -> c -> d
- veryStrictly1 :: NFData a => (a -> b) -> a -> b
- veryStrictly2 :: (NFData a, NFData b) => (a -> b -> c) -> a -> b -> c
- veryStrictly3 :: (NFData a, NFData b, NFData c) => (a -> b -> c -> d) -> a -> b -> c -> d
Weak Head Normal Form
strictly1 :: (a -> b) -> a -> bSource
Equivalent to $!
strictly1
is idempotent.
strictly1 (strictly1 f) x ≡ strictly1 f x
Normal Form
veryStrictly1 :: NFData a => (a -> b) -> a -> bSource
Equivalent to $!!
veryStrictly1
is idempotent.
veryStrictly1 (veryStrictly1 f) x ≡ veryStrictly1 f x
veryStrictly2 :: (NFData a, NFData b) => (a -> b -> c) -> a -> b -> cSource
veryStrictly3 :: (NFData a, NFData b, NFData c) => (a -> b -> c -> d) -> a -> b -> c -> dSource