From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p388494B006707 for ; Fri, 8 Apr 2011 10:04:09 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhYCAGnAnk3B/BfXkWdsb2JhbACmJgEBAQEJCwsHFAMiiHq3EoVtBI1Og2o X-IronPort-AV: E=Sophos;i="4.63,322,1299452400"; d="scan'208";a="105239116" Received: from msa06.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.215]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Apr 2011 10:04:03 +0200 Received: from [192.168.1.63] ([83.204.229.18]) by mwinf5d22 with ME id Uw411g00E0QTpRf03w42i5; Fri, 08 Apr 2011 10:04:03 +0200 Message-ID: <4D9EC172.1060205@lexifi.com> Date: Fri, 08 Apr 2011 10:04:02 +0200 From: Alain Frisch Organization: LexiFi User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Andreas Rossberg CC: caml-list References: <4D9E28D2.1050808@wp.pl> <1302212990.8429.1150.camel@thinkpad> <0F248A34-05CF-4640-B122-75C4CE7C2CD2@mpi-sws.org> In-Reply-To: <0F248A34-05CF-4640-B122-75C4CE7C2CD2@mpi-sws.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] What is an applicative functor? On 04/08/2011 08:50 AM, Andreas Rossberg wrote: > Nitpick: the Make functor is still applicative. All functors in OCaml > are applicative. NitpickČ: except if you compile with -no-app-funct. > Aside: In general, you really want to have both: functors with impure > bodies better be generative, while functors with pure bodies should be > applicative. I'm not sure the benefits of applicative functors are worth the extra complexity they induce, especially if you want to support applicative functors in the same system as well. As far as I understand, applicative functors are useful primarily to give precise types to higher-order functors (which are rare enough). It would be interested to see how much effort would be needed to adapt large code bases to compile with -no-app-funct (it probably amounts to giving a name to the result of a few functor applications). Alain