From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 121D9BC48 for ; Fri, 1 Apr 2005 04:02:18 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j3122HQr029384 for ; Fri, 1 Apr 2005 04:02:17 +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 EAA19130 for ; Fri, 1 Apr 2005 04:02:17 +0200 (MET DST) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j3122GuM029381 for ; Fri, 1 Apr 2005 04:02:16 +0200 Received: by wproxy.gmail.com with SMTP id 69so740306wri for ; Thu, 31 Mar 2005 18:02:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=jWubxIiuNlsrWRpfDNRM1Shl7RqTNzeDXq5bjXJgWzaHyiDBlIbgPcE7I32yqt4Te/+z2EOX9dNwJGMjQlthkp2GZAKEtqW1AVkBQfEmdY0ELiG5dvAsxRHPvZBt2LlQWQj8oKUw9wpRlNoNEziXkP3V+DrgZyeHdoo/vLMiVVI= Received: by 10.54.95.16 with SMTP id s16mr1333323wrb; Thu, 31 Mar 2005 18:02:15 -0800 (PST) Received: by 10.54.2.79 with HTTP; Thu, 31 Mar 2005 18:02:14 -0800 (PST) Message-ID: <891bd339050331180214df95db@mail.gmail.com> Date: Thu, 31 Mar 2005 21:02:14 -0500 From: Yaron Minsky Reply-To: yminsky@cs.cornell.edu To: Caml Mailing List Subject: Another polymorphism puzzle Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 424CABA9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 424CABA8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; yaron:01 minsky:01 yminsky:01 polymorphism:01 foo:01 foo:01 val:01 unification:01 typing:01 int:01 int:01 variant:02 types:02 types:02 seems:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.2 X-Spam-Level: The last example I posted about had to do with variant types. Here's another interseting little typing surprise having to do with record types: # type 'a t = { foo: 'a };; type 'a t = { foo : 'a; } # let f x = { x with foo = 3 };; val f : 'a -> int t = I can kind of see how this happened, since after all, the result of (f x) does not depend in any way on x. And yet, it seems like the unification rules should force f to have time ('a t -> int t). y