(*--------------------------------------------------------------------------- Copyright (c) 2025 Anil Madhavapeddy. All rights reserved. SPDX-License-Identifier: ISC ---------------------------------------------------------------------------*) type t = [ `All_visible | `By_id of int * int option | `By_number of int * int option | `At_cursor | `At_cell of int * int | `At_cell_z of int * int * int | `By_column of int | `By_row of int | `By_z_index of int | `By_id_range of int * int | `Frames ] let to_char ~free : t -> char = let base = function | `All_visible -> 'a' | `By_id _ -> 'i' | `By_number _ -> 'n' | `At_cursor -> 'c' | `At_cell _ -> 'p' | `At_cell_z _ -> 'q' | `By_column _ -> 'x' | `By_row _ -> 'y' | `By_z_index _ -> 'z' | `By_id_range _ -> 'r' | `Frames -> 'f' in fun t -> let c = base t in if free then Char.uppercase_ascii c else c