[darcs-devel] [patch1913] WIP: get rid of Invert instances for non-prim patch types

Ben Franksen bugs at darcs.net
Thu Sep 19 16:39:09 UTC 2019


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

Final bundle with fixed description of first patch and also without 

  patch 4ff33b06e4dd5ad34c216233b230de58baca4129
  Author: Ganesh Sittampalam <ganesh at earth.li>
  Date:   Wed Sep 18 18:57:35 CEST 2019
    * add a test for applying a patch with an unclean tag

which accidentally slipped in last time. Will screen now.

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

patch 62126d1356e4d3a7361f20d520d4f054f05b33e2
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:09 CEST 2019
  * add unapply method to class Apply
  
  The idea here is to allow to "inverse apply" a patch without that patch
  necessarily having an Invert instance.

patch c41fa34721ecc33b40a55bd66885ca3e1f51107c
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:26 CEST 2019
  * add Darcs.Patch.Invertible
  
  This is a wrapper type to make an arbitrary patch type formally invertible.
  We define only instances that will be needed to statisfy Invert constraints
  that are currently required in the Repository and UI subsystem. Some of the
  class methods defined for Invertible assume the patch is actually positive.

patch 7c414e0bf884f9cc2798718df8c60cb0e3879daa
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:36 CEST 2019
  * annotate: push inversion down to the prim level
  
  We must take care that we call the annotate method only on inverted prims
  and that we traverse the history (of prims) in reverse order. To avoid
  mistakes when defining instances (outside of Darcs.Patch.Annotate), we now
  use a default method with a default signature.

patch eb25c38924ea32d282e1d19d3b3cf3be01defd9a
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:36 CEST 2019
  * use Invertible when calling lookTouch in log command
  
  We call lookTouch with the patches inverted. To get rid of the Invert
  constraint, we wrap the patch as an Invertible patch.

patch 1256cd0703921537ad6784e23f44a9c2733cb385
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:36 CEST 2019
  * use effect to avoid inversion of non-prims in externalResolution

patch 935dff84c240e08dac099fa3af5ecdb8b418c0b3
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:36 CEST 2019
  * use Invertible to generalize runSelection
  
  The new runSelection no longer requires an Invert instance for the patches.
  This is done by wrapping them internally with Invertible. We keep the old
  function under the new name runInvertibleSelection so we can use it for
  selecting prims, since these are naturally invertible and we cannot and will
  not use Splitters with wrapped Invertible patches.

patch e6d8e6474da18a8195f3e1293fd96f7c03127de3
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:36 CEST 2019
  * possible fix for D.UI.SelectChanges.selected
  
  This makes it actually do what the docs claim it does. I am not sure this is
  the correct behavior, though. It also renames it to getSelected to make its
  easier to see where it is used, since the word 'selected' appears in lots of
  places in this module, but getSelected is used only in printSelected.

patch 4b5bba9bd00b7f6887ca4f9e981a837d6e16c101
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:36 CEST 2019
  * Invertible: allow showPatch etc of Rev patches
  
  Instead of calling error for Rev patches, requiring that the calling code
  first re-inverts the patch, we now do that ourselves. This means a Rev patch
  is shown in exactly the same way as a Fwd patch. This removes the need for
  reInvert in Darcs.UI.SelectPatches.

patch 3e8336a654ecb9a98891c1dabfbbcd1a63b05ef8
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:36 CEST 2019
  * remove reverse constructors from RebaseSelect and RebaseChange

patch fbbd4f8c0be03de894fe25079ac7a4576d402494
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:36 CEST 2019
  * remove lots of redundant constraints

patch c08c4ef112e1211971076093915b466b9e978807
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:37 CEST 2019
  * add class CleanMerge & make it super class of Merge
  
  This does not yet replace CommuteNoConflicts. Instead, instances for
  CleanMerge are, for now, defined in terms of mergeNoConflicts.

patch a13f20d3a0447d3ac7d6748633e4d6aabdf2b8cd
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:37 CEST 2019
  * use cleanMerge to implement partitionConflictingFL
  
  In order to simplify this change, it no longer takes a commuter as argument
  but only works with plain FLs. This necessitates an upstream change to
  filterOutConflicts, which while (we're at it) now gets the repositoiry
  argument first, like all similar functions.

patch cdf70e5721a906547cc0aefc6ba4ed50f6222a51
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:37 CEST 2019
  * replace CommuteNoConflicts with CleanMerge for prim patch types
  
  As a logical consequence this moves the definition of mergeList from
  D.P.CommuteNoConflicts to D.P.Merge. We also explicitly call error in
  definitions of cleanMerge and merge if the patch type has an Ident instance
  and we try to merge two identical patches, since this is an undefined
  operation.

patch d43b8e1b8622b06e9c650ff19750905e06483172
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:37 CEST 2019
  * define instance CleanMerge RepoPatchV3 directly
  
  This means we can use it the to define the instance CommuteNoConflicts for
  the Rotcilfnoc :> Conflictor case, eliminating the only remaining place
  where we do non-trivial computation with the internals of a Rotcilfnoc.

patch ddf1bbf880cd7fd28d4d3c28fa99ab1065635995
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:37 CEST 2019
  * remove Rotcilfnoc constructor and Invert instance for RepoPatchV3

patch ca0312fc5f0ef17595adf0dc6b0f60d4fa4045af
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:37 CEST 2019
  * RepoPatchV3: replace some uses of x, y with p, q
  
  We want to reserve these variable names for the conflicts in a conflictor.

patch 439f5ad1eeb273d0326c34df29dd03f6dadf2776
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:37 CEST 2019
  * v3: simplify merge of two Conflictors
  
  The simplification consists in using cleanMerge instead of re-implementing
  it in terms of commuteRLFL.

patch 47a68d1dc01a55d3afc2104d15947b4034c6d406
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:37 CEST 2019
  * eliminate Invert instances for Named, WrappedNamed, and PatchInfoAnd

patch 8ba79fa025b1c1ad166a412c09e4659c4b2a4605
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * remove patch type parameter to RebaseName
  
  Also remove its Apply and PrimPatchBase instances.

patch 1e2bc554c273cb56b8b076cf1c6ed5666cba91e2
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * remove CommuteNoConflicts from RepoPatch

patch 9022bf87dd166a1366d23b51128eb9e53c974ff4
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * RebaseFixup take a prim as type argument, not a RepoPatch

patch 4bed37051856f149b457c936ae7d59f040db5a65
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * unify RebaseChange and RebaseSelect

patch b5ba17a2ddcca702b722a41910ae307e3ef80daa
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * get rid of the last Invert constraints for RepoPatch in rebase
  
  This is done by changing the forceCommute implementation to do inversion on
  the underlying prims.

patch 2b214d6c1e79ecfd94b6fafcd86c082de606556b
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * remove Invert from RepoPatch constraint synonym
  
  This also disables tests for inverses of RepoPatches and fixes the
  permutivity test to no longer require it.

patch f10f45f16ee7052909bada0b3149cc4b049fa1ae
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * in D.P.Rebase.Viewing replace complicated constraints with RepoPatch

patch 11e42bd4724f9d89f6f2dfd02d0984d5699c6634
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * remove Check and Repair instances in D.P.Rebase.Suspended and D.P.Rebase.Item
  
  These were only needed while we mixed the rebase patch with normal patches.

patch 6c39e86c985f1be37f5f2fffc4dd46fd602bb755
Author: Ben Franksen <ben.franksen at online.de>
Date:   Thu Sep 19 18:40:38 CEST 2019
  * remove Apply and PrimPatchBase instances in D.P.Rebase.Suspended
  
  The Apply instance was used only for legacy support in D.P.Named.Wrapped and
  we can as well declare the apply and unapply methods there. A comment
  explains the definitions (which just return ()) in terms of the witnesses
  for the RebaseP constructor.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1913>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 152696 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190919/bd9d659e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-unapply-method-to-class-apply.dpatch
Type: application/x-darcs-patch
Size: 162784 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190919/bd9d659e/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list