[darcs-devel] [patch1904] use StandaloneDeriving for some Show instances

Ganesh Sittampalam bugs at darcs.net
Mon Sep 2 13:46:57 UTC 2019


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

A bit more Show-boilerplate-removal.

I won't screen this one immediately as the use of
'deriving stock' was a little bit controversial.

I have also deliberately not done it to V3.Core even
though I could, because it doesn't work with PrimContainer.
If we don't apply that, I'll do it to V3.Core too.

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

patch 26b82e81504001f04a888d5c0b3d36fddb087cb4
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Sep  2 14:41:19 BST 2019
  * use StandaloneDeriving for some Show instances
  
  This is possible in cases where all the directly included
  patches are concrete types rather than type variables.
  
  For example it works for
  
   data Foo p wX wY where
    Foo :: Named p wX wY -> Foo p wX wY
  
  but not for
  
   data Foo p wX wY where
    Foo :: p wX wY -> Foo p wX wY
  
  I've used DerivingStrategies and the 'stock' keyword to
  make it easier to tell at a glance what's going on given
  the increasing complexity of 'deriving'.

----------
files: patch-preview.txt, unnamed, use-standalonederiving-for-some-show-instances.dpatch
messages: 21313
nosy: ganesh
status: needs-screening
title: use StandaloneDeriving for some Show instances

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1904>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 4052 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190902/cdfc9729/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-standalonederiving-for-some-show-instances.dpatch
Type: application/x-darcs-patch
Size: 7777 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20190902/cdfc9729/attachment-0001.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list