new pragma name ideas? (was: defunctionalization)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

new pragma name ideas? (was: defunctionalization)

Nicolas Frisby
On Thu, Jul 18, 2013 at 5:10 PM, Carter Schonwald <
carter.schonwald at gmail.com> wrote:

> So the idea here to make it possible to have a function that can be
> specialized at certain types, and  explicitly inlined at specific use
> sites, but ghc otherwise will not inline it? Cool!
>
> one thought: might it be simpler to instead have something like
> EXPLICIT-INLINABLE, rather that requiring the juxtaposition of two pragmas
> which "seem" contradictory?
>

I like that idea. How about SPECIALISABLE? This is a nod to the possibility
that GHC might someday automatically specialize an imported function.

Or EXPOSE? Or EXTERNAL? Bikeshed activate!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130718/86566f30/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

new pragma name ideas? (was: defunctionalization)

Mateusz Kowalczyk
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18/07/13 23:18, Nicolas Frisby wrote:

> On Thu, Jul 18, 2013 at 5:10 PM, Carter Schonwald <
> carter.schonwald at gmail.com> wrote:
>
>> So the idea here to make it possible to have a function that can
>> be specialized at certain types, and  explicitly inlined at
>> specific use sites, but ghc otherwise will not inline it? Cool!
>>
>> one thought: might it be simpler to instead have something like
>> EXPLICIT-INLINABLE, rather that requiring the juxtaposition of
>> two pragmas which "seem" contradictory?
>>
>
> I like that idea. How about SPECIALISABLE? This is a nod to the
> possibility that GHC might someday automatically specialize an
> imported function.
>
> Or EXPOSE? Or EXTERNAL? Bikeshed activate!
>
>
>
> _______________________________________________ ghc-devs mailing
> list ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
Maybe we need a BIKESHED pragma that will let us alias any extensions
within the project to anything we like.

- --
Mateusz K.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJR6G1uAAoJEM1mucMq2pqXrbYP/RXWS0yeI6Ewy6hx35rmqxPG
TfCK5U9KjW9WkvWXZqJq407Z0Qluiif0UIfMFy8oujj3RnjJUKN+1Co/zVdYxyiD
0LGdS4SxDQO4aRTd1uRAjaMGzVUA4xkAp+lQNI9jKN0ZojMiSQHXr4FoThkNTV1r
wWUlYwTeDJlm1HJgqcNMIjhegeG1GJrmz3i5BZgW7WBI65TL/8MfwEozFO8jjtzD
R44gF0sIg7rWEfzO3jFuhr+F3w9vwZ24KzAFPLjAIJlmB/YiBK7WwiIXI0tQhdg/
/72vVgQQMGsmSauZ0j2hjfImGDU45wLZ21w26/kkn7F6k9k+6BRFsedI1qI0Bf7V
UqTG4oWLaZ5+EYQhvLH4VjYtH7h3UgGacHiYHcKHnmL49rr6GjDWQqBE8pieAtkQ
ckhTw+fpMPQZd6T6J5OX5VNsnWcEG4C89PPCvYL9Jvw8tq6uzcTdRbxc+Thu3Plr
I6hmcM5Ibz0n+nvqWLzsY/4voQb/CtiZWQQZ+c2VbIx1HpWsKTH0NFdHX891faTn
ijsm8wsO0YcyvtlFPfZxKoQfb1GiBN+ttdlYStS7i15YmDujl7GYlXeHz0nr9FYv
nNpHoNkz+U+fH3Neeh4epCOGxUhkAPWG/u1tMTAxQad0JiLpedKxB/IMBen+16pb
IT4deYFnfsQjp/HAQfHQ
=h5Nz
-----END PGP SIGNATURE-----



Reply | Threaded
Open this post in threaded view
|

new pragma name ideas? (was: defunctionalization)

Simon Peyton Jones
In reply to this post by Nicolas Frisby
So the idea here to make it possible to have a function that can be specialized at certain types, and  explicitly inlined at specific use sites, but ghc otherwise will not inline it? Cool!
That's almost exactly what INLINABLE means.  I agree that SPECIALISABLE would have been a better name.

The only difference between INLINABLE and what you say is that GHC is *free* to inline an INLINABLE if it thinks it'd be a good idea, whereas you want a promise that it will never do so.  (I'm not sure why.)  But they are pretty close already.

My suggestion

*         Rename INLINABLE to SPECIALISABLE (deprecating the former)

*         Allow SPECIALISABLE in conjunction with the existing NOINLINE

Simon


From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Nicolas Frisby
Sent: 18 July 2013 23:19
To: ghc-devs at haskell.org
Subject: new pragma name ideas? (was: defunctionalization)

On Thu, Jul 18, 2013 at 5:10 PM, Carter Schonwald <carter.schonwald at gmail.com<mailto:carter.schonwald at gmail.com>> wrote:
So the idea here to make it possible to have a function that can be specialized at certain types, and  explicitly inlined at specific use sites, but ghc otherwise will not inline it? Cool!

one thought: might it be simpler to instead have something like EXPLICIT-INLINABLE, rather that requiring the juxtaposition of two pragmas which "seem" contradictory?

I like that idea. How about SPECIALISABLE? This is a nod to the possibility that GHC might someday automatically specialize an imported function.

Or EXPOSE? Or EXTERNAL? Bikeshed activate!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130719/2899a869/attachment.htm>