NOTE: This program has been improved and updated for recent Haskell versions. It is now called java-adt and can be installed with a recent Haskell platform via

  cabal install alex happy java-adt
The new project homepage is https://github.com/andreasabel/java-adt.

Generating Algebraic Data Types as Java Classes

Functional algebraic data types can be simulated using immutable Java classes. Such data types are neat for representing abstract syntax, e.g., as in Andrew Appel's, Modern Compiler Implementation in Java. This little Haskell program parses a Haskell data declaration and outputs a number of Java class files which implement this data type.

New features:

Resources

Example: straightLine.tar.gz a functional interpreter for the straight line programming language (Appel, Chapter 1), written with dataGen.

Good luck!

 


Valid HTML 4.01! Andreas Abel, http://www.tcs.informatik.uni-muenchen.de/~abel
Last modified: Tue Oct 25 17:14:26 CEST 2005
Valid CSS!