[Haskell-cafe] Generalized, named, and exportable default declarations (GHC Proposal)

Richard Eisenberg rae at richarde.dev
Tue Apr 13 02:58:16 UTC 2021


Hi all,

Thanks, Eric, for posting this here.

I thought it would also be helpful to link to https://github.com/ghc-proposals/ghc-proposals/pull/396 <https://github.com/ghc-proposals/ghc-proposals/pull/396>. That proposal describes how a plugin might be designed to help handle defaulting. The proposal was labeled "out of scope" because plugin design is not part of the committee process, but I think it's a good counterpoint to the proposal Eric brought up. There is apparently an implementation of the default plugin scheme and I've encouraged the author to submit it for inclusion in GHC.

Thanks,
Richard

> On Apr 12, 2021, at 8:54 PM, Eric Seidel <eric at seidel.io> wrote:
> 
> Hi Cafe,
> 
> The GHC Steering Committee is considering a proposal that would expand the typeclass defaulting mechanism to support arbitrary (single-parameter) classes, and enable exporting defaulting rules.
> 
> It's received very little input from the community so far, which is a shame because it's trying to address a common complaint about Haskell's String situation. Under the proposal Data.Text could export a rule defaulting IsString to Text. Client modules would automatically import defaulting rules just like class instances, which would make ambiguous string literals automatically default to Text.
> 
> Please take a look at the proposal and leave your feedback, even if it's just "Yes, this would make my life meaningfully better" (reaction emoji are great for this level of feedback). Gauging the amount of pain caused by problems like this, and weighing that against the cost of new features, is one of the harder parts of being on the Committee.
> 
> PR: https://github.com/ghc-proposals/ghc-proposals/pull/409
> Rendered: https://github.com/blamario/ghc-proposals/blob/exportable-named-default/proposals/0000-exportable-named-default.rst
> _______________________________________________
> 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210413/9beb6d9f/attachment.html>


More information about the Haskell-Cafe mailing list