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:[email protected]] On Behalf Of Nicolas Frisby
Sent: 18 July 2013 23:19
To: [email protected]
Subject: new pragma name ideas? (was: defunctionalization)

On Thu, Jul 18, 2013 at 5:10 PM, Carter Schonwald 
<[email protected]<mailto:[email protected]>> 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
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to