caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: michel@lri.fr
To: caml-light@margaux (Caml Light Mailing list)
Subject: Defining own types printers.
Date: Wed, 21 Apr 1993 19:13:57 +0200 (MET DST)	[thread overview]
Message-ID: <9304211713.AA02411@sun7d.lri.fr> (raw)

Hi,

I have some user-defined types , and I'd like to have them printed the
ritgh way under caml-ligth when I just want to see the contents of a var ->

Ex:
---
#x1;;
- : t_bdd_tree = cNode {label="x1"; alors=cNode {label="x2"; alors=cNode {label="x3"; alors=cTerm false; sinon=cTerm false}; sinon=cNode {label="x3"; alors=cTerm
 false; sinon=cTerm true}}; sinon=cNode {label="x2"; alors=cNode {label="x3"; alors=cTerm false; sinon=cTerm true}; sinon=cNode {label="x3"; alors=cTerm false; s
inon=cTerm true}}}
#

I'd like to see ->

#print_bdd x1;;
(x1, (x2, (x3, 0, 0), (x3, 0, 1)), (x2, (x3, 0, 1), (x3, 0, 1)))- : unit = ()

I see at the page #231 of the Caml-light ref manual, that the chapter
will deal with Streams, parsers and printers but there's nothing
concerning user-defined printers (like in CAML).

My question is : Is it possible to attach printers to user defined
types ?

BTW, I wrote in english, since there might be some non-french readers
reading this question.

Thank you in advance.
-- 
  Olivier MICHEL                           Email : michel@lri.lri.fr 
  Laboratoire LRI - Universite PARIS_SUD         : michel@FRLRI61.BITNET
  Bat. 490- bureau 69                      Fax   : 33-1-64-46-19-92
  91405 ORSAY CEDEX                        Phone : 33-1-69-41-65-79
  FRANCE                                   

"if you're not programming functionally, then you must be programming
dysfunctionally"




             reply	other threads:[~1993-04-23 12:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-21 17:13 michel [this message]
1993-04-22  0:58 ` Xavier Leroy
     [not found] <9304220845.AA07570@margaux.inria.fr>
1993-04-22 18:58 ` Xavier Leroy

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=9304211713.AA02411@sun7d.lri.fr \
    --to=michel@lri.fr \
    --cc=caml-light@margaux \
    /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).