
Hi again all - Thanks very much for that Daniel (and thanks too to Aleksandar!). Your replies have been very helpful! Everything's now working with the parser! Parsec is truly a great library to use. It really does make parsing a joy..... :) Bye for now, and thanks again - - Andy Daniel Fischer wrote:
On Saturday 16 October 2010 10:59:10, Aleksandar Dimitrov wrote:
. GHC (the compiler itself) on the other hand, will just not produce a binary as long as your module name isn't "Main."
If your module name isn't Main, you have to tell GHC what to regard as the main module by passing the "-main-is" flag on the command line
$ ghc -O2 --make -main-is Test -o Test Test.hs
works. And your main function may also have a different name, e.g.
$ ghc -O2 --make -main-is MultiMain.main2 -o main2 MultiMain.hs
with
module MultiMain where
main1 :: IO () main1 = putStrLn "main1"
main2 :: IO () main2 = putStrLn "You chose main two."