commercialhaskell / commercialhaskell/jump

More instances for MapClass and its subclasses?

Open
#12 3 comments 0 reactions 0 assignees View on GitHub
not-now
Dominant language
No language data
Stars
155
Forks
4
PR merge metrics
No merged PRs in 30d

Description

While looking around for mappings from `String` keys to values I've come across a few packages containing potential instances for `MapClass`:
- `bytestring-trie` ([hackage](https://hackage.haskell.org/package/bytestring-trie), [github](https://github.com/wrengr/bytestring-trie))
- `TernaryTrees` ([hackage](https://hackage.haskell.org/package/TernaryTrees), [github](https://github.com/axman6/TernaryTrees))
- `list-tries` ([hackage](hackage.haskell.org/package/list-tries), [github](https://github.com/Deewiant/list-tries))
- `data-stringmap` ([hackage](https://hackage.haskell.org/package/data-stringmap), [github](https://github.com/sebastian-philipp/StringMap))

Some of these haven't been updated in a while and might not be worth bothering with.

If `MapClass` and its subclasses should in principle allow for instances from these packages, the classes should be checked for whether they can be implemented with reasonable effort (and while satisfying reasonable laws).

For example the `Trie` from `bytestring-trie` doesn't currently seem to offer a better definition of `OrdMap.splitRoot` than `(: [])`.

On a less related note, I'm wondering whether there would be a point in moving `MapClass` and its subclasses into a separate package, so they're less heavyweight to use for packages that might not use `jump` as a whole?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating MapClass and its subclasses in the jump package, then inspect the listed bytestring-trie, TernaryTrees, list-tries, and data-stringmap packages. Check whether useful instances can satisfy the relevant laws, including the noted Trie splitRoot limitation, and determine whether extracting the classes into a separate package is in scope. Done means a decided, justified set of supported instances or a clear package-design decision.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.