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          [EMAIL PROTECTED]              
Kapplandsgatan 40       +46 (0)708 26 33 60                    
S-414 78  GÖTEBORG      http://www.dtek.chalmers.se/~d95mback/
SWEDEN                  OpenPGP ID: 3FA8580B

Attachment: signature.asc
Description: PGP signature

Reply via email to