Syntax extension for deriving "compare" functions automatically