[prev in list] [next in list] [prev in thread] [next in thread] 

List:       darcs-devel
Subject:    Re: [darcs-devel] [issue323] darcs dist support for tarballs in other
From:       Wim Lewis <wiml () hhhh ! org>
Date:       2006-10-30 2:13:27
Message-ID: 2B845185-4382-4ABE-8A98-A755687A0C27 () hhhh ! org
[Download RAW message or body]


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
darcs-devel@darcs.net
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic