special handling of "Main.hs" contradicts Report
Ross Paterson
ross at soi.city.ac.uk
Fri Apr 25 05:01:06 EDT 2003
On Fri, Apr 25, 2003 at 09:51:55AM +0100, Simon Marlow wrote:
> [Mark Tullsen <mtullsen at cse.ogi.edu> 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?
More information about the Glasgow-haskell-bugs
mailing list