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 p38LNjno004039 for ; Fri, 8 Apr 2011 23:23:46 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtEAAOd7n02A1gkBe2dsb2JhbACZAo0pAQEWJgUgwjOFbQSFTw X-IronPort-AV: E=Sophos;i="4.63,326,1299452400"; d="scan'208";a="105291630" Received: from courier.cs.helsinki.fi (HELO mail.cs.helsinki.fi) ([128.214.9.1]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Apr 2011 23:23:40 +0200 Received: from melkinpaasi.cs.helsinki.fi (melkinpaasi.cs.helsinki.fi [128.214.9.14]) (AUTH: PLAIN cs-relay, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by mail.cs.helsinki.fi with esmtp; Sat, 09 Apr 2011 00:23:39 +0300 id 00093E92.4D9F7CDB.00005B44 Received: by melkinpaasi.cs.helsinki.fi (Postfix, from userid 37211) id 6C9038175A; Sat, 9 Apr 2011 00:23:39 +0300 (EEST) Date: Sat, 9 Apr 2011 00:23:39 +0300 From: Lauri Alanko To: caml-list@inria.fr Message-ID: <20110408212339.GD5064@melkinpaasi.cs.helsinki.fi> References: <4D9E28D2.1050808@wp.pl> <1302212990.8429.1150.camel@thinkpad> <0F248A34-05CF-4640-B122-75C4CE7C2CD2@mpi-sws.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <0F248A34-05CF-4640-B122-75C4CE7C2CD2@mpi-sws.org> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] What is an applicative functor? On Fri, Apr 08, 2011 at 08:50:52AM +0200, Andreas Rossberg wrote: > Aside: In general, you really want to have both: functors with > impure bodies better be generative, while functors with pure bodies > should be applicative. The absence of generative functors in OCaml > also is the reason that you cannot unpack a first-class module in a > functor body (non-locally), because that is unsound with applicative > semantics. I'm not sure if there really is an "absence": functions over first-class modules _are_ generative functors for all practical purposes. The only problem is that they only support type constraints for first-order types (and even this can be circumvented with a bit of magic). Lauri