{-# INLINE me_harder #-}

John Meacham john at repetae.net
Tue May 8 00:34:31 EDT 2007


On Wed, Apr 18, 2007 at 08:07:45AM -0400, Isaac Dupree wrote:
> Jhc has a pragma named "SUPERINLINE" that just means "try even harder to
> inline this", I think, e.g. it has
> {-# SUPERINLINE id, const, (.), ($), ($!), flip #-}
> 
> It just reminded me of the name -- I'm not sure whether it actually
> makes sense to use that same name for this purpose.

Actually, SUPERINLINE basically means 'treat this as if it were a
term-rewriting macro', so, it really always does inline no matter what,
fairly early in the compilation process. Even if the call is unsaturated
and it will end up being let-floated out anyway.

I originally added it so some early flow-insensitive optimizations
wouldn't end up doing silly things like unifying all uses of 'id'
program-wide. The compiler is smarter now, so it is less needed, but it
still exists. 

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Glasgow-haskell-users mailing list