[Haskell-cafe] Downsides to disabling unticked-promoted-constructor warning?

Adam Gundry adam at well-typed.com
Wed Oct 20 12:28:18 UTC 2021


I've created a ticket to request disabling this warning by default:
https://gitlab.haskell.org/ghc/ghc/-/issues/20531

I'm not sure if this needs a full ghc-proposal.

Cheers,

Adam



On 18/10/2021 03:19, Richard Eisenberg wrote:
> As its author, I think -Wunticked-promoted-constructors is a misfeature. It was motivated by the fact that writing [True] when you mean '[True] produces a cascade of obscure kind errors, and so I thought it was good to encourage people to always write the ticks. But the feature does not achieve its goal: because errors squelch warnings, we do not see the warnings if there are any errors. Furthermore, I agree with Adam's post that I've come to prefer a style where we leave off the ticks (where possible).
> 
> Bottom line: feel free to turn this warning off.
> 
> Richard
> 
>> On Oct 16, 2021, at 5:55 AM, Markus Läll <markus.l2ll at gmail.com> wrote:
>>
>> Hi!
>>
>> Is there any consensus on unticked promoted constructors -- are they generally safe to use?
>>
>> Currently the warning is part of -Wall, but having promoted constructors unticked is just aesthetically nicer.
>>
>>
>> Thanks,
>>
>> -- 
>> Markus Läll


-- 
Adam Gundry, Haskell Consultant
Well-Typed LLP, https://www.well-typed.com/

Registered in England & Wales, OC335890
118 Wymering Mansions, Wymering Road, London W9 2NF, England


More information about the Haskell-Cafe mailing list