Open dnadales opened 6 years ago
You could, but they would be as simple as:
import Control.Lens.Extra(is)
isSuccess = is _Success
isFailure = is _Failure
If you think they are useful, then let's do it! Thanks.
Oh, I was not aware of the is
function. Very nice!
If this information could be included in the documentation I guess we don't need isFailure
and isSuccess
unless depending on lenses is not an option. But since validation
already depends on lens
I guess this shouldn't be an issue for the library users.
So I'm in favor of not having these functions :)
Does it make sense to document how _Success
and _Failure
could be used in combination with is
? Or it is expected that any lens-educated person (which excludes me :D ) should know this?
It'd be nice to have functions
Does this make sense? If so I can submit a PR.