@hackage strict-types0.1.1
A type level predicate ranging over strict types
Installation
Dependencies (9)
Dependents (1)
@hackage/acme-everything
strict-types
This package provides a type-level predicate Strict and two pattern synonyms IsStrict and 'Rnf' to constrain value strictness.
The Rnf pattern
The 'Rnf' pattern matches every value of a type with an 'NFData' instance, forcing it to rigid normal form before binding it.
> Rnf [trace "1" 1, trace "2" 2]
> IsStrict (False)
False
> IsStrict (Identity False)
Identity False
> IsStrict (Identity (Just False))
<interactive>:1:1: error:
• Maybe Bool has an unnamed lazy field in constructor Just
• In the expression: IsStrict (Identity (Just False))
In an equation for ‘it’: it = IsStrict (Identity (Just False))