On Oct 28, 2006, at 11:05 PM, Eric Y. Kow wrote:
On Wed, Oct 25, 2006 at 21:37:26 -0700, Wim Lewis wrote:
resultfile <- return (formerdir++"/"++distname++".tar.gz")
This could be better expressed as
let resultfile = formerdir++"/"++distname++".tar.gz"
To indicate that it's not got any monadic bits in it.
Aha, I didn't know the 'do' syntax would allow 'let' blocks like
that. Yes, that's much nicer. (Though I find that the 'return' is a
pretty good indicator that something non-monadic is happening in the
monad also.)
I decided to take a stab at adding error checking to the exec calls
in 'Dist', but I have a question: when a subprocess fails (exits
nonzero), would it be better to raise an ExecException, or to raise
an ioError? Since we're in the IO monad, an ioError of some sort
(probably userError) seems like the right way to signal a failure,
but on the other hand ExecException exists and has places to store
the information about the failed command. It doesn't look like
there's a way to make ExecException into an instance of IOError, is
there?
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel