Fancy Haven Logo

New! Slides from a talk on GCJNI and Haven, given at the Haskell Implementor's Meeting in Portland, 1/15/2002.

What is Haven?

Haven is a purely functional library for producing scalable vector graphics in Haskell.

Haven provides a wealth of features, including:

As a demonstration of what can be done in Haven, the image at the top of this page was produced entirely in Haven (source code: Sierpinski.hs Slide.hs).

Interface and Implementation

Haven is designed to have a very clean, purely functional programming interface. Haven exports functions and a few data types that represent the abstract denotational model of vector graphics. For example, Haven's Image type denotes a function from continuous 2D space to Color (as in Pan), and Haven's Path type denotes any sequence of sub-paths composed of straight and curved segments.

However, Haven is implemented using an external 2D rendering engine. We provide a reference implementation of Haven that uses the Java 2D renderer, accessed via GCJNI.

Portability

The Haven reference implementation leverages the portability of the Java platform. Haven contains absolutely no platform-specific code, and should work "out of the box" on Hugs98 or ghc under Linux or Windows (or any other platform for which the Java Development Kit is available, for that matter).

Caveats

The Haven API is completely lacking in documentation. This should be considered an experimental release for interested parties that are willing to look at example code and understand the API from its type signatures. I hope to write some basic API documentation in the near future.

Prerequisites

You must completely download and install GCJNI before installing Haven.

Downloading

Haven is currently available as a source release. We have worked hard to make it easy to configure, compile and install from sources for any platform.

N.B.: The above distributions contain the same files, but use line-termination conventions in text files appropriate to the given platform.

The release includes complete source code, and detailed instructions on how to configure, build and install Haven with either ghc or hugs98 on either Linux or Windows.

Feedback

I would be very interested in getting feedback on Haven. Please send me email if you have any problems using Haven, or if you find Haven useful.

Source code for examples of images produced using Haven would be particularly welcome. I'd like to create a small on-line gallery of such examples, with source code.


Antony Courtney, Dept. of Computer Science, Yale University.