caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <alain@frisch.fr>
To: Christophe Troestler <Christophe.Troestler@umons.ac.be>,
	 OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] First class modules from C
Date: Sat, 15 Feb 2014 16:05:52 +0100	[thread overview]
Message-ID: <52FF8250.30607@frisch.fr> (raw)
In-Reply-To: <20140215.152342.1020588167010524975.Christophe.Troestler@umons.ac.be>

On 2/15/2014 3:23 PM, Christophe Troestler wrote:
> When passing a packed module to a C function, do we access its values
> as if it was a record (in the order of the signature) or is it more
> complicated?  A description in the user manual would be nice!

Yes, currently, this is how a first-class module is represented, and you 
need to know exactly what in the signature count for one slot.  But this 
representation is not specified, and not guaranteed to remain like that 
in future  versions (in particular, it might very well be the case that 
first-class modules would receive an extra unique identifier field, to 
be used by the generic hash/compare functions).  It seems more robust to 
access components from an OCaml function (called from C, if needed, or 
applied before/instead passing the packed module to C).


-- Alain

      parent reply	other threads:[~2014-02-15 15:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14  7:23 [Caml-list] First class modules aliases Christophe Troestler
2014-02-14  8:57 ` Alain Frisch
2014-02-14  9:08   ` Jacques Garrigue
2014-02-14  9:22     ` Alain Frisch
2014-02-14 23:23       ` Jacques Garrigue
2014-02-14  9:39   ` Alain Frisch
     [not found] ` <20140215.152342.1020588167010524975.Christophe.Troestler@umons.ac.be>
2014-02-15 15:05   ` Alain Frisch [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=52FF8250.30607@frisch.fr \
    --to=alain@frisch.fr \
    --cc=Christophe.Troestler@umons.ac.be \
    --cc=caml-list@inria.fr \
    /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).