From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p3B7At1h022198 for ; Mon, 11 Apr 2011 09:10:55 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIBADiook3RVdg0kGdsb2JhbACmEQgUAQEBAQkJDQcUBCGIep0/imiCI4NmMIhdAQEDBoVoBIF/i1mJODo X-IronPort-AV: E=Sophos;i="4.63,338,1299452400"; d="scan'208";a="96678647" Received: from mail-qw0-f52.google.com ([209.85.216.52]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Apr 2011 09:10:49 +0200 Received: by qwb8 with SMTP id 8so4419015qwb.39 for ; Mon, 11 Apr 2011 00:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=SiGlI03effHdmSeSUF/rTHA5MsVwFqJu5cj4whDb1mE=; b=PfSSAFUie2vaDayFhvAsH1lc2vOm+B6pVDaOJOeULI/ueA7GpKcPAA8N98yqtoZP0+ wMS9wgnsHcAYsx0tqi+I/cTvMVYfuWAqaXr5ZdWrBbUS9pJU26QJK8xTUFHw6BAnCn4E vqkENAJft7r/+zGWMp4mPvRErKSM8BI82EYUc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=J5q+WOsRShwvaopAvhahRiu0YWbHlzR3bb1JVki38yWNqPqV+bQpZV5XCfVCEU/fq5 4qSA4zI1AIjeoRYA9Tt/kmNnhk7gLcSDP34Hl609bYjjPjshuvy95fNL2fVF/ULhuK5R JQ8/TEV7u/gLG7ngryIDaSVXcMxAtXebGwUIk= MIME-Version: 1.0 Received: by 10.229.141.11 with SMTP id k11mr3659755qcu.195.1302505847577; Mon, 11 Apr 2011 00:10:47 -0700 (PDT) Received: by 10.229.250.5 with HTTP; Mon, 11 Apr 2011 00:10:47 -0700 (PDT) In-Reply-To: <4D9EF86A.9040202@lexifi.com> References: <4D9E28D2.1050808@wp.pl> <1302212990.8429.1150.camel@thinkpad> <0F248A34-05CF-4640-B122-75C4CE7C2CD2@mpi-sws.org> <4D9EC172.1060205@lexifi.com> <4D9ECAF2.7070300@lexifi.com> <4D9EF86A.9040202@lexifi.com> Date: Mon, 11 Apr 2011 09:10:47 +0200 Message-ID: From: Julien Signoles To: Alain Frisch Cc: Jacques Garrigue , caml-list Content-Type: multipart/alternative; boundary=90e6ba10aa755cdc6104a09f46b7 Subject: Re: [Caml-list] What is an applicative functor? --90e6ba10aa755cdc6104a09f46b7 Content-Type: text/plain; charset=ISO-8859-1 Hello Allain, 2011/4/8 Alain Frisch > On 04/08/2011 01:25 PM, Julien Signoles wrote: > >> 2) module F(X:...) = G(H(X)) >> >> Without applicative functors, we again get the error about parameter >> elimination. But I see no workaround to eliminate it without changing >> the signature of F. So IMHO that is a use case where applicative >> functors are useful. >> > > I'd be interested to see a full example for this case. > Download sources of Frama-C here : http://frama-c.com/download/frama-c-Carbon-20110201.tar.gz The use case is in module State_builder : src/project/state_builder.ml: (* ... *) module Caml_weak_hashtbl(Data: Datatype.S) = Weak_hashtbl(Weak.Make(Data))(Data) (* ... *) Do you see any workaround to compile this code with -no-app-funct (and as most as possible without changing API)? -- Julien --90e6ba10aa755cdc6104a09f46b7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Allain,

2011/4/8 Alain Frisch <alain.frisch@lexifi.com>
On 04/08/2011 01:25 PM, Julien Signoles wrote:
2) module F(X:...) =3D G(H(X))

Without applicative functors, we again get the error about parameter
elimination. But I see no workaround to eliminate it without changing
the signature of F. So IMHO that is a use case where applicative
functors are useful.

I'd be interested to see a full example for this case.
=

Download sources of Frama-C here : http://frama-c.co= m/download/frama-c-Carbon-20110201.tar.gz
The use case is in module State_builder :

src/project/state_builder.ml:
(* ... *)
module Caml_wea= k_hashtbl(Data: Datatype.S) =3D Weak_hashtbl(Weak.Make(Data))(Data)
(* .= .. *)

Do you see any workaround to compile this code with -no-app-funct (and = as most as possible without changing API)?

--
Julien
<= br> --90e6ba10aa755cdc6104a09f46b7--