I\'m fairly new to Haskell and have been slowly getting the idea that there\'s something wrong with the existence of Monad fail. Real World Haskell warns against its use (\"Once
I try to avoid Monad fail wherever possible, and there are a whole variety of ways to capture fail depending on your circumstance. Edward Yang has written a good overview on his blog in the article titled 8 ways to report errors in Haskell revisited.
In summary, the different ways to report errors that he identifies are:
Of these, I would be tempted to use option 3, with Either e b
if I know how to handle the error, but need a little more context.