-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New topic] Errors and exceptions #1
Comments
lhbg-book.link has a few chapters on Either, ExceptT, and exceptions. |
Thanks for sharing, I find especially interesting the one about exceptions since I still I need to understand that part better! What are your thoughts about recommendation from https://www.fpcomplete.com/haskell/tutorial/exceptions/ to use UnliftIO.Exception instead of Control.Exception? |
I believe fpco understand exceptions better than me. I've tried covering the basics that are available in base and focus on |
What is also somewhat confusing is when to use Either vs throwing an IO exception. The summary is somewaht in direction of: use Either when you want consumer of function to be very aware of what you are returning and explicitly handle it, vs use IO exception when you want to be more implicit and just let him handle those exceptions only if they really want to. |
As a general approach when following the 'functional core, imperative shell' pattern, I usually use Either/Except in the functional core, and exceptions in the imperative shell. |
No description provided.
The text was updated successfully, but these errors were encountered: