There's a whole chapter on full laziness in my book;
and a paper in Software Practice and Experience
A modular fully-lazy lambda lifter in Haskell, SL Peyton Jones and D Lester,

Software Practice and Experience 21(5), May 1991, pp479-506. 
The latter is available on my publications page
http://research.microsoft.com/~simonpj/papers/papers.html


> func n = map (func' n) [1..10]
> func' x y = nfib x

There isn't a free subexpression to lift out of func.
Try this

        func n = map nfib [1..10]

Now the constant expression should be lifted out by GHC to give

        ans = map nfib [1..10]
        func n = ans

Simon


Reply via email to