this repo has no description

Eliminate Obj.magic with type-safe equivalents

Replace unsafe Obj.magic casts with proper type-safe alternatives:

- conpool: Make protocol parameter required, add create_basic for simple
pools. The previous optional protocol with Obj.magic default was
fundamentally unsound as OCaml cannot have optional parameters that
change return types.

- publicsuffix: Add explicit id field to trie_node instead of using
Obj.magic to cast nodes to int for hashtable keys.

- yamlt: Add init_unknown_builder helper that properly handles GADT
refinement, returning () for Unknown_skip/Unknown_error cases where
builder=unit.

- jmap_brr: Use Jsont_brr.encode/decode Jsont.json instead of unsafe
casts between Jv.t and Jsont.json.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+2 -4
+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