haskell / haskell/stm

Add strict (whnf) variants of data types

Open
#101 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
118
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Since https://github.com/haskell/core-libraries-committee/issues/341 was accepted, it would be nice to follow suit and add strict variant of data types to this package as well, i.e.

1. Add `Control.Concurrent.STM.TArray.Strict`, `Control.Concurrent.STM.TBQueue.Strict`, `Control.Concurrent.STM.TChan.Strict`, `Control.Concurrent.STM.TMVar.Strict`, `Control.Concurrent.STM.TQueue.Strict`, `Control.Concurrent.STM.TSem.Strict`, `Control.Concurrent.STM.TVar.Strict` with newtype wrappers that make sure values are held in WHNF.
2. Add `Control.Concurrent.STM.Strict` that re-exports these (mirroring what `Control.Concurrent.STM` does).

I could create `strict-mutable-stm` with these (package adjacent to [strict-mutable-base](https://hackage.haskell.org/package/strict-mutable-base)), but I think it would be better for everyone in terms of UX to add them here, especially given that even this package had issues with forcing things properly to avoid space leaks: https://github.com/haskell/stm/pull/2, https://github.com/haskell/stm/pull/69.

If that sounds reasonable, I can submit a PR, but I need someone to tell me it will be merged in a timely fashion first.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the existing Control.Concurrent.STM modules with the seven requested .Strict modules and Control.Concurrent.STM. The work is done when the strict wrappers hold values in WHNF and Control.Concurrent.STM.Strict re-exports them, with the module set matching the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.