A great book which is my ‘goto" guide for understanding FP, the lambda calculus and type inference. The equally awesome (and practical!) stuff at the back on spineless tagless G machines is a bonus. And because it’s written by the inimitable SLPJ, the clarity of exposition and pedagogical style is second to none. TL;DR - it’s great, read it! :)
Another great (and shorter read), The Glasgow Haskell Compiler: http://www.aosabook.org/en/ghc.html, by the same great author!