
6 Mar
2011
6 Mar
'11
5:54 p.m.
On Sunday 06 March 2011 23:32:43, Andrew Pennebaker wrote:
Is there a way to compile a Haskell script with a different module name than Main?
$ ghc -main-is ScriptedMain --make ScriptedMain The -main-is flag tells GHC what to regard as Main.main. Give it a module name (Foo) to say main is Foo.main, a function name (bar) to tell it main is Main.bar or a quailfied function name (Foo.bar) to tell it main is function bar in module Foo.