[Haskell-cafe] What *not* to use Haskell for

Austin Seipp mad.one at gmail.com
Fri Nov 14 15:27:29 EST 2008

Excerpts from Andrew Coppin's message of Fri Nov 14 14:13:01 -0600 2008:
> Yeah. I figure if I knew enough about this stuff, I could poke code 
> numbers directly into RAM representing the opcodes of the machine 
> instructions. Then I "only" need to figure out how to call it from 
> Haskell. It all sounds pretty non-trivial if you ask me though... ;-)

Save yourself some time:

Using harpy, you can generate x86 assembly /inside/ your code and
execute it, using a DSL. This makes it excellent for code generators
and playing around with code generation.

Here's a calculator I wrote using it:

For more information, http://uebb.cs.tu-berlin.de/harpy/

> Never heard of LLVM, but from the Wikipedia description it sound like 
> warm trippy goodness. Pitty there's no Haddock. :-(

It's a pretty excellent little system, to be honest. One of the
cleanest APIs I've ever used, too (especially for C++.)

> [From the build log, it looks like it failed because the build machine 
> doesn't have the LLVM library installed. Is that really necessary just 
> for building the docs?]

It's necessary to even get through the 'cabal configure' step, since
the configure script bundled with the haskell llvm bindings is run
then, which checks for the llvm-c headers.


More information about the Haskell-Cafe mailing list