new pragma name ideas? (was: defunctionalization)
Simon Peyton-Jones
simonpj at microsoft.com
Fri Jul 19 12:30:50 CEST 2013
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>
More information about the ghc-devs
mailing list