
Raja Koduru
Hi,
I am a beginner. Help me.
Here is my "main.hs", sample code from the book HSOE. ---------------------------------------------------------------- module Main where import SOE
main = runGraphics ( do w <- openWindow "My First Graphics Program" (300, 300) drawInWindow w (text (100, 100) "Hello Graphics World") k <- getKey w closeWindow w )
------------------------------------------------------------------
When this is run, a window pops up but it immediately crashes. I call "main" function after loading the above src file (main.hs) in ghci
Does the same happen when you compile with "ghc --make" or use ":main" in ghci? ghc and ghci behaving different[1] wrt. ffi calls isn't unheard of. [1] meaning that ghci fails -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited.