[darcs-users] darcs patch: shell_harness script in haskell
Christian Kellermann
Christian.Kellermann at nefkom.net
Tue Nov 4 10:16:08 UTC 2008
* David Roundy <droundy at darcs.net> [081102 12:53]:
> > + forkIO (evaluate (length errput) >> putMVar errMVar ())
> > + takeMVar outMVar
> > + takeMVar errMVar
> > + e <- catch
> > + (waitForProcess pid)
> > + (\_ -> return ExitSuccess)
> > + hClose out >> hClose err
> > + return (e, (output, errput))
>
> It'd be better to keep output and errput interleaved as closely as
> possible. It's unfortunate that runInteractiveCommand doesn't support
> this, but you could look at franchise for an attempt to get some semblance
> of interleaving through use of threads. Without this, it's very hard to
> figure out which error messages go with which output.
>
Thanks for your and Jason's suggestions! For inclusion of the last
bit I'd like to have more advice. I think you are referring to the
Franchise.Util.systemOutErr function right? As I am lazy and like
to reuse code, I'd just canibalise this function in the script. Or
can I assume that Franchise will be present in current darcs'
codebase?
I am asking here for advice as I am aware that this is a potential
cultural landmine in this community.
I don't know the last outcome of the franchise/cabal discussion.
If it has not been settled I'd just use that tested function by
copy'n'pasting it in.
I am looking forward for your comments,
Christian
--
You may use my gpg key for replies:
pub 1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081104/c6adbf05/attachment.pgp
More information about the darcs-users
mailing list