A prototype for type compilation