
21 Mar
2007
21 Mar
'07
3:18 p.m.
In John Hughes's "Programming With Arrows" (http://www.cs.chalmers.se/~rjmh/afp-arrows.pdf), he discusses a "stream function" type newtype SF a b = SF {runSF :: [a] -> [b]} and gives instance Arrow SF where .... He gives some examples using this, and everything seems to go just fine. But in Ross Patterson's "Arrows and Computation" (http://www.soi.city.ac.uk/~ross/papers/fop.html), he says that newtype ListMap i o = LM ([i] -> [o]) is ALMOST an arrow. Now, I've heard (but never verified) that IO fails to satisfy some monad laws, yet here we are, using it as a monad. Is a similar kind of thing going on here? Has anyone hit any snags in using this instance? Thanks, Chad