--- Paul Hudak: Sierpinski Triangle --- See: The Haskell School of Expression, Chapter 3 import SOEGraphics spaceClose :: Window -> IO () spaceClose w = do k <- getKey w if k == ' ' then closeWindow w else spaceClose w main0 = runGraphics ( do putStr "Test program has started. Enter your name: " s <- getLine w <- openWindow "My first Graphics Program" (300, 300) drawInWindow w (withColor Red (ellipse (100,100) (200,200))) drawInWindow w (text (100,200) s) spaceClose w)