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

-- 
Martin Norbäck                         Safelogic AB
[EMAIL PROTECTED]            Stena Center 1C
+46 (0)31 772 81 70                    S-412 92 GÖTEBORG
http://www.safelogic.se                SWEDEN

Attachment: signature.asc
Description: PGP signature

Reply via email to