From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA03330 for caml-redistribution@pauillac.inria.fr; Wed, 2 Feb 2000 23:08:13 +0100 (MET) Resent-Message-Id: <200002022208.XAA03330@pauillac.inria.fr> 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 SAA02898 for ; Wed, 2 Feb 2000 18:59:00 +0100 (MET) Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id SAA14194 for ; Wed, 2 Feb 2000 18:58:59 +0100 (MET) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.9.3/2000011400) with ESMTP id SAA17095; Wed, 2 Feb 2000 18:58:57 +0100 (CET) Received: from grizzly.ps.uni-sb.de (grizzly.ps.uni-sb.de [134.96.186.68]) by cs.uni-sb.de (8.9.3/1999031900) with ESMTP id SAA29415; Wed, 2 Feb 2000 18:58:57 +0100 (CET) Received: from ps.uni-sb.de (IDENT:rossberg@grieg.ps.uni-sb.de [134.96.186.139]) by grizzly.ps.uni-sb.de (8.9.1a/8.9.1) with ESMTP id SAA16064; Wed, 2 Feb 2000 18:58:55 +0100 Sender: rossberg@ps.uni-sb.de Message-ID: <3898705F.ABFAF927@ps.uni-sb.de> Date: Wed, 02 Feb 2000 18:58:55 +0100 From: Andreas Rossberg Organization: =?iso-8859-1?Q?Universit=E4t?= des Saarlandes X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: German, de, en MIME-Version: 1.0 To: caml-list@inria.fr CC: Max Skaller Subject: Re: Module naming References: <38978ABF.7898BDB6@in.ot.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Wed, 2 Feb 2000 23:08:13 +0100 Resent-To: caml-redistribution@pauillac.inria.fr Max Skaller wrote: > > I'm confused: why doesn't this work? [I get unbound type ctor message] > [shortened version] > > module type X = sig type one end > module type Y = sig type two end > module type XY = sig module type XX = X module type YY = Y end > module type Client = functor (T: XY) -> > sig val f: T.XX.one -> unit end > ^^^^^^^^ > > What I expected was that T.XX.one would refer to the > type X.one, but this doesn't seem to be the case. You cannot even say type one = X.one What you tried is just a more complicated example of the same thing. Signature members cannot be accessed via the dot notation - it would not make any sense. You cannot refer to X.one just as you cannot write module type X = sig val one: int end let one = X.one Signatures just contain descriptions of entities - values, types, modules, etc. - they do not contain the actual things. So there simply is no type "X.one" if X is a signature, the notation does not even exist. If you want to access an actual entity you need a structure that matches the signature X. I'm not sure what you were trying to do, maybe you meant to say > module type XY = sig module XX : X module YY : Y end ? With this your example should be perfectly valid. Hope this helps, - Andreas -- Andreas Rossberg, rossberg@ps.uni-sb.de :: be declarative. be functional. just be. ::