Box helper to wrap types where WHNF = NF
- Dominant language
- Haskell
- Stars
- 45
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
I'd like a type that can be used to wrap values for which I want WHNF = NF. This is useful for satisfying NFData constraints with criterion for example.
```
newtype WHNF a = WHNF a
instance NFData (WHNF a) where rnf (WHNF a) = seq a ()
```
Of course, this data type should be given a better name. Maybe `data` instead of `newtype` would also be useful for even more laziness?
Contributor guide
No contributing guide indexed for this repository
Research direction
No file, test, or entry point is identified. Start by reviewing the proposed WHNF wrapper and its NFData instance, then check how criterion uses NFData constraints. Done means agreeing on the type's name and semantics, including whether newtype or data is appropriate, and adding the corresponding library coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100