not naming modules Main

Hal Daume hdaume@ISI.EDU
Fri, 16 Nov 2001 18:34:14 GMT

I'm really frustrated that modules that you want to compile to
executables have to be named Main.  I often have a module with a main
method that I use for testing or whatever (perhaps I want the gained
speed of an executable) but is, for the most part, a module I import
into others.  I end up having to constantly change the module name
whenever I want to compile it and I find this terribly frustrating.

Is there any reason you can't just compile things that simply export a
main method with the proper type?  Is this a ghc specific thing or
does nhc also have this restriction?  Any chance ghc will change its
policy on this?

 - Hal

Hal Daume III

 "Computer science is no more about computers    |
  than astronomy is about telescopes." -Dijkstra |