2024-01-17 13:59:05 +01:00
|
|
|
(* Range *)
|
|
|
|
|
|
|
|
(* A range is a sorted list of integers in an interval.
|
2021-01-28 00:34:26 +01:00
|
|
|
*
|
2024-01-17 13:59:05 +01:00
|
|
|
* - ~"[a-b]"~ : range between a and b (included)
|
|
|
|
* - ~"[a]"~ : the list with only one integer a
|
|
|
|
* - ~"a"~ : equivalent to "[a]"
|
|
|
|
* - ~"[36-53,72-107,126-131]"~ represents the list of integers
|
|
|
|
* [ 37 ; 37 ; 38 ; ... ; 52 ; 53 ; 72 ; 73 ; ... ; 106 ; 107 ; 126 ; 127 ; ... ; 130 ; 131 ].
|
|
|
|
*)
|
|
|
|
|
|
|
|
(** Type *)
|
2019-02-20 18:15:15 +01:00
|
|
|
|
2020-12-28 01:08:55 +01:00
|
|
|
type t
|
2019-02-20 18:15:15 +01:00
|
|
|
|
|
|
|
|
2024-01-17 13:59:05 +01:00
|
|
|
(** Conversion *)
|
2019-02-20 18:15:15 +01:00
|
|
|
|
2020-12-28 01:08:55 +01:00
|
|
|
val of_string : string -> t
|
|
|
|
val to_string : t -> string
|
2019-02-20 18:15:15 +01:00
|
|
|
val to_int_list : t -> int list
|
|
|
|
|
|
|
|
|
2024-01-17 13:59:05 +01:00
|
|
|
(** Printers *)
|
2019-02-20 18:15:15 +01:00
|
|
|
|
2020-12-28 01:08:55 +01:00
|
|
|
val pp : Format.formatter -> t -> unit
|