Peter Douglass wrote:

 | [Lava] I'm interested to know the rationale behind
 | removing the monads.

The reason we removed the monads was that circuits with
feedback (loops) in them became very tedious to define. One
had to use monadic fixpoint operators (or "softer" variants
on them), which were really unnatural to use. Also, the
monadic style enforces an ordering on the components that
you are using, while in a circuit, there is no such ordering
(everything works in parallel).

The way we removed the monads was by making a little
extension to Haskell, called Observable Sharing, which
allows one to detect if two branches in a tree are really
the same branch or merely copies of each other. Since this
is not possible to do in Haskell, this extension technically
defines a new language (not Haskell). See our paper for more
details [1]. The extension allows one to detect loops and
shared component in a datastructure.

To our delight, Lava circuit descriptions now look very much
like Hawk circuit descriptions. One of our goals was to make
the two systems come closer together.

Unfortunately, when we were struggling taking the monads out
of Lava, the Hawk people seem to have it gotten into their
mind to put in monads! :-)

Their solution to the feedback problem is to extend the
do-notation to introduce monadic fixpoint combinators
automatically (just as it introduces >>= at the moment).
This idea has been around for a long time, but I have not
seen or come up with a satisfactory solution to it. I am
looking forward to seeing their solution!

A big advantage of having monads is of course that you can
put a lot of extra information in them about the used
components, such as layout information. Currently we are
developing new ways to do this without monads.

Regards,
Koen.

[1] Koen Claessen, David Sands, "Observable Sharing for
Functional Circuit Description", ASIAN '99, Phuket,
Thailand, 1999.
http://www.cs.chalmers.se/~koen/Papers/obs-shar.ps

--
Koen Claessen         http://www.cs.chalmers.se/~koen     
phone:+46-31-772 5424      e-mail:[EMAIL PROTECTED]
-----------------------------------------------------
Chalmers University of Technology, Gothenburg, Sweden


Reply via email to