External Publication
Visit Post

Modern Haskell → C translation approaches?

Haskell Community [Unofficial] April 22, 2026
Source
Hello everyone, Thanks a lot for all the detailed answers — I really appreciate the insights. To clarify my use case a bit more: my goal is not portability per se, but rather to use C as an intermediate representation step in a toolchain. In particular, I am interested in leveraging existing C-based obfuscation tooling (e.g. Tigress) as part of a pipeline for transforming Haskell programs. After that, I would like to further lower the result to LLVM IR and analyze it, especially to reconstruct data-dependency graphs using LLVM passes. I did try MicroHs as suggested, but the generated C code appears to represent the Haskell runtime rather than the original program structure. It essentially produces a low-level runtime-like representation (large table), which makes it difficult to recover meaningful data-dependency information at the LLVM level. Regarding NASA’s Copilot, I understand it can compile a subset of Haskell-like stream programs to C99, but it seems to target a very specific domain (embedded, real-time stream processing), so it would not be applicable to general-purpose modern Haskell code. Thanks again for all the suggestions — they were very helpful in clarifying the landscape of existing approaches. Markus

Discussion in the ATmosphere

Loading comments...