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.3 required=5.0 tests=AWL 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 C470FBBAF for ; Tue, 2 Sep 2008 10:26:59 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4AAD+VvEjRVcbulGdsb2JhbACLIYZrPgEBAQEJBQgHDwWZQIYOAQKFFg X-IronPort-AV: E=Sophos;i="4.32,315,1217800800"; d="scan'208";a="16485586" Received: from rv-out-0506.google.com ([209.85.198.238]) by mail3-smtp-sop.national.inria.fr with ESMTP; 02 Sep 2008 10:26:59 +0200 Received: by rv-out-0506.google.com with SMTP id f6so1920957rvb.3 for ; Tue, 02 Sep 2008 01:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=GrrHBJg+8AOUKHohN/VwcN0G13VAgeE9013utGJdkUE=; b=mY8V+nHAoTvqsstDZtTzuL83ba2cxkEXKs9dRw82px73gpsJnlStUcAnli6CqYnBGe lut0RfrQHqwFp/86ZA69LaOy1gRy2bRBZBxwqbecjVDv2J/Hvtp3hKOFJ9MZrOBJy+ff o4vhQsIxPQduZ1wFPIW5+aiZrCTpuJkuHtzJ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=g5pgM5gdei0yARG8pppgidhtVqBXnRMCi8YPUcf75kl2UTRdrNyl1CeymNQz9zfKfe a2gfhIQMYsZmVB8h1YiTcF4Y55eDKT8p73plZMiE4acuEfiCXnayvUdis0e3shwB2sx8 bNFlI19CslFY1jG/VkHUJ9ug29g1yc2EfXT5E= Received: by 10.141.28.4 with SMTP id f4mr4004445rvj.35.1220344018035; Tue, 02 Sep 2008 01:26:58 -0700 (PDT) Received: by 10.140.165.11 with HTTP; Tue, 2 Sep 2008 01:26:58 -0700 (PDT) Message-ID: <53c655920809020126t41811fb0s7c226e48bdb4eabd@mail.gmail.com> Date: Tue, 2 Sep 2008 10:26:58 +0200 From: "David Baelde" Reply-To: david.baelde@ens-lyon.org To: "Christian Sternagel" Subject: Re: [Caml-list] `This expression is not a function it cannot be applied' Cc: caml-list@yquem.inria.fr In-Reply-To: <48BCF2BB.3090507@uibk.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48BCF2BB.3090507@uibk.ac.at> X-Spam: no; 0.00; parser:01 sig:01 val:01 val:01 cheers:01 token:01 wrote:01 abstract:01 caml-list:01 expression:02 implemented:02 module:03 module:03 tue:06 sep:06 You can provide your own application function, as follows. On Tue, Sep 2, 2008 at 10:00 AM, Christian Sternagel wrote: > E.g., when having the module > module Parser : sig > type ('a,'tok) t > val token : ('tok -> 'a option) -> ('a,'tok) t > val apply : ('a,'tok) t -> 'tok list -> ('a * 'tok list) > end = [...] This amouns to provide a cast from the abstract type to the function type, while keeping the liberty on how it's implemented. Cheers, -- David