So I've stumbled on some interesting research from the Racket
community. They found out how to implement type systems as macros:
https://www.youtube.com/watch?v=j5Hauz6cewM
And this technique was used to implement the Haskell98 type system, so
it's very powerful:
https://www.youtube.com/watch?v=5QQdI3P7MdY
There are a few other impressive demos they showcased, but the
underlying point is: what if programming languages were extensible to
the point that you could add new cooperating type systems just as
easily as importing new libraries? I think that's the direction they
started to explore.