-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laws for polymorphic optics #430
Comments
Hum I am wondering how is it possible to do |
Yep that's where I got stuck - I couldn't get the types to line up. With regard to the Haskell implementation -- their profunctorial It would be great if we could make it work with simple Monocle concepts, all that code is pretty horrid. |
I found some relevant links: It seems that the |
Polymorphic optics are likely to get dropped. So I will close that one. |
It's a scandal that the laws only apply to the degenerate monomorphic optics -- they're living in sin!
It seems important that the full range of optic behaviour offered by Monocle is well-regulated by laws. A starting point could be unpicking the Haskell Lens functionality so that the laws there can be transcribed. For instance, for Isos:
The secret sauce appears to be the Van Laarhoven representation with profunctor constraints, that can unify the various representations with regular functions. We could put all this machinery privately in the laws package, although it might be hard for users to understand the code. The current monomorphic laws are wonderfully crisp and easy to read. Still, the alternative is lawless anarchy!
The text was updated successfully, but these errors were encountered: