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 XAA09565 for caml-redistribution; Wed, 22 Dec 1999 23:02:31 +0100 (MET) 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 UAA00899 for ; Wed, 22 Dec 1999 20:32:30 +0100 (MET) Received: from ugly.gaggle (mail.webcriteria.com [207.173.34.253]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id UAA00185 for ; Wed, 22 Dec 1999 20:32:27 +0100 (MET) Received: from webcriteria.com (honker.gaggle [192.168.168.102]) by ugly.gaggle (8.9.3/8.9.3) with ESMTP id LAA02133 for ; Wed, 22 Dec 1999 11:32:26 -0800 Message-ID: <38612749.528896CB@webcriteria.com> Date: Wed, 22 Dec 1999 11:32:25 -0800 From: Chris Tilt Organization: WebCriteria, Inc. X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: OCAML Subject: parameterized signatures Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: weis Bonjour. S'il vous plaît pardon le manque de Français aujourd'hui. Merci. I have read (although poorly understood) the recent postings regarding the need for parameterized signatures, which I think would help. Please let me ask the question a different way. Is there a way to refer to the type of a functor defined by a .mli file in another .mli file? I am attempting to build a parameterized type and they build a sub-type which will provide a specific implementation of that signature. My problem is in expressing the interface of the second type to use the constructed type from the first file. Since some people have asked for a generalized graph module, and I also have the need, I am trying to package one. Here is a snipet to help explain my question. The issue is in the very last line. Sorry for the long post and example. BTW, this code is being used in production of a real product! Thank you all for your support of a great programming language! Merci, Chris ---- pgraph.mli ---- (* supply the core graph functionality *) module type ParameterizedGraphType = sig type t type edge type vertex val compare: t -> t -> int end module type S = sig type vid type pEdge type vertex = Vertex of vid * pVertex type edge = Edge of vid * vid * pEdge type t type graph = t ... some functions ... end module Make : functor (Param: ParameterizedGraphType) -> (S with type vid = Param.t and type pVertex = Param.vertex and type pEdge = Param.edge) ---- pgraph.ml ----- implements pgraph.mli in the usual way ---- wgraph.ml ----- (* use the ParameterizedGraphType module (Pgraph) to build a custom graph which has Html.window values as vertex attributes. This is used by the old-generation profiler product *) module type WindowGraphType = sig type t = string type vertex = Html.window type edge = float * float val compare: string -> string -> int end =====> the problem area. How do I express the type of this module? module type Wgraph = Pgraph.S ???