Skip to content

Commit

Permalink
Added NoThunks instance for Identity
Browse files Browse the repository at this point in the history
  • Loading branch information
bezirg authored and coot committed Nov 3, 2023
1 parent 7d70c4a commit cc35609
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## next version

* `NoThunks ThreadId` instance.
* `NoThunks Identity` instance
* Fix tests on ghc 9.8.
Andreas Abel <[email protected]>
* Tested with ghc 8.10 to 9.8.
Expand Down
2 changes: 2 additions & 0 deletions src/NoThunks/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import GHC.Conc.Sync (ThreadId (..))
-- For instances

import Data.Foldable (toList)
import Data.Functor.Identity (Identity)
import Data.Int
import Data.IntMap (IntMap)
import Data.Kind (Type)
Expand Down Expand Up @@ -638,6 +639,7 @@ instance NoThunks Void
instance NoThunks ()

instance NoThunks a => NoThunks [a]
instance NoThunks a => NoThunks (Identity a)
instance NoThunks a => NoThunks (Maybe a)
instance NoThunks a => NoThunks (NonEmpty a)

Expand Down

0 comments on commit cc35609

Please sign in to comment.