All Projects → lthms → chain

lthms / chain

Licence: other
Extensible, Type Safe Error Handling in Haskell

Programming Languages

haskell
3896 projects
shell
77523 projects

Projects that are alternatives of or similar to chain

belay
Robust error-handling for Kotlin and Android
Stars: ✭ 35 (+169.23%)
Mutual labels:  error-handling
jsonerror
Makes Go error-handling a breeze!
Stars: ✭ 28 (+115.38%)
Mutual labels:  error-handling
go-errors
Flexible, general-purpose error handling for Go.
Stars: ✭ 17 (+30.77%)
Mutual labels:  error-handling
rescue
🚒✨ Rescue: better errors through types (a more type directed MonadThrow/MonadCatch)
Stars: ✭ 18 (+38.46%)
Mutual labels:  error-handling
raygun4ruby
The Ruby & Ruby on Rails provider for Raygun
Stars: ✭ 37 (+184.62%)
Mutual labels:  error-handling
errors
Simple error handling primitives that work well with structured logging
Stars: ✭ 28 (+115.38%)
Mutual labels:  error-handling
dx
JavaScript without `try...catch`.
Stars: ✭ 26 (+100%)
Mutual labels:  error-handling
ts-json-validator
JSON Validator for TypeScript - Safer JSON.parse() validating by TypeScript types
Stars: ✭ 23 (+76.92%)
Mutual labels:  type-safe
ErrorLayout
Simple layout to show custom error toast with animation
Stars: ✭ 13 (+0%)
Mutual labels:  error-handling
domain-browser
Node's domain module for the web browser
Stars: ✭ 30 (+130.77%)
Mutual labels:  error-handling
apollo-error-converter
Global Apollo Server Error handling made easy. Remove verbose and repetitive resolver / data source Error handling. Automatic Error catching, logging, and conversion to ApolloErrors.
Stars: ✭ 16 (+23.08%)
Mutual labels:  error-handling
moko-errors
Automated exceptions handler for mobile (android & ios) Kotlin Multiplatform development.
Stars: ✭ 45 (+246.15%)
Mutual labels:  error-handling
rust-error-handle
detail rust error handle
Stars: ✭ 47 (+261.54%)
Mutual labels:  error-handling
gommon
A collection of common util libraries for Go
Stars: ✭ 26 (+100%)
Mutual labels:  error-handling
result
A lightweight C++11-compatible error-handling mechanism
Stars: ✭ 121 (+830.77%)
Mutual labels:  error-handling
envy
envy: Deserialize environment variables into type-safe structs
Stars: ✭ 64 (+392.31%)
Mutual labels:  type-safe
ErrorHandler
This is a library for Google Apps Script projects. It provides methods to perform an Exponential backoff logic whenever it is needed and rewrite error objects before sending them to Stackdriver Logging.
Stars: ✭ 14 (+7.69%)
Mutual labels:  error-handling
bugsnag-wordpress
Bugsnag error monitoring for WordPress sites
Stars: ✭ 20 (+53.85%)
Mutual labels:  error-handling
errz
Error Handling In One Line
Stars: ✭ 34 (+161.54%)
Mutual labels:  error-handling
validator
💯Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
Stars: ✭ 9,721 (+74676.92%)
Mutual labels:  error-handling

chain

This haskell package started as an experiment to implement a Haskell-flavour error-chain. Its result is ResultT, a parameterised Monad which implements an extensible, type-safe error-handling.

This package is released on GitHub as an open source software, but it is not distributed under any particular licence, and therefore is not (yet) a free software. Hopefully, this will be changed before publishing chain to Hackage.

In a Nutshell

A typical monadic function which lives inside the ResultT monad will have a type signature which looks like that:

function :: ('[Err1, Err2] :| err, Monad m)
        => a -> b -> ResultT msg err m c

'[Err1, Err2] :| err means function may raise an error of type Err1 or Err2 while it computes a result of type c. The computation is done within the monad m, that is ResultT can be part of a monad stack a la mtl. ResultT is not an alternative to mtl, as Eff can be. It is a more flexible EitherT.

To escape the ResultT package means using the runResultT function, whose type signature is:

runResultT :: ResultT msg '[] m a -> m a

runResultT only accepts empty row of errors ('[]). This obliges you to handle your error. The package provides several functions to that end.

Status

This is still a big “work in progress” project. You can have a look at this blogpost for an —already a bit out-dated— introduction to the ResultT monad.

Service Status
Travis Build Status

References

This package could not have been written without the works of other talented programmers, including (but not limited to):

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].