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 q1EAO7d2017183 for ; Tue, 14 Feb 2012 11:24:07 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AucDAO41Ok+7SSC7nGdsb2JhbABDgw2CA6sMIgEBAQEBCAsJCRQngXIBAQQBI1YFCwsYAgImAgIgDQEpBogPp26SHYEvinIBAgECBQMEBwoEBxoDAwECAoN1AQiCYIEWBJsMX4xD X-IronPort-AV: E=Sophos;i="4.73,416,1325458800"; d="scan'208";a="144153734" Received: from mta115.f1.k8.com.br ([187.73.32.187]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 Feb 2012 11:24:01 +0100 Received: from localhost (localhost [127.0.0.1]) by smtpz.f1.k8.com.br (Postfix) with ESMTP id 461846009E; Tue, 14 Feb 2012 10:23:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at k8.com.br Received: from smtpz.f1.k8.com.br ([127.0.0.1]) by localhost (mta115.f1.k8.com.br [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ud-o8iGmcL-U; Tue, 14 Feb 2012 10:23:59 +0000 (UTC) Received: from [10.7.5.14] (fosforo.f2.k8.com.br [200.150.156.10]) by smtpz.f1.k8.com.br (Postfix) with ESMTPA id 1428460095; Tue, 14 Feb 2012 10:23:59 +0000 (UTC) Message-ID: <1329215040.13129.3.camel@andre> From: Andre Nathan To: Gabriel Scherer Cc: Arnaud Spiwack , caml-list@inria.fr Date: Tue, 14 Feb 2012 08:24:00 -0200 In-Reply-To: References: <4F399DD5.3000507@digirati.com.br> <1329213575.13129.0.camel@andre> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Subject: Re: [Caml-list] What am I reinventing here? On Tue, 2012-02-14 at 11:09 +0100, Gabriel Scherer wrote: > Here is an attempt at a functor translation. Note that's it's mostly a > glorified way to do exactly the same thing. Passing a module or a > record of operation is not very different; yet a module can carry > types so you don't have to parametrize your operations explicitly. Thank you Gabriel. > module Make (O : OPS) = struct > let foo = O.bar_of_foo > let bar = O.foo_of_bar > end Would it be correct to say that it isn't possible to specify a signature S for the output module like module Make (O : OPS) : S = struct ... end that would still make pattern-matching outside of the module possible? Thanks, Andre