[1] https://hackage.haskell.org/package/bound [2] https://github.com/ermine-language/ermine
I cannot recommend HOAS outside of very narrow areas.
Full disclosure: Brigitte Pientka was my supervisor. I did not work on the compiler, but I did make the language's logo.
[1] https://github.com/fritzo/hstar/blob/6df3347/src/DeBruijn.v#... [2] https://github.com/fritzo/pomagma/blob/ada575c/src/reducer/s...
https://stackoverflow.com/questions/22676975/simple-lambda-c...
Candidly, I find them a pain to write, but it is faster and integrates with the host language's type checker.
Maybe that's pretty non-standard. I like thinking of shallow-deep as a continuum, though.
HOAS is a great example. There is the creation of an AST, but perhaps the most important and tricky part of any AST, the binding system, is left to the metalanguage. For that reason exactly I'm happy to say that HOAS is "shallower" than, say, a de Bruijn indexed binding system.