Functions for computing the sizes of types.