The Home of Haggis
Haggis is a graphical user interface framework for the functional
running under the X Window system. It is currently being developed using the
Glasgow Haskell Compiler
with its concurrent extensions to achieve more comfortable interaction with the outside world.
- Multi-threaded, concurrent user interface framework.
To help in structuring the interaction with the user
and the outside world, Haggis uses concurrency to
separate concerns. To be precise, Haggis is built
on top of the concurrent extensions to the Glasgow Haskell Compiler
(aka. Concurrent Haskell). The concurrency is simulated, i.e.,
the GHC runtime system performs pre-emptive scheduling between a
collection of concurrently running state threads.
- An extensible framework for building user interfaces.
Haggis offers a simple framework for building user interfaces
from parts. Using only a few primitive abstractions and
combinators for glueing `components' together, complete applications
or new user interface abstractions can be built. Indeed, one
of the goals behind Haggis is to try and eradicate the boundary
between building user interface abstractions (`widgets') and writing
- An (almost) complete set of common user interface abstractions.
Using the Haggis core set of combinators, a large collection of
user interface abstractions has been built. In scope, this
collection is equal (if not bigger) to what toolkits such as Tk,
Athena, Java's AWT or Fudgets (the `standard' FP toolkit) offers.
A caveat to this (bold) claim is that the set of abstractions for
handling text input and output is somewhat lacking at the moment,
as there is no support for multi-line text editing or a proper
abstraction for viewing large chunks of text. Expect this to
- A simple model of structured graphics.
To describe graphical output, Haggis opt for a non-procedural
approach. Instead of viewing graphics as a sequence of
side-effecting operations on some drawing surface, a simple model
of structured, declarative graphics is used. A picture is described
by an abstract value that can be manipulated and combined
together with other picture values to compose complete graphical
scenes. These picture values can then be converted into actual
graphical output on the screen, or can be printed out as
In the cases where the graphical output have no apparent or
simple compositional structure, Haggis provides also a
procedural drawing interface.
Haggis currently groks XBM, XPM and P[B,P]M image formats.
- An abstract view of the underlying window system.
To try and save the user from having to learn about Haggis
and the details of the underlying window system
(the X Window system), Haggis tries to hide its current X11
parentage by providing some (we hope!) window system independent
interfaces for accessing and communicating with the window system.
(If you really want to see what's under the bonnet and deal
with the window system more directly, you can.)
- Uses modern functional I/O model.
Haggis uses the now standard Haskell way of expressing I/O,
the IO monad. Interacting with the user interface components
is presented as interaction with any other device, like a file or
- A reasonably complete set of documentation describing the system.
The current version of Haggis is 0.1c, and is available in both
source and binary formats via anonymous ftp from:
For WWWers: ftp.dcs.gla.ac.uk/pub/haskell/glasgow/
- Host: ftp.dcs.gla.ac.uk
- Directory: pub/haskell/glasgow/
- Filename: haggis-0.1c.tar.gz
Or just click one of these (binary bundles to follow):
Literate documents showing some of the features of Haggis:
[more to come]
The Haggis distribution contains documentation describing the
system, here is the `online' version of it:
Papers and stuff
- Composing User Interfaces with Haggis. Sigbjorn Finne and Simon Peyton Jones
To be presented at the 1996 Summer school on advanced Functional programming, Olympia, WA, Aug 25-30 1996.
- Concurrent Haskell Simon Peyton Jones, Andrew Gordon and Sigbjorn Finne,
Proceedings of the ACM Symposium on Principles of Programming Languages,St Petersburg
Beach, Florida, January 1996.
- Composing Haggis
Sigbjorn Finne and Simon Peyton Jones.
Proceedings of the Fifth Eurographics Workshop on Programming Paradigms
for Computer Graphics, Maastricht, September 1995, Springer Verlag.
(Gives an overview of the ideas behind Haggis and although some of the details
of the programming model have changed since the paper was written, the basic principles
still hold true.)
- Pictures: A Simple Structured Graphics Model
Paper describing the simple model for doing structured graphics in Haggis.
Presented at the 1995 Glasgow Workshop on Functional Programming, Ullapool.
Reporting bugs and problems
If you should come across bugs installing or using Haggis, please send
a detailed as possible description of the problem (plus
details on window system environment and compiler setup) to
A list of known bugs and problems can be found
A version history for Haggis hides here.
Department of Computing Science,
University of Glasgow,
Glasgow G12 8QQ,
Sigbjorn Finne <email@example.com>
Last modified: Mon 11 Oct 14:53 BST 1999 by firstname.lastname@example.org