Integrate non-sequentialized DNS resolution with Tcp.with_connection

12 views
Skip to first unread message

Mark Li

unread,
Oct 9, 2014, 1:41:54 PM10/9/14
to ocaml...@googlegroups.com
I made a non-sequentialized variant of Tcp.with_connection called async_to_host_and_port. When I plugged it into Tcp.with_connection and compiler warns me type mismatching at line 337 of alpacaml_main.ml

File "lib/alpacaml_main.ml", line 337, characters 37-63:
Error: This expression has type Socket.Address.Inet.t where_to_connect
       but an expression was expected of type
         [< Async_extra.Import.Socket.Address.t ] Tcp.where_to_connect

I made the return type of async_to_host_and_port follow strictly to Async's to_host_and_port. I struggled on it for a while because I cannot change Tcp.ml. I guess the problem may have something to do with the way I define 'a where_to_connect in Alpacaml_async_dns_resolver.ml and type constraint in Tcp.ml that I don't 100% understand.
Would anyone like to give me some advice?

David House

unread,
Oct 14, 2014, 6:54:59 AM10/14/14
to ocaml...@googlegroups.com
I'm not sure how this email differs from your other similar one to this list. I responded to the other one.

--
You received this message because you are subscribed to the Google Groups "ocaml-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocaml-core+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages