5 Feb
2001
5 Feb
'01
6:27 p.m.
On Mon, 5 Feb 2001, Simon Marlow wrote:
I don't see that. Presumably you mean overloading failIf with the Monad class, but `fail' takes a String and in the IO monad we want to raise a real IOError, not just a UserError.
MarshalError is a "portable" and language-independent error wrapping which throws userErrors. This can easily be generalized to an arbitrary Monad. CError translates errno to IOError. IOError's representation is private to the Haskell's implementation. Translation of errors other than errno to IOErrors would usually not make much sense anyway, and similarly translation of errno to something other than throwing IOError. -- Marcin 'Qrczak' Kowalczyk