I also like this solution. On Tue, Feb 11, 2014 at 3:05 PM, Renzo Carbonara <[email protected]> wrote: > On Tue, Feb 11, 2014 at 2:42 AM, Gabriel Gonzalez <[email protected]> > wrote: >> Ok, I think I found an approach that will satisfy everybody. This solution >> only requires providing three utility functions in `pipes-parse`: >> >> debugView >> :: (Producer a m x -> Producer b m y) >> -> (Producer a m x -> Producer b m y) >> debugView = id >> >> debugZoom >> :: (StateT (Producer a m x) m r -> StateT (Producer b m y) m r) >> -> (StateT (Producer a m x) m r -> StateT (Producer b m y) m r) >> debugZoom = id >> >> debugOver >> :: ( (Producer a m w -> Producer b m x) >> -> (Producer c m y -> Producer d m z) ) >> -> ( (Producer a m w -> Producer b m x) >> -> (Producer c m y -> Producer d m z) ) >> debugOver = id >> >> The following example shows how you would use it (see the `p3` example): >> >> http://lpaste.net/99760 > > > Ah, this is great! I like this solution. > > Besides, the GHC error message is quite precise about where the error > happens, so users aware of the > existence of `debugView` and the other debug functions can readily > realize when they need to use them. > > In the first argument of `view', namely `decoded' > In the second argument of `(>->)', namely `view decoded PB.stdin' > > > Regards, > > Renzo Carbonara. > > -- > You received this message because you are subscribed to the Google Groups > "Haskell Pipes" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected].
-- You received this message because you are subscribed to the Google Groups "Haskell Pipes" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
