You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Is it possible to use generic-lens with large-anon?
I want something like
importControl.Lens ((&), (*~))
importData.Generics.Labels ()
importData.Record.AnonimportData.Record.Anon.OverloadingimportData.Record.Anon.Simplemagenta::Record '[ "red" ':=Integer, "green" ':=Integer, "blue" ':=Integer]
magenta =ANON{red =1, green =0, blue =1}
-- maybe plus some other constraintsreduceRed:: (RowHasField"red"rDouble) =>Recordr->Recordr
reduceRed c = c &#red *~0.9
ex = reduceRed magenta
The text was updated successfully, but these errors were encountered:
large-anon provides a LabelOptic instance from the optics package, which will allow you to do things like this.
If you really want to use lens rather than optics, then probably the easiest way is to use something like toLensVL to translate an optics lens into a van Laarhoven lens (so you'd do something like toLensVL #red).
Hi! Is it possible to use
generic-lens
withlarge-anon
?I want something like
The text was updated successfully, but these errors were encountered: