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 VAA28392; Wed, 14 Apr 2004 21:06:10 +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 VAA27851 for ; Wed, 14 Apr 2004 21:06:09 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from natsiq (adsl-69-212-103-45.dsl.chmpil.ameritech.net [69.212.103.45]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3EJ7Ajq009429 for ; Wed, 14 Apr 2004 21:07:10 +0200 Received: from sfogarty by natsiq with local (Exim 3.36 #1 (Debian)) id 1BDphU-000765-00 for ; Wed, 14 Apr 2004 14:05:32 -0500 Date: Wed, 14 Apr 2004 14:05:32 -0500 To: caml-list@inria.fr Subject: [Caml-list] '_a out of nowhere? (list.reverse) Message-ID: <20040414190532.GQ10439@students.uiuc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i From: "Seth J. Fogarty" X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; val:01 val:01 char:01 sex:99 orlando:99 ocaml:01 int:01 int:01 behavior:03 cons:03 cons:03 let:04 let:04 debian's:04 type:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 349 # let cons x y = x::y # and flip f x y = f y x ;; val cons : 'a -> 'a list -> 'a list = val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c = # let reverse = List.fold_left (flip cons) [];; val reverse : '_a list -> '_a list = # reverse [1;2;3];; - : int list = [3; 2; 1] # reverse ['a';'b';'c'];; This expression has type char but is here used with type int I've encountered similar things with references, but never with something as basic as a fold_left. Can someone tell me why this is happening? This, to me, is very wrong behavior. This is on Debian's OCaml 3.07. -- Arav bipsum Aim: Sorrath ICQ: 47462500 The same person. No difference at all. Just a different sex. -Orlando (Orlando, 1992) ------------------- 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