<div dir="ltr">On Sat, Aug 27, 2011 at 16:24, michael rice <span dir="ltr">&lt;<a href="mailto:nowgate@yahoo.com">nowgate@yahoo.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I&#39;m not sure how to do that. Please demonstrate.</span></div></div></div></blockquote><div>
<br></div><div>If you just compile it normally you have an unexported binding called &quot;main&quot; which is effectively (and actually, when compiled with optimization) discarded.  If you do</div><div><br></div><div>    ghc --make --main-is GameState GameState.hs</div>
<div><br></div><div>then GHC will use GameState.main as the entry point (instead of Main.main) and build a program instead of a library.</div><div><br></div><div><a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-linker">http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-linker</a></div>
</div><div><br></div>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br>
<br>
</div>