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 WAA14291; Fri, 6 Jun 2003 22:24:33 +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 WAA14067 for ; Fri, 6 Jun 2003 22:24:32 +0200 (MET DST) Received: from carme.kasserver.com (h-62.141.48.121.keyweb.de [62.141.48.121] (may be forged)) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h56KOVT03204 for ; Fri, 6 Jun 2003 22:24:31 +0200 (MET DST) Received: from kunz.ratzer (dclient217-162-174-4.hispeed.ch [217.162.174.4]) by carme.kasserver.com (8.11.6/8.11.6) with ESMTP id h56KOVC21311 for ; Fri, 6 Jun 2003 22:24:31 +0200 Received: from stefan by kunz.ratzer with local (Exim 3.35 #1 (Debian)) id 19ONlN-0003Tz-00 for ; Fri, 06 Jun 2003 22:24:37 +0200 Date: Fri, 6 Jun 2003 22:24:37 +0200 From: Stefan Heimann To: Ocaml Mailing List Subject: Re: Re: [Caml-list] Automatic generation of mli files Message-ID: <20030606202437.GA12982@kunz.ratzer> Mail-Followup-To: Ocaml Mailing List References: <4.3.2.7.2.20030606112653.039b1838@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-Spam: no; 0.00; caml-list:01 mli:01 hecker:01 foo:01 inference:01 val:01 chris:01 06,:02 wrote:03 types:03 let:04 functions:05 cvs:05 brian:06 fri:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, Jun 06, 2003 at 02:16:59PM -0500, Brian Hurt wrote: > On Fri, 6 Jun 2003, Chris Hecker wrote: > [...] > > Here's one problem I've hit several times. In the .ml file, I do > something like: > > type t = foo * bar * bang > > Then several functions that use type t. The type inference will come up > with types like: > val add: foo * bar * bang -> foo -> bar -> bang -> foo * bar * bang > when what I wanted was: > vall add: t -> foo -> bar -> bang -> t > > How do you deal with this? You could make an annotation in the comment of the method: (** val add: t -> foo -> bar -> bang -> t *) let add a x y z = a Bye, Stefan -- Stefan Heimann http://www.stefanheimann.net :: personal website. http://cvsshell.sf.net :: CvsShell, a console based cvs client. ------------------- 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