[darcs-devel] [patch1792] inline function Darcs.Patch.Named.namepatch (and 9 more)

Ben Franksen bugs at darcs.net
Tue Jun 11 15:06:14 UTC 2019


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

>>   This is now no longer an official part of the Patch API.
> 
> We have an official Patch API??? :-)

Well, what other use would the Darcs.Patch re-exports have? It has
severely bit-rotten and lots of code outside Darcs.Patch imports
directly from sub-modules but I guess this was the original idea...

I guess the main problem is that the re-exports are so heavy on
maintenance, which is why people started not to bother to add things to
Darcs.Patch. Another disadvantage is that it makes it harder to find out
where things are defined. We should make a decision about this at some
point (and similarly about Darcs.Repository) and then either get rid of
them or actually remove all direct imports from sub-modules.

>>   * add class IdEq2 to Darcs.Patch.Ident
>>   
>>   This allows a faster equality test for FLs of patches with identity.
> 
> I'm a little skeptical of this one. The existing instances of Ident
> (ignoring any forthcoming changes from you) already have fast equality
> via their identities.
> 
> Also, the existing Eq2 for FLs actually commutes them, which for FL
> (Named p) means that two lists would compare equal if one can be
> reordered to the other [hopefully laziness would mean that the patch
> bodies don't actually get commuted, though I wouldn't be sure of that.]
> 
> So I think for now your operators are equivalent to eqFL/eqFLRev.

eqFL/eqFLRev sound unfamiliar to me. I may well have re-implemented some
code that already exists. Let us check that as soon as my V3/camp code
is in screened. I am always for simplifying things.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1792>
__________________________________


More information about the darcs-devel mailing list