[Haskell-cafe] Modules and a main function
allbery.b at gmail.com
Sat Aug 27 22:40:07 CEST 2011
On Sat, Aug 27, 2011 at 16:24, michael rice <nowgate at yahoo.com> wrote:
> I'm not sure how to do that. Please demonstrate.
If you just compile it normally you have an unexported binding called "main"
which is effectively (and actually, when compiled with optimization)
discarded. If you do
ghc --make --main-is GameState GameState.hs
then GHC will use GameState.main as the entry point (instead of Main.main)
and build a program instead of a library.
brandon s allbery allbery.b at gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe