From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: ivan.matveich@gmail.com
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] lablgtk2: receiving messages from network?
Date: Mon, 17 Apr 2006 08:45:16 +0900 (JST) [thread overview]
Message-ID: <20060417.084516.07640451.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <b5def3a40604161528l636cd34av486f118a3eccb694@mail.gmail.com>
From: "Ivan Matveich" <ivan.matveich@gmail.com>
> Now I have another question. I've started writing some code,
>
> module Channel =
> struct
> type event =
> | Connected of Unix.sockaddr
> | Dropped of Unix.sockaddr
> | Received of Unix.sockaddr * x
> | Sent of Unix.sockaddr * x
> type action =
> | Associate of Unix.sockaddr
> | Dissociate of Unix.sockaddr
> | Send of Unix.sockaddr * x
>
> where x will be something returned by Marshal.from_string.
>
> How do I properly specify its type?
I suppose x should be Obj.t, meaning that you're going to use Obj.repr
and Obj.obj. This is clearly unsafe, but any use of Marshal is.
Jacques Garrigue
prev parent reply other threads:[~2006-04-16 23:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-15 19:33 Ivan Matveich
2006-04-15 19:45 ` [Caml-list] " yoann padioleau
2006-04-15 20:10 ` Markus Mottl
2006-04-15 20:58 ` Eric Cooper
2006-04-15 22:54 ` Remi Vanicat
2006-04-16 22:28 ` Ivan Matveich
2006-04-16 23:45 ` Jacques Garrigue [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060417.084516.07640451.garrigue@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=caml-list@yquem.inria.fr \
--cc=ivan.matveich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).