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.