Remove GHC.Err import from Data.Maybe

Stefan O'Rear stefanor at cox.net
Fri Jan 4 04:18:23 EST 2008


On Fri, Jan 04, 2008 at 09:12:20AM +0000, Simon Peyton-Jones wrote:
> The trouble is that 'error' calls an I/O function to print its message, and the I/O functions in turn depend on a *lot* of stuff. So 'error' can be defined only when a lot of other functions have been defined.
> 
> But 'error' is *needed* very early; e.g. to define 'head'.

Why is this necessary in post-exceptions Haskell?  Can we not just have
error be:

error str = throw# (ErrorCall str)

?

The exception is only printed if the exception reaches the top level;
but it seems that the most logical place to handle that is in the RTS
uncaught-exception handler.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/cvs-ghc/attachments/20080104/a8bb806c/attachment.bin


More information about the Cvs-ghc mailing list