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 q1EB5wFh019209 for ; Tue, 14 Feb 2012 12:05:58 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AucDAA4/Ok+7SSC4nGdsb2JhbABDgw2CA6sMIgEBAQEBCAsJCRQngXIBAQUjBFIQCxgCAiYCAiANASkGsASSGYEvijI1CwECAQIFAwQHCgQHGgMDAwKDdQEIgmCBFgSbDF+MQw X-IronPort-AV: E=Sophos;i="4.73,416,1325458800"; d="scan'208";a="144162119" Received: from mta112.f1.k8.com.br ([187.73.32.184]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 Feb 2012 12:05:52 +0100 Received: from localhost (localhost [127.0.0.1]) by smtpz.f1.k8.com.br (Postfix) with ESMTP id BF8C680090; Tue, 14 Feb 2012 11:05:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at k8.com.br Received: from smtpz.f1.k8.com.br ([127.0.0.1]) by localhost (mta112.f1.k8.com.br [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6ZDEXLV1oql4; Tue, 14 Feb 2012 11:05:50 +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 89B36800C0; Tue, 14 Feb 2012 11:05:50 +0000 (UTC) Message-ID: <1329217552.13129.8.camel@andre> From: Andre Nathan To: Gabriel Scherer Cc: Arnaud Spiwack , caml-list@inria.fr Date: Tue, 14 Feb 2012 09:05:52 -0200 In-Reply-To: References: <4F399DD5.3000507@digirati.com.br> <1329213575.13129.0.camel@andre> <1329215040.13129.3.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:39 +0100, Gabriel Scherer wrote: > Yes it is, but you have to use judicious "with .." annotations to make > the type non-abstract. Figured out my error... I had tried defining a functor like this: module type Ops = sig type foo type bar val bar_of_foo : foo -> bar val foo_of_bar : bar -> foo end module type S = sig type foo type bar val foo : foo -> bar val bar : bar -> foo end module M (O : Ops) : S with type foo = O.foo and type bar = O.bar = struct type foo = O.foo type bar = O.bar let foo = O.bar_of_foo let bar = O.foo_of_bar end which is correct, but in the actual code I also have a .mli file and there I had only written "module M (O : Ops) : S", without the "with type ..." part. I completely forgot to replicate it there, and that's why this attempt kept failing... Thanks so much for your help! Andre