Simplified, type-safe error handling for Haskell
open sourceBSD-3-Clausefree
errors is a Haskell library for handling errors through the type system rather than out-of-band exceptions. One import, Control.Error, brings together helpers for Either, Maybe, ExceptT and MaybeT, plus safe versions of partial functions, so failures show up in types and convert between one another.
Problems it solves
- handle errors in Haskell without exceptions
- convert between Maybe and Either in Haskell
- avoid head and fromJust crashing a Haskell program
Features
- one import for error handling (Control.Error)
- helpers for Either, Maybe, ExceptT and MaybeT
- safe versions of partial functions
- helpers for scripts that catch every error as Text
