[Haskell-beginners] A problem with a simple csv file parser
Daniel Fischer
daniel.is.fischer at web.de
Sat Oct 16 05:39:31 EDT 2010
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."
More information about the Beginners
mailing list