https://123dok.net/document/y96mejkw-a-logical-framework-for-incremental-type-checking.html