> > If the same module is defined in multiple "root" source files, then
> > complain.  Before, the compiler would silently ignore one of them.
>   
> Is this a test for searchpaths which contain multiple copies of
> some module Foo.Bar like:
> 
>   ghc -ia:b
> 
>   a/Foo/Bar.hs
>   b/Foo/Bar.hs
> 
> If so, do you think this is something Hugs and NHC should check too?

It's actually to catch cases where you have two different source files,
say foo.hs and bar.hs, both of which define the same module.  In GHCi
you can load both of these together:

Prelude> :l foo.hs bar.hs
Compiling Foo              ( bar.hs, interpreted )
Ok, modules loaded: Foo.
*Foo> 

which is quite confusing behaviour, so now we emit an error in this
case.  Hugs also gives an error:

Reading file "foo.hs":
Reading file "bar.hs":
Parsing
ERROR bar.hs - Module "Foo" already loaded
Foo> 

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to