From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA12583 for caml-redistribution; Wed, 11 Dec 1996 11:14:27 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA24183 for ; Tue, 10 Dec 1996 15:08:13 +0100 (MET) Received: from maury.inria.fr (maury.inria.fr [192.93.2.7]) by concorde.inria.fr (8.7.6/8.7.1) with ESMTP id PAA06567 for ; Tue, 10 Dec 1996 15:08:11 +0100 (MET) Received: from Carnot-labo.dijon.fr (remote14.ac-dijon.fr [194.167.18.141]) by maury.inria.fr (8.7.6/8.7.1) with SMTP id PAA02056 for ; Tue, 10 Dec 1996 15:08:10 +0100 (MET) Received: from Carnot-labo (localhost [127.0.0.1]) by Carnot-labo.dijon.fr (8.6.12/8.6.9) with SMTP id PAA00277 for ; Tue, 10 Dec 1996 15:08:01 GMT Message-ID: <32AD7CCF.3E539FD3@l-carnot1.ac-dijon.fr> Date: Tue, 10 Dec 1996 15:07:59 +0000 From: Quercia Organization: Lycee Carnot X-Mailer: Mozilla 3.0 (X11; I; Linux 2.0.0 i586) MIME-Version: 1.0 To: caml-list Subject: building a toplevel Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis --------------------------- 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