
6 Mar
2011
6 Mar
'11
6:21 p.m.
It turns out you need to delete scriptedmain.o in order for test.hs to compile. Cheers, Andrew Pennebaker www.yellosoft.us On Sun, Mar 6, 2011 at 5:54 PM, Daniel Fischer < daniel.is.fischer@googlemail.com> wrote:
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.