The short version:
- Import
UnliftIO
orUnliftIO.Exception
- Do not import
Control.Exception
- Done
Long version:
- Slides: https://www.snoyman.com/reveal/async-exception-handling
- Blog post: https://www.fpcomplete.com/blog/2018/04/async-exception-handling-haskell
Further reading:
- UnliftIO.Exception
- safe-exceptions package
- Exceptions best practices (highly opinionated)
- Implement
finally
andonException
using functions fromControl.Exception