Version 40 (modified by Ben Lippmeier, 13 years ago) (diff)



Gloss hides the pain of drawing simple vector graphics behind a nice data type and a few display functions. Gloss uses OpenGL and GLUT under the hood, but you won't have to worry about any of that. Get something cool on the screen in under 10 minutes.

Gloss is a fork and cleanup of ANUPlot, which has been used for teaching first year computer science at the ANU for the last few years. Its main goal is to allow total beginners to get something working with a minimum of fuss.


From Hackage

With cabal

If you have cabal installed you should be able to do:

cabal update
cabal install gloss
cabal install gloss-examples

From the darcs repo

The source repos are at

darcs get
cd gloss-stable
cd gloss
cabal install 

Then again for the examples directory in that same repo.

Frequently Asked Questions (FAQ)

Q: Gloss freezes in ghci. It tries to draw the window but I don't get a picture and must kill the process.
A0: Upgrade to GHC 7.2
A1: Start ghci with -fno-ghci-sandbox
A2: Try installing gloss to use the GLFW window manager interface instead of GLUT: cabal install gloss --flags="GLFW -GLUT"

Q: The window doesn't reshape properly under Xmonad.
A: Use the GLFW window manager interface instead, or prod the Xmonad people about it. This is probably an incompatibility between Xmonad and GLUT, but the main Gloss developer doesn't use Xmonad.

Further Information

To report bugs or request features, post in the haskell-gloss Google group.

We're also interested in cool examples you come up with. Contributed examples can be added to the gloss-examples package and posted on this page.

To get an account on the trac, send email to


These are some of the examples included in the gloss-examples package:

Hello Lifespan Styrene Tree Clock Zen
code result code result code result code result code result code video

Attachments (6)

Download all attachments as: .zip