Re: Remove GHC.Err import from Data.Maybe

2008-01-04 Thread Stefan O'Rear
On Fri, Jan 04, 2008 at 09:33:40AM +, 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. > >

RE: Remove GHC.Err import from Data.Maybe

2008-01-04 Thread Simon Peyton-Jones
| > 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. | Why is this necessary in post-exceptions Haskell? Can we not just have | err

Re: Remove GHC.Err import from Data.Maybe

2008-01-04 Thread Stefan O'Rear
On Fri, Jan 04, 2008 at 09:12:20AM +, 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 'err

RE: Remove GHC.Err import from Data.Maybe

2008-01-04 Thread Simon Peyton-Jones
s of GHC.Err. But remember that many of these modules are still compiled before GHC.Err. Does that make sense? Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Mitchell | Sent: 31 December 2007 16:57 | To: cvs-ghc@haskell.org | Su

Re: Remove GHC.Err import from Data.Maybe

2008-01-02 Thread Simon Marlow
Judah Jacobson wrote: On Dec 31, 2007 11:57 AM, Neil Mitchell <[EMAIL PROTECTED]> wrote: These imports of Err all include {-# SOURCE #-} pragmas, which GHC warns me are unnecessary, but clear change the output. What do the SOURCE pragma's do? I couldn't find them in the manual. They break the

Re: Remove GHC.Err import from Data.Maybe

2007-12-31 Thread Judah Jacobson
On Dec 31, 2007 11:57 AM, Neil Mitchell <[EMAIL PROTECTED]> wrote: > > These imports of Err all include {-# SOURCE #-} pragmas, which GHC > warns me are unnecessary, but clear change the output. What do the > SOURCE pragma's do? I couldn't find them in the manual. > They break the circular depende

Re: Remove GHC.Err import from Data.Maybe

2007-12-31 Thread Neil Mitchell
Hi GHC.Arr and GHC.Base both also have this issue, but they could well be necessary. These imports of Err all include {-# SOURCE #-} pragmas, which GHC warns me are unnecessary, but clear change the output. What do the SOURCE pragma's do? I couldn't find them in the manual. Thanks Neil On 12/3

Remove GHC.Err import from Data.Maybe

2007-12-31 Thread Neil Mitchell
Hi, I noticed that Data.List uses "error" normally, but Data.Maybe explicitly imports it from GHC.Err. Is there a reason for this? Removing the import GHC.Err line still appears to work. This caused me issues with circular modules and recursive boot files, in various mixtures. It's not a fatal is