Main.main naming convention

Martin Norbäck d95mback@dtek.chalmers.se
09 Sep 2002 14:00:42 +0200


--=-eduztXDOQREXJmxJ87fI
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I have a question about the Main.main naming convention. Would it be a
good idea to lift the restriction and allow any module which exports a
function main :: IO () to be compiled into a separate binary?

You'd need to specify which module should be the top-level module when
compiling, of course.

Why I'm asking is because I have several Main modules in one directory,
in files like Program1.hs, Program2.hs and so on, but all of these
claims (and must claim) to be "module Main".

Java, for instance, allows any class which has a main method to be used
at the top level.

Regards,

	Martin

--=20
Martin Norb=E4ck          d95mback@dtek.chalmers.se             =20
Kapplandsgatan 40       +46 (0)708 26 33 60                   =20
S-414 78  G=D6TEBORG      http://www.dtek.chalmers.se/~d95mback/
SWEDEN                  OpenPGP ID: 3FA8580B

--=-eduztXDOQREXJmxJ87fI
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: För information se http://www.gnupg.org/

iD8DBQA9fI1qkXyAGj+oWAsRAg03AJ48ZYUJHo6FzP5hi9O/N2CugJ1IlQCdECe7
DcxyoD4Xva+EEoJD4batf1g=
=dOtj
-----END PGP SIGNATURE-----

--=-eduztXDOQREXJmxJ87fI--