July 2023
Intermediate to advanced
670 pages
17h 13m
English
In the last section, we looked at how to add error handling to a parser that we built using State, but as you’ve seen throughout this book the problem of dealing with error handling in some sort of computation is common. Another example where you’ve already had first-hand experience with this is in handling failures inside of IO actions. We’ve previously handled errors inside of IO actions by raising exceptions using ioError. Although we’ve managed to get by with IO exceptions, they have a couple of problems. First, we’re risking errors caused by unhandled exceptions. We can certainly argue that developers should be responsible and handle exceptions appropriately but there’s nothing to force us to catch ...
Read now
Unlock full access