caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Quercia <querciam@l-carnot1.ac-dijon.fr>
To: caml-list <caml-list@inria.fr>
Subject: building a toplevel
Date: Tue, 10 Dec 1996 15:07:59 +0000	[thread overview]
Message-ID: <32AD7CCF.3E539FD3@l-carnot1.ac-dijon.fr> (raw)

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





                 reply	other threads:[~1996-12-11 10:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32AD7CCF.3E539FD3@l-carnot1.ac-dijon.fr \
    --to=querciam@l-carnot1.ac-dijon.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).