feat(sexp): reexport atom/list cstors

This commit is contained in:
Simon Cruanes 2019-12-05 15:19:38 -06:00
parent 76bec991a2
commit 825e350da0
2 changed files with 15 additions and 0 deletions

View file

@ -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)

View file

@ -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