[ghc-steering-committee] #493: SPECIALISE with expressions, rec: accept

Moritz Angermann moritz.angermann at gmail.com
Sun Dec 3 00:47:17 UTC 2023


I'm supportive of this, if it doesn't break existing code (e.g. it supports
existing code for at least a migration period,
where it warns and gives concrete guidance on how to change the code).

On Thu, 30 Nov 2023 at 20:15, Vladislav Zavialov <vlad.z.4096 at gmail.com>
wrote:

> Great idea. I've worked on some code that uses SPECIALIZE pragmas with
> large type signatures, and it would become considerably more elegant if it
> could use type applications instead.
>
> Vlad
>
> On Wed, Nov 29, 2023 at 9:25 AM Adam Gundry <adam at well-typed.com> wrote:
>
>> Dear all,
>>
>> Richard and Simon propose to generalise SPECIALISE pragmas to allow
>> expressions, not just type signatures:
>>
>> https://github.com/ghc-proposals/ghc-proposals/pull/493
>>
>> https://github.com/goldfirere/ghc-proposals/blob/specialise/proposals/0000-specialise-expressions.rst
>>
>> This does not add anything fundamentally new, because such SPECIALISE
>> pragmas can be translated using the existing RULES machinery, but it
>> does make several idioms substantially more convenient:
>>
>>   * Using type applications in a SPECIALISE pragma to avoid repetition
>>
>>   * Manual call-pattern specialisation
>>
>>   * Loop unrolling
>>
>> Thus I propose we accept this proposal.
>>
>> Cheers,
>>
>> Adam
>>
>>
>> --
>> Adam Gundry, Haskell Consultant
>> Well-Typed LLP, https://www.well-typed.com/
>>
>> Registered in England & Wales, OC335890
>> 27 Old Gloucester Street, London WC1N 3AX, England
>> _______________________________________________
>> ghc-steering-committee mailing list
>> ghc-steering-committee at haskell.org
>> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>>
> _______________________________________________
> 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/20231203/8cf81ae7/attachment.html>


More information about the ghc-steering-committee mailing list