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 JAA23484; Wed, 10 Sep 2003 09:10:37 +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 JAA32568 for ; Wed, 10 Sep 2003 09:10:36 +0200 (MET DST) Received: from mail1.telekom.de (mail1.telekom.de [62.225.183.202]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8A7AaT16519 for ; Wed, 10 Sep 2003 09:10:36 +0200 (MET DST) Received: from g9jbr.mgb01.telekom.de by G8SBV.dmz.telekom.de with ESMTP for caml-list@inria.fr; Wed, 10 Sep 2003 09:10:13 +0200 Received: by G9JBR.mgb01.telekom.de with Internet Mail Service (5.5.2653.19) id ; Wed, 10 Sep 2003 09:10:12 +0200 Message-Id: From: "Beck01, Wolfgang" To: caml-list@inria.fr Subject: RE: [Caml-list] strange behaviour with variants and "cannot be g eneralized" Date: Wed, 10 Sep 2003 09:10:06 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Loop: caml-list@inria.fr X-Spam: no; 0.00; t-systems:01 caml-list:01 didier:01 morgon:01 3.06:01 orthogonal:01 implemented:01 3.07:01 omitted:01 backquote:01 3.06.:01 uglier:01 compiles:01 ocaml:01 caml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Didier Remy [mailto:remy@morgon.inria.fr] wrote: > Here is some explanation of > > 1) what happened in version 3.06 and > 2) how this is related to a relaxed form of value restriction, > 3) which is actually orthogonal to the solution implemented in 3.07 > > [detailed explanation omitted] well, I was not aware that compilation of polymorphic variants is an area of ongoing research. In the OCaml manual, they are not mentioned under "Language extensions" but as a section in the chapter "An introduction to Objective Caml". There is a statement "In programs, polymorphic variants work like usual ones. You just have to prefix their names with a backquote character `." and this is not true, at least in 3.06. After spending another evening with weird type errors, I replaced polymorphic variants with ordinary ones. My project looks uglier now since I had to split up some files, but at least it compiles and runs. -- Wolfgang Beck ------------------- 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