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=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 25A8FBBAF for ; Wed, 20 Aug 2008 16:33:35 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgQBAITHq0jRVdkVnGdsb2JhbACRWT4BAQEBAQgDCgcRm3+HGAECg14 X-IronPort-AV: E=Sophos;i="4.32,239,1217800800"; d="scan'208";a="28366075" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 20 Aug 2008 16:33:35 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m7KEXQkJ026611 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 20 Aug 2008 16:33:34 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgQBAITHq0jRVdkVnGdsb2JhbACRWT4BAQEBAQgDCgcRm3+HGAECg14 X-IronPort-AV: E=Sophos;i="4.32,239,1217800800"; d="scan'208";a="28366019" Received: from mail-gx0-f21.google.com ([209.85.217.21]) by mail4-smtp-sop.national.inria.fr with ESMTP; 20 Aug 2008 16:31:53 +0200 Received: by gxk14 with SMTP id 14so224817gxk.9 for ; Wed, 20 Aug 2008 07:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition:x-google-sender-auth; bh=97h/MICUWtpo4lnXh3YO1BLiL8cOQPwiuyT4dz8D8qw=; b=jwvFx8WXElOXcUX/V6ea6myCfhhU3x/R8U1LNdFzBBcJivVgtT218bmcb2zxGXuOQi O68BejQHOfRwS0fjD6C5WbhdThc/D4OGBg6FBR/NsV11jt64JLNEfpRdwv/4b6pZJk0F KtMkOvxmO7O7FF0tlDUE9ukn+HjiHsgdslJvs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=mEdMYzC45k+QO3pvROMfkaytWwvRVLM1QW0gNmK9QBC+7Q7LQ5pzVDnNU7uD6qYkoM OQkOgJPZo/5qkLQW6/Vk20TNLsw7c4KhUC4o45+IBm0Octwv7zZ052d7hK2O3nSkErKg HKrUZ8jaam04BeehE5Uk6+FevyPaOJoobZk8E= Received: by 10.142.225.11 with SMTP id x11mr42733wfg.101.1219242711914; Wed, 20 Aug 2008 07:31:51 -0700 (PDT) Received: by 10.142.105.11 with HTTP; Wed, 20 Aug 2008 07:31:51 -0700 (PDT) Message-ID: <2b7b425b0808200731x6dd6aa12udd03c16dbb8eae05@mail.gmail.com> Date: Wed, 20 Aug 2008 16:31:51 +0200 From: "=?ISO-8859-1?Q?J=E9r=E9mie_Lumbroso?=" Sender: jeremie.lumbroso@gmail.com To: caml-list@inria.fr Subject: Specifying recursive modules? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Google-Sender-Auth: 066c51c90a97672b X-Miltered: at concorde with ID 48AC2B36.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; recursive:01 ocaml:01 ocaml's:01 recursive:01 toplevel:01 toplevel:01 sig:01 syntax:01 ocaml:01 mli:01 coupling:01 syntax:01 bug:01 rec:01 rec:01 Hello, I'd always thought of separating specification and definition as simply not possible in OCaml, but OCaml's reference manual (3.10, which is, as far as I can tell, the most recent version of the documentation) seems to contradict my assumption: http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#htoc100 It says that recursive specifications can be written as: module rec : { and ... } What does this mean? When I attempt to use this feature in the toplevel, it results in an error: # module rec Tmp : sig type t =3D Stop | Next of Tmp.t end**;;** Syntax error On the off-chance that OCaml might explicitly need an "and", I also tried adding a second dummy module to the definition, but no dice ... When I try to use this feature in a .mli/.ml file coupling, I get the same (syntax) error. Have I misunderstood the usage? Or has this been removed since its introduction (and the documentation not updated accordingly)? Or is this a bug? J=E9r=E9mie