caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] do i need a private row type?
@ 2011-05-15 13:56 Joel Reymont
  2011-05-16  6:24 ` Goswin von Brederlow
  2011-05-19  4:15 ` Pedro Borges
  0 siblings, 2 replies; 18+ messages in thread
From: Joel Reymont @ 2011-05-15 13:56 UTC (permalink / raw)
  To: caml-list

https://github.com/wagerlabs/ocaml-zmq/blob/master/src/ZMQ.ml

Looking at the Poll module at the bottom and the definition of poll_item as

  type 'a poll_item = ('a Socket.t * event_mask)

I would like to be able to put different 'a in the same poll_item array. 

This is not possible as written, e.g. 

Error: This expression has type
         ZMQ.Socket.pub ZMQ.Socket.t * ZMQ.Poll.event_mask
       but an expression was expected of type
         ZMQ.Socket.pull ZMQ.Socket.t * ZMQ.Poll.event_mask

How do I type poll_item and poll_item array so that the array is polymorphic with respect to 'a?

Does the definition of Socket a the top of ZMQ.ml need to be changed to make this possible?

	Thanks, Joel

--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------





^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-05-19  7:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-15 13:56 [Caml-list] do i need a private row type? Joel Reymont
2011-05-16  6:24 ` Goswin von Brederlow
2011-05-16  7:07   ` Gabriel Scherer
2011-05-16  8:57     ` Joel Reymont
2011-05-16  9:31     ` Joel Reymont
2011-05-16  9:58     ` Joel Reymont
2011-05-16 10:05     ` Joel Reymont
2011-05-16 12:02     ` Joel Reymont
2011-05-16 12:32     ` Joel Reymont
2011-05-16 13:02     ` Joel Reymont
2011-05-16 13:39       ` Gabriel Scherer
2011-05-16 13:46         ` Joel Reymont
2011-05-16 14:02         ` Joel Reymont
2011-05-16 14:06           ` Gabriel Scherer
2011-05-16 14:08             ` Joel Reymont
2011-05-17  4:26     ` Goswin von Brederlow
2011-05-19  4:15 ` Pedro Borges
2011-05-19  7:33   ` Joel Reymont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).