-
Notifications
You must be signed in to change notification settings - Fork 19
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
hasproperty()
analogue for optics
#92
Comments
Thanks @staticfloat ! Would be nice to have such functionality. I thing it should however not be a method of |
This function is now available as |
I've been using
|
Sometimes I'd like to check beforehand whether an optic is truly applicable to a type; especially when dealing with deeply-nested optics. It would be quite useful if there existed a
hasproperty()
analogue for optics on a type. I've made a simple version forPropertyLens
andComposedFunction
, but I'm not sure about the rest of the optic types. I'm opening this issue so that if someone else is interested, they can carry this to completion.This allows tests such as the following:
The text was updated successfully, but these errors were encountered: