diff --git a/check/classic/classic.exp b/check/classic/classic.exp index f46f87e1..76a4f78f 100644 --- a/check/classic/classic.exp +++ b/check/classic/classic.exp @@ -33,6 +33,19 @@ ./examples/docs/exported_values/hello_world/hello_world_with_intf.mli:3: goodbye ./examples/docs/exported_values/hello_world/hello_world_with_intf.mli:4: world +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:5: redefined_used + ./examples/docs/methods/code_constructs/factory_fun/factory_fun_bin.ml:2: unused_factory ./examples/docs/methods/code_constructs/immediate_object/immediate_object_bin.ml:2: unused_obj diff --git a/check/classic/classic.ref b/check/classic/classic.ref index 5fda775e..5ec0a5d2 100644 --- a/check/classic/classic.ref +++ b/check/classic/classic.ref @@ -33,10 +33,23 @@ ./examples/docs/exported_values/hello_world/hello_world_with_intf.mli:3: goodbye ./examples/docs/exported_values/hello_world/hello_world_with_intf.mli:4: world -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:20: copy: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:25: id: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:40: new_method: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:41: public_method_label: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.mli:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:5: redefined_used + ./examples/docs/methods/code_constructs/factory_fun/factory_fun_bin.ml:2: unused_factory ./examples/docs/methods/code_constructs/immediate_object/immediate_object_bin.ml:2: unused_obj @@ -768,7 +781,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 643 -Success: 585 +Total: 653 +Success: 595 Failed: 58 -Ratio: 90.9797822706% +Ratio: 91.1179173047% diff --git a/check/internal/internal.exp b/check/internal/internal.exp index 3f47d1c6..5d1487c3 100644 --- a/check/internal/internal.exp +++ b/check/internal/internal.exp @@ -23,6 +23,19 @@ ./examples/docs/exported_values/code_constructs/module/module_lib.mli:6: M.unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:5: redefined_used + ./examples/docs/methods/code_constructs/factory_fun/factory_fun_bin.ml:2: unused_factory ./examples/docs/methods/code_constructs/immediate_object/immediate_object_bin.ml:2: unused_obj diff --git a/check/internal/internal.ref b/check/internal/internal.ref index 2dadd916..dad1e95c 100644 --- a/check/internal/internal.ref +++ b/check/internal/internal.ref @@ -23,10 +23,23 @@ ./examples/docs/exported_values/code_constructs/module/module_lib.mli:6: M.unused -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:20: copy: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:25: id: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:40: new_method: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:41: public_method_label: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.mli:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:5: redefined_used + ./examples/docs/methods/code_constructs/factory_fun/factory_fun_bin.ml:2: unused_factory ./examples/docs/methods/code_constructs/immediate_object/immediate_object_bin.ml:2: unused_obj @@ -720,7 +733,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 599 -Success: 541 +Total: 609 +Success: 551 Failed: 58 -Ratio: 90.3171953255% +Ratio: 90.4761904762% diff --git a/check/threshold-1/threshold-1.exp b/check/threshold-1/threshold-1.exp index 1b9d1dd9..d9b5d5ee 100644 --- a/check/threshold-1/threshold-1.exp +++ b/check/threshold-1/threshold-1.exp @@ -23,6 +23,19 @@ ./examples/docs/exported_values/code_constructs/module/module_lib.mli:6: M.unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:5: redefined_used + ./examples/docs/methods/code_constructs/factory_fun/factory_fun_bin.ml:2: unused_factory ./examples/docs/methods/code_constructs/immediate_object/immediate_object_bin.ml:2: unused_obj @@ -152,6 +165,15 @@ ./examples/docs/exported_values/hello_world/hello_world_without_intf.ml:2: hello ./examples/docs/exported_values/hello_world/hello_world_without_intf.ml:3: goodbye +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:5: redefined_used + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:5: redefined_used + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:3: used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:3: used + ./examples/docs/fields_and_constructors/code_constructs/extensible_variant/extensible_variant_bin.ml:5: to_string_opt ./examples/docs/fields_and_constructors/code_constructs/extensible_variant/extensible_variant_lib.mli:7: to_string_opt diff --git a/check/threshold-1/threshold-1.ref b/check/threshold-1/threshold-1.ref index 92c6a0e1..65aaef2a 100644 --- a/check/threshold-1/threshold-1.ref +++ b/check/threshold-1/threshold-1.ref @@ -23,10 +23,23 @@ ./examples/docs/exported_values/code_constructs/module/module_lib.mli:6: M.unused -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:20: copy: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:25: id: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:40: new_method: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:41: public_method_label: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.mli:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:5: redefined_used + ./examples/docs/methods/code_constructs/factory_fun/factory_fun_bin.ml:2: unused_factory ./examples/docs/methods/code_constructs/immediate_object/immediate_object_bin.ml:2: unused_obj @@ -156,6 +169,19 @@ ./examples/docs/exported_values/hello_world/hello_world_without_intf.ml:2: hello ./examples/docs/exported_values/hello_world/hello_world_without_intf.ml:3: goodbye +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:3: used: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml:3: used: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:5: redefined_used + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.mli:3: used: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:3: used: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:5: redefined_used + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:3: used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:3: used + ./examples/docs/fields_and_constructors/code_constructs/extensible_variant/extensible_variant_bin.ml:5: to_string_opt ./examples/docs/fields_and_constructors/code_constructs/extensible_variant/extensible_variant_lib.mli:7: to_string_opt @@ -1176,7 +1202,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 979 -Success: 919 -Failed: 60 -Ratio: 93.8712972421% +Total: 999 +Success: 935 +Failed: 64 +Ratio: 93.5935935936% diff --git a/check/threshold-3-0.5/threshold-3-0.5.exp b/check/threshold-3-0.5/threshold-3-0.5.exp index b520252a..354e0cd3 100644 --- a/check/threshold-3-0.5/threshold-3-0.5.exp +++ b/check/threshold-3-0.5/threshold-3-0.5.exp @@ -23,6 +23,19 @@ ./examples/docs/exported_values/code_constructs/module/module_lib.mli:6: M.unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:5: redefined_used + ./examples/docs/methods/code_constructs/factory_fun/factory_fun_bin.ml:2: unused_factory ./examples/docs/methods/code_constructs/immediate_object/immediate_object_bin.ml:2: unused_obj @@ -152,6 +165,15 @@ ./examples/docs/exported_values/hello_world/hello_world_without_intf.ml:2: hello ./examples/docs/exported_values/hello_world/hello_world_without_intf.ml:3: goodbye +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:5: redefined_used + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:5: redefined_used + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:3: used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:3: used + ./examples/docs/fields_and_constructors/code_constructs/extensible_variant/extensible_variant_bin.ml:5: to_string_opt ./examples/docs/fields_and_constructors/code_constructs/extensible_variant/extensible_variant_lib.mli:7: to_string_opt diff --git a/check/threshold-3-0.5/threshold-3-0.5.ref b/check/threshold-3-0.5/threshold-3-0.5.ref index 1f4f76c1..08716e2e 100644 --- a/check/threshold-3-0.5/threshold-3-0.5.ref +++ b/check/threshold-3-0.5/threshold-3-0.5.ref @@ -23,10 +23,23 @@ ./examples/docs/exported_values/code_constructs/module/module_lib.mli:6: M.unused -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:20: copy: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:25: id: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:40: new_method: Should not be detected -./examples/docs/exported_values/limitations/incl_same_name/oo.mli:41: public_method_label: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.mli:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:2: unused: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:4: redefined_unused + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:2: unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:4: redefined_unused +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:5: redefined_used + ./examples/docs/methods/code_constructs/factory_fun/factory_fun_bin.ml:2: unused_factory ./examples/docs/methods/code_constructs/immediate_object/immediate_object_bin.ml:2: unused_obj @@ -156,6 +169,19 @@ ./examples/docs/exported_values/hello_world/hello_world_without_intf.ml:2: hello ./examples/docs/exported_values/hello_world/hello_world_without_intf.ml:3: goodbye +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:3: used: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml:3: used: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli:5: redefined_used + +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml:5: redefined_used +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.mli:3: used: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:3: used: Should not be detected +./examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml:5: redefined_used + +./examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli:3: used +./examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml:3: used + ./examples/docs/fields_and_constructors/code_constructs/extensible_variant/extensible_variant_bin.ml:5: to_string_opt ./examples/docs/fields_and_constructors/code_constructs/extensible_variant/extensible_variant_lib.mli:7: to_string_opt @@ -1590,7 +1616,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 1311 -Success: 1241 -Failed: 70 -Ratio: 94.6605644546% +Total: 1331 +Success: 1257 +Failed: 74 +Ratio: 94.4402704733% diff --git a/examples/docs/exported_values/limitations/incl_same_name/Makefile b/examples/docs/exported_values/limitations/incl_same_name/Makefile index cd91c72e..ebf1ea23 100644 --- a/examples/docs/exported_values/limitations/incl_same_name/Makefile +++ b/examples/docs/exported_values/limitations/incl_same_name/Makefile @@ -1,12 +1,14 @@ -SRC:=oo.ml - all: build analyze build: - ocamlopt -bin-annot ${SRC} + make -C to_incl + make -C incl_without_intf + make -C incl_with_intf analyze: - dead_code_analyzer --nothing -E all . + ~/proj/dead_code_analyzer/_build/install/default/bin/dead_code_analyzer --nothing -E all . clean: rm -f *.cm* *.o a.out + make -C to_incl clean + make -C incl_without_intf clean diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/Makefile b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/Makefile new file mode 100644 index 00000000..0d8f5fab --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/Makefile @@ -0,0 +1,9 @@ +SRC:=with_intf.mli with_intf.ml without_intf.mli without_intf.ml use.ml + +all: build + +build: + ocamlopt -I ../to_incl -bin-annot to_incl.cmxa ${SRC} + +clean: + rm -f *.cm* *.o a.out diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/use.ml b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/use.ml new file mode 100644 index 00000000..b61d607e --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/use.ml @@ -0,0 +1,3 @@ +let () = + With_intf.redefined_used |> ignore; + Without_intf.redefined_used |> ignore diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.ml b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.ml new file mode 100644 index 00000000..2be15df8 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.ml @@ -0,0 +1,5 @@ +(* incl_with_intf/with_intf.ml *) +include To_incl.With_intf +(* WARNING: Line placement is important. It must match the one found in the original file *) +let redefined_unused = 0 +let redefined_used = 0 diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli new file mode 100644 index 00000000..44ce31c6 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/with_intf.mli @@ -0,0 +1,6 @@ +(* incl_with_intf/with_intf.mli *) +include module type of To_incl.With_intf +(* WARNING: Line placement is important. It must match the one found in the original file *) +val redefined_unused : int +val redefined_used : int + diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml new file mode 100644 index 00000000..357f9ad4 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.ml @@ -0,0 +1,5 @@ +(* incl_with_intf/without_intf.ml *) +include To_incl.Without_intf +(* WARNING: Line placement is important. It must match the one found in the original file *) +let redefined_unused = 0 +let redefined_used = 0 diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli new file mode 100644 index 00000000..265a384e --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_with_intf/without_intf.mli @@ -0,0 +1,6 @@ +(* incl_with_intf/without_intf.mli *) +include module type of To_incl.Without_intf +(* WARNING: Line placement is important. It must match the one found in the original file *) +val redefined_unused : int +val redefined_used : int + diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/Makefile b/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/Makefile new file mode 100644 index 00000000..c50a0b62 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/Makefile @@ -0,0 +1,9 @@ +SRC:=with_intf.ml without_intf.ml use.ml + +all: build + +build: + ocamlopt -I ../to_incl -bin-annot to_incl.cmxa ${SRC} + +clean: + rm -f *.cm* *.o a.out diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/use.ml b/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/use.ml new file mode 100644 index 00000000..b61d607e --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/use.ml @@ -0,0 +1,3 @@ +let () = + With_intf.redefined_used |> ignore; + Without_intf.redefined_used |> ignore diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml b/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml new file mode 100644 index 00000000..4180ee25 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/with_intf.ml @@ -0,0 +1,5 @@ +(* incl_without_intf/with_intf.ml *) +include To_incl.With_intf +(* WARNING: Line placement is important. It must match the one found in the original file *) +let redefined_unused = 0 +let redefined_used = 0 diff --git a/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml b/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml new file mode 100644 index 00000000..0a45c1bc --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/incl_without_intf/without_intf.ml @@ -0,0 +1,5 @@ +(* incl_without_intf/without_intf.ml *) +include To_incl.Without_intf +(* WARNING: Line placement is important. It must match the one found in the original file *) +let redefined_unused = 0 +let redefined_used = 0 diff --git a/examples/docs/exported_values/limitations/incl_same_name/oo.ml b/examples/docs/exported_values/limitations/incl_same_name/oo.ml deleted file mode 100644 index 29e63421..00000000 --- a/examples/docs/exported_values/limitations/incl_same_name/oo.ml +++ /dev/null @@ -1,2 +0,0 @@ -(* oo.ml *) -include Stdlib.Oo diff --git a/examples/docs/exported_values/limitations/incl_same_name/to_incl/Makefile b/examples/docs/exported_values/limitations/incl_same_name/to_incl/Makefile new file mode 100644 index 00000000..34b09941 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/to_incl/Makefile @@ -0,0 +1,11 @@ +SRC:=with_intf.mli with_intf.ml without_intf.ml use.ml + +all: build + +build: + ocamlopt -bin-annot -for-pack To_incl -c ${SRC} + ocamlopt -pack -o to_incl.cmx $(filter %.cmx, ${SRC:%.ml=%.cmx}) + ocamlopt -a -o to_incl.cmxa to_incl.cmx + +clean: + rm -f *.cm* *.o *.a a.out diff --git a/examples/docs/exported_values/limitations/incl_same_name/to_incl/use.ml b/examples/docs/exported_values/limitations/incl_same_name/to_incl/use.ml new file mode 100644 index 00000000..74d3bae8 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/to_incl/use.ml @@ -0,0 +1,4 @@ +let () = + With_intf.used |> ignore; + Without_intf.used |> ignore + diff --git a/examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.ml b/examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.ml new file mode 100644 index 00000000..054d4b92 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.ml @@ -0,0 +1,5 @@ +(* to_incl/with_intf.ml *) +let unused = 0 +let used = 0 +let redefined_unused = 0 +let redefined_used = 0 diff --git a/examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli b/examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli new file mode 100644 index 00000000..a4efb7be --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/to_incl/with_intf.mli @@ -0,0 +1,5 @@ +(* to_incl/with_intf.mli *) +val unused : int +val used : int +val redefined_unused : int +val redefined_used : int diff --git a/examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml b/examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml new file mode 100644 index 00000000..a176a9c5 --- /dev/null +++ b/examples/docs/exported_values/limitations/incl_same_name/to_incl/without_intf.ml @@ -0,0 +1,5 @@ +(* to_incl/without_intf.ml *) +let unused = 0 +let used = 0 +let redefined_unused = 0 +let redefined_used = 0