From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA06609 for caml-redistribution; Tue, 16 Feb 1999 08:22:54 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA02962 for ; Tue, 16 Feb 1999 08:16:37 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id IAA16365; Tue, 16 Feb 1999 08:16:34 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA20081; Tue, 16 Feb 1999 08:16:34 +0100 (MET) From: Pierre Weis Message-Id: <199902160716.IAA20081@pauillac.inria.fr> Subject: Re: Non generalizable type of constants? To: ohl@hep.tu-darmstadt.de Date: Tue, 16 Feb 1999 08:16:34 +0100 (MET) Cc: caml-list@inria.fr In-Reply-To: <14024.25027.421367.684137@heplix4.ikp.physik.tu-darmstadt.de> from "Thorsten Ohl" at Feb 15, 99 07:04:51 pm X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > > I'm not aware of any solution to your problem, except turning your > > unit_bad identifier into a function let unit_bad () = A.atom (M.unit). > > Syntactically, It's not pretty, but I can live with it. I shied away > from this because I was not sure about the result of > > module F = FreeRing ( some ring ...) > compare (F.unit_bad ()) (F.unit_bad ()) > > in this case. Does O'Caml guarantee that the expression will always > evaluate to 0? [ Currently it appears to, but can I depend on it? ] Yes, since constant constructors are uniquely represented. Best regards, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/