Fix 4.02.3 build
This commit is contained in:
parent
10c01ac741
commit
bfd0f2eada
|
@ -185,7 +185,7 @@ module Of_sexp = struct
|
||||||
let string_set sexp = String.Set.of_list (list string sexp)
|
let string_set sexp = String.Set.of_list (list string sexp)
|
||||||
let string_map f sexp =
|
let string_map f sexp =
|
||||||
match String.Map.of_list (list (pair string f) sexp) with
|
match String.Map.of_list (list (pair string f) sexp) with
|
||||||
| Ok x -> x
|
| Result.Ok x -> x
|
||||||
| Error (key, _v1, _v2) ->
|
| Error (key, _v1, _v2) ->
|
||||||
of_sexp_error sexp (Printf.sprintf "key %S present multiple times" key)
|
of_sexp_error sexp (Printf.sprintf "key %S present multiple times" key)
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ module Of_sexp = struct
|
||||||
let map_validate parse ~f state =
|
let map_validate parse ~f state =
|
||||||
let x, state' = parse state in
|
let x, state' = parse state in
|
||||||
match f x with
|
match f x with
|
||||||
| Ok x -> x, state'
|
| Result.Ok x -> x, state'
|
||||||
| Error msg ->
|
| Error msg ->
|
||||||
let parsed =
|
let parsed =
|
||||||
Name_map.merge state.unparsed state'.unparsed ~f:(fun _key before after ->
|
Name_map.merge state.unparsed state'.unparsed ~f:(fun _key before after ->
|
||||||
|
|
|
@ -109,7 +109,10 @@ module Of_sexp : sig
|
||||||
-> 'a option record_parser
|
-> 'a option record_parser
|
||||||
val field_b : string -> bool record_parser
|
val field_b : string -> bool record_parser
|
||||||
|
|
||||||
val map_validate : 'a record_parser -> f:('a -> ('b, string) result) -> 'b record_parser
|
val map_validate
|
||||||
|
: 'a record_parser
|
||||||
|
-> f:('a -> ('b, string) Result.result)
|
||||||
|
-> 'b record_parser
|
||||||
|
|
||||||
val ignore_fields : string list -> unit record_parser
|
val ignore_fields : string list -> unit record_parser
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue