Thinks so much for this! Working on porting this to Rust so that I can figure out if I want to use it in Pikelet: https://github.com/brendanzab/rust-nbe-for-mltt… - Still need to add a parser, pretty printing, and some tests! 🙂
Do you know if recursive definitions could be implemented using this style of semantic type checking? I'm considering going with an Idris approach to this - allow general recursion, but have a totality checker to ensure that a subset of the language terminates.
One must be a bit careful that everything is termination-checked before you attempt to normalize it (otherwise normalization might diverge) but if you do this (or are fine with things diverging) it should be fine. Mini-TT supports recursion IIRC