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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 64D40BC57 for ; Thu, 29 Apr 2010 19:20:49 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYCABdd2UtKfVK0mGdsb2JhbACQcIFYij8IFQEBAQEBCAkMBxEirFCBfIVSLohOAQEDBYULBA X-IronPort-AV: E=Sophos;i="4.52,296,1270418400"; d="scan'208";a="49991932" Received: from mail-wy0-f180.google.com ([74.125.82.180]) by mail2-smtp-roc.national.inria.fr with ESMTP; 29 Apr 2010 19:20:49 +0200 Received: by wyb29 with SMTP id 29so1020498wyb.39 for ; Thu, 29 Apr 2010 10:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=TmYpodezoeGrQSbEf0fvcBOi5x978aVq1PthK0IkPRs=; b=gqeiHT3C/1cNPmnBl+lOI0/PjEo4aoqWbf6foTkEXvo0EFmMPdf8avqHGkDTUuAwyz HQ2fHyvUQVBsKa+Y21nlvRkdfECG4MTb+RuxI8+wHLN433bqXLrXEQgeJHxmVmvdcfNr rkk+03sRuK3d0kxErv2tF0cGwA90fzTNm7aLU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kxXXWhQQ1XAwBuRND0Y2oONaIAFA/MiniJnm3FxIqq+/97OkOLwXOxvw188GLxY5Ii 1+mBNMzJRTR3Zs8oonX9dPPOVp0X/QPuq0LtdQHCgy8I1DzJjDeSt8YGxPd67lpT4WMw /eGkmI4OrQ6q5PofQq7C0CH16lw9uF0zMGxhU= MIME-Version: 1.0 Received: by 10.216.87.68 with SMTP id x46mr532894wee.145.1272561648209; Thu, 29 Apr 2010 10:20:48 -0700 (PDT) Received: by 10.216.25.144 with HTTP; Thu, 29 Apr 2010 10:20:48 -0700 (PDT) Date: Thu, 29 Apr 2010 19:20:48 +0200 Message-ID: Subject: Nested modules with equal types From: Dennis Walter To: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; ocaml:01 sig:01 abbreviation:01 cyclic:01 define:02 define:02 modules:02 modules:02 defined:02 module:03 module:03 nested:04 nested:04 types:05 sense:10 Hi, is there a way in OCaml to define nested modules where a type t of the inner module is defined as equal to the out type of the same name? For example, I would like to define a file outer.ml containing type t module Inner : sig type t = t end but I get the error Error: The type abbreviation t is cyclic which kind of makes sense. Can I somehow refer to Outer.t in the Inner module? (Outer.t does in fact not work either). Thanks!