"Scherrer, Chad" <[EMAIL PROTECTED]> writes:

> module Main where
>   module A where
>   module B where

> in a single file. This example is straight from chapter 5 of the Report,
> and no mention is made (that I could find) about modules needing to be
> in separate files. But this won't load in ghci!

IIRC, the standard deliberately doesn't specify any requirements as to
the file organization of code, and leaves it up to implementations.  I
think the reason file names and module names must coincide (with the
exception of module Main, which may be in an arbitrarily named file),
is simply that it makes it easier for the compiler (and the programmer
as well) to locate them.

Perhaps now that we have hierarchical namespaces we could allow a
"module directory" (i.e. any prefix up to a dot) to be represented
either as a directory (like it is now), or as a multi-module file?

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to