[darcs-devel] [patch1898] WIP: identical commutes are an internal ... (and 1 more)

Ganesh Sittampalam bugs at darcs.net
Fri Sep 20 18:08:38 UTC 2019


Ganesh Sittampalam <ganesh at earth.li> added the comment:

> The -fno-cse option alone would be a reason to move this code back to
> the test suite.... except that we now use it to implement
> fromAnonymousPrim, too, which is a good thing, as long as we need that.
> And we need it (in lib:darcs) only for rebase:

Oh, I see. I probably left it there because it is needed by existing
code and I realised that when reading the unsafePerformIO docs. That
should probably be a separate patch though.

> To get rid of this particular bit of ugliness requires us to /either/
> finish what you started with "[patch1911] WIP: use Prim patches in
> rebase toedit", /or/ find a way to make the rebase fixups contain
> /named/ prims when it works with V3 patches.

Finishing patch1911 is next on my todo list, now that Invertible is done
and I think you have showed the right way ahead for RebaseName.

> This would mean we can no longer use canonizeFL in simplifyPush, but
> perhaps this is just as well: we could define a new type class for prims:
> 
>   class PrimNormalize prim where
>     normalizeFL :: FL prim wX wY -> FL prim wX wY
> 
> which for named prims only uses re-ordering and elimination of inverse
> pairs.

My gut feeling is that canonizing is important for a good user
experience with rebase. Otherwise the fixups can end up unnecessarily
complicated leading to excessive conflicts. Also, using named prims
inside rebase actually seems wrong to me: they implicitly refer to a
PatchInfo that may no longer exist.

Anyway, I think using Prim patches right through rebase should be our
plan A. But it does mean getting as far as making it work with suspended
conflicts, so there's a reasonable amount to do.

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


More information about the darcs-devel mailing list