[Haskell-beginners] error handling in libraries