Announce: APP: The Haskell Array Preprocessor

Hal Daume III hdaume@ISI.EDU
Tue, 13 Aug 2002 07:47:14 -0700 (PDT)


Hi all...I'd read through the results of the survey and there seemed to be
a sentiment that people tend to build their own "in-house" utilities and
don't share them.  I have a small one, but if anyone wants to use it,
they're of course welcome.  I have made it available at:

  http://www.isi.edu/~hdaume/APP/

With some documentation.  The basic idea is to alleviate the pain of
dealing with stateful arrays (IOArrays and STArrays, for the most part,
but really anything that is an instance of MArray).

APP basically builds some syntactic sugar on to Haskell for dealing with
these and now allows constructions like:

Read:

  z <- array[|x|][|y|]

Assign:

  array[|x|][|y|] <- expr

Update:

  array[|x|][|y|] <-$ expr

Use:

  array[|x|][|y|] >>= print

It's not perfect and makes some errors (but rarely), but it's very fast
and the translations are very simple (and, imo, obvious).  The exact
translations can be found on the web page or in the source code which is
distributed thereon.

Happy Haskelling!

 - Hal