From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p38LbLbP004560 for ; Fri, 8 Apr 2011 23:37:22 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcDAK5/n01V2gB5hWdsb2JhbACmLQEBAQoLCwUWJYh6uUEOhV8E X-IronPort-AV: E=Sophos;i="4.63,326,1299452400"; d="scan'208";a="80482401" Received: from emailfrontal2.citycable.ch ([85.218.0.121]) by mail3-smtp-sop.national.inria.fr with SMTP; 08 Apr 2011 23:37:12 +0200 X-Alinto-smtpauth-localdomain: Yes Received: from seldon (91-103-38-56.dynamic.thecloud.net [91.103.38.56]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal2.citycable.ch (Postfix) with ESMTPA id CB1D4835117; Fri, 8 Apr 2011 23:37:10 +0200 (CEST) Received: from yziquel by seldon with local (Exim 4.72) (envelope-from ) id 1Q8JJk-0004RH-Sl; Fri, 08 Apr 2011 23:34:12 +0200 Date: Fri, 8 Apr 2011 23:34:12 +0200 From: Guillaume Yziquel To: Lauri Alanko Cc: caml-list@inria.fr Message-ID: <20110408213412.GB4608@localhost> References: <4D9E28D2.1050808@wp.pl> <1302212990.8429.1150.camel@thinkpad> <0F248A34-05CF-4640-B122-75C4CE7C2CD2@mpi-sws.org> <20110408212339.GD5064@melkinpaasi.cs.helsinki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20110408212339.GD5064@melkinpaasi.cs.helsinki.fi> User-Agent: Mutt/1.5.20 (2009-06-14) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p38LbLbP004560 Subject: Re: [Caml-list] What is an applicative functor? Le Saturday 09 Apr 2011 à 00:23:39 (+0300), Lauri Alanko a écrit : > 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). I've very curious about the "with a bit of magic" part... > Lauri -- Guillaume Yziquel