Skip to content

Commit c0820f0

Browse files
committed
add option -no-module-constraint-filter for PR#4588
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8932 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1 parent 5243326 commit c0820f0

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

ocamldoc/odoc_args.ml

+5
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ let keep_code = ref false
108108

109109
let inverse_merge_ml_mli = ref false
110110

111+
let filter_with_module_constraints = ref true
112+
111113
let title = ref (None : string option)
112114

113115
let intro_file = ref (None : string option)
@@ -229,6 +231,9 @@ let options = ref [
229231
"-no-custom-tags", Arg.Set no_custom_tags, M.no_custom_tags ;
230232
"-stars", Arg.Set remove_stars, M.remove_stars ;
231233
"-inv-merge-ml-mli", Arg.Set inverse_merge_ml_mli, M.inverse_merge_ml_mli ;
234+
"-no-module-constraint-filter", Arg.Clear filter_with_module_constraints,
235+
M.no_filter_with_module_constraints ;
236+
232237
"-keep-code", Arg.Set keep_code, M.keep_code^"\n" ;
233238

234239
"-dump", Arg.String (fun s -> dump := Some s), M.dump ;

ocamldoc/odoc_args.mli

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ val keep_code : bool ref
6969
(** To inverse implementation and interface files when merging. *)
7070
val inverse_merge_ml_mli : bool ref
7171

72+
(** To filter module elements according to module type constraints. *)
73+
val filter_with_module_constraints : bool ref
74+
7275
(** The optional title to use in the generated documentation. *)
7376
val title : string option ref
7477

ocamldoc/odoc_ast.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,8 @@ module Analyser =
16171617
p_modtype tt_modtype
16181618
in
16191619
let tt_modtype = Odoc_env.subst_module_type env tt_modtype in
1620-
filter_module_with_module_type_constraint m_base2 tt_modtype;
1620+
if !Odoc_args.filter_with_module_constraints then
1621+
filter_module_with_module_type_constraint m_base2 tt_modtype;
16211622
{
16221623
m_base with
16231624
m_type = tt_modtype ;

ocamldoc/odoc_info.mli

+6
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,12 @@ module Args :
945945
(** The optional title to use in the generated documentation. *)
946946
val title : string option ref
947947

948+
(** To inverse [.ml] and [.mli] files while merging comments. *)
949+
val inverse_merge_ml_mli : bool ref
950+
951+
(** To filter module elements according to module type constraints. *)
952+
val filter_with_module_constraints : bool ref
953+
948954
(** To keep the code while merging, when we have both .ml and .mli files for a module. *)
949955
val keep_code : bool ref
950956

ocamldoc/odoc_messages.ml

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ let no_custom_tags = "\n\t\tDo not allow custom @-tags"
167167
let remove_stars = "\tRemove beginning blanks of comment lines, until the first '*'"
168168
let keep_code = "\tAlways keep code when available"
169169
let inverse_merge_ml_mli = "\n\t\tInverse implementations and interfaces when merging"
170+
let no_filter_with_module_constraints = "\n\t\tDo not filter module elements using module type constraints"
170171
let merge_description = ('d', "merge description")
171172
let merge_author = ('a', "merge @author")
172173
let merge_version = ('v', "merge @version")

0 commit comments

Comments
 (0)