On Tue, Sep 08, 2009 at 22:50:22 +0100, Ganesh Sittampalam wrote: > This patch is a step on the road towards adding type witnesses to Pull.lhs.
Applied, thanks! > - Sealed pw <- tentativelyMergePatches repository "pull" merge_opts > - (reverseRL $ head $ unsafeUnRL us') to_be_pulled > + Sealed pw <- case us' of > + h_us :<: NilRL -> tentativelyMergePatches repository > "pull" merge_opts > + (reverseRL h_us) to_be_pulled > + _ -> impossible -- we believe that > get_common_and_uncommon should guarantee this, > + -- at least in this case. Error out if > we're wrong, so that > + -- we find out. An alternative would be > to do a concatRL of the whole > + -- us' list, but the code originally > just took the head, and so we > + -- might instead introduce some subtle > bug by doing a concat. Blowing up explicitly and with an explanation why we're surprised sounds like the kind of thing we should be doing systematically. Hlint? We have lots of fromJust in the code and that makes me a bit unhappy (even if it's our homegrown fromJust with call to darcsBug and line numbers). -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9
signature.asc
Description: Digital signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
