What decides the name of a module?
Matthias Lang
matthias@REDACTED
Sun Jul 6 09:24:42 CEST 2003
mml> The convention is that the module name matches the file name.
> I think it would be helpful if the compiler issued a stern warning
> if it found -module(x) in file y.erl and x/=y.
E.g. like this:
1> c(rabbit).
** Module name 'roger' does not match file name 'rabbit' **
{error,badfile}
:-)
Lower level interfaces to the compiler (e.g. erlc or compile:file)
don't tell you, though you'll notice when you try to load the file.
Matthias
More information about the erlang-questions
mailing list