about summary refs log tree commit diff
path: root/users/Profpatsch/lens.nix (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-11-13 r/3053 feat(users/Profpatsch/lens): add _ as reverse function applicationProfpatsch1-0/+3
Change-Id: I0bcd997ea469ff55d2170027184fc5bd10b44e00 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3847 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2021-11-13 r/3052 docs(users/Profpatsch/lens): setter inline arrowsProfpatsch1-0/+2
Change-Id: I22bed7bc16b69f94556142cad1079e23f3550bb1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3846 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-11-13 r/3049 feat(users/Profpatsch/lens): lens library for nixProfpatsch1-0/+131
Profunctor lenses for nix. Implemented Profunctor and Strong instances for `(->)`, and some simple setters. Next step would be getters, which will need the `Forget` profunctor. Fairly straightforward implementation of https://github.com/purescript-contrib/purescript-profunctor-lenses (with all the types erased and instance dicts passed manually). ``` > :p set (optic [_2 (field "foo") _1]) 42 (tuple 1 { foo = (tuple 1 2); }) { fst = 1; snd = { foo = { fst = 42; snd = 2; }; }; } ``` Change-Id: Iad145523d1c035187b8b2db9302b840c282d427a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3295 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>