darcs

Patch 1906 decouple RepoPatchV3 impl from WithName

Title decouple RepoPatchV3 impl from WithName
Superseder Nosy List ganesh
Related Issues
Status in-discussion Assigned To
Milestone

Created on 2019-09-02.15:06:54 by ganesh, last changed 2019-09-03.07:43:50 by ganesh.

Files
File name Status Uploaded Type Edit Remove
decouple-repopatchv3-impl-from-withname.dpatch ganesh, 2019-09-02.15:06:54 application/x-darcs-patch
patch-preview.txt ganesh, 2019-09-02.15:06:54 text/x-darcs-patch
unnamed ganesh, 2019-09-02.15:06:54 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg21315 (view) Author: ganesh Date: 2019-09-02.15:06:54
This is a followup to patch1880, to make a final decision
on whether we want to go with PrimContainer or not.

On the plus side, it does make the types (not constraints)
in V3.Core shorter and IMO clearer. It also means my
toy code doesn't need to duplicate the patch ids.

On the minus side, the constraints do get worse, albeit
hidden behind PrimContainer (which is now a type synonym).
As I comment in the code there isn't any principled reason
for what's in it.

As I mentioned in patch1904 it also prevents us using
standalone deriving for the Show instance, but I think
that says more about the flexibility of 'deriving' than
about the intrinsic design merits of this change.

1 patch for repository darcs-unstable@darcs.net:screened:

patch 655c133da2358718a0f36ed1182e14a9513bf9c9
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Mon Sep  2 16:06:47 BST 2019
  * decouple RepoPatchV3 impl from WithName
  
  WithName is now abstracted behind a type class,
  HasPrimContents.
Attachments
msg21328 (view) Author: ganesh Date: 2019-09-03.07:43:50
Also: the types don't always get smaller/clearer, though most do. A small 
number of them mention PrimContents and those look more complicated to me. 
Similarly a few constraints get longer even with the PrimContainer helper.
History
Date User Action Args
2019-09-02 15:06:54ganeshcreate
2019-09-02 15:07:18ganeshsetstatus: needs-screening -> in-discussion
2019-09-03 07:43:50ganeshsetmessages: + msg21328