Add strict array operations and perhaps arrays
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Compare Data.HashMap.Array with Data.Primitive.SmallArray, then review the strict and lazy module patterns in Data.HashMap.Lazy and Data.HashMap.Strict. Determine whether the needed strict map and traverse operations require strict-operation modules or a separate strict array type; done requires an agreed API and corresponding implementation scope.
Written by the indexing model from the issue text.
Description
Currently, unordered-containers has a Data.HashMap.Array module that's pretty similar to Data.Primitive.SmallArray. I'd love to stack unordered-containers on top of primitive to avoid this duplication. Aside from the bugs currently being fixed in primitive, I'm missing some operations. Notably, I need operations like strict map (map over an array, forcing the results) and strict traverse (traverse an array, forcing the results as they're installed). Could we add such operations?
Furthermore, some strictness bugs that have turned up in unordered-containers were caused by failure to force things before installing them in arrays. One possible fix would be to add modules full of strict array operations (the way we have Data.HashMap.Lazy and Data.HashMap.Strict with the same types). Another option would be to offer a separate type for notionally strict arrays, offering only strict operations (and no Functor instance). This would make it easy to avoid goofing up, but users could break open the abstraction if necessary to implement things like efficient Functor and Traversable instances for types using "strict" arrays.
- Dominant language
- Haskell
- Stars
- 123
- Forks
- 60
- Avg merge
- 14d 14h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell/primitive
-
bump bound QuickCheck to <9.17Possibly taken @konsumlamm claimed this 16 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Drop support for GHCs older than 9.2?Possibly taken @konsumlamm claimed this 12 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
MicroHs supportOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
documentation
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in haskell/primitive
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
compiler-explorer/compiler-explorer#9272 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 82/100
alunduil/siren-json.hs#247 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 85/100
alunduil/network-arbitrary#196 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 82/100
alunduil/collection-json.hs#402 ·
Maintainers usually reply within 1 day
-
`--margin` still counts code points when it measures the last line of a call in `Margin.hs`Possibly taken @sherenkov claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
objectionary/phino#1871 · 2 comments ·
Maintainers usually reply within 1 day