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 AAA22896; Thu, 4 Apr 2002 00:22:03 +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 AAA12619 for ; Thu, 4 Apr 2002 00:22:02 +0200 (MET DST) Received: from hotmail.com (f179.law8.hotmail.com [216.33.241.179]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g33MM0D27033 for ; Thu, 4 Apr 2002 00:22:01 +0200 (MET DST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 3 Apr 2002 14:21:59 -0800 Received: from 68.82.49.153 by lw8fd.law8.hotmail.msn.com with HTTP; Wed, 03 Apr 2002 22:21:59 GMT X-Originating-IP: [68.82.49.153] From: "Ryan Tarpine" To: caml-list@inria.fr Subject: [Caml-list] Type variables won't generalize Date: Wed, 03 Apr 2002 17:21:59 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 03 Apr 2002 22:21:59.0917 (UTC) FILETIME=[F901C9D0:01C1DB5D] Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I have an odd typing problem, odd because it occurs only when using ocamlc and not ocaml. I've cut my code down to the following small snippet: type 'a my_object = { partner : 'a my_object ref; data : 'a ref };; let rec object1 = { partner = ref object2; data = ref `PNone } and object2 = { partner = ref object2; data = ref `PNone };; That runs fine when passed to ocaml, but when I run it through ocamlc I get: File "foo.ml", line 6, characters 18-66: The type of this expression, _[> `PNone] my_object, contains type variables that cannot be generalized What's wrong with my code? Thanks in advance! Ryan Tarpine, rtarpine@hotmail.com "To err is human, to compute divine. Trust your computer but not its programmer." - Morris Kingston _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com ------------------- 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