English version
Accueil     Ŕ propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis ŕ jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml ŕ l'adresse ocaml.org.

Browse thread
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: 2004-11-05 (15:51)
From: pad@r...
Subject: Re: [Caml-list] Print values like the toplevel's printer
Wolfgang Müller <Wolfgang.Mueller2@uni-bayreuth.de> writes:

> > I recently post a message to allow this (with generic print in the subject
> > of the message).
> Thanks a lot, but isn't there something more simple without forking processes?

well it is quite simple to fork a process :) and it is maximum reuse :)

why don't you like this solution ? is it because it is slow ? ugly ?
there is some way to improve easily my solution by not forking each time for each
call to generic_print  by using a pipe with the toplevel
(I plan to do a tracer for ocaml better than the #trace using this technique)

> Is there no way to reuse the code that is already in the toplevel?
> Cheers,
> Wolfgang