Replying to @cawhitworth
@cawhitworth fail is bad form *iff* you can't control what monad it's being called in. It's fine for Maybe and for Either fr.ex.
2
Replying to @cawhitworth
@cawhitworth i.e. I dislike that fail always takes a string, even if you might have a better more semantically useful way to report it.

Jul 3, 2014 ยท 9:39 AM UTC

1
This tweet is unavailable
@cawhitworth Mostly I write such code in the (Either MyErrorKind) monad; 'fail' in that context is simply 'Left'. Not pretty, but works.