From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 13AB8BBAF for ; Mon, 16 Nov 2009 09:12:17 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8AAFuYAEvZSMDqi2dsb2JhbACBTZpRAQEBCgsKBxEFt1OEPAQ X-IronPort-AV: E=Sophos;i="4.44,750,1249250400"; d="scan'208";a="38148025" Received: from fmmailgate03.web.de ([217.72.192.234]) by mail3-smtp-sop.national.inria.fr with ESMTP; 16 Nov 2009 09:12:16 +0100 Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate03.web.de (Postfix) with ESMTP id B535B133090AE; Mon, 16 Nov 2009 09:11:20 +0100 (CET) Received: from [95.208.117.111] (helo=frosties.localdomain) by smtp08.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #314) id 1N9wgC-0007Ag-00; Mon, 16 Nov 2009 09:11:20 +0100 Received: from mrvn by frosties.localdomain with local (Exim 4.69) (envelope-from ) id 1N9wgB-0000Yp-VE; Mon, 16 Nov 2009 09:11:20 +0100 From: Goswin von Brederlow To: guillaume.yziquel@citycable.ch Cc: caml-list@inria.fr Subject: Re: [Caml-list] Polymorphic functors / modules and OCaml-R References: <4B010073.6090402@citycable.ch> Date: Mon, 16 Nov 2009 09:11:19 +0100 In-Reply-To: <4B010073.6090402@citycable.ch> (Guillaume Yziquel's message of "Mon, 16 Nov 2009 08:34:11 +0100") Message-ID: <87r5ry51p4.fsf@frosties.localdomain> User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.22 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX1/eb8xU+Zuk1zTAGdY9YGg3YwJlwDJoMSM0DVK7 id4l86SvlwmOWbhRiGaEqpp5uhZn1CcDr/IPZz7E0KxuBJ3t6R 1te7uCsek= X-Spam: no; 0.00; functors:01 guillaume:01 guillaume:01 sig:01 sig:01 polymorphism:01 functors:01 functor:01 mfg:98 polymorphic:01 abstract:01 caml-list:01 writes:01 modules:02 modules:02 Guillaume Yziquel writes: > Hello. > > I've been trying stuff like these: > >> # module type 'a A = sig >> Error: Parse error: [a_UIDENT] expected after "type" (in [str_item]) >> # module type ['a] A = sig >> Error: Parse error: [a_UIDENT] expected after "type" (in [str_item]) >> # module type A = sig module type B end >> ;; >> Error: Failure: "abstract/nil module type not allowed here" >> # > > Is there a way, somehow, of introducing such polymorphism in modules / > functors? Isn't that exactly what a functor is? You just need to wrape the 'a type in a module. MfG Goswin