Initial code to generate the t/0 type.

Doesn't quite work yet.