I have released a new version of the conceit package with the following changes:
The Applicative instance now doesn't require those ugly (Show e, Applicative e) constraints on the error type.
There's a Monad instance for Conceit. I initially made the >> operator concurrent, like *>, but that was a bad idea. In the end, the Monad instance has sequential operations and the Applicative concurrent ones, like it happens in Haxl.
There are also MonadThrow, MonadCatch and MonadError instances. The first two work throwing and catching exceptions from IO, the last one works more like ExceptT.
A special run function was added for when the error is "impossible": Conceit Void a -> IO a. This makes easier to use Conceit in place of Concurrently.
The internals of this new version of conceit have been copied from those of Concurrently in Simon Marlow's async package, with modifications to support the new behaviour.
Showing posts with label pet projects. Show all posts
Showing posts with label pet projects. Show all posts
Thursday, October 23, 2014
Sunday, October 19, 2014
Colchis, yet another JSON-RPC 2.0 client
There's no shortage of JSON-RPC 2.0 libraries on Hackage, as any cursory search will show. I have just added my own, called Colchis.
It is a pipes-based client that makes use of bidirectional pipes. It doesn't have a lot of features, in particular the only supported transport is raw TCP. I think HTTP transport support would be easy to add, but I don't have the need right now. No notifications or batched requests, either.My aim is to be able to communicate with jsonrpc4j servers in "streaming" mode.
Check the examples folder in the repo for some examples of usage.
Monday, June 9, 2014
process-streaming 0.3.0.0
I have released version 0.3.0.0 of process-streaming, my library of pipes-based helpers built on top of the process package.
It contains breaking changes. Some functions have new names, and a few newtypes have been introduced in order to hide unnecessarily complex signatures. Hopefully the changes make the library a bit more intuitive.
You might find this library useful if:
- You want an easy way to consume the standard streams of an external process using the tools provided by the pipes ecosystem.
- You want concurrent, streaming access to both the stdout and stderr of an external process, without fear of deadlocks caused by full output buffers.
- You want to consume stdout and stderr combined in a single stream.
- You want to be relieved of tedious bookkeeping like: automatically killing the external process on the face of errors and exceptions, ensuring the termination of threads spawned for concurrent reads, and so on.
Subscribe to:
Posts (Atom)