[ghc-steering-committee] GHC 2020

Iavor Diatchki iavor.diatchki at gmail.com
Mon Aug 31 16:35:53 UTC 2020


Hi,

yeah, I use `OverloadedStrings` all the time too, but didn't include it for
the reason Joachim mentioned.   For me one common pattern where ambiguity
occurs is indeed with `aeson`, for example if you are encoding tagged sums
you may write:
```
object [ "tag" .= ("inLeft" :: Text) ]
```
The type signature is required so that the `.=` operator knows how to make
the JSON value.   I don't think that's a big deal, and it's easy to work
around (I typically make a helper function for making that field).  I'd be
OK with it being always on, but I didn't add it as it does require you to
change your code sometimes.

As for `RecordWildcards`, I do like the extension as it can make code
significantly more readable in some situations (single record manipulation,
or constructing large records, especially when effects are involved).  I
know some folks don't like it, but I hope we can get the extension included
in the list, as it is not something that can be used "by accident" and
also, using it does not affect a function's interface in any way.

I feel `LambdaCase` is another extension in the same group---in this case I
don't really like the extension, but I know other folks like it, so I think
it'd be reasonable to add (although I did see we have a proposal for an
incompatible alternative, so we'll have to see what to do about that)

-Iavor





On Mon, Aug 31, 2020 at 1:16 AM Joachim Breitner <mail at joachim-breitner.de>
wrote:

> Hi,
>
> Am Sonntag, den 30.08.2020, 23:51 -0400 schrieb Eric Seidel:
> > Interesting, I think I can count on one hand the number of times
> > OverloadedStrings has caused an ambiguity error for me. What
> > libraries do you use that are polymorphic in the string type?
>
> hmm, I don’t remember. It must have been code that deals with keys or
> labels of sorts, but it’s not aeson… sorry. Maybe I’ll remember later.
>
> Cheers,
> Joachim
>
>
>
> --
> Joachim Breitner
>   mail at joachim-breitner.de
>   http://www.joachim-breitner.de/
>
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20200831/3b2c61e4/attachment.html>


More information about the ghc-steering-committee mailing list