[darcs-devel] [patch1947] refactor simplifyPush (and 9 more)

Ganesh Sittampalam bugs at darcs.net
Fri Sep 27 20:00:02 UTC 2019


New submission from Ganesh Sittampalam <ganesh at earth.li>:

I am not screening this immediately, but would like to do so
soon if there are no objections.

It's a series of incremental refactors to turn the rather
monolithic definition of simplifyPush into more modular pieces
that we'll be able to reuse when refactoring the rebase types.

It was initially part of my WIP bundle for migrating rebase
to use prim types everywhere, but I've factored it out to be
applyable first even though it adds a bit more complexity
(the code is simpler with prims). I think it's worth it to break
the merging work into smaller pieces.

Some of the changes are quite small, reflecting the way I
actually did the refactoring.

mapMB_MB can obviously be replaced with fmap2 if we apply
the Functor2 patch.

10 patches for repository darcs-unstable at darcs.net:screened:

patch 393574cfc5cbccd959c0f9a14c2e9d9eed4f0ab9
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:15:09 BST 2019
  * refactor simplifyPush
  
  This patch introduces a general concept of pushing 'fixups'
  past 'items', and uses it to implement simplifyPush.
  
  This provides a framework for modularizing the logic in
  subsequent patches.

patch fcc84f7dfb92f769a649bfbdd5ba6aba639f4280
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:19:06 BST 2019
  * drop redundant case in pushFixupItem

patch 17f854155bbacb52bf2ab974e04fcb82a2e56d00
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:19:28 BST 2019
  * drop error in commuteNameNamed if a deleted name is readded
  
  As in D.P.R.Item.pushFixupItem, this scenario isn't impossible
  so should just be a failed commute rather than an error.
  

patch 287c8c901e9ba38e018dfeef7c79cf2473edd563
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:21:22 BST 2019
  * reuse commuteNameNamed to push RebaseName through ToEdit
  
  A commute is the natural way of implementing this operation
  and following the previous refactors the logic was identical

patch f7235ff1566651fe2f04dac2a71d103b3edd9435
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:32:01 BST 2019
  * add Maybe2 type

patch 2283cc4f2f6a131728fbcd0a622a9bc49f7458cd
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:32:08 BST 2019
  * move logic for pushing name fixups to D.P.R.Name

patch 08e571529264913630083abe368ef355a5d4195b
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:40:03 BST 2019
  * move logic for pushing prim fixups to D.P.R.Fixup

patch 9f3996fbc438da7df101b85535aa760077fbcab3
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:41:40 BST 2019
  * reorder cases in pushFixupItem
  
  Just to make it easier to see how connected logic can be
  extracted to a separate function.

patch 3e3ebc087fb95171de2fc1ed7befc0b111135289
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:50:20 BST 2019
  * move logic for pushing past fixups into D.P.R.Fixup

patch 7fa75673d2f15d74320b510f557b6d19fdbc004e
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Sep 27 20:53:55 BST 2019
  * use commuteFixupNamed in pushFixupItem

----------
files: patch-preview.txt, refactor-simplifypush.dpatch, unnamed
messages: 21644
nosy: ganesh
status: needs-screening
title: refactor simplifyPush (and 9 more)

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1947>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 19466 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190927/cbacea33/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refactor-simplifypush.dpatch
Type: application/x-darcs-patch
Size: 33735 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190927/cbacea33/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list