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-adtThe new project homepage is https://github.com/andreasabel/java-adt.
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.
dataGen --defaultVisitor straightLine.hsor
dataGen --defaultVisitor MJAbsSyn.hsThis will generate a bunch of .java files.
Example: straightLine.tar.gz a functional interpreter for the straight line programming language (Appel, Chapter 1), written with dataGen.
Last modified: Tue Oct 25 17:14:26 CEST 2005