kind inference