[Haskell-cafe] Re: HSH and IO ()

Dimitry Golubovsky golubovsky at gmail.com
Sat Jun 13 22:17:02 EDT 2009


John,

On Sat, Jun 13, 2009 at 7:01 PM, John Goerzen<jgoerzen at complete.org> wrote:
>> where hscpid corresponds to a process that runs a Haskell function
>> (hsffigMain :: a -> b -> c -> IO ()) defined within the same program,
>> and gccpid runs an external program (gcc), and they are piped
>> together. I am trying to avoid writing this mess using HSH.
>
> OK, so I should have read more before starting to reply.  But why are
> you writing to me about HSH if you're trying to *avoid* HSH?  I'm confused.

Sorry, I should have written "by using"; Jason made the right
correction. I thought that forkProcess-based shell commands existed in
HSH thus I could avoid all these low-level manipulations with handles
that are usually done in C programming.

> Integraing hsffigMain into HSH directly will be difficult because it
> apparently already has its notions about where its input and output come
> from; the fact that its return type is IO () implies that its output

I'll try to write a wrapper for a forked process inside a Channel ->
IO Channel typed function.

> Your best bet is to make this a separate executable.

That's not what was intended, but now I see the situation more clearly.

Thanks for the explanation. If I get any working code, I'll post a
link on the list.

-- 
Dimitry Golubovsky

Anywhere on the Web


More information about the Haskell-Cafe mailing list