juspay / juspay/jrec

Merging and consing

Open
#3 0 comments 0 reactions 1 assignee Claimed by @srid View on GitHub
enhancement
Dominant language
Haskell
Stars
36
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Vague inspiration: https://pursuit.purescript.org/packages/purescript-record/0.2.6/docs/Data.Record

Not sure about all of this, but:

- [x] `union` appends records and removes duplicates. Left-biased. Does not sort.
- [x] `append` appends records and does not remove duplicates.
- [x] `insert` adds a field to the beginning, but checks that the record does not contain that field already.
- [x] `insertOrSet` adds a field to the beginning, or replaces the existing field.

There have to be tests for all of these, including

- [x] [should-not-typecheck](https://hackage.haskell.org/package/should-not-typecheck) tests for `insert`.

*added by srid*:
- [ ] Fix a bug with `append` overwriting values (looks to affect `Eq` as well; ultimately because of `RecTyIdxH`)
- [ ] Finish tests

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.