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
@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.
1
Replying to @cawhitworth
@cawhitworth Mostly I write such code in the (Either MyErrorKind) monad; 'fail' in that context is simply 'Left'. Not pretty, but works.

Jul 3, 2014 ยท 9:47 AM UTC