caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Miles Egan <miles@caddr.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] lisp -> ocaml
Date: Tue, 22 May 2001 10:12:48 -0700	[thread overview]
Message-ID: <20010522101248.A97732@caddr.com> (raw)
In-Reply-To: <877kz9kznu.dlv@wanadoo.fr>; from vanicat@labri.u-bordeaux.fr on Tue, May 22, 2001 at 08:27:01PM +0200

On Tue, May 22, 2001 at 08:27:01PM +0200, Remi VANICAT wrote:
> the 
> let rec ... = ..
> and ... = ...
> and ... = ...
> 
> make the trick

Great.  This is easy enough.  Thanks (and thanks to Markus).

> no you haven't, the function compare is a very good ordering for
> variant:
> 
> # compare `Aze `Azr ;;
> - : int = -1
> # compare (Some 0) None;;
> - : int = 1
> # type response = Yes | No;;
> type response = Yes | No
> # compare Yes No;;
> - : int = -1

I wasn't aware of this function, but it's exactly what I need.  Thanks again.

> yes this a problem. but often there is better way to print thing than
> just the name of the variant.
> 
> You can also use camlp4 to make a construct who build the variant and
> the printer at the same time.

I haven't had a chance to familiarize myself with camlp4 yet.  I guess I should.

-- 
miles
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  reply	other threads:[~2001-05-22 17:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-22 16:33 Miles Egan
2001-05-22 16:52 ` Markus Mottl
2001-05-22 17:09 ` Brian Rogoff
2001-05-22 18:27 ` Remi VANICAT
2001-05-22 17:12   ` Miles Egan [this message]
2001-05-22 18:26     ` Chris Hecker
2001-05-27 13:01 ` Xavier Leroy
2001-05-27 14:43   ` Miles Egan
2001-05-27 21:24   ` Dave Mason
2001-05-28 17:10     ` William Chesters
2001-05-28  0:06   ` Chris Hecker
2001-05-28 13:32     ` Xavier Leroy
2001-05-28 19:02       ` Chris Hecker

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=20010522101248.A97732@caddr.com \
    --to=miles@caddr.com \
    --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).