On 14 July 2010 22:37, Andrew Coppin <andrewcop...@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: http://www.ittc.ku.edu/csdl/fpg/biblio http://www.ittc.ku.edu/csdl/fpg/sites/default/files/kansas-lava-ifl09.pdf 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 Stephen _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe