4 ms·
btw haskell also has a concept of exception, so it's not like that you need These or Either for all cases, in some cases using a exception might be good enough.
by merb 8y ago
btw haskell also has a concept of exception, so it's not like that you need These or Either for all cases, in some cases using a exception might be good enough.
- dwohnitmok 8y agoExceptions do exist but their usage in Haskell is mainly restricted to code living in IO (as a result of both community customs and the restriction of handlers to IO code). FWIW personally I think of exceptions in Haskell almost exclusively as a tool for thread management and tend to shy away from using it for only error handling (although the two do have some overlap). But that's a more divisive topic in the Haskell community at large than the ban on exceptions in pure code.