Add support for ordering when using exhaustive