From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 60BC3BB84 for ; Wed, 2 Aug 2006 19:57:49 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k72Hvm5Z002979 for ; Wed, 2 Aug 2006 19:57:49 +0200 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 TAA17224 for ; Wed, 2 Aug 2006 19:57:48 +0200 (MET DST) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.203]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k72HvlQY002921 for ; Wed, 2 Aug 2006 19:57:48 +0200 Received: by nz-out-0102.google.com with SMTP id 12so411523nzp for ; Wed, 02 Aug 2006 10:57:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=B7SQZn2cECIqco3lojUSzI5Hxwu+K7BATBMPlOeoEBavXe401730+kyeyaYLqgGz/48SHaGdLVgctJ80ZftTkcluDHa7rq25HenOn2GUqr/aFW9iT8e2LRX00lUIHXC2eLk+dxtkWldUIJ23diSU8yypp1WKqOkBYdAbA5yrNvY= Received: by 10.35.51.6 with SMTP id d6mr1840210pyk; Wed, 02 Aug 2006 10:57:47 -0700 (PDT) Received: by 10.35.130.17 with HTTP; Wed, 2 Aug 2006 10:57:47 -0700 (PDT) Message-ID: <875c7e070608021057rfb89914x1d6b9c6e7e4d7ce0@mail.gmail.com> Date: Wed, 2 Aug 2006 13:57:47 -0400 From: "Chris King" To: "Alain Frisch" Subject: Re: [Caml-list] Unexpected '_a problem Cc: "O'Caml Mailing List" In-Reply-To: <44D04D83.5020503@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <875c7e070608011347y62d2dd21lc55390cd4ffd00a1@mail.gmail.com> <004801c6b5b0$47811030$15b2a8c0@wiko> <6b8a91420608011509s696233cew8d499f315aa0cba9@mail.gmail.com> <44D04D83.5020503@inria.fr> X-j-chkmail-Score: MSGID : 44D0E79B.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at concorde with ID 44D0E79C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44D0E79B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; frisch:01 frisch:01 wwwfun:01 christophe's:01 wrote:01 caml-list:01 right-hand:01 variables:02 garrigue:03 garrigue:03 seems:03 seems:03 unexpected:03 types:03 module:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 On 8/2/06, Alain Frisch wrote: > See the paper _Relaxing the value restriction_ by Jacques Garrigue ( > http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/papers/morepoly-long.pdf > ), page 15: dangerous type variables (which are not generalized when the > right-hand side of the let-binding is not a value) are not only those is > contravariant position - this would be enough to ensure type soundness - > but also those which appear in a contravariant branch (e.g. anywhere on > the left of an arrow) - this is necessary to ensure that the type system > has principal types. Okay, that (and Christophe's explanation) explains why hiding everything in a module works. Thanks everyone for your help! It seems I will have to use Obj.magic to get the type I want but at least its use in this situation seems both safe and warranted. - Chris