darcs

Patch 1899 turn RepoPatch into a constraint synonym (and 1 more)

Title turn RepoPatch into a constraint synonym (and 1 more)
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To
Milestone

Created on 2019-08-29.16:26:07 by bfrk, last changed 2019-09-22.19:28:24 by ganesh.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bfrk, 2019-08-29.16:26:07 text/x-darcs-patch
turn-repopatch-into-a-constraint-synonym.dpatch bfrk, 2019-08-29.16:26:07 application/x-darcs-patch
unnamed bfrk, 2019-08-29.16:26:07 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg21271 (view) Author: bfrk Date: 2019-08-29.16:26:07
2 patches for repository http://darcs.net/screened:

patch 13bfe4748acbf8cdf8d33702185feae94a47badc
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Aug 29 18:24:43 CEST 2019
  * turn RepoPatch into a constraint synonym
  
  This has a lot of advantages wrt maintenance and gets us rid of a few orphan
  instances. Also included a few minor cleanups in Darcs.Patch.RepoPatch.

patch cb5482f2b66867a0cd03d32625e15380f4e65858
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Aug 29 18:30:03 CEST 2019
  * turn PrimPatch into a constraint synonym
Attachments
msg21272 (view) Author: bfrk Date: 2019-08-29.16:28:38
I am not expecting these two patches to be controversial, so I'll screen
them soon. Shout if you have objections.
msg21275 (view) Author: ganesh Date: 2019-08-29.17:01:21
The principle is fine with me.
msg21381 (view) Author: ganesh Date: 2019-09-04.15:53:27
Just to note that one practical consequence of this change is that
if you really need a PrimPatch constraint but omit it, instead
of the type-checker telling you that, you get a stream of messages
about the individual classes. You have to be paying a bit of 
attention to realise that the right fix is to add PrimPatch rather
than writing out a huge constraint by hand.
msg21383 (view) Author: bfrk Date: 2019-09-04.17:04:18
> Just to note that one practical consequence of this change is that
> if you really need a PrimPatch constraint but omit it, instead
> of the type-checker telling you that, you get a stream of messages
> about the individual classes. You have to be paying a bit of 
> attention to realise that the right fix is to add PrimPatch rather
> than writing out a huge constraint by hand.

I noticed that, too.

My conclusion from this and the problem with using class constraints on
type family applications is that we should think carefully before we
apply this idiom. As I see it, for RepoPatch the benefits outweigh these
problems, but for PrimPatch I'm not so sure.
History
Date User Action Args
2019-08-29 16:26:07bfrkcreate
2019-08-29 16:28:38bfrksetmessages: + msg21272
2019-08-29 17:01:21ganeshsetmessages: + msg21275
2019-08-29 18:55:36bfrksetstatus: needs-screening -> needs-review
2019-08-30 13:04:57ganeshsetstatus: needs-review -> accepted-pending-tests
2019-09-04 15:53:27ganeshsetmessages: + msg21381
2019-09-04 17:04:18bfrksetmessages: + msg21383
2019-09-22 19:28:24ganeshsetstatus: accepted-pending-tests -> accepted