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 XAA10933; Sun, 21 Sep 2003 23:03:07 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA09675 for ; Sun, 21 Sep 2003 23:03:06 +0200 (MET DST) Received: from mwinf0401.wanadoo.fr (smtp5.wanadoo.fr [193.252.22.27]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8LL36513976 for ; Sun, 21 Sep 2003 23:03:06 +0200 (MET DST) Received: from debian (ca-bordeaux-18-125.w80-8.abo.wanadoo.fr [80.8.90.125]) by mwinf0401.wanadoo.fr (SMTP Server) with ESMTP id EB3385800120 for ; Sun, 21 Sep 2003 23:03:05 +0200 (CEST) Received: from moi by debian with local (Exim 3.36 #1 (Debian)) id 1A1B3H-00062V-00 for ; Sun, 21 Sep 2003 22:43:27 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] inference engine References: <1063741611.14799.3.camel@pelican> <1064162741.12854.73.camel@pelican> From: Remi Vanicat Mail-Copy-To: never Date: Sun, 21 Sep 2003 22:43:27 +0200 In-Reply-To: <1064162741.12854.73.camel@pelican> (skaller@ozemail.com.au's message of "22 Sep 2003 02:45:42 +1000") Message-ID: <87he35g9e8.dlv@wanadoo.fr> User-Agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 inference:01 ozemail:01 inference:01 mli:01 val:01 mli:01 doable:01 ocaml:01 int:01 int:01 labri:01 u-bordeaux:01 writes:01 remi:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk skaller writes: [...] > [Where that's the line number of the place the inference > was made] > > I can understand that inferences are incremental, and there > would be a lot of pain tracking *all* the places the data came > from to make a type inference: I'm not suggesting that. One could use the new ocaml option -dtype and .annot file, and the emacs mode that come with. I've never try it yet, but it give type information inside a source, even if the source does not compile. > Instead, I tried to suggest that somehow the constraint > be included as early as possible. Clearly here that is NOT > the case, or the error would have been detected where > it actually occured. there is a problem : one can have a .ml containing : let f x = x + 1 let f x y = string_of_int (f x) ^ y and the .mli : val f : int -> string -> string then applying the constraint of the .mli to the .ml became difficult (at least). but of course it could be doable. In such a case I put the constraint into the .ml, helping me to narrow the error. [...] -- Rémi Vanicat remi.vanicat@laposte.net ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners