I am not sure if typing can be added as a library. In terms of typed lambda calculus vs untyped lambda calculus, can we do this way?
But the idea of "layered" language is nice. In Scala, many features are not really from language itself, but from libraries.