special handling of "Main.hs" contradicts Report
Simon Marlow
simonmar at microsoft.com
Fri Apr 25 04:51:55 EDT 2003
> Oops, your right. Unfortunately this is just a bug in my
> "bug report",
> there still
> seems to be a contradiction with the report:
>
> 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'.
- interpreting 'module Main where' as 'module Main(main) where'
leads to more efficient code (we have lots of examples
that do this, I believe).
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list