From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 30EC2BC29 for ; Sun, 7 Nov 2004 02:12:50 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iA71Cn8l025736 for ; Sun, 7 Nov 2004 02:12:49 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA30429 for ; Sun, 7 Nov 2004 02:12:49 +0100 (MET) Received: from mailout08.sul.t-online.com (mailout08.sul.t-online.com [194.25.134.20]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iA71Cnvg025733 for ; Sun, 7 Nov 2004 02:12:49 +0100 Received: from fwd02.aul.t-online.de by mailout08.sul.t-online.com with smtp id 1CQbbs-0005Ff-00; Sun, 07 Nov 2004 02:12:48 +0100 Received: from [80.133.127.49] (Z63+deZ-weAyx4bl+SaOV+AoTF256w8BcvhOSWC9vEL1I6IltSnn4s@[80.133.127.49]) by fwd02.sul.t-online.com with esmtp id 1CQbbo-1wZOXw0; Sun, 7 Nov 2004 02:12:44 +0100 Message-ID: <418D768B.1000505@t-online.de> Date: Sun, 07 Nov 2004 02:12:43 +0100 From: szegedy@t-online.de (Christian Szegedy) User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040808) X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: caml-list@inria.fr Subject: Re: [Caml-list] Nested modules: signature restriction possible? References: <20041106233957.GA7443@muffin> In-Reply-To: <20041106233957.GA7443@muffin> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-ID: Z63+deZ-weAyx4bl+SaOV+AoTF256w8BcvhOSWC9vEL1I6IltSnn4s X-TOI-MSGID: bc6952d6-3756-41a8-9fc5-4ad5f742301d X-Miltered: at nez-perce with ID 418D7691.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 418D7691.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 signoles:01 sig:01 val:01 sig:01 val:01 imho:01 algebra:01 signatures:01 functions:01 computation:01 modules:01 constraints:01 functional:02 polynomial:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: I am writing a code with almost the same functionality and I was also bugged by the same problem and posed the same question in the functional mailing list. Julien Signoles was kind enough to answer: > I also encounter this annoying situation. In general, I solve it in the > following way: > > module type A = sig type t val f: t -> t end > module type B = sig include A val g: t -> t end > module type C' = sig type c val h: c -> c end > module type C = sig include A include C' with type c = t end > module type D = sig include B include C' with type c = t end > > Sadly, this solution uses some additional types and with-type constraints > but IMHO it is the best when your signatures are big. > > Hope this helps, I've got a similar algebra package as yours, but my design is quite pragmatic: I have only programmed those parts I really needed. I send my version in a separate mail. It would be fun to cooperate, if you would like to. (What I currently think about is the GCD computation over multivariate polynomial fields (it is needed for the functions field), and it is hard to get it efficient. After I solved it, I will want to programm Groebner base manipluation.) Best regards, Christian