[darcs-devel] darcs patch: function to determine active/inactive
patches.
Eric Y. Kow
eric.kow at gmail.com
Sun Aug 12 12:28:13 UTC 2007
> Here's a function in the Cancellation module to determine which
> patches are active, and make the inactive patches Cancelled.
I'm pushing this, but I've only gotten a basic gist of it, not looked
very hard.
> +cancel_patches :: FL Patch C(a b) -> Sealed (FL Patch) C(a)
> +cancel_patches x = cancel_marked_patches $ mark_cancelled_patches
> + $ mapFL_FL uncancel x
This seems a bit confusing! Why would there be cancelled patches to
mark if we've just uncancelled them? And then why bother cancelling
the marked patches if they were already cancelled when we marked them?
> +remove_from_sequence_unless_depended_upon
> + :: Patch C(a b) -> FL Patch C(b c) -> Maybe (Sealed (FL Patch) C(a))
I think I understand this one: given a sequence p xs (i.e. p before xs),
if p commutes past xs, then xs does not depend on it, so we can ignore p
(however, we must return the commuted xs'). If it fails to commute we
return Nothing.
The 'removing' consists of ignoring p. That it, is it 'p' that we are
trying to remove.
--
Eric Kow http://www.loria.fr/~kow
PGP Key ID: 08AC04F9 Merci de corriger mon français.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20070812/013b100d/attachment.pgp
More information about the darcs-devel
mailing list