From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL,NO_REAL_NAME autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id C3183BBC1 for ; Mon, 24 Mar 2008 10:21:42 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsgBAA8Q50eGYPwhiGdsb2JhbACQH3gBAQEPJpRc X-IronPort-AV: E=Sophos;i="4.25,545,1199660400"; d="scan'208";a="9879850" Received: from mail.uni-sb.de (HELO uni-sb.de) ([134.96.252.33]) by mail1-smtp-roc.national.inria.fr with ESMTP; 24 Mar 2008 10:21:42 +0100 Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by uni-sb.de (8.14.2/2008020100) with ESMTP id m2O9LgcY003191 for ; Mon, 24 Mar 2008 10:21:42 +0100 (CET) Received: from mail.ps.uni-sb.de (james.ps.uni-sb.de [134.96.186.68]) by mail.cs.uni-sb.de (8.14.2/2008022900) with ESMTP id m2O9Lfur002052 for ; Mon, 24 Mar 2008 10:21:41 +0100 (CET) Received: from localhost ([127.0.0.1] helo=ps.uni-sb.de ident=www-data) by mail.ps.uni-sb.de with esmtp (Exim 4.63) (envelope-from ) id 1Jdis9-0005hJ-Hh for caml-list@yquem.inria.fr; Mon, 24 Mar 2008 10:21:41 +0100 Received: from 77.3.13.73 (SquirrelMail authenticated user rossberg) by ps.uni-sb.de with HTTP; Mon, 24 Mar 2008 10:21:41 +0100 (CET) Message-ID: <51041.77.3.13.73.1206350501.squirrel@ps.uni-sb.de> In-Reply-To: <6ebe51ce0803231137s75c16a30sce985f2de922b57@mail.gmail.com> References: <7B22B0CF-8E65-434A-9EF7-0C20EBE618E8@erratique.ch> <6ebe51ce0803221420h272bec70ne92695651f6b2b38@mail.gmail.com> <6ebe51ce0803231137s75c16a30sce985f2de922b57@mail.gmail.com> Date: Mon, 24 Mar 2008 10:21:41 +0100 (CET) Subject: Re: [Caml-list] mutually recursive modules From: rossberg@ps.uni-sb.de To: caml-list@yquem.inria.fr User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: rossberg@ps.uni-sb.de X-SA-Exim-Scanned: No (on mail.ps.uni-sb.de); SAEximRunCond expanded to false X-Spam: no; 0.00; recursive:01 rossberg:01 recursive:01 sig:01 sig:01 wrote:01 signatures:01 signatures:01 andreas:01 caml-list:01 define:02 modules:02 modules:02 uni-sb:03 module:03 "ketti" wrote: > > You have to factor out the types of the modules. > Lets say we have modules A and B which are mutually recursive. > A needs to know the signature of B and vise verse. > > So we define the signatures somewhere visible to both A and B: > > module type A_T = sig ... end > module type B_T = sig ... end Note that this only works if the signatures themselves aren't mutually recursive - which often is the case. Unfortunately, there is no solution that works in the general case. - Andreas