From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 955F2BB9A for ; Tue, 8 Nov 2005 17:56:37 +0100 (CET) Received: from plover.csun.edu (plover.csun.edu [130.166.1.24]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jA8Gua9g031605 for ; Tue, 8 Nov 2005 17:56:37 +0100 Received: from puffin.csun.edu (puffin.csun.edu [130.166.1.21]) by plover.csun.edu (MOS 3.7.1-GA) with ESMTP id CKR06231; Tue, 8 Nov 2005 08:56:17 -0800 (PST) Received: from [130.166.171.220] ([130.166.243.33]) by puffin.csun.edu (MOS 3.5.4-GR) with ESMTP id EHT06303 (AUTH eric); Tue, 8 Nov 2005 08:56:07 -0800 (PST) In-Reply-To: <4367987D.3030905@yahoo.fr> References: <4367987D.3030905@yahoo.fr> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <84F5D2B8-064B-4BE6-9954-443C72DE270B@itkinetix.com> Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: quoted-printable From: Eric Stokes Subject: Re: [Caml-list] A feature wish on Toplevel directives. Date: Tue, 8 Nov 2005 08:56:12 -0800 To: sejourne_kevin X-Mailer: Apple Mail (2.746.2) X-Miltered: at concorde with ID 4370D8C4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 toplevel:01 lexing:01 toploop:01 toplevel:01 toploop:01 sprintf:01 val:01 dynlink:01 caml-list:01 beginner's:01 ocaml:01 beginners:01 bug:01 2005,:98 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Try this, let eval s =3D let l =3D Lexing.from_string s in let ph =3D !Toploop.parse_toplevel_phrase l in assert(Toploop.execute_phrase false Format.err_formatter ph) ;; eval (sprintf "#use \"%s\";;" p);; On Nov 1, 2005, at 8:31 AM, sejourne_kevin wrote: > Hello, > > > Here an example of what is a problem to me: > .------------------------------------------- > | Objective Caml version 3.08.3 > | > | # let p =3D read_line()^".ml";; > | printer > | val p : string =3D "printer.ml" > | # #use p;; > | Wrong type of argument for directive `use'. > | # > `------------------------------------------- > > Because 'p' has the type 'string', it seemed to me natural that =20 > '#use p' would be an equivalent to '#use "printer.ml"'. Naturally, =20 > in this cases, I do not want to use DynLink because all the =20 > definitions would be hidden. > > > regards. > > =09 > > =09 > =09 > ______________________________________________________________________=20= > _____ Appel audio GRATUIT partout dans le monde avec le nouveau =20 > Yahoo! Messenger T=E9l=E9chargez cette version sur http://=20 > fr.messenger.yahoo.com > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs