caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pierre Weis <Pierre.Weis@inria.fr>
To: dsyme@microsoft.com (Don Syme)
Cc: caml-list@inria.fr
Subject: Re: Warnings in ocaml
Date: Mon, 22 Feb 1999 19:16:51 +0100 (MET)	[thread overview]
Message-ID: <199902221816.TAA25711@pauillac.inria.fr> (raw)
In-Reply-To: <39ADCF833E74D111A2D700805F1951EF0F00B9E4@RED-MSG-06> from "Don Syme" at Feb 22, 99 09:25:27 am

> Here's another problem: I wrote about 20,000 lines where I used the built in
> equality for
> a particular type (that represented terms in a theorem prover).  Now I want
> to implement
> my own equality function on the type, and never user built-in equality.  I
[...]
> Don
[...]
> email: dsyme@microsoft.com
> ------------------------------------------------------------------------

A quick hack that may helps could be to use the compiler to detect
those applications by redefining the (=) predicate with a type that is
not compatible with the type term. For instance, you may redefine (=)
for integers only (or strings only), and this way you may statically
find applications of generic equality to your term values since they
become ill-typed. Admittedly, this is not perfect, but can be of some
help in a very symbolic code as a theorem prover, where application of
= to values that are not of type term may be sparse.

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/





  reply	other threads:[~1999-02-22 18:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-22 17:25 Don Syme
1999-02-22 18:16 ` Pierre Weis [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-02-22 14:56 Andrew Kay
1999-02-22 13:45 Andrew Kay
1999-02-22  9:55 Frank A. Christoph
1999-02-22 12:36 ` Xavier Leroy
1999-02-22 13:24   ` Anton Moscal
1999-02-22 15:06   ` Michael Hicks
1999-02-22 18:33 ` Ching-Tsun Chou
1999-02-19 12:30 Jacques GARRIGUE
1999-02-19 18:32 ` Pierre Weis
1999-02-20 10:45   ` Markus Mottl

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=199902221816.TAA25711@pauillac.inria.fr \
    --to=pierre.weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=dsyme@microsoft.com \
    /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).