25 May
2002
25 May
'02
9:38 p.m.
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