caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>
To: Guy Yeterian <GYe@mail.dotcom.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] récupération de paramètre
Date: Thu, 3 May 2001 22:07:19 +0200 (MET DST)	[thread overview]
Message-ID: <15089.47735.317609.314974@ext> (raw)
In-Reply-To: <3AF1743B.7CF7CA78@mail.dotcom.fr>


Il n'y a pas d'acces au compilateur Caml aussi simple que
"function_of_string" (comment cela pourrait-il etre statiquement type,
d'ailleurs ?) Il y a cependant plusieurs manieres de faire, dont entre
autres :

  - dans un toplevel, l'inclusion d'un morceau de code avec #use
    (qui peut par exemple definir une fonction f, la stocker dans
    une reference, etc.)

  - la compilation d'un module definissant une fonction f (avec un
    appel externe au compilo Caml) puis un chargement dynamique de ce
    code avec le module Dynlink

  - la definition de votre propre type pour les fonctions dont vous
    avez besoin, le parseur et l'interpreteur associes, bref votre
    mini Caml dans Caml :-)

Cordialement,
-- 
Jean-Christophe FILLIATRE
  mailto:Jean-Christophe.Filliatre@lri.fr
  http://www.lri.fr/~filliatr


Guy Yeterian writes:
 > Bonjour,
 > 
 > 	si je construis un programme qui prend comme paramètre une fonction
 > comment puis-je récupérer cette fonction et l'utiliser sans déclancher
 > une erreur de type. (sys__command_line est un vecteur de string et je ne
 > connais pas de fonction du type function_of_string en caml-light ?)
 > 
 > 	le programme en question est une dichotomie sur une fonction  style
 > 		dicho(f,a,b,e)
 > 
 > 	avec (evidemment) :
 > 	f de type float -> float
 > 	a de type float ...
 > 
 > si vous avez une idée ??
 > 
 > merci d'avance.
 > -------------------
 > To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  reply	other threads:[~2001-05-03 20:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-03 15:07 Guy Yeterian
2001-05-03 20:07 ` Jean-Christophe Filliatre [this message]
2001-05-03 22:49   ` Remi VANICAT
2001-05-07 10:07     ` Fabrice Le Fessant
2001-05-10 11:22       ` Dmitry Lomov

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=15089.47735.317609.314974@ext \
    --to=jean-christophe.filliatre@lri.fr \
    --cc=GYe@mail.dotcom.fr \
    --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).