From: Martin Mueller <mmueller@dfki.uni-sb.de>
To: caml-list@margaux.inria.fr
Subject: equality between functions
Date: Mon, 15 Aug 1994 12:04:18 +0200 [thread overview]
Message-ID: <199408151004.MAA02163@godard.dfki.uni-sb.de> (raw)
I am just wondering, why CAML light decided to allow for
#let g x = x in g=g;;
to succeed with
-: bool = true
but fail on (eg)
#(function x -> x) = (function x -> x);;
Uncaught exception: Invalid_argument "equal: functional value"
I understand that there are reasons to avoid
equality between functions, but then should not equality and
inequality be handled symmetrically?
For instance, SML/NJ does so and fails on
- let fun g x= x in g=g end;
std_in:0.0-0.0 Error: operator and operand don't agree (equality type required)
operator domain: ''Z * ''Z
operand: ('Y -> 'Y) * ('X -> 'X)
in expression:
= (g,g)
Could someone shed some light onto that issue? I would also
be interested in pointers to the literature on that topic.
Is there a basic reference on equality types?
-- Martin M"uller
---
Martin M"uller, DFKI, Stuhlsatzenhausweg 3, D-66123 Saarbruecken, Germany
Tel: +49 681 302-5329; Fax: +49 681 302-5341; Net: mmueller@dfki.uni-sb.de
next reply other threads:[~1994-08-25 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-08-15 10:04 Martin Mueller [this message]
1994-08-26 11:49 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=199408151004.MAA02163@godard.dfki.uni-sb.de \
--to=mmueller@dfki.uni-sb.de \
--cc=caml-list@margaux.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