Release 0.1.1a: PocketHaskell-0.1.1a.tar.gz
PockelHaskell consists of a Compiler, written in Haskell, and a runtime system. It is intended that there may be several implementations of the runtime system, to allow different options for tracing, space profiling, etc. In these sources there are two: one written in Haskell and another in C. They are supposed to have identical semantics, but there are presently minor inconsistencies.
The sources of the compiler proper are intended to form one big document. As such most of the documentation is intended to be in the sources or in the main file PocketHaskell.lhs. Unfortunately, the documentation is not exactly up to date or even complete, but there might still be helpful snippets in there.
$ hugs -98 -P:hsparser TestInterpreter.lhs
Type :? for help
TestInterpreter>Now you try various stages by using one of the following functions:
It is possible to a limited attempt to run programs with the built-in interpreter using
TestInterpreter> testInternaliser "main = 41+1"
main = \ -> (+ 41 1)
TestInterpreter> testCompiler "main = 41+1"
StoreGlo "main" 0
AccessGlo "main" 0
TestInterpreter> testit "main = 41+1"
Program error: Result = TaggedInt 42
TestInterpreter> linkFile "42.bc" "main = 41+1"
$ ./run -h60000 queens.bc
Execution ended with the value 724
Stack high mark 4376There is a small PalmPilot application in the rt/Pilot directory that generates the primes below 1000.
Have fun and please let me have all your comments. Remember however, that it is far from finished.