1
1
mirror of https://github.com/juspay/jrec.git synced 2024-11-09 13:34:42 +03:00
Literally the best anonymous records
Go to file
2020-07-31 17:43:01 -04:00
.github/workflows Add CI 2020-07-29 21:13:57 -04:00
src rename module: Rec -> JRec 2020-07-31 10:30:44 -04:00
.gitignore Initialize project layout 2020-07-29 20:16:57 -04:00
CHANGELOG.md Initialize project layout 2020-07-29 20:16:57 -04:00
default.nix Use gitignoreSrc to prevent unnecessary rebuilds 2020-07-31 17:43:01 -04:00
jrec.cabal rename module: Rec -> JRec 2020-07-31 10:30:44 -04:00
LICENSE Add BSD3 License file 2020-07-29 20:13:16 -04:00
README.md Update README.md 2020-07-30 14:23:40 -04:00
Setup.hs Initialize project layout 2020-07-29 20:16:57 -04:00

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 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 Record ("foo" := Int ': rest), HasField "foo" will work just fine.

TODOs

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