let parse_sort_order = function | "unknown" -> Ok `Unknown | "unsorted" -> Ok `Unsorted | "queryname" -> Ok `Query_name | "coordinate" -> Ok `Coordinate | x -> error "invalid sort order" x sexp_of_string