[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


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(- and GLFW(0.3).

ghc-pkg list output:
    Cabal-, GLFW-0.3, HUnit-, OpenGL-,
    QuickCheck-, Win32-, array-, base-,
    base-, bytestring-, containers-,
    directory-, (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-, (ghc-6.10.2), ghc-prim-,
    haddock-2.4.2, haskell-src-, haskell98-, hpc-,
    html-, integer-, mtl-, network-2.2.1,
    old-locale-, old-time-, packedstring-,
    parallel-, parsec-, pretty-, process-,
    random-, regex-base-, regex-compat-,
    regex-posix-, rts-1.0, stm-, syb-,
    template-haskell-, xhtml-3000.2.0.1


More information about the Haskell-Cafe mailing list