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=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id A1B4BBBAF for ; Mon, 7 Jul 2008 22:35:53 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAFcbckjAXQIn/2dsb2JhbACBW6oShUE X-IronPort-AV: E=Sophos;i="4.30,318,1212357600"; d="scan'208";a="27106366" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 07 Jul 2008 22:35:25 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m67KZOhm023918 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 7 Jul 2008 22:35:24 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMCAJgackjUGyobgWdsb2JhbACBW5EBAQEQIAOYT4VB X-IronPort-AV: E=Sophos;i="4.30,318,1212357600"; d="scan'208";a="12906357" Received: from smtp1-g19.free.fr ([212.27.42.27]) by mail2-smtp-roc.national.inria.fr with ESMTP; 07 Jul 2008 22:35:24 +0200 Received: from smtp1-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp1-g19.free.fr (Postfix) with ESMTP id 4489A1AB329 for ; Mon, 7 Jul 2008 22:35:24 +0200 (CEST) Received: from localhost.localdomain (c5850-a2-3-62-147-11-140.dial.proxad.net [62.147.11.140]) by smtp1-g19.free.fr (Postfix) with ESMTP id 6F39E1AB312 for ; Mon, 7 Jul 2008 22:35:23 +0200 (CEST) Date: Mon, 7 Jul 2008 20:36:59 +0200 From: Fabrice Marchant To: caml-list@inria.fr Subject: Re: [Caml-list] functions' recursive construction Message-ID: <20080707203659.41f107de@free.fr> In-Reply-To: References: <20080707200128.4e125865@free.fr> X-Mailer: Claws Mail 3.2.0 (GTK+ 2.12.10; i486-pc-linux-gnu) X-Face: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 48727E0C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; recursive:01 lindig:01 lindig:01 runtime:01 ocaml's:01 wrote:01 wrote:01 integer:01 caml-list:01 argument:02 supported:02 static:03 types:05 jul:05 jul:05 On Mon, 7 Jul 2008 22:18:45 +0200 Christian Lindig wrote: > > On Jul 7, 2008, at 8:01 PM, Fabrice Marchant wrote: > > (I think the answer is 'No') Could you shed light on this ? > > Farbrice, > > I think you are right I but can't give a formal argument, only some > intuition: you can't provide a static type for the function you want. > The type of the function would depend on the integer value you only > know at runtime. Such value-dependent types are not supported by > OCaml's type system. Thanks a lot Christian for these clear explanations. So they confirm William's answer. Regards, Fabrice