It starts by looking at how to evaluate the simply typed lambda calculus and then going from that to a dependently typed lambda calculus. Surprisingly, the transformation is not all that complicated!
The actual code is in Haskell.
A compiler, if asked to "execute" itself a million times will generate code that is still reasonably fast.
An interpreter, if asked to "execute" itself a million times, will generate code that is a million times slower.
https://bitbucket.org/quiark/hsc
The whole purpose of that mental gymnastics was to learn x86 assembly while practicing my Haskell ;)
I think I'll save myself the wasted time and just use X from the get-go.