caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: "OCaml List (caml-list@inria.fr)" <caml-list@inria.fr>
Subject: RE: [Caml-list] Anonymous sum types in functors
Date: Tue, 25 Jun 2013 08:39:39 +0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9CC86C22B@Remus.metastack.local> (raw)
In-Reply-To: <CAF1Sy-FsjPAroRxxKCpOZPsgnsk9vUVr5-H3x65frvXCjay08Q@mail.gmail.com>

Kristopher Micinski wrote:
> On Mon, Jun 24, 2013 at 5:39 AM, David Allsopp 
> <dra-news@metastack.com>
> wrote:
> > 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 = struct
> >>   type t = A | B
> >>   let compare = compare
> >>   (* Other useful operations over flags, e.g. *)
> >>   let to_string = function A -> "A" | B -> "B"
> >> end
> >
> > The "reason" for wanting to avoid that in this instance is the 
> > specific application - the sets are actually bit masks and there are 
> > about 50 of them (using a code generator, unsurprisingly). Given 
> > that the ocamldoc output is 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.

(**/**) is mentioned in the manual for ocamldoc (and used in the standard library, typically to "hide" the documentation for unsafe functions) - see 15.2.2 of the reference manual.

All these types do need documenting :o) But splitting the documentation for each concept across two modules will necessarily make the documentation physically longer!


David

  parent reply	other threads:[~2013-06-25  8:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-23  7:16 David Allsopp
2013-06-23 15:14 ` Xavier Leroy
2013-06-23 23:15 ` Jacques Garrigue
2013-06-24  9:39   ` David Allsopp
2013-06-24 14:37     ` Kristopher Micinski
2013-06-24 14:41       ` Raphaël Proust
2013-06-24 19:13         ` Kristopher Micinski
2013-06-25  8:39       ` David Allsopp [this message]
     [not found] <563607038852382852@orange.fr>
2013-06-23  9:48 ` David Allsopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E51C5B015DBD1348A1D85763337FB6D9CC86C22B@Remus.metastack.local \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).