?

Log in

No account? Create an account

August 16th, 2010

Yet Another Monad Tutorial (part 5: error-handling monads)

In the previous article we showed how to derive and use the Maybe and list monads. In this article and the next we're going to look at how to use monads for error handling, also known as exception handling.

Read moreCollapse )

Yet Another Monad Tutorial (part 6: more on error-handling monads)

In the previous article we discussed error-handling strategies in Haskell and derived the Either e monad for structured error handling. In this article we'll continue our discussion of error handling by introducing some new type classes that will enable us to write code which recovers from errors in a selective way (which is called exception handling in most computer languages). Interestingly, exception handling doesn't have to be built-in in Haskell; you get it for free once you have monads!

I also promise (threaten?) that there will be one absolutely jaw-droppingly awful pun in what follows. You have been warned.

Read moreCollapse )

August 2010

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    
Powered by LiveJournal.com