From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA22248 for caml-redistribution; Thu, 26 Nov 1998 16:38:43 +0100 (MET) 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 QAA05036 for ; Thu, 26 Nov 1998 16:33:35 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id QAA29530; Thu, 26 Nov 1998 16:33:32 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA09182; Thu, 26 Nov 1998 16:33:18 +0100 (MET) From: Pierre Weis Message-Id: <199811261533.QAA09182@pauillac.inria.fr> Subject: Re: arrays and type variables... To: dsyme@microsoft.com (Don Syme) Date: Thu, 26 Nov 1998 16:33:18 +0100 (MET) Cc: caml-list@inria.fr In-Reply-To: <39ADCF833E74D111A2D700805F1951EF0B2EF63B@RED-MSG-06> from "Don Syme" at Nov 25, 98 05:57:03 am X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > Shouldn't "[| [] |]" count as a value?? > > bash$ ocaml > Objective Caml version 2.00 > > # let x = [| [] |];; > val x : '_a list array = [|[]|] [...] > Cheers, > Don No, we can't, since it is equivalent to create a polymorphic reference (you just have to put the value into a list and to assign this list to the vector). This would break the type system's safety theorem: it would lead to ``bus errors''. Best regards, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/