Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Print values like the toplevel's printer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Clément_Capel <clement.capel@f...>
Subject: Re: [Caml-list] Print values like the toplevel's printer
Hello,

you should take a look at the function "execute_phrase" 
(toplevel/toploop.ml)
which evaluate and print a term.
Two interesting functions are called:
- outval_of_value
- Printtyp.tree_of_type_scheme
and
!print_out_phrase

I think the parameter "v" is the value...


Clément Capel


Le 5 nov. 04, à 13:23, Wolfgang Müller a écrit :

> Hi,
>
> I would like to print values to a file in a human-readable manner 
> without
> having to compose the output writers of print_int and friends. In 
> short, I
> would like to use the toplevel's function for screen output of 
> structured
> values.
>
> Is there a simple way, a FM or a mailing list you can point me to?
>
> I googled quite a bit, but apparently not with the right terms.
>
> Cheers,
> Wolfgang
> -- 
> Dr. Wolfgang Müller
> LS AI 1
> Universität Bayreuth
>
> _______________________________________________
> 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