Course Software

FP

wxHaskell

In the course we will tell something about the programming of graphical user interfaces in Haskell. Unfortunately there is not a single, well-defined way to do so, since there are quite a few, more or less equally expressive, packages available. All these packages rely on haskell bindings to some external graphical user-inerface library, such as OpenGL? , wxWidgets or GTK. We will use wxHaskell

Due to the fact that both the main haskell compiler GHC evolves, these packages evolve, and the operating systems on which they are to be combined evolve, getting a working combination of these three components is not always easy. The situation has improved however over the years. Especially on Widows based systems the situation has been somewhat problematic. In order to make your life easier we have constructed a zip file which contains a working combination of the wxWidgets, the wxHaskell modules, and the GHC Haskell compiler. It contains also an example application which is based on the so-called turtle graphics, which enables you to program line drawings by giving commands to a turtle who draws lines by moving over a piece of paper. The nice thing is that you do not need a lot of haskell knowledge to start using it.

In order to use this package:

  • download the package
  • unpack the zip file
  • double-click on start.bat and type main in order to run the main program
  • using a text editor to change the file Turtle.hs
  • the file Turtle.pdf contains an exercise (in Dutch)


Topic attachments
I Attachment Action Size Date Who Comment
elsehs Turtle.hs manage 8.5 K 09 Sep 2010 - 07:53 DoaitseSwierstra  
pdfpdf Turtle.pdf manage 158.5 K 09 Sep 2010 - 07:53 DoaitseSwierstra