As a first step what I am currently doing is the following but I doubt it 
is quite idiomatic.

To deal with P1 m (P2 m (P3)

    req <- parseUrl 
"http://0.0.0.0:8080/event/3593032d45c946bc7df34a9b40431a7d?tag=salt%2Fjob%2F";
    withManager defaultManagerSettings $ \m ->
       withHTTP req m $ \resp -> do
            runEffect $ events (responseBody resp) >-> PT.stdout

    where
        events resp = do
            p' <- resp ^. (PT.decodeUtf8 . PT.line)
            for p' $ \evt -> do
                liftIO $ print evt
                liftIO $ putStrLn "==============="

            leftover <- p'
            for leftover (\t -> do
                            liftIO $ print t
                            liftIO $ putStrLn "°°°°°°°°°°")

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