4 ms·
It would be interesting to try these in some functional language backend, say, in GHC or Ocaml.
by lngnmn 10y ago
It would be interesting to try these in some functional language backend, say, in GHC or Ocaml.
- mhh__ 10y agoGHC compiles haskell through about a million different IRs and abstract machines, until eventually reaching Cmm, which is effectively a similar idea to LLVM IR (A very simple C ish imperative language). Any benefits to be had, should be fairly straightforward for the GHC folks to use, which should be cool.
- kccqzy 10y agoIt's just Core, STG, Cmm. Anything else I'm missing?
- mrkgnao 10y agoNo. But that is probably two more than most other languages with a similar compilation model. (I think Rust has two IRs?)
- mhh__ 10y agoI wasn't trying to be critical, it's just significantly more than most languages (With good reason!). This is a good thing, I dream of when we will have libraries/frameworks for doing these kind of high level program transformations in a modular way a la LLVM.