[Haskell-cafe] Crashing - First Graphics Program in Haskell School of Expression(HSOE)

Raja Koduru kscraja at gmail.com
Fri Apr 10 03:11:07 EDT 2009


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

I am on XP, using GHC-6.10.2. It crashed on GHC-6.10.1 also.

I downloaded the HSOE code from here: http://haskell.org/soe/software1.htm

Used cabal to install OpenGL(-2.2.1.1) and GLFW(0.3).

ghc-pkg list output:
d:/ghc/ghc-6.10.2\package.conf:
    Cabal-1.6.0.3, GLFW-0.3, HUnit-1.2.0.3, OpenGL-2.2.1.1,
    QuickCheck-1.2.0.0, Win32-2.2.0.0, array-0.2.0.0, base-3.0.3.1,
    base-4.1.0.0, bytestring-0.9.1.4, containers-0.2.0.1,
    directory-1.0.0.3, (dph-base-0.3), (dph-par-0.3),
    (dph-prim-interface-0.3), (dph-prim-par-0.3), (dph-prim-seq-0.3),
    (dph-seq-0.3), filepath-1.1.0.2, (ghc-6.10.2), ghc-prim-0.1.0.0,
    haddock-2.4.2, haskell-src-1.0.1.3, haskell98-1.0.1.0, hpc-0.5.0.3,
    html-1.0.1.2, integer-0.1.0.1, mtl-1.1.0.2, network-2.2.1,
    old-locale-1.0.0.1, old-time-1.0.0.2, packedstring-0.1.0.1,
    parallel-1.1.0.1, parsec-2.1.0.1, pretty-1.0.1.0, process-1.0.1.1,
    random-1.0.0.1, regex-base-0.72.0.2, regex-compat-0.71.0.1,
    regex-posix-0.72.0.3, rts-1.0, stm-2.1.1.2, syb-0.1.0.1,
    template-haskell-2.3.0.1, xhtml-3000.2.0.1
-----------------------------------------------------------------------------------------

regards,
raja


More information about the Haskell-Cafe mailing list