[darcs-users] Matching patches in reversed order

Florent Becker florent.becker at ens-lyon.org
Fri Nov 13 10:31:32 UTC 2009


Hi all,

in SelectChanges.lhs, there are two bug lines in iswanted:

iswanted Last opts p = bug "don't support patch matching with Last in
wasp"
iswanted FirstReversed opts p = bug "don't support patch matching with
FirstReversed in wasp"

and I can't see why we can't match patches when the sequence is
reversed. annotate says I added these lines, but I just copied them. Can
someone tell me why the naive following code would not work?

iswanted :: Patchy p => MatchCriterion (PatchInfoAnd p)
iswanted First opts p = match_a_patch opts . hopefully $ p
iswanted LastReversed opts p = match_a_patch opts . hopefully . invert $
p
iswanted Last opts p = match_a_patch opts . hopefully . invert $ p
--bug "don't support patch matching with Last in wasp"
iswanted FirstReversed opts p = match_a_patch opts . hopefully $ p
--bug "don't support patch matching with FirstReversed in wasp"

It appears that these branches were never triggered, but is there a
profound reason? I can't seem to get anything bad with them.

Thanks,

Florent





More information about the darcs-users mailing list