caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pierre Weis <weis@pauillac.inria.fr>
To: caml-list@pauillac.inria.fr
Subject: Polymorphic comparison
Date: Tue, 18 Oct 1994 10:43:07 +0100 (MET)	[thread overview]
Message-ID: <9410180943.AA28448@pauillac.inria.fr> (raw)

To: caml-list@pauillac.inria.fr
Cc: John.Harrison@cl.cam.ac.uk
Subject: Polymorphic <<
Date: Mon, 17 Oct 94 16:10:57 +0100


Caml has a polymorphic equality with type scheme 'a -> 'a -> bool. It
tests structural equality between values of the same type
(isomorphism), and fails when applied to functions.

On the other hand comparisons are monomorphic: we have comparisons for
integers (prefix <=), strings (le_string), floatting point numbers
(le_float) but no polymorphic comparisons.
In the next 0.7 version of Caml Light, we plan to extend comparisons to a
polymorphic function (i.e. prefix < : 'a -> 'a -> bool, instead of the
now available prefix < : int -> int -> bool).

To extend comparisons to unrelated pairs of values, that is defining
prefix <  with type scheme 'a -> 'b -> bool seems a bit strange to me.
What do you plan to do with such a general type scheme for comparisons ?

Pierre




             reply	other threads:[~1994-10-18  9:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-18  9:43 Pierre Weis [this message]
  -- strict thread matches above, loose matches on Subject: below --
1994-10-18 12:46 Franck.Delaplace
1994-10-18 10:40 Judicael Courant
1994-10-18 12:54 ` John Harrison
1994-10-19  8:47   ` Xavier Leroy
1994-10-18  9:32 Pierre Weis

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=9410180943.AA28448@pauillac.inria.fr \
    --to=weis@pauillac.inria.fr \
    --cc=caml-list@pauillac.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).