Proposal: overhaul System.Process

John Meacham john at
Tue Apr 22 22:54:04 EDT 2008

On Tue, Apr 22, 2008 at 07:45:38PM -0700, Don Stewart wrote:
> > But it is much more elegant, cleaner code, and more in line with the
> > underlying semantics. A general library API shouldn't force
> > complexity on its users. Also, it has two redundant cases (Left
> > (ExitSuccess,out)) and (Right out), which is a far worse bug in an API.
> > 
> > Also, it means you can't have lazy output. since you won't know the
> > error code until the process has finished completely.
> > 
> Yeah, this was originally written for lambdabot, where lazy output just
> wasn't an option -- and possibly dangerous.
> Finding a good type that encourages the kind of "correctness" approach
> to handling errors that we like in Haskell would be good though --
> if we can improve safety, cheaply, let's do it!

It seems more verbose and ambiguous than safe, because now you have to
look up the documentation to figure out what the difference between
(Left (ExitSuccess,s)) and (Right s) is, taking up precious, precious
mindspace to remembering it and introducing another place a bug can be
introduced. Code clarity does a lot more for correctness (and
debugability) than dubious measures to improve some idea of safety.


John Meacham - ⑆⑆john⑈

More information about the Libraries mailing list