File tree 5 files changed +17
-1
lines changed
5 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,8 @@ let keep_code = ref false
108
108
109
109
let inverse_merge_ml_mli = ref false
110
110
111
+ let filter_with_module_constraints = ref true
112
+
111
113
let title = ref (None : string option )
112
114
113
115
let intro_file = ref (None : string option )
@@ -229,6 +231,9 @@ let options = ref [
229
231
" -no-custom-tags" , Arg. Set no_custom_tags, M. no_custom_tags ;
230
232
" -stars" , Arg. Set remove_stars, M. remove_stars ;
231
233
" -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
+
232
237
" -keep-code" , Arg. Set keep_code, M. keep_code^ " \n " ;
233
238
234
239
" -dump" , Arg. String (fun s -> dump := Some s), M. dump ;
Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ val keep_code : bool ref
69
69
(* * To inverse implementation and interface files when merging. *)
70
70
val inverse_merge_ml_mli : bool ref
71
71
72
+ (* * To filter module elements according to module type constraints. *)
73
+ val filter_with_module_constraints : bool ref
74
+
72
75
(* * The optional title to use in the generated documentation. *)
73
76
val title : string option ref
74
77
Original file line number Diff line number Diff line change @@ -1617,7 +1617,8 @@ module Analyser =
1617
1617
p_modtype tt_modtype
1618
1618
in
1619
1619
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;
1621
1622
{
1622
1623
m_base with
1623
1624
m_type = tt_modtype ;
Original file line number Diff line number Diff line change @@ -945,6 +945,12 @@ module Args :
945
945
(* * The optional title to use in the generated documentation. *)
946
946
val title : string option ref
947
947
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
+
948
954
(* * To keep the code while merging, when we have both .ml and .mli files for a module. *)
949
955
val keep_code : bool ref
950
956
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ let no_custom_tags = "\n\t\tDo not allow custom @-tags"
167
167
let remove_stars = " \t Remove beginning blanks of comment lines, until the first '*'"
168
168
let keep_code = " \t Always keep code when available"
169
169
let inverse_merge_ml_mli = " \n\t\t Inverse implementations and interfaces when merging"
170
+ let no_filter_with_module_constraints = " \n\t\t Do not filter module elements using module type constraints"
170
171
let merge_description = ('d' , " merge description" )
171
172
let merge_author = ('a' , " merge @author" )
172
173
let merge_version = ('v' , " merge @version" )
You can’t perform that action at this time.
0 commit comments