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

Markus Läll markus.l2ll at gmail.com
Thu Oct 21 16:13:55 UTC 2021


Hi and thank you both!

For disambiguation the tick may be required for syntactically empty and one
element lists, right? As only these can be ambiguous at locations where a
type is expected.


On Wed, Oct 20, 2021 at 3:29 PM Adam Gundry <adam at well-typed.com> wrote:

> 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
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



-- 
Markus Läll
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20211021/380b65a1/attachment.html>


More information about the Haskell-Cafe mailing list