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

Ben Franksen bugs at darcs.net
Mon Sep 2 20:48:07 UTC 2019


Ben Franksen <ben.franksen at online.de> added the comment:

>> BTW, I am not happy about the proliferation of Haskell extensions in
>> single modules. I think if a developer wants to use a new extension,
>> there should be discussion about that and if we agree that this is a
>> good idea, then the extension should be enabled globally.
> 
> OK, that's the approach I've taken in this patch anyway. I assume from
> your comments that you're ok with enabling StandaloneDeriving globally.

Yes, definitely.

>> There are a
>> few exceptions to this rule, e.g. UndecidableInstances should be used
>> only per module. For these, we should demand that enabling such an
>> extension requires a comment that explains why it is necessary.
> 
> Yeah. FlexibleContexts and FlexibleInstances should perhaps also fall
> into this category (they're currently globally on). There are generally
> ok to use if it makes sense, but it's useful to have to stop and think
> if there's a more H98-ish way first.

I don't want to open another endless discussion about this, but I
disagree on that point. FlexibleContexts and FlexibleInstances are
absolutely essential to write modular code. For instance, we could not
define the instance FromPrim RepoPatchV3 in Darcs.Patch.V3 i.e. outside
of Darcs.Patch.V3.Core otherwise. I would be very much disappointed if
these extensions were not part of the next Haskell standard. Don't laugh!

>> GHC has acquired a lot of minor syntactical extensions over the years
>> that are pretty useful and utterly harmless (LambdaCase, MultiWayIf,
>> TupleSections to mention some) which aren't enabled by default in darcs
>> and we should really change that.
> 
> I'm fine with it if you just want to turn those all on. We do appear to
> already have LambdaCase in the darcs library.
> 
>> the next Haskell standard
> 
> Hahahahahaha

I know. I don't find it funny, though. I really wish the standardisation
process would make progress. Someone of the haskell-prime list said
everyone on the haskell prime commitee should all give up their posts,
retreat in shame and make room for others. I think he has it right. Just
my 2 cent.

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


More information about the darcs-devel mailing list