Module type Markup.Foo

The first special comment of the file is the comment associated with the whole module.

Special comments can be placed between elements and are kept by the OCamldoc tool, but are not associated to any element. @-tags in these comments are ignored.

Comments like the one above, with more than two asterisks, are ignored.

val f : int -> int -> int

The comment for function f.

The continuation of the comment for function f.

exception My_exception of int -> int * int

Comment for exception My_exception, even with a simple comment between the special comment and the exception.

type weather =
  1. | Rain of int
    (*

    The comment for constructor Rain

    *)
  2. | Sun
    (*

    The comment for constructor Sun

    *)

Comment for type weather

type weather2 =
  1. | Rain of int
    (*

    The comment for constructor Rain

    *)
  2. | Sun
    (*

    The comment for constructor Sun

    *)

Comment for type weather2

I can continue the comment for type weather2 here because there is already a comment associated to the last constructor.

type my_record = {
  1. foo : int;
    (*

    Comment for field foo

    *)
  2. bar : string;
    (*

    Comment for field bar

    *)
}

The comment for type my_record

Continuation of comment for type my_record

val foo : string

Comment for foo

This comment is associated to foo and not to bar.

val bar : string

This comment is associated to bar.

class cl : object ... end

Interesting information about cl

class my_class : object ... end

The comment for class my_class

class type my_class_type = object ... end

The comment for the class type my_class_type

module Foo : sig ... end

The comment for module Foo

module type my_module_type = sig ... end

The comment for module type my_module_type.