[Haskell-cafe] How to implement digital filters using Arrows

John Lask jvlask at hotmail.com
Tue Nov 1 23:53:59 CET 2011



I can't comment on using ghci debugger to observe evaluation. I have in 
the past used hood (http://hackage.haskell.org/package/hood) and found 
it both convenient and useful when trying to observe evaluation order.

On 2/11/2011 7:00 AM, Captain Freako wrote:
> Hi John,
>
> I'm trying to use the GHCI debugger on this code:
>
>   20 instance ArrowLoop SF where
>   21     loop (SF f) = SF $ \as ->
>   22         let (bs, cs) = unzip (f (zip as (stream cs))) in bs
>   23       where stream ~(x:xs) = x : stream xs
>   24
>   25 swap :: (a,b) ->  (b,a)
>   26 swap (x,y) = (y,x)
>
> in order to watch the recursion of the `loop' function unfold.
> However, when I single step through the code, I never stop on line 22
> (where I could, presumably, peek in at `bs' and `cs', in order to see
> them develop):
>



More information about the Haskell-Cafe mailing list