myriad
myriad copied to clipboard
Add usage of lenses to the lens how-to page
https://moiraesoftware.github.io/myriad//how-tos/lenses.html
I would also like to see this. For instance I can't work out why the generated setter is 'b -> 'a -> 'b instead of 'a -> 'b -> 'b as seen in Aether.
I would like to be able to use all the utility functions in Aether but the lenses generated here have the wrong signature. So now I am porting Aether (just for me) to match these signatures. But I suspect there is some intended usage pattern that motivates the signature in myriad, I'm just not seeing it.
@7sharp9 could you provide a teaser here of what the usage looks like using this signature?
@travis-leith MAyeb in Aether they are flipped to promote piping the record into the setter.
See https://github.com/MoiraeSoftware/myriad/blob/master/test/Myriad.IntegrationPluginTests/Tests.fs#L103-L123 for details on usage.
Having gone through the exercise of re-implementing the various utilities to cater for the Myriad setter, having it flipped does lead to neater code in this regard.
Inactive so closing.