caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: rossberg@ps.uni-sb.de
To: "skaller" <skaller@users.sourceforge.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Improper generic equality in Caml (Rossberg's SML   vs Caml)
Date: Sun, 17 Sep 2006 14:43:44 +0200 (CEST)	[thread overview]
Message-ID: <1932.72.254.55.251.1158497024.squirrel@www.ps.uni-sb.de> (raw)
In-Reply-To: <1158486341.5405.11.camel@rosella.wigram>

skaller wrote:
> On Sun, 2006-09-17 at 07:08 +0200, rossberg@ps.uni-sb.de wrote:
>
>> This problem can sometimes make translation from SML (which has Leibniz
>> equality)
>
> It does? I'm curious how it handles
>
> (a) functions
> (b) abstract types

By statically ruling out the use of generic equality on them. That's the
purpose of eqtypes in SML.

For the latter, the implementor of the abstract type can choose to allow
generic equality if the abstract equality coincides with representational
equality.

Of course, this solution comes with its own set of problems...

Btw, SML'97 even goes as far as disallowing the use of generic equality on
floats, because IEEE equality does not meet the requirements. You have to
use a special operator Real.== to compare them.

- Andreas



  reply	other threads:[~2006-09-17 12:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-09  3:11 Comparing two things of any two types, in pure OCaml oleg
2006-09-09  7:13 ` [Caml-list] " Jacques Garrigue
2006-09-13  9:14   ` [Caml-list] Comparing two things of any two types, in pure oleg
2006-09-16 18:53     ` Improper generic equality in Caml (Rossberg's SML vs Caml) Diego Olivier Fernandez Pons
2006-09-16 20:58       ` [Caml-list] " Jacques Garrigue
2006-09-17  5:08       ` rossberg
2006-09-17  9:45         ` skaller
2006-09-17 12:43           ` rossberg [this message]
2006-09-14  4:36   ` [Caml-list] Comparing two things of any two types, in pure OCaml brogoff

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=1932.72.254.55.251.1158497024.squirrel@www.ps.uni-sb.de \
    --to=rossberg@ps.uni-sb.de \
    --cc=caml-list@inria.fr \
    --cc=skaller@users.sourceforge.net \
    /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).