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 WAA02894; Tue, 22 Oct 2002 22:00:09 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA05378 for caml-list@pauillac.inria.fr; Tue, 22 Oct 2002 22:00:08 +0200 (MET DST) 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 RAA25574 for ; Tue, 22 Oct 2002 17:52:06 +0200 (MET DST) Received: from julie.univ-savoie.fr (univax.univ-savoie.fr [193.48.120.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9MFq5520019 for ; Tue, 22 Oct 2002 17:52:05 +0200 (MET DST) Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by julie.univ-savoie.fr (8.9.3/jtpda-5.3.3) with ESMTP id RAA64527 for ; Tue, 22 Oct 2002 17:52:04 +0200 (CEST) Received: from univ-savoie.fr (d85.lama.univ-savoie.fr [193.48.123.85]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id g9MFpxQd020262 for ; Tue, 22 Oct 2002 17:51:59 +0200 Message-ID: <3DB574DA.5080908@univ-savoie.fr> Date: Tue, 22 Oct 2002 17:55:06 +0200 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 CC: "caml-list@inria.fr" Subject: [Caml-list] Question about polymorphic variant References: <200210221507.g9MF7b517633@concorde.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk After reading the manual, I am a bit confused ... I should say this part of the manual could be clearer ? In the following code, f and g typecheck but not h. Why ? let f = function `a -> 0 | `b -> 1 let g = function `c -> 2 | (`a | `b as x) -> f x let h = function `c -> 2 | x -> f x ------------------- 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