[Haskell-cafe] streaming translation using monads

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Tue Nov 18 21:53:03 EST 2008


On 2008 Nov 18, at 21:23, Warren Harris wrote:
> However, each of the clauses is actually an output routine to send  
> the expression that it denotes to a remote server, and a parser for  
> receiving the results. Since a clause is really a pair of  
> operations, it doesn't seem possible to formulate a monad that will  
> compose all the output routines together and compose all the input  
> routines together in one shot. (Note that the variables in the above  
> code (v1, v2) represent inputs to be received from the remote server  
> -- all outputs are packaged into the clause expressions themselves  
> and are effectively literals.)


Have you considered using arrows instead?

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Haskell-Cafe mailing list