[Haskell-cafe] Expression dye

Stephen Tetley stephen.tetley at gmail.com
Thu Jul 15 03:45:48 EDT 2010

On 14 July 2010 22:37, Andrew Coppin <andrewcoppin at btinternet.com> wrote:

> (The small problem with the approach above, of course, is that as soon as
> the function wants to do comparisons or take flow control decisions, you've
> got trouble. It's not impossible to solve, but it *is* a lot of work...)

Hi Andrew

You could try pairing both the Dye representation and a genuinely
numeric one in the same type. Kansas Lava - a embedded hardware
description language - uses this technique to be able to both
interpret signals and generate them.

There is a new paper describing Kansas Lava here:

I think Antony Courtney was also using a dual representation in the
graphics program Haven - shallow so it could use normal function
mechanism to calculate "point in polygon" and deep so it could build
interfaces across the JNI bridge in Java.

Best wishes


More information about the Haskell-Cafe mailing list