[darcs-devel] [patch1806] add an explicit type for the output of resolveConflicts

Ganesh Sittampalam bugs at darcs.net
Sat Jul 27 16:57:24 UTC 2019


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

> patch 3900e63f717181f325ffd78c1a51bcf77f3c879f
> Author: Ben Franksen <ben.franksen at online.de>
> Date:   Fri Jul 12 19:25:29 CEST 2019
>   * move instance PrimMangleUnravelled for Prim.V1 to its own 
module
>   
>   This is a pure code move without any changes to the definitions. 
It serves
>   as preparation for a larger refactor but makes sense in its own 
right.

OK

> patch 440b6e59a5dcfa644bf8405068cdc5872ceaedff
> Author: Ben Franksen <ben.franksen at online.de>
> Date:   Fri Jul 12 20:26:56 CEST 2019
>   * cleanup and refactor mangleUnravelled

Looks good, the new version is easier to read and properly 
documented (plus a bit safer with the FileState type).

> patch 0a4d1af29a1982ca59540b66a72d637a14e5ec51
> Author: Ben Franksen <ben.franksen at online.de>
> Date:   Fri Jul 12 21:43:03 CEST 2019
>   * add an explicit type for the output of resolveConflicts

This doesn't actually build without the next patch, but never mind 
:-) (it changes the type of resolveConflicts without changing any 
instances)

> patch d1d723faa6f3dc0bfc6c827e18a5ca49b386892f
> Author: Ben Franksen <ben.franksen at online.de>
> Date:   Fri Jul 12 21:43:11 CEST 2019
>   * change the return type of mangleUnravelled
>   
>   This makes it clear that mangleUnravelled is unable to deal with 
conflicts
>   involving anything other than hunks. Previously we returned the 
unmodified
>   head of the input list if that was the case, now we return 
Nothing.
Good idea to separate this decision from the hunk mangling logic. I 
guess that logic could actually eventually be made independent of 
Prim.V1 as the core of it really only cares about FileHunk.
> patch 1cbd89a776d0e75c05a7e4fbc0156de14c165cd5
> Author: Ben Franksen <ben.franksen at online.de>
> Date:   Fri Jul 12 22:16:05 CEST 2019
>   * introduce type synonyms Mangled and Unravelled

OK

----------
status: needs-review -> accepted-pending-tests

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


More information about the darcs-devel mailing list