Skip to content

Provide NFData1 and NFData2 instances. #278

@jonathanknowles

Description

@jonathanknowles

Related issue:

From containers version 0.8 onwards, Map is an instance of NFData1 and NFData2:

-- | @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:

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions