using PG'OCaml with Async

51 views
Skip to first unread message

Ashish Agarwal

unread,
Feb 11, 2014, 12:48:45 PM2/11/14
to pgocaml...@lists.forge.ocamlcore.org, ocaml...@googlegroups.com
Does anyone have an Async implementation of PG'OCaml's functor argument [1]. I tried:

type in_channel = Reader.t
type out_channel = Writer.t

but then I need

val open_connection : Unix.sockaddr -> (Reader.t * Writer.t) Deferred.t

which I can't find in Async. The Socket API [2] is quite different from Stdlib and Lwt, and I don't know how to map it to what PG'OCaml wants.

Dario Teixeira

unread,
Feb 17, 2014, 7:49:53 AM2/17/14
to Ashish Agarwal, pgocaml...@lists.forge.ocamlcore.org, ocaml...@googlegroups.com
Hi Ashish,

> Does anyone have an Async implementation of PG'OCaml's functor argument [1]. I tried:

> (...)

I've never used Async, so I won't be able to help you directly.  I do however have
a somewhat related question: is PG'OCaml's reliance on Batteries a big turn-off for
users of Async/Core?  I imagine it might, which is why I'm considering dropping the
Batteries dependency.  It turns out there's only a couple of Batteries functions we
actually use, so it might be worth just copy + pasting them into PG'OCaml if that
means one fewer big dependency. (Yes, code duplication is evil, but so is scaring
away a huge chunk of potential users...)

Best regards,
Dario Teixeira

Ashish Agarwal

unread,
Feb 17, 2014, 2:46:33 PM2/17/14
to Dario Teixeira, pgocaml...@lists.forge.ocamlcore.org, ocaml...@googlegroups.com
I'm not as sensitive to extra dependencies as others, so I personally don't care. However, if it is really just a few functions, I suppose the dependency should be removed.
Reply all
Reply to author
Forward
0 new messages