caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* A feature wish on Toplevel directives.
@ 2005-11-01 16:31 sejourne_kevin
  2005-11-08 16:56 ` [Caml-list] " Eric Stokes
  0 siblings, 1 reply; 3+ messages in thread
From: sejourne_kevin @ 2005-11-01 16:31 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] A feature wish on Toplevel directives.
  2005-11-01 16:31 A feature wish on Toplevel directives sejourne_kevin
@ 2005-11-08 16:56 ` Eric Stokes
  2005-11-08 18:41   ` sejourne_kevin
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Stokes @ 2005-11-08 16:56 UTC (permalink / raw)
  To: sejourne_kevin; +Cc: caml-list

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] A feature wish on Toplevel directives.
  2005-11-08 16:56 ` [Caml-list] " Eric Stokes
@ 2005-11-08 18:41   ` sejourne_kevin
  0 siblings, 0 replies; 3+ messages in thread
From: sejourne_kevin @ 2005-11-08 18:41 UTC (permalink / raw)
  Cc: caml-list

Eric Stokes a écrit :
> 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);;
> 
Thanks very mush !


Kévin.

	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-08 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-01 16:31 A feature wish on Toplevel directives sejourne_kevin
2005-11-08 16:56 ` [Caml-list] " Eric Stokes
2005-11-08 18:41   ` sejourne_kevin

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).