How do functional language compilers work?

So this is probably a stupid question, but I'm a bit confused.

So, I understand that the Haskell compiler itself is written in Haskell. How it works? What is the reason for this? What is the OCaml compiler written in?

In addition, they speak using a functional language such as haskell or OCaml. Can someone go through the steps of what happens when it happens? So, the new language will be compiled into haskell, which will then be compiled to compile the haskell compiler?

+5
source share

All Articles