4 ms·
Though this page doesn’t seem to mention it, the Glasgow Haskell Compiler still uses Cmm as its backend [0]. (Cmm is a close relative of C--, though I’m not sur
by bradrn 5y ago
Though this page doesn’t seem to mention it, the Glasgow Haskell Compiler still uses Cmm as its backend [0]. (Cmm is a close relative of C--, though I’m not sure exactly what the differences are.) In fact, if you pass -ddump-cmm to GHC (or any other one of the -ddump-cmm-* options, [1]) you should be able to see the Cmm code output for any given Haskell program. Alas, it doesn’t seem to work in the REPL, though at least -ddump-simpl (dumping the Core intermediate language) does.
[0] https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/cmm https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/cm...
[1] https://downloads.haskell.org/ghc/latest/docs/html/users_guide/debugging.html#c-representation https://downloads.haskell.org/ghc/latest/docs/html/users_gui...