A batteries included HTTP/1.1 client in OCaml

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>

+4 -4
+2 -2
lib/requests.ml
··· 148 148 let http_pool = match http_pool with 149 149 | Some p -> p 150 150 | None -> 151 - Conpool.create ~sw ~net ~clock ~config:pool_config () 151 + Conpool.create_basic ~sw ~net ~clock ~config:pool_config () 152 152 in 153 153 154 154 (* HTTPS pool - TLS-wrapped connections *) 155 155 let https_pool = match https_pool with 156 156 | Some p -> p 157 157 | None -> 158 - Conpool.create ~sw ~net ~clock ?tls:tls_config ~config:pool_config () 158 + Conpool.create_basic ~sw ~net ~clock ?tls:tls_config ~config:pool_config () 159 159 in 160 160 161 161 (* HTTP/2 pool - shared connections with H2 state *)
+1 -1
test/test_localhost.ml
··· 102 102 () 103 103 in 104 104 105 - let pool = Conpool.create 105 + let pool = Conpool.create_basic 106 106 ~sw 107 107 ~net:env#net 108 108 ~clock:env#clock
+1 -1
test/test_simple.ml
··· 43 43 Eio.Time.sleep env#clock 0.1; 44 44 45 45 traceln "Creating connection pool"; 46 - let pool = Conpool.create ~sw ~net:env#net ~clock:env#clock () in 46 + let pool = Conpool.create_basic ~sw ~net:env#net ~clock:env#clock () in 47 47 48 48 traceln "Testing connection"; 49 49 let endpoint = Conpool.Endpoint.make ~host:"127.0.0.1" ~port:9000 in