jonathanknowles / jonathanknowles/monoidmap
Provide `NFData1` and `NFData2` instances.
- Dominant language
- Haskell
- Stars
- 21
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Related issue:
- #254
From `containers` version `0.8` onwards, `Map` is an instance of `NFData1` and `NFData2`:
```hs
-- | @since 0.8
instance NFData k => NFData1 (Map k) where
liftRnf rnfx = go
where
go Tip = ()
go (Bin _ kx x l r) = rnf kx `seq` rnfx x `seq` go l `seq` go r
-- | @since 0.8
instance NFData2 Map where
liftRnf2 rnfkx rnfx = go
where
go Tip = ()
go (Bin _ kx x l r) = rnfkx kx `seq` rnfx x `seq` go l `seq` go r
```
Source:
- https://github.com/haskell/containers/blob/7cd38d1e6ab98fdb96bf50496cedb5e0bd2df622/containers/src/Data/Map/Internal.hs#L4600-L4612
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.