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 OAA24036; Fri, 12 Jul 2002 14:16:49 +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 OAA24031 for ; Fri, 12 Jul 2002 14:16:48 +0200 (MET DST) Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.25.148.40]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6CCGkf24259 for ; Fri, 12 Jul 2002 14:16:47 +0200 (MET DST) Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id g6CCGhSs020424 for ; Fri, 12 Jul 2002 22:16:43 +1000 (EST) Received: from ozemail.com.au (ppp115.dyn1.pacific.net.au [61.8.1.115]) by wisma.pacific.net.au with ESMTP id WAA27404 for ; Fri, 12 Jul 2002 22:16:42 +1000 (EST) Message-ID: <3D2EC8A8.5010109@ozemail.com.au> Date: Fri, 12 Jul 2002 22:16:40 +1000 From: John Max Skaller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901 X-Accept-Language: en-us MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Caml-list] Is this a bug? References: <200207081952.PAA28813@hickory.cc.columbia.edu> <3D2C5538.2090901@ozemail.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk There is a bug here: is it in: Objective Caml version 3.04+11 (2002-05-16) or is it in my code: in one module: | `TYP_none -> print_endline ("NONE DETECTED"); 0,"Unknown" in another module: | `DCL_val t -> print_endline ("val " ^ id^ "[old] : " ^ string_of_typecode t); let t' = match t with | `TYP_none -> `TYP_var n | _ -> t in print_endline ("val " ^ id^"[new] : " ^ string_of_typecode t'); output (2 test cases): val printv[old] : Unknown NONE DETECTED val printv[new] : Unknown NONE DETECTED val x[old] : Unknown NONE DETECTED val x[new] : Unknown The code also fails if I replace the match t with |`TYP_none with and if/then/else construction. It looks like the constructor `TYP_none isn't equal to itself :-) -- John Max Skaller, mailto:skaller@ozemail.com.au snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850 ------------------- 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