A mo dular fully lazy lambda lifter in Haskell
Simon L Peyton Jones
Department of Computing Science University of Glasgow G QQ
David Lester
Department of Computer Science University of Manchester M PL
June
Abstract
An imp ortant step in many compilers for functional languages is lambda lifting In
his thesis Hughes showed that by doing lambda lifting in a particular way a useful
prop erty called ful l laziness can b e preserved Hughes Full laziness has b een seen
as intertwined with lambda lifting ever since
We show that on the contrary full laziness can b e regarded as a completely separate
pro cess to lambda lifting thus making it easy to use di erent lambda lifters following a
full laziness transformation or to use the full laziness transformation in compilers which
do not require lambda lifting
On the way we present the complete co de for our mo dular fully lazy lambda lifter
written in the Haskell functional programming language
This paper appears in Software Practice and Experience May