Recursive type inlining with type variables

Address #7.