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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 06699BC37 for ; Wed, 10 Feb 2010 10:36:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar4BAGEMcktKfU4akGdsb2JhbACaYQgVAQEBAQkJDAcTAyCuToUjiHEBAQMFhFAEi3w X-IronPort-AV: E=Sophos;i="4.49,442,1262559600"; d="scan'208";a="52323187" Received: from ey-out-2122.google.com ([74.125.78.26]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 Feb 2010 10:36:11 +0100 Received: by ey-out-2122.google.com with SMTP id d26so1799274eyd.31 for ; Wed, 10 Feb 2010 01:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=sp6Dnz95T0tmMLVcBDXYXKLEtxo/eErYej3bHIudjug=; b=QR28I1ZqVH1yo8Laz47ho0B/CZMMD2Vn+6Xik9gdK0D0J/8AOhs/AVIosJIciMtWO1 FHmgNsSnsgtlgieVryQdl6Z00c282bGHnxh93w2yDUfLhdPfgISsdoiXs7lrJB6iaKaa mVYbvXH1wp4NoSNElC6hfSpwtWcq3fZlb0C5U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=QmlXtkUwOI5rcsglJbMQm9INc3SLwd/AIkqj698LTgbcic8ym45Uo9pJXDNA3CbWIN +yfdNs7phu3/a1EdhfFd+3JUWwX3cDxxC80bOLxHshxyow9T3D8FjVYDv4hzHxDRmOpE J300+L/bc5fyx0P46LynJy/6QJIx/qpqPHa2Q= MIME-Version: 1.0 Sender: francois.maurel@gmail.com Received: by 10.216.87.197 with SMTP id y47mr1049375wee.8.1265794571374; Wed, 10 Feb 2010 01:36:11 -0800 (PST) In-Reply-To: <7d8707de1002092319j4d6bfca5s169914a992d57be2@mail.gmail.com> References: <1e7471d51002091250of7a686fq537a03c9401c868f@mail.gmail.com> <1265752863.5482.42.camel@flake.lan.gerd-stolpmann.de> <7d8707de1002092319j4d6bfca5s169914a992d57be2@mail.gmail.com> Date: Wed, 10 Feb 2010 10:36:11 +0100 X-Google-Sender-Auth: af1b82c0bde771d5 Message-ID: <5e321f881002100136o276346e5j9a3157bb67edf11d@mail.gmail.com> Subject: Re: [Caml-list] The need to specify 'rec' in a recursive function defintion From: Francois Maurel To: Andrej Bauer Cc: Gerd Stolpmann , caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0016e6d63ffbc91488047f3bc353 X-Spam: no; 0.00; recursive:01 defintion:01 val:01 underscores:01 val:01 underscores:01 polymorphic:01 polymorphic:01 caml-list:01 francois:02 francois:02 let:03 let:03 specify:06 function:08 --0016e6d63ffbc91488047f3bc353 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > > > # let y =3D z z ;; > val y : (('_a -> '_b) -> '_a -> '_b) -> '_a -> '_b =3D > > Can anyone get rid of the pesky underscores in the type of y above, so > that it becomes truly polymorphic? > Eta expansion does it... # let y x =3D z z x;; val y : (('a -> 'b) -> 'a -> 'b) -> 'a -> 'b =3D Regards, Fran=E7ois --0016e6d63ffbc91488047f3bc353 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

# let y =3D z z ;;
val y : (('_a -> '_b) -> '_a -> '_b) -> '_a= -> '_b =3D <fun>

Can anyone get rid of the pesky underscores in the type of y above, so
that it becomes truly polymorphic?

Eta expansion = does it...

# let y x =3D z z x;;
val y : (('a -> 'b) -= > 'a -> 'b) -> 'a -> 'b =3D <fun>

Regards,
Fran=E7ois
--0016e6d63ffbc91488047f3bc353--