Skip to content
  • Simon Peyton Jones's avatar
    Inline in a call argument if the caller has RULES · a2c92ccc
    Simon Peyton Jones authored
    This is an experimental change suggested by Roman.  Consider
    	
    	{-# INLINE f #-}
    	f x y = ...
    
    	....(g (f a b))...
    
    where g has RULES.  Then we'd like to inline f, even though the context of
    the call is otherwise 100% boring -- g is lazy and we know nothing about
    x and y. 
    
    This patch just records in the continuation that f has rules.  And does so
    somewhat recursively...e.g.
    
    	...(g (h (f a b)))...
    
    where g has rules.  
    
    a2c92ccc