All Projects → juspay → jrec

juspay / jrec

Licence: BSD-3-Clause license
Literally the best anonymous records

Programming Languages

haskell
3896 projects

Labels

Projects that are alternatives of or similar to jrec

record-builder
Record builder generator for Java records
Stars: ✭ 426 (+1274.19%)
Mutual labels:  records
Language Ext
C# functional language extensions - a base class library for functional programming
Stars: ✭ 3,964 (+12687.1%)
Mutual labels:  records
awesome-csv
Awesome Comma-Separated Values (CSV) - What's Next? - Frequently Asked Questions (F.A.Q.s) - Libraries & Tools
Stars: ✭ 46 (+48.39%)
Mutual labels:  records
DDDToolbox
A set of Roslyn refactorings supporting DDD design
Stars: ✭ 31 (+0%)
Mutual labels:  records
ordo
Ordo: A minimalist language with row polymorphism
Stars: ✭ 50 (+61.29%)
Mutual labels:  records
records-migrate
A migration system for Records.
Stars: ✭ 30 (-3.23%)
Mutual labels:  records
rec-core
Data pipelining service
Stars: ✭ 19 (-38.71%)
Mutual labels:  records

jrec — anonymous records for busy people

Based on superrecord, but simplified. No automatic field reordering. No GHCJS bits inside. Easier to hack on.

Benefits

  • Nice construction syntax:

    Rec (#id := 18853, #orderId := "MG13-233")
  • Provides Generic instances out of the box. Aeson, etc can't believe these aren't normal records! Anything Generic-derived just works.

  • Provides generic-lens and generic-optics instances out of the box. Due to those custom instances, we support polymorphic updates.

  • O(1) field access, O(n) construction.

  • PureScript-style partial records — if you have a Rec ("foo" := Int ': rest), HasField "foo" will work just fine.

Developing

IDE support is available inside nix-shell. For example, if you use VS Code, you may launch it as:

nix-shell --run "code ."

Tests

Run bin/test for fast-reloading tests. When library sources change, the test script will reload instantly and re-run the tests.

TODOs

  • Documentation.
  • Expose all internals.
  • -- NOTE: doesn't use 'KeyDoesNotExist' — fix this.
  • RemoveAccessTo — can we get rid of it?

Acknowledgement

  • The JRec.Internal module is entirely based on the code from superrecord.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].