Home > Uncategorized > Haskell Graphics

Haskell Graphics

The next step in my Haskell quest has been to display some graphics. I might add that I use windows and that I use Haskell platform 2012.2.0.0. After a bit of investigation I found this rather hairy description. Not too encouraging. At this point I had been fiddling around and I might have installed bindings for OpenGL and GLUT using cabal.

(?) cabal install OpenGL

(?) cabal install GLUT

At least the packages are among my installed packages when listing using

cabal list –installed


Anyhow, I decided to just give it a shot without installing anything – just to see what happened. I copied the source code for teapot.hs and compiled it using:

ghc teapot.hs


It actually compiled without any problems into teapot.exe but when run nothing happened. I figured that this might be due to a missing glut32.dll. I downloaded a precompiled version from here and placed the dll next to the teapot.exe and bang:


The application was up and running. Nice and simple. (Don’t know why it is called teapot though).

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: