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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 1F0DED45F for ; Tue, 25 Oct 2005 04:22:24 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j9P2MNsI029224 for ; Tue, 25 Oct 2005 04:22:23 +0200 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 EAA11258 for ; Tue, 25 Oct 2005 04:22:23 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9P2MLDR013320 for ; Tue, 25 Oct 2005 04:22:22 +0200 Received: from localhost (orion [130.54.16.5]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id j9P2MKHt016075; Tue, 25 Oct 2005 11:22:20 +0900 (JST) Date: Tue, 25 Oct 2005 11:22:20 +0900 (JST) Message-Id: <20051025.112220.68541121.keiko@kurims.kyoto-u.ac.jp> To: bhurt@spnz.org Cc: caml-list@inria.fr Subject: Re: [Caml-list] any types in signatures of functor arguments From: Keiko Nakata In-Reply-To: References: <20051024.175154.68545642.keiko@kurims.kyoto-u.ac.jp> X-Mailer: Mew version 4.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 435D96DF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 435D96DD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 functor:01 ocaml:01 sig:01 val:01 struct:01 functor:01 ...:98 signatures:01 compiles:01 int:01 modules:01 modules:01 defined:01 modifying:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 From: Brian Hurt > I think the problem is that `A holds something, but you're not giving > Ocaml any idea of what. For example, the following compiles: > > module F(X:sig type 'a t = [`A of 'a ] val f : 'a t -> int end) = > struct > let f = function `A x as a -> X.f a | `B -> 0 > end I see... So it seems that I cannot avoid modifying modules to which F is applied. Actually, I already written several modules, say M and N, in separate files. Later, I defined the functor F so as to apply it to the modules M and N. I thought that it would be nice if I can avoid modifying the implementations and interface files of M and N, since it will affect other parts of my program. Thanks for the reply. Regards, Keiko Nakata