From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 4D17181792 for ; Mon, 24 Jun 2013 16:37:18 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of krismicinski@gmail.com) identity=pra; client-ip=209.85.214.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="krismicinski@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of krismicinski@gmail.com designates 209.85.214.180 as permitted sender) identity=mailfrom; client-ip=209.85.214.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="krismicinski@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ob0-f180.google.com) identity=helo; client-ip=209.85.214.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="postmaster@mail-ob0-f180.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsBAOlYyFHRVda0k2dsb2JhbABbhAO/N3wIFg4BAQEBBwsLCRQEJIIjAQEFJxkBGx0BAwwGBQsDCi4iAREBBQEcBhMah2EBAw+cfoxNgn+EGQoZJw1Yh3QBBQyPEDMHg2MDl0OPXxYphFIg X-IPAS-Result: AtsBAOlYyFHRVda0k2dsb2JhbABbhAO/N3wIFg4BAQEBBwsLCRQEJIIjAQEFJxkBGx0BAwwGBQsDCi4iAREBBQEcBhMah2EBAw+cfoxNgn+EGQoZJw1Yh3QBBQyPEDMHg2MDl0OPXxYphFIg X-IronPort-AV: E=Sophos;i="4.87,928,1363129200"; d="scan'208";a="23127018" Received: from mail-ob0-f180.google.com ([209.85.214.180]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Jun 2013 16:37:17 +0200 Received: by mail-ob0-f180.google.com with SMTP id eh20so10646387obb.25 for ; Mon, 24 Jun 2013 07:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=dSeCgzg5X5o7gdcx5wdNmBw10uP3yvfEbVV1iXzY6nw=; b=TGEv4CLYjUS85iDATCOmKRHYG0u4qqKkargRd6F3IOG6rezmwoMpDUkZIMRGB90sd8 zb0ddyN/1n1LX+AvI0DYODI6YdsetZzp/k88+I6pc6b5qz5lkN9jcqcRz8b8KdPveOpC 3Qfr5qbbVWIzfeFNB3PczZMzjRQmUAsBONeM8coKDZA+0OaSkcnnIPjaVzD5JDxNfdZ5 lGS5I/fijlmboGavCnI3UjyRJ3S3aypZlZOlDOoiScsDDNIvEaIZeVishKFR++T9AX65 Cge9dwRoA63w7wQtKGY/8G15SSAujRVMBA3m2bW8c0LUU+RYW/IUhw4gWB7N3e1lAowI HPOw== MIME-Version: 1.0 X-Received: by 10.60.155.146 with SMTP id vw18mr6865772oeb.114.1372084635915; Mon, 24 Jun 2013 07:37:15 -0700 (PDT) Received: by 10.182.51.165 with HTTP; Mon, 24 Jun 2013 07:37:15 -0700 (PDT) In-Reply-To: References: <001601ce6fe1$a2ea9390$e8bfbab0$@metastack.com> Date: Mon, 24 Jun 2013 10:37:15 -0400 Message-ID: From: Kristopher Micinski To: David Allsopp Cc: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Anonymous sum types in functors On Mon, Jun 24, 2013 at 5:39 AM, David Allsopp wro= te: > Xavier Leroy wrote: >> On 23/06/13 09:16, David Allsopp wrote: >> > b) Is there a syntactically lighter way to write the module definition? >> >> I would recommend naming your anonymous "struct": >> >> module Flag =3D struct >> type t =3D A | B >> let compare =3D compare >> (* Other useful operations over flags, e.g. *) >> let to_string =3D function A -> "A" | B -> "B" >> end > > The "reason" for wanting to avoid that in this instance is the specific a= pplication - the sets are actually bit masks and there are about 50 of them= (using a code generator, unsurprisingly). Given that the ocamldoc output i= s already going to be interesting, I was trying to avoid having 100 modules= if possible :o) This honestly sounds like something that you should be able to avoid in OCamlDoc. It seems sensible you should be able to mark things as "don't generate documentation for these", but I havent' seen such. Kris