From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA16696; Tue, 25 Sep 2001 00:51:59 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 AAA16692 for ; Tue, 25 Sep 2001 00:51:59 +0200 (MET DST) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f8OMpvX06369 for ; Tue, 25 Sep 2001 00:51:58 +0200 (MET DST) Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by david.siemens.de (8.11.6/8.11.6) with ESMTP id f8OMpvS04690 for ; Tue, 25 Sep 2001 00:51:57 +0200 (MET DST) Received: from mars.cert.siemens.de (ust.mchp.siemens.de [139.23.201.17]) by mail2.siemens.de (8.11.6/8.11.6) with ESMTP id f8OMpu316830 for ; Tue, 25 Sep 2001 00:51:56 +0200 (MET DST) Received: from basecamp.cert (basecamp.mchp.siemens.de [139.23.202.131]) by mars.cert.siemens.de (8.12.0/8.12.0/Siemens CERT [ $Revision: 1.17 ]) with ESMTP id f8OMpun9008574 for ; Tue, 25 Sep 2001 00:51:56 +0200 (CEST) Received: by basecamp.mchp.siemens.de with Internet Mail Service (5.5.2653.19) id ; Tue, 25 Sep 2001 00:51:56 +0200 Message-ID: <4F8477CFC03A71499AD8DDA428F5E114037726@basecamp.mchp.siemens.de> From: Christian.Schaller@cert.siemens.de To: caml-list@inria.fr Subject: RE: [Caml-list] Haskell features in O'Caml Date: Tue, 25 Sep 2001 00:51:55 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk vanicat@labri.u-bordeaux.fr wrote: > > Since implementation is not automatically checked against > the interface > > (or did I get something wrong?), > > yes, you do: > > test.ml : > > let f x = x > > test.mli : > > val f : int -> float > > $ ocamlc -c test.ml > I/O error: test.cmi: No such file or directory > $ ocamlc -c test.mli > $ ocamlc -c test.ml > The implementation test.ml does not match the interface test.cmi: > Values do not match: val f : 'a -> 'a is not included in val > f : int -> float oops, yes you're right. I was trying it that way: * create test.ml * compile it => test.cm[io] file * now create test.mli * compile test.ml again and no error message will be issued, since test.cmi is existing, though has totally different signature. This problem does also occur whenever the interface is changing! There seems to be no check if interface source is newer than the compiled one (I'm using OCaml 3.02 @ cygwin without tk; Win2k, English, SP2). It gets also interesting, when you are using -i to see the signature of your definitions. A correct test.mli will yield "val f : int -> int", however compiling the definition will yield "val f : 'a -> 'a". bye Chris... ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr