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 RAA16370 for caml-red; Tue, 24 Oct 2000 17:49:13 +0200 (MET DST) 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 JAA23769 for ; Tue, 24 Oct 2000 09:05:34 +0200 (MET DST) Received: from ext.lri.fr (ext.lri.fr [129.175.15.4]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id e9O75Yv19533 for ; Tue, 24 Oct 2000 09:05:34 +0200 (MET DST) Received: from pc87.lri.fr (IDENT:root@pc87 [129.175.8.106]) by ext.lri.fr (8.9.3/jtpda-5.3.2) with ESMTP id JAA03715 ; Tue, 24 Oct 2000 09:05:30 +0200 (MET DST) Received: from lri.fr (IDENT:jcourant@localhost.localdomain [127.0.0.1]) by pc87.lri.fr (8.9.3/jtpda-5.3.2) with ESMTP id JAA27535 ; Tue, 24 Oct 2000 09:05:30 +0200 Message-ID: <39F534BA.BF2C905E@lri.fr> Date: Tue, 24 Oct 2000 09:05:30 +0200 From: Judicael Courant X-Mailer: Mozilla 4.72 [fr] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: Claudio Sacerdoti Coen CC: caml-list@inria.fr Subject: Re: Strange type error References: <20001023173554.A30886@students.cs.unibo.it> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: weis@pauillac.inria.fr Claudio Sacerdoti Coen a écrit : > > Hello, > > let a.mli be > > type 'a section_path = { x : int; } > and mind_section_path = [ `MIND] section_path > type const_section_path = [ `CONST] section_path [...] > for a.mli I get > > File "prova.mli", line 3, characters 26-35: > This type [ `CONST] should be an instance of type [ `MIND] > > that seems nonsense to me. Someone could explain the error? > I had a similar problem some time ago. This strange behavior of O'Caml 3.00 was corrected in the CVS version: ------------------------------------------------------ Objective Caml version 3.00 # type 'a section_path = { x : int; } and mind_section_path = [ `MIND] section_path ;; type [ `MIND] section_path = { x : int; } constraint [ `MIND] = [ `MIND] type mind_section_path = [ `MIND] section_path # ------------------------------------------------------ Objective Caml version 3.00+8 (2000-06-30) # type 'a section_path = { x : int; } and mind_section_path = [ `MIND] section_path ;; type 'a section_path = { x : int; } type mind_section_path = [ `MIND] section_path # ------------------------------------------------------ Judicaël. -- Judicael.Courant@lri.fr, http://www.lri.fr/~jcourant/ (+33) (0)1 69 15 64 85 "Montre moi des morceaux de ton monde, et je te montrerai le mien" Tim, matricule #929, condamné à mort. http://rozenn.picard.free.fr/tim.html