I am digging into the lambda language (as printed by -dlambda and as represented by the types in bytecomp/lambda.ml). And it mostly makes sense however I still have a constant stream of questions. So I was wondering: Is there any internal documentation for the lambda IL?

The specific questions on my mind at the moment are:
1. How are types represented in the lambda IL? (they seem to be implicit but it's not clear) This is especially an issue with polymorphic primitives like "field" and "apply".
2. What do each of the operation (primitive and lambda) mean? What do they do and what types to they imply (if that's handled that way)?

Just for some background I am a grad student in a compilers course and I am looking to build a simple LLVM code generator that takes lambda and output LLVM bytecode (allowing it to use all the fun JIT and optimization, etc features of LLVM). Out of curiosity has this been attempted before?

Thanks a lot!
-Arthur