My aggregated monorepo of OCaml code, automaintained
0
fork

Configure Feed

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

Squashed 'ocaml-jmap/' changes from 8424c92..5779ecb

5779ecb Eliminate Obj.magic with type-safe equivalents
111d03f metadata

git-subtree-dir: ocaml-jmap
git-subtree-split: 5779ecb4b45f11a7d6f273aa63d02109e02e9b99

+6 -8
+2 -2
dune-project
··· 12 12 13 13 (maintainers "Anil Madhavapeddy <anil@recoil.org>") 14 14 15 - (homepage "https://tangled.org/@anil.recoil.org/ocaml-jmap") 15 + (homepage "https://tangled.org/anil.recoil.org/ocaml-jmap") 16 16 17 - (bug_reports "https://tangled.org/@anil.recoil.org/ocaml-jmap/issues") 17 + (bug_reports "https://tangled.org/anil.recoil.org/ocaml-jmap/issues") 18 18 19 19 (maintenance_intent "(latest)") 20 20
+2 -2
jmap.opam
··· 6 6 maintainer: ["Anil Madhavapeddy <anil@recoil.org>"] 7 7 authors: ["Anil Madhavapeddy <anil@recoil.org>"] 8 8 license: "ISC" 9 - homepage: "https://tangled.org/@anil.recoil.org/ocaml-jmap" 10 - bug-reports: "https://tangled.org/@anil.recoil.org/ocaml-jmap/issues" 9 + homepage: "https://tangled.org/anil.recoil.org/ocaml-jmap" 10 + bug-reports: "https://tangled.org/anil.recoil.org/ocaml-jmap/issues" 11 11 depends: [ 12 12 "dune" {>= "3.20"} 13 13 "ocaml" {>= "5.4.0"}
+2 -4
lib/js/jmap_brr.ml
··· 44 44 Jsont_brr.encode Jmap.Proto.Session.jsont session 45 45 46 46 let decode_json s = 47 - match Brr.Json.decode s with 48 - | Ok jv -> Ok (Obj.magic jv : Jsont.json) (* Jv.t and Jsont.json are compatible *) 49 - | Error e -> Error e 47 + Jsont_brr.decode Jsont.json s 50 48 51 49 let encode_json json = 52 - Ok (Brr.Json.encode (Obj.magic json : Jv.t)) 50 + Jsont_brr.encode Jsont.json json 53 51 54 52 let pp_json ppf json = 55 53 match encode_json json with