caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Michaël Grünewald" <michael.grunewald@laposte.net>
To: caml-list@inria.fr
Subject: Automatically install printer
Date: 14 Jun 2007 14:28:51 +0200	[thread overview]
Message-ID: <hjlkemg1oc.fsf@darboux.math.univ-montp2.fr> (raw)

Hi all,

the toplevel `ocaml' allows to install printers for custom types
with the `#install_printer' directive. Is this possible to do this
automatically?

Being more precise, if I define module `F' made of a type `t' and a
`to_string' function, can I arrange so that the toplevel uses function
`F.to_string' to print `F.t' values? I can use a wrapper script around
the `ocaml' command that will issue the directive before giving back the
hand, but this would break if `F' happens to be a functor: only the
functor instantiation knows what the correct directive is.
-- 
cheers,
Michaël


             reply	other threads:[~2007-06-15  9:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 12:28 Michaël Grünewald [this message]
2007-06-15 14:25 ` [Caml-list] " David Teller

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=hjlkemg1oc.fsf@darboux.math.univ-montp2.fr \
    --to=michael.grunewald@laposte.net \
    --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).