caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* building a toplevel
@ 1996-12-10 15:07 Quercia
  0 siblings, 0 replies; only message in thread
From: Quercia @ 1996-12-10 15:07 UTC (permalink / raw)
  To: caml-list

--------------------------- En francais

Bonjour,

Est-il possible d'installer un "pretty-printer" dans un "toplevel" ?

Mon probleme est le suivant :
J'ai defini une bibliotheque d'utilitaires sur les arbres comprenant
entre autres une fonction d'impression semi-graphique. Je peux inclure
cette bibliotheque dans un "toplevel" avec "camlmktop", mais je ne vois
pas comment activer la fonction d'impression autrement qu'en entrant la
commande :

"install_printer xxx"

manuellement a l'utilisation.
Ma solution provisoire est de regrouper les commandes d'initialisation
de ce genre dans un fichier "init.ml" et de demander aux etudiants
d'inclure ce fichier "init.ml" dans leur code.
Comme ils doivent aussi passer en option a "camllight" le nom du
"toplevel" a utiliser, cela fait *deux* manipulations pour avoir acces a
ma bibliotheque.
*deux* c'est supportable, mais y a-t-il un moyen d'obtenir le meme effet
en une seule operation.

------------------------------- English
Hi,

Is it possible to install a pretty-printer in a toplevel ?

Here is my problem :
I wrote a library about trees with, among other things, a function which
draws trees on the terminal. I can include that library in a toplevel
with camlmktop, but I can't figure how to install my tree-printer
*within* the toplevel. I can install it manually with the phrase :

"install_printer xxx"

but I may have to enter a lot of such phrases with a more complex
library. Of course, I can put all theese phrases in a "init.ml" source
file and tell the students to fire camllight with the name of the
library on the command line and then to include "init.ml" in their code.
That works but it requires *two* special manipulations from the
students.
Is there a way to get the same result without needing an init file ?

-- 
Michel Quercia
Lycee Carnot  16 bd Thiers  21000 Dijon
e-mail = querciam@l-carnot1.ac-dijon.fr





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-12-11 10:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-10 15:07 building a toplevel Quercia

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