Closed haasn closed 8 years ago
It would be great if you could add fail _ = mzero to Selector str's Monad instance.
fail _ = mzero
Selector str
This would allow me to cleanly pattern match inside selectors, like this:
do Just x <- fmap readMaybe . text $ "foo" // "bar" ...
This selector would fail without throwing an error when the tag in question can't be parsed as an integer.
It would be great if you could add
fail _ = mzero
toSelector str
's Monad instance.This would allow me to cleanly pattern match inside selectors, like this:
This selector would fail without throwing an error when the tag in question can't be parsed as an integer.