Haskell for non-Haskell's sake

Alastair Reid alastair@reid-consulting-uk.ltd.uk
Sat, 30 Aug 2003 12:33:53 +0100


> If you use Haskell for a purpose *other than* one of those listed below,
> I'd love to hear.  I don't need a long report, anything from a simple "I
> do" to a paragraph would be fine, and if you want to remain anonymous
> that's fine, too.

I have used Haskell for:

- Knit (http://www.cs.utah.edu/flux/knit/)

  A component language for C based on the Unit model used in MzScheme.
  (Roughly comparable to using ML functors for every module.)
  This was used to break the OSKit (a huge collection of OS kernel
  components extracted from Linux, Mach and *BSD) into finer grained
  components.

  A new version of Knit which allows import and export of types is almost
  ready.  (The first version could only import/export functions, variables
  and opaque types.)

  [Knit is a language needing all the bits that Haskell is good for writing
  (lexing, parsing, static typechecking, desugaring, optimizing, generating
  'code', etc.)  Uses an external program written in C to rename symbols
  in ELF-format object files.]

- CMI (due for release soon)
  A tunable cross-module inliner for C.
  Can be used to speed up your code.
  Can be used to reduce the stack consumption of 
   embedded systems (http://www.cs.utah.edu/~regehr/stacktool/)
  Can be used to let you adopt a better programming style in C
    by letting you put aside some performance concerns.

  [Works by parsing C source code, merging multiple files into one,
  topologically sorting function definitions, pretty-printing, etc.
  All the things Haskell is good for!]

- ADL
  An architecture description language which focusses on describing
  the hierarchies of schedulers and composition of software components
  found in embedded systems.  
  (Background: http://www.cs.utah.edu/flux/papers/cee-flux-tn-02-02/)

  [Again, ADL is a language so it has all the usual bits Haskell is good for:
   lexer, parser, dynamic typechecking, dimension types, interpreter, etc.
   Also uses Haskell's ability to call external tools so it can use external
   analysis tools written in Haskell (like TSL, below), or written in C, perl,
   whatever.]

- Task/Scheduler Logic (TSL)
  A language/ logic/ tool for reasoning about hierarchies of schedulers 
  found in embedded systems.

  [Uses Haskell's strengths for implementing languages and for
  symbol manipulation (contains a small forward-chaining inference
  engine).]

- FVision (Visual tracking)

  Given a bunch of simple image tracking primitives (written in C++ and
  assembly, part of the larger XVision system), build complex feedback
  loops, hierarchies, etc. to create more robust, flexible, sophisticated
  tracking systems.
  http://www.reid-consulting-uk.ltd.uk/alastair/publications/padl01/index.html

  Uses Haskell's ability to 'embed' domiain specific languages inside it.

  [One could argue that this project was just  'Haskell for Haskell's sake'
   but it's worth pointing out that it lead to a complete redesign of XVision
   along the lines I had developed in the Haskell version.]

--
Alastair Reid