Fix 4.02.3 compat
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
46eba2ef98
commit
5618be7ab0
|
@ -299,13 +299,13 @@ module Of_sexp = struct
|
||||||
basic "Integer" (fun s ->
|
basic "Integer" (fun s ->
|
||||||
match int_of_string (s Atom.Dune) with
|
match int_of_string (s Atom.Dune) with
|
||||||
| x -> Ok x
|
| x -> Ok x
|
||||||
| exception _ -> Error ())
|
| exception _ -> Result.Error ())
|
||||||
|
|
||||||
let float =
|
let float =
|
||||||
basic "Float" (fun s ->
|
basic "Float" (fun s ->
|
||||||
match float_of_string (s Atom.Dune) with
|
match float_of_string (s Atom.Dune) with
|
||||||
| x -> Ok x
|
| x -> Ok x
|
||||||
| exception _ -> Error ())
|
| exception _ -> Result.Error ())
|
||||||
|
|
||||||
let pair a b =
|
let pair a b =
|
||||||
enter
|
enter
|
||||||
|
@ -334,7 +334,7 @@ module Of_sexp = struct
|
||||||
let string_map t =
|
let string_map t =
|
||||||
list (pair string t) >>= fun bindings ->
|
list (pair string t) >>= fun bindings ->
|
||||||
match String.Map.of_list bindings with
|
match String.Map.of_list bindings with
|
||||||
| Ok x -> return x
|
| Result.Ok x -> return x
|
||||||
| Error (key, _v1, _v2) ->
|
| Error (key, _v1, _v2) ->
|
||||||
loc >>= fun loc ->
|
loc >>= fun loc ->
|
||||||
of_sexp_errorf loc "key %s present multiple times" key
|
of_sexp_errorf loc "key %s present multiple times" key
|
||||||
|
|
Loading…
Reference in New Issue