[ghc-steering-committee] TypeApplications for Overloaded Literals (#129), Recommendation: accept

Iavor Diatchki iavor.diatchki at gmail.com
Sun May 6 15:42:19 UTC 2018


Is there a reason why we should write `5 @Int` as opposed to `5 :: Int`?

Also, there appears to be a typo in the spec, the part which specifies
translations for integers (1 turned into 0?)

-Iavor

On Sun, May 6, 2018 at 7:25 AM Joachim Breitner <mail at joachim-breitner.de>
wrote:

> Dear Committee,
>
> this is your secretary speaking:
>
> Sandy Maguire proposes to change the desugaring of overloaded literals
> so that they work nicely with type applications
> https://github.com/ghc-proposals/ghc-proposals/pull/129
> rendered at
>
> https://github.com/isovector/ghc-proposals/blob/type-apps/proposals/0000-type-apply-literals.rst
>
> I’ll shepherd that myself.
>
> The proposal is a good example for a working proposal system here. The
> original version of the proposal was rather complex, reshuffling type
> arguments and stuff. But community input distilled this much smaller
> change, which can be summarized:
>
>    Desugar `5` into `integerLit (5 :: Integer)` where
>
>    integerLit :: Integer -> forall a. Num a => a
>    integerLit = fromInteger
>
> This allows `5 @Int` to work just fine.
>
> The proposal does not require a language extension, and does not change
>  what happens in the light of `RebindableSyntax`.
>
> I therefore recommend that we accept this proposal.
>
> 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/20180506/baaf7d80/attachment.html>


More information about the ghc-steering-committee mailing list