diff --git a/misc/sexp.ml b/misc/sexp.ml index 7657c777..d58d99d9 100644 --- a/misc/sexp.ml +++ b/misc/sexp.ml @@ -608,6 +608,7 @@ module Traverse = struct let to_int e = _try_atom e int_of_string let to_bool e = _try_atom e bool_of_string + let to_float e = _try_atom e float_of_string let to_string e = _try_atom e (fun x->x) let to_pair e = match e with diff --git a/misc/sexp.mli b/misc/sexp.mli index e7f2ec0b..2d20e590 100644 --- a/misc/sexp.mli +++ b/misc/sexp.mli @@ -260,6 +260,8 @@ module Traverse : sig val to_bool : t -> bool option + val to_float : t -> float option + val to_list : t -> t list option val to_pair : t -> (t * t) option