From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id QAA23189 for caml-redistribution; Fri, 16 Feb 1996 16:25:36 +0100 Received: (from xleroy@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id OAA17569; Fri, 16 Feb 1996 14:57:20 +0100 From: Xavier Leroy Message-Id: <199602161357.OAA17569@pauillac.inria.fr> Subject: Re: may be an other bug To: delapla@lami.univ-evry.fr (Franck Delaplace) Date: Fri, 16 Feb 1996 14:57:20 +0100 (MET) Cc: caml-list@pauillac.inria.fr In-Reply-To: <199602151419.PAA10563@berlioz.lami.univ-evry.fr> from "Franck Delaplace" at Feb 15, 96 03:19:25 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > I built a script shell to add signature to .mli > as follow > > When I use it for global variabale as hash table > the signature is > > let L = hashtbl__new 30 ;; > > L : hashtbl__t _a > > instead of the real instantion of L > The -i option to camlc prints the inferred types immediately after it has been inferred. If the type is not generic, it may get instantiated during the typing of the remainder of the file. E.g. : let L = hashtbl__new 30 ;; inferred type L: ('_a, '_b) hashtbl__t with '_a and '_b not generic hashtbl__add L 123 "hello" ;; '_a becomes int '_b becomes string L has type (int, string) hashtbl__t The alternative, which is used in Caml Special Light, is to print the types only at the end of the typing phase. Then, the types printed are correct. But another user complained that if a type error occurs, no types are printed... - Xavier Leroy