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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 105CBBB83 for ; Mon, 3 Jul 2006 20:50:55 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k63IotEx004473 for ; Mon, 3 Jul 2006 20:50:55 +0200 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 UAA01942 for ; Mon, 3 Jul 2006 20:50:54 +0200 (MET DST) Received: from sophia.inria.fr (sophia.inria.fr [138.96.64.20]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k63IosPu020943 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 3 Jul 2006 20:50:54 +0200 Received: from localhost (localhost [127.0.0.1]) by sophia.inria.fr (8.13.6/8.13.4) with ESMTP id k63IorFN027779; Mon, 3 Jul 2006 20:50:53 +0200 Received: from [194.254.174.37] (vis037b.inria.fr [194.254.174.37]) (authenticated bits=0) by sophia.inria.fr (8.13.6/8.13.4) with ESMTP id k63IonE4027749 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Mon, 3 Jul 2006 20:50:50 +0200 In-Reply-To: References: <069A1F65-E50C-4363-9CCA-C6CC9A453D09@vub.ac.be> <20060703155131.7031cffa@is003364.intra.cea.fr> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <8965DAA4-7CC5-440A-91B9-FF39C69E3711@sophia.inria.fr> Cc: caml-list@inria.fr Content-Transfer-Encoding: quoted-printable From: Etienne Miret Subject: Re: Petty complaint (Was Re: [Caml-list] Type from local module would escape its )scope? Date: Mon, 3 Jul 2006 20:50:47 +0200 To: brogoff X-Mailer: Apple Mail (2.752.2) X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (sophia.inria.fr [138.96.64.20]); Mon, 03 Jul 2006 20:50:50 +0200 (MEST) X-Virus-Scanned: by amavisd-new at sophia.inria.fr X-Miltered: at nez-perce with ID 44A9670F.003 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44A9670E.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; iirc:01 forall:01 ocaml:01 encodings:01 polymorphism:01 decidable:01 botlan:01 mlf:01 mlf:01 wrote:01 caml-list:01 typing:01 cristal:01 functions:01 remy:01 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=none autolearn=disabled version=3.0.3 Le 3 juil. 06 =E0 19:30, brogoff a =E9crit : > On Mon, 3 Jul 2006, Virgile Prevosto wrote: >> IIRC arguments can not have a generalized type of the form >> "forall 'a, 'a -> unit", but methods and record fields support such >> types: for instance, you can have: > > It makes me wonder, if OCaml is to be a functional language, why > functions are second class citizens of the language with regards > to typing? By various encodings you can get this higher rank > polymorphism, it's been there for years, but we can't write the =20 > function > directly. Is it because we'd have to write it's type? > > -- Brian It is because you would be using another type system, called "system F", wich is much stronger, but infortunately not decidable. Still, D. Le Botlan and D. R=E9my have made a Caml extension that allow this, but you need to add explicit anotations, as you have guessed. See http://cristal.inria.fr/~lebotlan/mlf/mlf.html Etienne=