[darcs-devel] [patch1267] changed the argument order of PatchSet and backward operators

Ben Franksen bugs at darcs.net
Thu Jun 11 11:10:46 UTC 2015


Ben Franksen <benjamin.franksen at helmholtz-berlin.de> added the comment:

It turns out I had already rebased this change, so here goes.

1 patch for repository http://darcs.net/screened:

patch 7e9c43e06df01116abb58d0b4e2fc4b43a26f534
Author: Ben Franksen <benjamin.franksen at helmholtz-berlin.de>
Date:   Thu Feb 19 22:49:25 CET 2015
  * changed the argument order of PatchSet and backward operators
  
  This simple (if tedious) refactoring makes the constructor :<: of RL and the
  backward concatenation operator +<+ left-associative and flips their
  argument order. This means backward lists (RL) are constructed by adding
  elements to the right (xs :<: x). Concatenating backward lists (xs +<+ ys)
  means the xs are earlier than the ys, in symmetry with (xs +>+ ys). IMO this
  greatly improves the ease with which one can read and write patch
  commutation code, since the order of identifiers in patterns and expressions
  is now always the same: left = apply earlier to right = apply later, no
  matter from which end we add elements.
  
  The data type PatchSet was changed to match this: first come the tagged
  chunks, then the rest of the patches. Thus we now pattern match and
  construct PatchSets in the intuitive order e.g.  PatchSet tagged (ps :<: p)
  gives us the latest patch p.
  
  Also renamed consRLSealed to snocRLSealed and swapped order of arguments.

----------
title: changed the argument order of PatchSet and backward op... -> changed the argument order of PatchSet and backward operators

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1267>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 43168 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20150611/bc7780a1/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changed-the-argument-order-of-patchset-and-backward-operators.dpatch
Type: application/x-darcs-patch
Size: 58451 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20150611/bc7780a1/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20150611/bc7780a1/attachment-0001.obj>


More information about the darcs-devel mailing list