about summary refs log tree commit diff
path: root/.nixery
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-08-08T16·25+0200
committerProfpatsch <mail@profpatsch.de>2021-11-13T00·57+0000
commit850dcf615b3c0a453e17bddf37dd7e59d70b7e58 (patch)
treec99f098ee195f946c91d4b4c0f4693cd06a696f5 /.nixery
parentb48c5c497620288a08a5c225389231ffaede8f8f (diff)
feat(users/Profpatsch/lens): lens library for nix r/3049
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>
Diffstat (limited to '.nixery')
0 files changed, 0 insertions, 0 deletions