Main.main naming convention

Martin Norbäck martin.norback@safelogic.se
09 Sep 2002 13:58:56 +0200


--=-v1PM9AYpA9pYAPf9BXO8
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                         Safelogic AB
martin.norback@safelogic.se            Stena Center 1C
+46 (0)31 772 81 70                    S-412 92 G=D6TEBORG
http://www.safelogic.se                SWEDEN

--=-v1PM9AYpA9pYAPf9BXO8
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/

iD8DBQA9fI0A3YauxIdkXLgRAkUdAKCI8EPzyx1kgNZhW5llzwzFICJHFgCcDqvB
hHUt0ooyDHunzNNRx9lZPu0=
=7bO7
-----END PGP SIGNATURE-----

--=-v1PM9AYpA9pYAPf9BXO8--