Haskell is a really great language. I love it. But as a C++ programmer and with some basic knowledge about the computer architecture, I really want to know the implementation details about Haskell.
I mean, for example, map
function. I know the grammar, the result. However, I want to know how does this function really work in the RAM or so. Because C family language is very clear about the mapping between the grammar and the computer behaviors.
So does anybody have ideas about the computer behaviors behind functional programmings grammar? Or any books about this like “inside the C++ object model”?
The basic idea to implement lazy functional languages is called Graph Reduction.
"The Implementation of Functional Programming Languages" is a detailed, if older book on the subject: http://research.microsoft.com/en-us/um/people/simonpj/papers/slpj-book-1987/
A more tutorial-like introduction: http://research.microsoft.com/en-us/um/people/simonpj/papers/pj-lester-book/
For more on how GHC is implemented, you might look at the "Spineless Tagless G-Machine" (STGM) papers, e.g.: http://www.dcc.fc.up.pt/~pbv/aulas/linguagens/peytonjones92implementing.pdf