Pure OCaml Yaml 1.2 reader and writer using Bytesrw
at main 699 B view raw
1(*--------------------------------------------------------------------------- 2 Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 SPDX-License-Identifier: ISC 4 ---------------------------------------------------------------------------*) 5 6(** Collection layout styles *) 7 8type t = 9 [ `Any (** Let emitter choose *) 10 | `Block (** Indentation-based *) 11 | `Flow (** Inline with brackets *) ] 12 13let to_string = function `Any -> "any" | `Block -> "block" | `Flow -> "flow" 14let pp fmt t = Format.pp_print_string fmt (to_string t) 15let equal a b = a = b 16 17let compare a b = 18 let to_int = function `Any -> 0 | `Block -> 1 | `Flow -> 2 in 19 Int.compare (to_int a) (to_int b)