arrows
Magnus Carlsson
magnus@cse.ogi.edu
Sat, 25 May 2002 14:38:07 -0700
Koen Claessen writes:
> * Stream processors (from Fudgets) are nice arrows:
>
> data SP a b = Get (a -> SP a b) | Put a (SP a b) | Nil
>
> But the first operator assumes that the product type
> associated with this arrow must be Haskell's product
> (,), but in fact a sum type would make a much nicer
> product.
I made an attempt to parameterize the arrow type over the type that
should be used to form environments. Indeed, I used the sum type
for the stream processor instance of arrows. I modified Ross
Paterson's preprocessor to take advantage of this generalization.
Some slides about this and an implementation can be found at
http://www.cse.ogi.edu/~magnus/ProdArrows/
All the best,
/M