Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Generic and NoThunks instances for RAWState #4

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rawlock/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Changelog entries

## 0.1.1.0 -- 2024-11-22

* Added `Generic` and `NoThunks` instance for `RAWState`.

## 0.1.0.0 -- 2024-10-22

* First version. Released on an unsuspecting world.
4 changes: 2 additions & 2 deletions rawlock/rawlock.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: rawlock
version: 0.1.0.0
version: 0.1.1.0
synopsis: A writer-biased RAW lock.
description:
A writer-biased RAW lock.
Expand Down Expand Up @@ -37,7 +37,7 @@ source-repository this
type: git
location: https://github.com/IntersectMBO/io-classes-extra
subdir: rawlock
tag: rawlock-0.1.0.0
tag: rawlock-0.1.1.0

common warnings
ghc-options:
Expand Down
2 changes: 1 addition & 1 deletion rawlock/src/Control/RAWLock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ data RAWState = RAWState {
waitingReaders :: !Readers
, waitingAppenders :: !Appenders
, waitingWriters :: !Writers
} deriving Show
} deriving (Show, Generic, NoThunks)

noWriters :: Poisonable RAWState -> Bool
noWriters (Healthy (RAWState _ _ w)) = w == 0
Expand Down