OCaml Claude SDK using Eio and Jsont
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

claude: bind [enc] locally to steady codec's label disambiguation

[let open Json.Codec in; map ~kind ~dec:of_string ~enc:to_string
string] made OCaml mis-resolve [string] against another [Codec.*]
path when [of_string] and [to_string] were both labeled arguments.
Pulling [enc = to_string] into a local binding before the [open]
pins the inference without any label-order sensitivity, matches
the other encodings helpers in the repo, and reads a touch better.

+2 -1
+2 -1
lib/model.ml
··· 45 45 | s -> `Custom s 46 46 47 47 let json : t Json.codec = 48 + let enc = to_string in 48 49 let open Json.Codec in 49 - map ~kind:"Model" ~dec:of_string ~enc:to_string string 50 + map ~kind:"Model" ~dec:of_string ~enc string