mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
feat(sexp): reexport atom/list cstors
This commit is contained in:
parent
76bec991a2
commit
825e350da0
2 changed files with 15 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ module Make(Sexp : SEXP) = struct
|
|||
type t = Sexp.t
|
||||
type sexp = t
|
||||
|
||||
let atom = Sexp.atom
|
||||
let list = Sexp.list
|
||||
let of_int x = Sexp.atom (string_of_int x)
|
||||
let of_float x = Sexp.atom (string_of_float x)
|
||||
let of_bool x = Sexp.atom (string_of_bool x)
|
||||
|
|
|
|||
|
|
@ -30,11 +30,24 @@ module type S = sig
|
|||
type t
|
||||
type sexp = t
|
||||
|
||||
(** {2 Re-exports} *)
|
||||
|
||||
val atom : string -> t
|
||||
(** Make an atom out of this string.
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val list : t list -> t
|
||||
(** Make a Sexpr of this list.
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
(** {2 Constructors} *)
|
||||
|
||||
val of_int : int -> t
|
||||
val of_bool : bool -> t
|
||||
val of_list : t list -> t
|
||||
val of_rev_list : t list -> t
|
||||
(** Reverse the list. *)
|
||||
|
||||
val of_float : float -> t
|
||||
val of_unit : t
|
||||
val of_pair : t * t -> t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue