Generation of comparison functions from types
