@@ -774,11 +774,11 @@ module Make_renderer (R : S) : sig
774774
775775 val targets : docs :string -> unit Term .t * Term .info
776776
777- val targets_impl : docs :string -> unit Term .t * Term .info
777+ val targets_source : docs :string -> unit Term .t * Term .info
778778
779779 val generate : docs :string -> unit Term .t * Term .info
780780
781- val generate_impl : docs :string -> unit Term .t * Term .info
781+ val generate_source : docs :string -> unit Term .t * Term .info
782782end = struct
783783 let input_odoc =
784784 let doc = " Input file." in
@@ -862,19 +862,25 @@ end = struct
862862
863863 let generate ~docs = Generate. (cmd, info ~docs )
864864
865- module Generate_impl = struct
865+ module Generate_source = struct
866866 let generate extra _hidden output_dir syntax extra_suffix input_file
867867 warnings_options source_file =
868- let file = Fs.File. of_string input_file in
869- Rendering. generate_impl_odoc ~renderer: R. renderer ~warnings_options
870- ~syntax ~output: output_dir ~extra_suffix ~source_file extra file
868+ Rendering. generate_source_odoc ~renderer: R. renderer ~warnings_options
869+ ~syntax ~output: output_dir ~extra_suffix ~source_file extra input_file
870+
871+ let input_odocl =
872+ let doc = " Linked implementation file." in
873+ Arg. (
874+ required
875+ & opt (some convert_fpath) None
876+ & info [ " impl" ] ~doc ~docv: " impl-file.odocl" )
871877
872878 let source_file =
873879 let doc = " Source code for the implementation unit." in
874880 Arg. (
875- value
876- & opt (some convert_fpath) None
877- & info [ " source " ] ~doc ~docv: " file .ml" )
881+ required
882+ & pos 0 (some convert_fpath) None
883+ & info ~doc ~docv: " FILE .ml" [] )
878884
879885 let cmd =
880886 let syntax =
@@ -895,10 +901,10 @@ end = struct
895901 Format. sprintf " Generate %s files from a $(i,impl-*.odocl)."
896902 R. renderer.name
897903 in
898- Term. info ~docs ~doc (R. renderer.name ^ " -generate-impl " )
904+ Term. info ~docs ~doc (R. renderer.name ^ " -generate-source " )
899905 end
900906
901- let generate_impl ~docs = Generate_impl . (cmd, info ~docs )
907+ let generate_source ~docs = Generate_source . (cmd, info ~docs )
902908
903909 module Targets = struct
904910 let list_targets output_dir directories extra odoc_file =
@@ -940,16 +946,16 @@ end = struct
940946
941947 let targets ~docs = Targets. (cmd, info ~docs )
942948
943- module Targets_impl = struct
949+ module Targets_source = struct
944950 let list_targets output_dir source_file extra odoc_file =
945- let odoc_file = Fs.File. of_string odoc_file in
946951 let warnings_options =
947952 { Odoc_model.Error. warn_error = false ; print_warnings = false }
948953 in
949- Rendering. targets_impl_odoc ~warnings_options ~syntax: OCaml
954+ Rendering. targets_source_odoc ~warnings_options ~syntax: OCaml
950955 ~renderer: R. renderer ~output: output_dir ~extra ~source_file odoc_file
951956
952- let source_file = Generate_impl. source_file
957+ let source_file = Generate_source. source_file
958+ let input_odocl = Generate_source. input_odocl
953959
954960 let cmd =
955961 Term. (
@@ -960,13 +966,13 @@ end = struct
960966 let info ~docs =
961967 let doc =
962968 Format. sprintf
963- " Print the files that would be generated by $(i,%s-generate-impl )."
969+ " Print the files that would be generated by $(i,%s-generate-source )."
964970 R. renderer.name
965971 in
966- Term. info (R. renderer.name ^ " -targets-impl " ) ~docs ~doc
972+ Term. info (R. renderer.name ^ " -targets-source " ) ~docs ~doc
967973 end
968974
969- let targets_impl ~docs = Targets_impl . (cmd, info ~docs )
975+ let targets_source ~docs = Targets_source . (cmd, info ~docs )
970976end
971977
972978module Odoc_latex_url : sig
@@ -1528,7 +1534,7 @@ let () =
15281534 Compile_asset. (cmd, info ~docs: section_pipeline);
15291535 Odoc_link. (cmd, info ~docs: section_pipeline);
15301536 Odoc_html. generate ~docs: section_pipeline;
1531- Odoc_html. generate_impl ~docs: section_pipeline;
1537+ Odoc_html. generate_source ~docs: section_pipeline;
15321538 Support_files_command. (cmd, info ~docs: section_pipeline);
15331539 Compile_impl. (cmd, info ~docs: section_pipeline);
15341540 Indexing. (cmd, info ~docs: section_pipeline);
@@ -1539,7 +1545,7 @@ let () =
15391545 Targets.Support_files. (cmd, info ~docs: section_support);
15401546 Odoc_error. (cmd, info ~docs: section_support);
15411547 Odoc_html. targets ~docs: section_support;
1542- Odoc_html. targets_impl ~docs: section_support;
1548+ Odoc_html. targets_source ~docs: section_support;
15431549 Odoc_manpage. targets ~docs: section_support;
15441550 Odoc_latex. targets ~docs: section_support;
15451551 Depends.Compile. (cmd, info ~docs: section_support);
0 commit comments