[Haskell-cafe] HSH and IO ()

Dimitry Golubovsky golubovsky at gmail.com
Fri Jun 12 23:58:07 EDT 2009


John & all,

I use HSH in my project where several external programs and Haskell
functions need to be piped together: HSH is of great help here.

I however came across the situation when one of pipe-connected
functions has signature IO (), yet it reads from stdin* and writes to
stdout.

The documentation mentions "instance ShellCommand (Handle -> Handle ->
IO ())" which could be of some help, but in the latest version of HSH
on Hackage this instance is commented out.

What was the reason of doing that? Is this to be expected in the
upcoming versions?

Thank you.

----------------------------
* I modelled that by calling getContents, but the actual program will
call a foreign library that contains a C function that reads from
stdin (that is, FILE *), and that cannot be changed easily.


-- 
Dimitry Golubovsky

Anywhere on the Web


More information about the Haskell-Cafe mailing list