Select the types of activity you want to include in your feed.
csv: rename from csvt
Drops the redundant "t" suffix. Library name, opam package, module (Csvt -> Csv), and directory all rename in lockstep. Every downstream reference in interop tests, libraries, and docs updated.
···2020 optional text-location tracking and layout preservation and is
2121 compatible with effect-based concurrency.")
2222 (depends
2323- (ocaml (>= 4.14))
2323+ (ocaml (>= 5.1))
2424 (dune (>= 3.21))
2525 (bytesrw (>= 0.1.0))
2626 (alcotest :with-test)
-31
lib/core.ml
···9494 let c = String.get_uint8 h i in
9595 Error (Printf.sprintf "%d: byte x%x not an ASCII hexadecimal digit" i c)
96969797-(* Type identifiers. *)
9898-9999-module Type = struct
100100- (* Can be removed once we require OCaml 5.1 *)
101101- type (_, _) eq = Equal : ('a, 'a) eq
102102-103103- module Id = struct
104104- type _ id = ..
105105-106106- module type ID = sig
107107- type t
108108- type _ id += Id : t id
109109- end
110110-111111- type 'a t = (module ID with type t = 'a)
112112-113113- let make (type a) () : a t =
114114- (module struct
115115- type t = a
116116- type _ id += Id : t id
117117- end)
118118-119119- let provably_equal (type a b) ((module A) : a t) ((module B) : b t) :
120120- (a, b) eq option =
121121- match A.Id with B.Id -> Some Equal | _ -> None
122122-123123- let uid (type a) ((module A) : a t) =
124124- Obj.Extension_constructor.id (Obj.Extension_constructor.of_val A.Id)
125125- end
126126-end
127127-12897(* Resizable arrays *)
1299813099module Rarray = struct
-13
lib/core.mli
···99val binary_string_of_hex : string -> (string, string) result
1010val binary_string_to_hex : string -> string
11111212-(** Type identifiers. Can be removed once we require OCaml 5.1 *)
1313-module Type : sig
1414- type (_, _) eq = Equal : ('a, 'a) eq
1515-1616- module Id : sig
1717- type 'a t
1818-1919- val make : unit -> 'a t
2020- val uid : 'a t -> int
2121- val provably_equal : 'a t -> 'b t -> ('a, 'b) eq option
2222- end
2323-end
2424-2512(** Resizable arrays. *)
2613module Rarray : sig
2714 type 'a t
-1
lib/json.ml
···137137module Repr = struct
138138 (* See the .mli for documentation *)
139139 module String_map = Map.Make (String)
140140- module Type = Core.Type
141140142141 type ('ret, 'f) dec_fun =
143142 | Dec_fun : 'f -> ('ret, 'f) dec_fun
+16-24
lib/json.mli
···903903 (** {1:types JSON types} *)
904904905905 val as_string_map :
906906- ?kind:string -> ?doc:string -> 'a codec -> 'a Stdlib.Map.Make(String).t codec
906906+ ?kind:string ->
907907+ ?doc:string ->
908908+ 'a codec ->
909909+ 'a Stdlib.Map.Make(String).t codec
907910 (** [as_string_map t] maps object to key-value maps of type [t]. See also
908911 {!Mems.string_map} and {!Json.json_mems}. *)
909912···10321035 val set_meta : Meta.t -> t -> t
10331036 (** [set_meta m v] replaces [v]'s meta with [m]. *)
1034103710351035- val copy_layout : t -> dst:json -> t
10381038+ val copy_layout : t -> dst:t -> t
10361039 (** [copy_layout src ~dst] copies the layout of [src] and sets it on [dst]
10371040 using {!Meta.copy_ws}. *)
10381041···11971200val json_object : t codec
11981201(** [json_object] represents JSON objects by their generic representation. *)
1199120212001200-val json_mems : (t, json, mem list) Object.Mems.map
12031203+val json_mems : (t, t, mem list) Object.Mems.map
12011204(** [json_mems] is a members map collecting unknown members into a generic JSON
12021205 object. See {{!page-cookbook.keeping}this example}. *)
12031206···12331236 specified in which case this value is returned. Encodes a singleton array.
12341237*)
1235123812361236-val set_nth :
12371237- ?stub:json -> ?allow_absent:bool -> 'a codec -> int -> 'a -> t codec
12391239+val set_nth : ?stub:t -> ?allow_absent:bool -> 'a codec -> int -> 'a -> t codec
12381240(** [set_nth t n v] on decodes sets the [n]th value of a JSON array to [v]
12391241 encoded by [t]. Other indices are left untouched. Errors if there is no such
12401242 index unless [~allow_absent:true] is specified in which case the index is
···12421244 {!Json.zero} applied to the value [v] encoded by [t] (i.e. the "natural
12431245 zero" of [v]'s encoding sort). Encodes like {!json_array} does. *)
1244124612451245-val update_nth : ?stub:json -> ?absent:'a -> int -> 'a codec -> t codec
12471247+val update_nth : ?stub:t -> ?absent:'a -> int -> 'a codec -> t codec
12461248(** [update_nth n t] on decode recodes the [n]th value of a JSON array with [t].
12471249 Errors if there is no such index unless [absent] is specified in which case
12481250 the index is created with [absent], encoded with [t] and preceeded by as
···12921294 is left untouched. Encodes generic JSON objects like {!json_object} does. *)
1293129512941296val filter_map_object :
12951295- 'a codec -> 'b codec -> (Meta.t -> string -> 'a -> (name * 'b) option) -> t t
12971297+ 'a codec ->
12981298+ 'b codec ->
12991299+ (Meta.t -> string -> 'a -> (name * 'b) option) ->
13001300+ t codec
12961301(** [filter_map_object a b f] maps the [a] members of a JSON object with [f] to
12971302 [(n, b)] members or deletes them on [None]. The meta given to [f] is the
12981303 meta of the member name. Encodes generic JSON arrays like {!json_object}
···13111316val set_index : ?allow_absent:bool -> 'a codec -> Path.index -> 'a -> t codec
13121317(** [set_index] uses {!set_nth} or {!set_mem} on the given index. *)
1313131813141314-val update_index : ?stub:json -> ?absent:'a -> Path.index -> 'a codec -> t codec
13191319+val update_index : ?stub:t -> ?absent:'a -> Path.index -> 'a codec -> t codec
13151320(** [update_index] uses {!update_nth} or {!update_mem} on the given index. *)
1316132113171322val delete_index : ?allow_absent:bool -> Path.index -> t codec
···13241329 {!Path.root} this is [t]. *)
1325133013261331val set_path :
13271327- ?stub:json -> ?allow_absent:bool -> 'a codec -> Path.t -> 'a -> t codec
13321332+ ?stub:t -> ?allow_absent:bool -> 'a codec -> Path.t -> 'a -> t codec
13281333(** [set_path t p v] {{!set_index}sets} the last index of [p]. If [p] is
13291334 {!Path.root} this encodes [v] with [t]. *)
1330133513311331-val update_path : ?stub:json -> ?absent:'a -> Path.t -> 'a codec -> t codec
13361336+val update_path : ?stub:t -> ?absent:'a -> Path.t -> 'a codec -> t codec
13321337(** [update_path p t] {{!update_index}updates} the last index of [p] with [t].
13331338 On the root path this is [t]. *)
13341339···14141419 module String_map : Map.S with type key = string
14151420 (** A [Map.Make(String)] instance. *)
1416142114171417- (** Type identifiers. Can be removed once we require OCaml 5.1 *)
14181418- module Type : sig
14191419- type (_, _) eq = Equal : ('a, 'a) eq
14201420-14211421- module Id : sig
14221422- type 'a codec
14231423-14241424- val make : unit -> 'a codec
14251425- val uid : 'a codec -> int
14261426- val provably_equal : 'a codec -> 'b codec -> ('a, 'b) eq option
14271427- end
14281428- end
14291429-14301422 (** The type for decoding functions. *)
14311423 type ('ret, 'f) dec_fun =
14321424 | Dec_fun : 'f -> ('ret, 'f) dec_fun
···14641456 | Number : (float, 'a) base_map -> 'a codec (** Number maps. *)
14651457 | String : (string, 'a) base_map -> 'a codec (** String maps. *)
14661458 | Array : ('a, 'elt, 'builder) array_map -> 'a codec (** Array maps. *)
14671467- | Object : ('o, 'o) object_map -> 'o t (** Object maps. *)
14591459+ | Object : ('o, 'o) object_map -> 'o codec (** Object maps. *)
14681460 | Any : 'a any_map -> 'a codec
14691461 (** Map for different sorts of JSON values. *)
14701462 | Map : ('b, 'a) map -> 'a codec