Skip to content

Commit

Permalink
Merge pull request #99 from haskell/fuse-list-instance
Browse files Browse the repository at this point in the history
Let the list instance fuse
  • Loading branch information
mixphix authored Jul 26, 2023
2 parents 72a665c + c78d703 commit ec7de61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Control/DeepSeq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,8 @@ instance NFData a => NFData [a] where rnf = rnf1

-- | @since 1.4.3.0
instance NFData1 [] where
liftRnf r = go
where
go [] = ()
go (x : xs) = r x `seq` go xs
liftRnf f = foldr (\x r -> f x `seq` r) ()
{-# INLINABLE liftRnf #-}

-- | @since 1.4.0.0
instance NFData a => NFData (ZipList a) where rnf = rnf1
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
([#95])(https://github.com/haskell/deepseq/pull/95)
* Drop support for GHC < 8.6
([#94](https://github.com/haskell/deepseq/pull/94))
* List fusion in `instance NFData [a]` reduces allocations
([#99](https://github.com/haskell/deepseq/pull/99))

## 1.4.8.1

Expand Down

0 comments on commit ec7de61

Please sign in to comment.