caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk), caml-list@inria.fr
Subject: Re: [Caml-list] currying...
Date: Tue, 06 Mar 2001 17:10:56 -0800	[thread overview]
Message-ID: <4.3.2.7.2.20010306170714.03787b40@shell16.ba.best.com> (raw)
In-Reply-To: <slrn9aatlb.29o.qrczak@qrnik.zagroda>


>No, it needs not to create an OCaml closure of any particular arity.
>It must create a closure which behaves in a particular way: calls the
>C function after it received the necessary number of arguments. 

Isn't this the same thing?  How is it different?

> You can't in general let the original C function pointer mimic OCaml's
>code pointer in a closure anyway. First of all, types of values will
>be different: C has a wide variety of types, OCamls wraps everything
>as either a pointer or a tagged integer.

I'll convert all the arguments, so that shouldn't be a problem.

>> Since this is all happening dynamically, I need to be able to deduce
>> the physical arity of the functions at runtime.
>Deduce from what? I understood that you create an OCamls function,
>not examine it!

Right.  Since I haven't written the code yet, I'm not 100% sure exactly which primitives I'll need.  I definitely need to be able to create a int -> int -> (int -> int) and an int -> int -> int -> int, but I'm not sure whether I'll need to decide whether a given closure takes a given number of arguments.

I'm trying to piece together all the tools I'll need to make this work, and I'm feeling out the various corners of the problem to see where there might be problems...

Chris


-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  reply	other threads:[~2001-03-07  1:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-06  9:39 Chris Hecker
2001-03-06 10:22 ` Thomas Colcombet
2001-03-06 10:33 ` Bruce Hoult
2001-03-06 10:50 ` Remi VANICAT
2001-03-06 16:31 ` Xavier Leroy
2001-03-06 17:41   ` Chris Hecker
2001-03-06 18:43     ` Sven LUTHER
2001-03-06 19:09     ` Marcin 'Qrczak' Kowalczyk
2001-03-06 20:14       ` Chris Hecker
2001-03-06 21:39         ` Marcin 'Qrczak' Kowalczyk
2001-03-06 23:23           ` Chris Hecker
2001-03-06 23:45             ` Marcin 'Qrczak' Kowalczyk
2001-03-07  1:10               ` Chris Hecker [this message]
2001-03-07  8:44                 ` Marcin 'Qrczak' Kowalczyk
2001-03-06 23:51             ` Chris Hecker
2001-03-06 10:16 Adam Granicz

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=4.3.2.7.2.20010306170714.03787b40@shell16.ba.best.com \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=qrczak@knm.org.pl \
    /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).