mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 03:35:30 -05:00
feat(CCChar): add CCChar.Infix
This commit is contained in:
parent
4ad331fbe3
commit
2c96dd1b55
2 changed files with 37 additions and 1 deletions
|
|
@ -21,5 +21,15 @@ let to_int = Char.code
|
||||||
let to_string c = String.make 1 c
|
let to_string c = String.make 1 c
|
||||||
|
|
||||||
(*$Q to_string
|
(*$Q to_string
|
||||||
(Q.string_of_size (Q.Gen.return 1)) (fun s -> to_string s.[0] = s)
|
(Q.string_of_size (Q.Gen.return 1)) (fun s -> Stdlib.(=) (to_string s.[0]) s)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
module Infix = struct
|
||||||
|
let (=) : t -> t -> bool = Stdlib.(=)
|
||||||
|
let (<>) : t -> t -> bool = Stdlib.(<>)
|
||||||
|
let (<) : t -> t -> bool = Stdlib.(<)
|
||||||
|
let (>) : t -> t -> bool = Stdlib.(>)
|
||||||
|
let (<=) : t -> t -> bool = Stdlib.(<=)
|
||||||
|
let (>=) : t -> t -> bool = Stdlib.(>=)
|
||||||
|
end
|
||||||
|
include Infix
|
||||||
|
|
|
||||||
|
|
@ -37,3 +37,29 @@ val pp_buf : Buffer.t -> t -> unit
|
||||||
|
|
||||||
val pp : Format.formatter -> t -> unit
|
val pp : Format.formatter -> t -> unit
|
||||||
(** Renamed from [print] since 2.0. *)
|
(** Renamed from [print] since 2.0. *)
|
||||||
|
|
||||||
|
(** {2 Infix Operators}
|
||||||
|
|
||||||
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
|
module Infix : sig
|
||||||
|
val (=) : t -> t -> bool
|
||||||
|
(** @since NEXT_RELEASE *)
|
||||||
|
|
||||||
|
val (<>) : t -> t -> bool
|
||||||
|
(** @since NEXT_RELEASE *)
|
||||||
|
|
||||||
|
val (<) : t -> t -> bool
|
||||||
|
(** @since NEXT_RELEASE *)
|
||||||
|
|
||||||
|
val (>) : t -> t -> bool
|
||||||
|
(** @since NEXT_RELEASE *)
|
||||||
|
|
||||||
|
val (<=) : t -> t -> bool
|
||||||
|
(** @since NEXT_RELEASE *)
|
||||||
|
|
||||||
|
val (>=) : t -> t -> bool
|
||||||
|
(** @since NEXT_RELEASE *)
|
||||||
|
end
|
||||||
|
|
||||||
|
include module type of Infix
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue