[darcs-devel] [patch1866] clean up the Matchable mess (and 1 more)

Ben Franksen bugs at darcs.net
Mon Aug 12 15:29:01 UTC 2019


Ben Franksen <ben.franksen at online.de> added the comment:

Fixed & rebased bundle.

2 patches for repository http://darcs.net/screened:

patch 3ca1278615e363ae85cbee04c81f356dcba61b53
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Aug 12 17:24:53 CEST 2019
  * clean up the Matchable mess
  
  This is a large refactor. Matchable is no longer a class but a constraint
  synonym. This means we don't have to define instances and can therefore
  defined it in Darcs.Patch.Match. Darcs.Patch.Matchable has been deleted.
  
  MatchFun, Matcher, and PatchSetMatch no longer get the patch type or repo
  type as parameter. Instead, MatchFun is now a data type that contains the
  polymorphic match function (constrained to work only on Matchable patches).
  
  Matchable p now also requires Ident p and PatchId p ~ PatchInfo, so we have
  access to the PatchInfo (using ident). The goal here was to generalize
  matching functions from PatchInfoAnd to any Matchable patch type. Since some
  of the matching functions work on PatchSets, which have PatchInfoAnd
  hard-coded, we add a new constraint synonym for RepoPatches p such that
  PatchInfoAnd rt p becomes Matchable.
  
  Darcs.UI.SelectPatches no longer has PatchInfoAnd in any of its type
  signatures.

patch 1020fcd35876eaa0e2f9a8e6cbe6c988ff13abd9
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Aug 12 17:26:20 CEST 2019
  * eliminate Darcs.Patch.Dummy
  
  This is possible since Darcs.Patch.Match no longer needs it. The few
  remaining ocurrences were easily refactored to avoid its use.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1866>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 25210 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190812/d7e2cf23/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clean-up-the-matchable-mess.dpatch
Type: application/x-darcs-patch
Size: 70270 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190812/d7e2cf23/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list