Get the latest tech news

Compiling a Functional Language to LLVM (2023)


Recently I thought it would be good to start compiling the small functional language mimsa I’ve been messing around with for the last few years to LLVM. There’s a few really helpful resources - Joseph Morag’s Micro-C series, and Mapping High Level Concepts to LLVM IR in particular, but neither go into converting functional programming paradigms such as pattern matching, lambdas and ADTs in much depth.

Recently I thought it would be good to start compiling the small functional language mimsa I’ve been messing around with for the last few years to LLVM. There’s a few really helpful resources - Joseph Morag’s Micro-C series, and Mapping High Level Concepts to LLVM IR in particular, but neither go into converting functional programming paradigms such as pattern matching, lambdas and ADTs in much depth. A megaparsec parse error made nice with diagnose Although some languages make whitespace meaningful, we won’t be bothering with any of that for now.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of functional language

functional language

Related news:

News photo

Implementing a functional language with graph reduction (2021)