On 15 February 2011 15:12, Roman Leshchinskiy <[email protected]> wrote:
> Ah, but you assume that bar won't be inlined into foo first. Consider that
> it is perfectly acceptable for GHC to generate this:
>
> foo = <big>
> {-# INLINE bar #-}
> bar = <big>
>
> We did ask to inline bar, after all.

Well, yes, but when considering the use site for foo don't we now
inline the *original RHS* of foo? This recent change means that it
doesn't matter whether bar gets inlined into foo first - use sites of
foo will only get a chance to inline the "bar" RHS.

Cheers,
Max

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to