Bug involving graphics under OS X
Scot Drysdale
scot at cs.dartmouth.edu
Tue Jul 17 15:49:32 EDT 2007
I am preparing to teach a course this fall from Paul Hudak's _The
Haskell School of Expression_. In running Picture.lhs, one of the
example programs form the book, I am getting strange graphics
behavior. I load the program using ghci and type "main". The
graphics window appears, but only one or two of the four shapes is
drawn. But if I resize the window (or let the screen or computer
sleep and awaken, or cover the window and then uncover it), all four
shapes appear. When clicking on a shape to bring it to the front,
only the last drawn shape appears on the screen. Again, resizing the
window reveals all four shapes drawn correctly.
The fours files needed to produce this behavior are enclosed, and a
full session (using the -v flag on ghci) is shown below. I modified
the files to use the library Graphics.SOE instead of SOEGraphics,
which was needed to run under ghc (as opposed to HUGS).
I am running ghci, version 6.6.1, on an Apple MacBook Pro (2.16 GHz
Intel Core Duo, 1 GB 666 MHz Ram) running OS X version 10.4.10. I
get similar behavior on an Apple iMac (1.6 GHz PowerPC G5) running
10.4.10.
Scot Drysdale
Professor of Computer Science, Dartmouth College
----------------
scot-macbookpro:~/Documents/Courses/CS 8/SOE/bugtest scot$ ghci -v
Picture.lhs
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.6.1, for Haskell
98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Using package config file: /opt/local/lib/ghc-6.6.1/package.conf
wired-in package base mapped to base-2.1.1
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0
wired-in package template-haskell mapped to template-haskell-2.1
Hsc static flags: -static
Loading package base ... linking ... done.
wired-in package base mapped to base-2.1.1
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0
wired-in package template-haskell mapped to template-haskell-2.1
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
wired-in package base mapped to base-2.1.1
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0
wired-in package template-haskell mapped to template-haskell-2.1
*** Chasing dependencies:
Stable obj: []
Stable BCO: []
unload: retaining objs []
unload: retaining bcos []
Upsweep completely successful.
*** Deleting temp files:
Deleting:
*** Chasing dependencies:
Created temporary directory: /tmp/ghc4524_0
*** Literate pre-processor:
/opt/local/lib/ghc-6.6.1/unlit -h Picture.lhs Picture.lhs /tmp/
ghc4524_0/ghc4524_0.lpp
*** Literate pre-processor:
/opt/local/lib/ghc-6.6.1/unlit -h Region.lhs Region.lhs /tmp/
ghc4524_0/ghc4524_1.lpp
*** Literate pre-processor:
/opt/local/lib/ghc-6.6.1/unlit -h Shape.lhs Shape.lhs /tmp/ghc4524_0/
ghc4524_2.lpp
*** Literate pre-processor:
/opt/local/lib/ghc-6.6.1/unlit -h Draw.lhs Draw.lhs /tmp/ghc4524_0/
ghc4524_3.lpp
Stable obj: []
Stable BCO: []
unload: retaining objs []
unload: retaining bcos []
compile: input file /tmp/ghc4524_0/ghc4524_2.lpp
*** Checking old interface for main:Shape:
[1 of 4] Compiling Shape ( Shape.lhs, interpreted )
*** Parser:
*** Renamer/typechecker:
*** Desugar:
Result size = 501
*** Simplify:
Result size = 910
Result size = 681
Result size = 681
*** Tidy Core:
Result size = 681
*** CorePrep:
Result size = 831
*** ByteCodeGen:
*** Deleting temp files:
Deleting:
compile: input file /tmp/ghc4524_0/ghc4524_3.lpp
*** Checking old interface for main:Draw:
[2 of 4] Compiling Draw ( Draw.lhs, interpreted )
*** Parser:
*** Renamer/typechecker:
*** Desugar:
Result size = 827
*** Simplify:
Result size = 1173
Result size = 1093
Result size = 1093
*** Tidy Core:
Result size = 1093
*** CorePrep:
Result size = 1351
*** ByteCodeGen:
*** Deleting temp files:
Deleting:
compile: input file /tmp/ghc4524_0/ghc4524_1.lpp
*** Checking old interface for main:Region:
[3 of 4] Compiling Region ( Region.lhs, interpreted )
*** Parser:
*** Renamer/typechecker:
*** Desugar:
Result size = 827
*** Simplify:
Result size = 1134
Result size = 945
Result size = 945
*** Tidy Core:
Result size = 945
*** CorePrep:
Result size = 1215
*** ByteCodeGen:
*** Deleting temp files:
Deleting:
compile: input file /tmp/ghc4524_0/ghc4524_0.lpp
*** Checking old interface for main:Picture:
[4 of 4] Compiling Picture ( Picture.lhs, interpreted )
*** Parser:
*** Renamer/typechecker:
*** Desugar:
Result size = 1624
*** Simplify:
Result size = 2423
Result size = 2083
Result size = 2083
*** Tidy Core:
Result size = 2083
*** CorePrep:
Result size = 2443
*** ByteCodeGen:
*** Deleting temp files:
Deleting:
Upsweep completely successful.
*** Deleting temp files:
Deleting:
Ok, modules loaded: Picture, Region, Shape, Draw.
*Picture> main
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
Loading package X11-1.2.1 ... linking ... done.
Loading package HGL-3.1.1 ... linking ... done.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Draw.lhs
Type: application/octet-stream
Size: 4111 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20070717/dcb8f43a/Draw-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture.lhs
Type: application/octet-stream
Size: 9986 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20070717/dcb8f43a/Picture-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Region.lhs
Type: application/octet-stream
Size: 7868 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20070717/dcb8f43a/Region-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Shape.lhs
Type: application/octet-stream
Size: 4578 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20070717/dcb8f43a/Shape-0001.obj
More information about the Glasgow-haskell-bugs
mailing list