Not much news, but the Release 0.1.1 is really old, and it turned out that it needed a one space change to work with a recent Hugs.

Release 0.1.1a: PocketHaskell-0.1.1a.tar.gz

Programming functionally in tiny spaces.

The present non-release is essentially a snapshot of the ongoing development.  Therefore you can expect to find lots of rough edges and lacking functionallity.

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.

The Compiler

To play with the compiler, fire up a recent Haskell 98 compliant hugs from within the main directory:
  $ hugs -98 -P:hsparser TestInterpreter.lhs
  Type :? for help
Now you try various stages by using one of the following functions: where the argument is a Haskell module, IN THE UNDOCUMENTED SUBSET CURRENTLY SUPPORTED.  Demos: numbers, hamming, primes, and queens are names of small demo applications.

It is possible to a limited attempt to run programs with the built-in interpreter using

There is tracing variant For producing object files for the C-runtime, used to function


  TestInterpreter> testInternaliser "main = 41+1"
  main = \[] -> (+ 41 1)
  TestInterpreter> testCompiler "main = 41+1"
  Closure //0
    ConstInt 1
    PushConstInt 41
    PrimApp "+"
    Enter 0
  StoreGlo "main" 0
    AccessGlo "main" 0
    Enter 0
  TestInterpreter> testit "main = 41+1"
  Program error: Result = TaggedInt 42
  TestInterpreter> linkFile "42.bc" "main = 41+1"

The C-Runtime system

The runtime system is located in the rt directory.  Create it with `make' or `make hot'.


  $ ./run -h60000 queens.bc
  Execution ended with the value 724
  Stack high mark 4376
There 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.