Are you sure this part is correct  (the 1 becomes 2, ...) ?

yield :: Monad m => a -> Proxy x' x a' a m a'yield a = Respond a Pure
producer'' :: Proxy X () () Int IO ()producer'' 

  = yield 1 >> yield 1
  
  = yield 1 >>= \_ -> yield 1
  
  = Respond 1 Pure >>= \_ -> Respond 1 Pure
  
  = Respond 1 (\v -> Pure v >>= \_ -> Respond 2 Pure)
  
  = Respond 1 (\v -> Pure v >>= \_ -> Respond 2 (\v' -> Pure v'))

Cheers

On Friday, May 23, 2014 4:35:12 AM UTC+2, Chris Mahon wrote:
>
> I completed the unfinished parts of the article, mainly the reduction of 
> the sample effect at the end. Will update with any feedback. thx, Chris
>
> On Thursday, May 22, 2014 8:21:32 AM UTC+10, Gabriel Gonzalez wrote:
>>
>>  Alright, then I will try to complete the bidirectional tutorial as soon 
>> as possible.
>>
>> On 5/21/14, 7:13 AM, Chris Mahon wrote:
>>  
>> Thanks for those links, very interesting. I'll shelve that idea for a 
>> bi-directional article then - look forward to your tutorial on the subject 
>> - I'm not sure I would have had much to write on the subject anyway.
>>
>> On Wednesday, May 21, 2014 11:12:09 PM UTC+10, Gabriel Gonzalez wrote: 
>>>
>>>  I'm still reading your article, and I will give more comments later 
>>> today, but I just wanted to mention that there used to be a bidirectional 
>>> pipes tutorial back in the 3.* cycle:
>>>
>>>
>>> https://hackage.haskell.org/package/pipes-3.3.0/docs/Control-Proxy-Tutorial.html#g:2
>>>
>>> I deleted in the transition to 4.0.0, mainly because people were 
>>> complaining about the high complexity of `pipes` and one of the goals of 
>>> the 4.0.0 release was to show that you could program entirely in a 
>>> unidirectional subset of `pipes`.  However, I plan to add a bidirectional 
>>> tutorial back again soon.
>>>
>>> You might also find this Stack Overflow answer I wrote helpful:
>>>
>>>
>>> http://stackoverflow.com/questions/23185690/event-handler-stack/23187159#23187159
>>>
>>> On 5/21/14, 4:38 AM, Chris Mahon wrote:
>>>  
>>> Hi all,
>>>
>>> I'm working on an article titled pipes 
>>> deconstructed<http://cmahon.github.io/posts/pipes-deconstructed/>and would 
>>> really appreciate feedback before I put the final touches on it. 
>>> My aim is to explain the underlying co-routine mechanics via a reduction of 
>>> a simple example to Proxy form. While I found it useful to get to grips 
>>> with the pipes implementation for my own edification, I'm really not sure 
>>> whether anyone else would find this level of detail useful so apart from 
>>> any comments on style, correctness, etc., please let me know if I'm off on 
>>> a self-indulgent tangent of no wider interest!
>>>
>>> Was also thinking of writing a short article illustrating bi-directional 
>>> pipes usage as I couldn't find much detail on the subject in the pipes 
>>> tutorial and I leaned how to send data upstream while digging into the 
>>> pipes code. Simple example towards the end of a short note I just wrote on 
>>> fix. <http://cmahon.github.io/notes/haskell/#fix>
>>>
>>> I've just created my blog and the limited content that's there is all 
>>> work in progress at the moment so a bit rough and ready in places. 
>>>
>>> Anyway, thanks in advance for your help,
>>>
>>> Chris 
>>>  -- 
>>> 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].
>>
>>
>>  

-- 
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].

Reply via email to