caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eric Stokes <gremlin@itkinetix.com>
To: sejourne_kevin <sejourne_kevin@yahoo.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] A feature wish on Toplevel directives.
Date: Tue, 8 Nov 2005 08:56:12 -0800	[thread overview]
Message-ID: <84F5D2B8-064B-4BE6-9954-443C72DE270B@itkinetix.com> (raw)
In-Reply-To: <4367987D.3030905@yahoo.fr>

Try this,

let eval s =
   let l = Lexing.from_string s in
   let ph = !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 = read_line()^".ml";;
> | printer
> | val p : string = "printer.ml"
> | # #use p;;
> | Wrong type of argument for directive `use'.
> | #
> `-------------------------------------------
>
> Because 'p' has the type 'string', it seemed to me natural that  
> '#use p' would be an equivalent to '#use "printer.ml"'. Naturally,  
> in this cases, I do not want to use DynLink because all the  
> definitions would be hidden.
>
>
> regards.
>
> 	
>
> 	
> 		
> ______________________________________________________________________ 
> _____ Appel audio GRATUIT partout dans le monde avec le nouveau  
> Yahoo! Messenger Téléchargez cette version sur http:// 
> 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


  reply	other threads:[~2005-11-08 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01 16:31 sejourne_kevin
2005-11-08 16:56 ` Eric Stokes [this message]
2005-11-08 18:41   ` [Caml-list] " sejourne_kevin

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=84F5D2B8-064B-4BE6-9954-443C72DE270B@itkinetix.com \
    --to=gremlin@itkinetix.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=sejourne_kevin@yahoo.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).