News for hackers. Stuff that matters.
Re:Implementing a LLVM Micro C compiler in Haskell by siraben on Friday June 04, 2021 @11:12PM (#27401762)
This is amazing. I tried following Stephen Diehl's JIT compiler in LLVM tutorial[0] a few years ago but it was already outdated (the llvm-hs library changed quite a bit), and subsequent web searches didn't turn up much.

For those interested in tutorials like this, I'd also recommend a very literate Haskell compiler for the PCF language to C[1], which is essentially lambda calculus with some primitives and pattern matching. It details a number of transformations such as closure conversion and lambda lifting.

[0] https://www.stephendiehl.com/llvm/

[1] https://github.com/jozefg/pcf/

There are no comments on this comment yet.