A while ago I wrote a Haskell compiler for a simple functional language that uses the JIT features of LLVM in order to make the Haskell-level "compile" function lazy in the term being compiled. Quite a fun trick I thought: <a href="https://github.com/batterseapower/productive-compiler/blob/master/Main.hs" rel="nofollow">https://github.com/batterseapower/productive-compiler/blob/m...</a>