From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id B8981BC69 for ; Fri, 23 Nov 2007 05:01:41 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAP7fRUeoEoL7k2dsb2JhbACPNgEBAQEHBAYJIJN8 X-IronPort-AV: E=Sophos;i="4.21,454,1188770400"; d="scan'208";a="6095373" Received: from mailx.valdosta.edu ([168.18.130.251]) by mail3-smtp-sop.national.inria.fr with ESMTP; 23 Nov 2007 05:01:34 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAMPfRUeoEoLQ/2dsb2JhbACjbQ X-IronPort-AV: E=Sophos;i="4.21,454,1188792000"; d="scan'208";a="141409328" Received: from blazemail.valdosta.edu ([168.18.130.208]) by mailx.valdosta.edu with ESMTP; 22 Nov 2007 23:01:33 -0500 Received: from tull (tull.valdosta.edu [168.18.130.139]) by blazemail.valdosta.edu (iPlanet Messaging Server 5.2 HotFix 2.10 (built Dec 26 2005)) with SMTP id <0JRX00MXKXULDF@blazemail.valdosta.edu> for caml-list@yquem.inria.fr; Thu, 22 Nov 2007 23:01:33 -0500 (EST) Date: Thu, 22 Nov 2007 23:01:33 -0500 (EST) From: Jonathan T Bryant Subject: Type issue To: caml-list@yquem.inria.fr Message-id: <2921298.1195790493072.JavaMail.jtbryant@valdosta.edu> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7BIT X-Spam: no; 0.00; bool:01 bool:01 val:01 hen:98 rec:01 typing:01 cond:02 cond:02 match:02 let:03 applied:05 fun:08 think:13 isn't:13 issue:14 List, I don't understand the following typing: # type 'a t = Cond of bool t * 'a t * 'a t | Value of 'a;; type 'a t = Cond of bool t * 'a t * 'a t | Value of 'a # let rec f t = match t with Cond (c,t,e) -> if f c then f t else f e | Value x -> x ;; val f : bool t -> bool = I don't understand why f isn't of type 'a t -> 'a. I understand that f is applied to a bool t, but I would think that that would just be a particular instantiation of 'a, not enough to fully determine its type. --Jonathan Bryant