summaryrefslogtreecommitdiff
path: root/ocamldoc/generators
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2016-03-10 00:21:42 +0100
committeralainfrisch <alain@frisch.fr>2016-03-15 22:47:33 +0100
commitb8e418e9f3e8464314111404e2207d65d04d4a05 (patch)
tree7d764d62b49224ad63b8325c9ca7b155a54f08bd /ocamldoc/generators
parentf2b45c0d0f5ed5afefd6e5c72f91e62d8dbea55d (diff)
downloadocaml-b8e418e9f3e8464314111404e2207d65d04d4a05.tar.gz
More warnings for ocamldoc.
Diffstat (limited to 'ocamldoc/generators')
-rw-r--r--ocamldoc/generators/odoc_literate.ml13
-rw-r--r--ocamldoc/generators/odoc_todo.ml26
2 files changed, 19 insertions, 20 deletions
diff --git a/ocamldoc/generators/odoc_literate.ml b/ocamldoc/generators/odoc_literate.ml
index da71b9ef6b..aec198081a 100644
--- a/ocamldoc/generators/odoc_literate.ml
+++ b/ocamldoc/generators/odoc_literate.ml
@@ -16,7 +16,6 @@
open Odoc_info
module Naming = Odoc_html.Naming
open Odoc_info.Value
-open Odoc_info.Module
let p = Printf.bprintf
let bp = Printf.bprintf
@@ -38,20 +37,20 @@ module Generator =
struct
class html =
object (self)
- inherit Html.html as html
+ inherit Html.html
- method private html_of_module_comment b text =
+ method! private html_of_module_comment b text =
let br1, br2 =
match text with
- [(Odoc_info.Title (n, l_opt, t))] -> false, false
- | (Odoc_info.Title (n, l_opt, t)) :: _ -> false, true
+ [(Odoc_info.Title _)] -> false, false
+ | (Odoc_info.Title _) :: _ -> false, true
| _ -> true, true
in
if br1 then p b "<br/>";
self#html_of_text b text;
if br2 then p b "<br/><br/>\n"
- method private html_of_Title b n l_opt t =
+ method! private html_of_Title b n l_opt t =
let label1 = self#create_title_label (n, l_opt, t) in
p b "<a name=\"%s\"></a>\n" (Naming.label_target label1);
p b "<h%d>" n;
@@ -75,7 +74,7 @@ class html =
Printf.bprintf b "</div>"
(** Print html code for a value. *)
- method private html_of_value b v =
+ method! private html_of_value b v =
Odoc_info.reset_type_names ();
self#html_of_info b v.val_info;
bs b "<pre>";
diff --git a/ocamldoc/generators/odoc_todo.ml b/ocamldoc/generators/odoc_todo.ml
index 01d3d94a75..d404e9b0f5 100644
--- a/ocamldoc/generators/odoc_todo.ml
+++ b/ocamldoc/generators/odoc_todo.ml
@@ -107,44 +107,44 @@ struct
l;
p b "</div>"
- method scan_value v =
+ method! scan_value v =
self#gen_if_tag
v.val_name
(Odoc_html.Naming.complete_value_target v)
v.val_info
- method scan_type t =
+ method! scan_type t =
self#gen_if_tag
t.ty_name
(Odoc_html.Naming.complete_type_target t)
t.ty_info
- method scan_extension_constructor x =
+ method! scan_extension_constructor x =
self#gen_if_tag
x.xt_name
(Odoc_html.Naming.complete_extension_target x)
x.xt_type_extension.te_info
- method scan_exception e =
+ method! scan_exception e =
self#gen_if_tag
e.ex_name
(Odoc_html.Naming.complete_exception_target e)
e.ex_info
- method scan_attribute a =
+ method! scan_attribute a =
self#gen_if_tag
a.att_value.val_name
(Odoc_html.Naming.complete_attribute_target a)
a.att_value.val_info
- method scan_method m =
+ method! scan_method m =
self#gen_if_tag
m.met_value.val_name
(Odoc_html.Naming.complete_method_target m)
m.met_value.val_info
(** This method scan the elements of the given module. *)
- method scan_module_elements m =
+ method! scan_module_elements m =
List.iter
(fun ele ->
match ele with
@@ -161,30 +161,30 @@ struct
)
(Odoc_module.module_elements ~trans: false m)
- method scan_included_module _ = ()
+ method! scan_included_module _ = ()
- method scan_class_pre c =
+ method! scan_class_pre c =
self#gen_if_tag
c.cl_name
(fst (Odoc_html.Naming.html_files c.cl_name))
c.cl_info;
true
- method scan_class_type_pre ct =
+ method! scan_class_type_pre ct =
self#gen_if_tag
ct.clt_name
(fst (Odoc_html.Naming.html_files ct.clt_name))
ct.clt_info;
true
- method scan_module_pre m =
+ method! scan_module_pre m =
self#gen_if_tag
m.m_name
(fst (Odoc_html.Naming.html_files m.m_name))
m.m_info;
true
- method scan_module_type_pre mt =
+ method! scan_module_type_pre mt =
self#gen_if_tag
mt.mt_name
(fst (Odoc_html.Naming.html_files mt.mt_name))
@@ -202,7 +202,7 @@ struct
html generator class *)
val mutable scanner = new scanner (new Html.html )
- method generate modules =
+ method! generate modules =
(* prevent having the 'todo' tag signaled as not handled *)
tag_functions <- ("todo", (fun _ -> "")) :: tag_functions;
(* generate doc as usual *)