type constraint library; still needs tests