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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id B276DBB81 for ; Mon, 24 Oct 2005 10:51:58 +0200 (CEST) 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 j9O8pwrU028269 for ; Mon, 24 Oct 2005 10:51:58 +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 KAA25797 for ; Mon, 24 Oct 2005 10:51:57 +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 j9O8ptIG028266 for ; Mon, 24 Oct 2005 10:51:56 +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 j9O8psNJ020597 for ; Mon, 24 Oct 2005 17:51:55 +0900 (JST) Date: Mon, 24 Oct 2005 17:51:54 +0900 (JST) Message-Id: <20051024.175154.68545642.keiko@kurims.kyoto-u.ac.jp> To: caml-list@inria.fr Subject: any types in signatures of functor arguments From: Keiko Nakata 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 nez-perce with ID 435CA0AE.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 435CA0AB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; functor:01 functor:01 concretely:01 typable:01 sig:01 val:01 struct:01 typable:01 sig:01 val:01 struct:01 ...:98 signatures:01 signatures:01 int:01 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 Hello. Why I cannot have *any types* in signatures of functor arguments? Concretely, the following F is not typable. module F(X:sig type t = [`A of _ ] val f : t -> int end) = struct let f = function `A x as a -> X.f a | `B -> 0 end The above F could be made typable as in module F(X:sig type s type t = [`A of s ] val f : t -> int end) = struct let f = function `A x as a -> X.f a | `B -> 0 end However, this change requires me to add the type component s to every module to which F are going to be applied. This is not very nice... Regards, Keiko Nakata