[darcs-users] darcs patch: Refactor logic flow in `main`.
Eric Kow
kowey at darcs.net
Thu Jan 15 11:15:17 UTC 2009
On Thu, Jan 15, 2009 at 21:30:37 +1100, Trent W. Buck wrote:
> Hmm, I made them have a common exitWith at the bottom of the "outer"
> when's body.
Hmm! Indeed you did... so the code actually seems to make sense to me.
I must be missing something (or maybe this is one of those cases where
you accidentaly revealed some other bug by changing something innocent?)
> Maybe I've misunderstood how WHEN works in Haskell?
I think when is just
when :: Bool -> m () -> m ()
when b a =
if b then a else return ()
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20090115/9922e586/attachment.pgp
More information about the darcs-users
mailing list