[Haskell-cafe] Please help me debug my arrow

Paul Johnson paul at cogito.org.uk
Mon Jan 18 15:33:25 EST 2010


I'm trying to write an arrow for a real-time stream processor.  I'm 
basing it on the SP type in Hughes paper on Generalising Monads to 
Arrows (http://www.cs.chalmers.se/~rjmh/Papers/arrows.pdf) section 6.  
I've extended this with a notion of time by making each step a function 
of time.  But I can't get the compose operator to work.

The arrow itself is defined in http://haskell.pastebin.com/m49944f64 
with the (.) function highlighted.  Some simple tests are in 
http://haskell.pastebin.com/m6d90f27 with the problematic call highlighted.

When run it produces an infinite list of puts, which causes the 
SimulateRTSP interpreter function to diverge.  But I've run the 
expansions by hand, and they seem to work (see the test case file at the 

I'm going nuts looking at this.  Can anyone see what I'm doing wrong?



More information about the Haskell-Cafe mailing list