Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add strict array operations and perhaps arrays

Open
#98 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
haskell
Domain
data

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

enhancement

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haskell/primitive

All issues in haskell/primitive

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.