logo       

Re: special handling of "Main.hs" contradicts Report: msg#00075

lang.haskell.glasgow.bugs

Subject: Re: special handling of "Main.hs" contradicts Report

On Fri, Apr 25, 2003 at 09:51:55AM +0100, Simon Marlow wrote:
> [Mark Tullsen <mtullsen@xxxxxxxxxxx> writes:]
> > The report leads one to believe "module Main where ..."
> > should export
> > all top-level entitities just the same as if we were
> > defining a module by another name.
>
> Yes, we're aware this is a bug (see my first message in this thread).
> However, I think we're going to declare it as a known
> divergence from the report, for two reasons:
>
> - It's highly unlikely that you need to import Main, so
> you'll never notice the difference. If you *do* need more
> exports from Main, then write 'module Main(module Main) where'.

I expect it would be confusing for GHCi users.

> - interpreting 'module Main where' as 'module Main(main) where'
> leads to more efficient code (we have lots of examples
> that do this, I believe).

How about just suggesting that users write 'module Main(main) where'
to get more efficient code?


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise