text
stringlengths
12
786k
module Search = struct type result_element = Odoc_search . result_element = Res_module of Module . t_module | Res_module_type of Module . t_module_type | Res_class of Class . t_class | Res_class_type of Class . t_class_type | Res_value of Value . t_value | Res_type of Type . t_type | Res_extensio...
module Scan = struct class scanner = Odoc_scan . scanner end
module Dep = struct let kernel_deps_of_modules = Odoc_dep . kernel_deps_of_modules let deps_of_types = Odoc_dep . deps_of_types end
let separate_files = ref false
let latex_titles = ref [ 0 , " section " ; 1 , " section " ; 2 , " subsection " ; 3 , " subsubsection " ; 4 , " paragraph " ; 5 , " subparagraph " ; ]
let latex_value_prefix = ref Odoc_messages . default_latex_value_prefix
let latex_type_prefix = ref Odoc_messages . default_latex_type_prefix
let latex_type_elt_prefix = ref Odoc_messages . default_latex_type_elt_prefix
let latex_extension_prefix = ref Odoc_messages . default_latex_extension_prefix
let latex_exception_prefix = ref Odoc_messages . default_latex_exception_prefix
let latex_module_prefix = ref Odoc_messages . default_latex_module_prefix
let latex_module_type_prefix = ref Odoc_messages . default_latex_module_type_prefix
let latex_class_prefix = ref Odoc_messages . default_latex_class_prefix
let latex_class_type_prefix = ref Odoc_messages . default_latex_class_type_prefix
let latex_attribute_prefix = ref Odoc_messages . default_latex_attribute_prefix
let latex_method_prefix = ref Odoc_messages . default_latex_method_prefix
let new_buf ( ) = Buffer . create 1024
let new_fmt ( ) = let b = new_buf ( ) in let fmt = Format . formatter_of_buffer b in ( fmt , fun ( ) -> Format . pp_print_flush fmt ( ) ; let s = Buffer . contents b in Buffer . reset b ; s )
let ps f s = Format . fprintf f " % s " s
let rec merge_codepre = function [ ] -> [ ] | [ e ] -> [ e ] | ( CodePre s1 ) :: ( CodePre s2 ) :: q -> merge_codepre ( ( CodePre ( s1 " ^\ n " ^ s2 ) ) :: q ) | e :: q -> e :: ( merge_codepre q )
let print_concat fmt sep f = let rec iter = function [ ] -> ( ) | [ c ] -> f c | c :: q -> f c ; ps fmt sep ; iter q in iter object ( self ) method section_style level s = try let sec = List . assoc level ! latex_titles in " " \\^ sec " { " ^^ s " } ^\ n " with Not_fo...
module Generator = struct object ( self ) inherit text inherit Odoc_to_text . to_text as to_text inherit info method first_and_rest_of_info i_opt = match i_opt with None -> ( [ ] , [ ] ) | Some i -> match i . Odoc_info . i_desc with None -> ( [ ] , self # text_of_info ~ block : ...
module type Latex_generator = module type of Generator
let content " =\ \ n \ \ n \\ NeedsTeXFormat { LaTeX2e } \ \ n \\ ProvidesPackage { ocamldoc } \ \ n \ \ n \\ newenvironment { ocamldoccode } { %\ \ n { \\ egroup \\ par } \ \ n \ \ n \\ def \\ g @ remfrom @ specials # 1 { %\ \ n \ \ n \\ newenvironment { ocamldoc...
module Html = ( val ( match ! Odoc_args . current_generator with None -> ( module Odoc_html . Generator : Odoc_html . Html_generator ) | Some ( Odoc_gen . Html m ) -> m | _ -> failwith " A non - html generator is already set . Cannot install the Todo - list html generator " ) : O...
module Generator = struct object ( self ) inherit Html . html method ! private html_of_module_comment b text = let br1 , br2 = match text with [ ( Odoc_info . Title _ ) ] -> false , false | ( Odoc_info . Title _ ) :: _ -> false , true | _ -> true , true in if br1 then p b " ...
let _ = Odoc_args . set_generator ( Odoc_gen . Html ( module Generator : Odoc_html . Html_generator ) ) ; ;
let man_suffix = ref Odoc_messages . default_man_suffix
let man_section = ref Odoc_messages . default_man_section
let man_mini = ref false
let new_buf ( ) = Buffer . create 1024
let linebreak = " \ n . sp \ n " ; ; object ( self ) val mutable tag_functions = ( [ ] : ( string * ( Odoc_info . text -> string ) ) list ) method virtual man_of_text : Buffer . t -> Odoc_info . text -> unit method str_man_of_text t = let b = Buffer . create 256 in sel...
module Generator = struct let re_slash = Str . regexp_string " " / in object ( self ) inherit info method file_name name = let s = Printf . sprintf " % s . % s " name ! man_suffix in Str . global_replace re_slash " slash " s method escape ( s : string ) = let len = String . leng...
module type Man_generator = module type of Generator
let merge_before_tags l = let rec iter acc = function [ ] -> List . rev acc | ( v , text ) :: q -> let ( l1 , l2 ) = List . partition ( fun ( v2 , _ ) -> v = v2 ) q in let acc = let text = List . fold_left ( fun acc t -> acc @ [ Raw " " ] @ t ) text ( List . ...
let version_separators = Str . regexp " [ . ] " ; ; \\\\+
let merge_info merge_options ( m1 : info ) ( m2 : info ) = let new_desc_opt = match m1 . i_desc , m2 . i_desc with None , None -> None | None , Some d | Some d , None -> Some d | Some d1 , Some d2 -> if List . mem Merge_description merge_options then Some ( d1 @ ( Newline :: d2 )...
let merge_info_opt merge_options mli_opt ml_opt = match mli_opt , ml_opt with None , Some i -> Some i | Some i , None -> Some i | None , None -> None | Some i1 , Some i2 -> Some ( merge_info merge_options i1 i2 )
let merge_types merge_options mli ml = mli . ty_info <- merge_info_opt merge_options mli . ty_info ml . ty_info ; mli . ty_loc <- { mli . ty_loc with loc_impl = ml . ty_loc . loc_impl } ; mli . ty_code <- ( match mli . ty_code with None -> ml . ty_code | _ -> mli . ty_code ) ;...
let merge_type_extension merge_options mli ml = mli . te_info <- merge_info_opt merge_options mli . te_info ml . te_info ; mli . te_loc <- { mli . te_loc with loc_impl = ml . te_loc . loc_impl } ; mli . te_code <- ( match mli . te_code with None -> ml . te_code | _ -> mli . te_c...
let merge_extension_constructor merge_options mli ml = let new_desc = match mli . xt_text , ml . xt_text with None , None -> None | Some d , None | None , Some d -> Some d | Some d1 , Some d2 -> if List . mem Merge_description merge_options then Some ( merge_info merge_options d1 d2 ) else S...
let rec merge_param_info pi_mli pi_ml = match ( pi_mli , pi_ml ) with ( Simple_name sn_mli , Simple_name sn_ml ) -> if sn_mli . sn_name = " " then Simple_name { sn_mli with sn_name = sn_ml . sn_name } else pi_mli | ( Simple_name _ , Tuple _ ) -> pi_mli | ( Tuple ( _ , t_mli...
let rec merge_parameters param_mli param_ml = match ( param_mli , param_ml ) with ( [ ] , [ ] ) -> [ ] | ( l , [ ] ) | ( [ ] , l ) -> l | ( ( pi_mli :: li ) , ( pi_ml :: l ) ) -> ( merge_param_info pi_mli pi_ml ) :: merge_parameters li l
let merge_classes merge_options mli ml = mli . cl_info <- merge_info_opt merge_options mli . cl_info ml . cl_info ; mli . cl_loc <- { mli . cl_loc with loc_impl = ml . cl_loc . loc_impl } ; mli . cl_parameters <- merge_parameters mli . cl_parameters ml . cl_parameters ; Odoc_class . ...
let merge_class_types merge_options mli ml = mli . clt_info <- merge_info_opt merge_options mli . clt_info ml . clt_info ; mli . clt_loc <- { mli . clt_loc with loc_impl = ml . clt_loc . loc_impl } ; List . iter ( fun a -> try let _ = List . find ( fun ele -> match ele with Class_a...
let rec merge_module_types merge_options mli ml = mli . mt_info <- merge_info_opt merge_options mli . mt_info ml . mt_info ; mli . mt_loc <- { mli . mt_loc with loc_impl = ml . mt_loc . loc_impl } ; List . iter ( fun te -> let rec f exts elems = match exts , elems with [ ] , _ ...
let merge merge_options modules_list = let rec iter = function [ ] -> [ ] | m :: q -> let ( l_same , l_others ) = List . partition ( fun m2 -> m . m_name = m2 . m_name ) q in match l_same with [ ] -> m :: ( iter l_others ) | m2 :: [ ] -> ( let f b = if ! Odoc_global...
let usage = " Usage : " ( ^ Sys . argv . ( 0 ) ) " ^ [ options ] < files >\ n "
let options_are = " Options are " :
let latex_only = " ( LaTeX only ) "
let texi_only = " ( TeXinfo only ) "
let latex_texi_only = " ( LaTeX and TeXinfo only ) "
let html_only = " ( HTML only ) "
let html_latex_only = " ( HTML and LaTeX only ) "
let html_latex_texi_only = " ( HTML , LaTeX and TeXinfo only ) "
let man_only = " ( man only ) "
let option_impl " =< file > Consider < file > as a . ml file "
let option_intf " =< file > Consider < file > as a . mli file "
let option_text " =< file > Consider < file > as a . txt file "
let display_custom_generators_dir = " Display custom generators standard directory and exit "
let add_load_dir = " < dir > Add the given directory to the search path for custom \ n " ^ " \ t \ tgenerators "
let load_file = " < file . cm [ o | a | xs ] > Load file defining a new documentation generator "
let werr = " Treat ocamldoc warnings as errors "
let show_missed_crossref = " Show missed cross - reference opportunities "
let hide_warnings = " do not print ocamldoc warnings "
let target_dir = " < dir > Generate files in directory < dir , > rather than in current \ n " ^ " \ t \ tdirectory ( for man and HTML generators ) "
let dump = " < file > Dump collected information into < file " >
let load = " < file > Load information from < file > ; may be used several times "
let css_style = " < file > Use content of < file > as CSS style definition " ^ html_only
let index_only = " Generate index files only " ^ html_only
let colorize_code = " Colorize code even in documentation pages " ^ html_only
let html_short_functors = " Use short form to display functor types " ^ html_only
let charset c = Printf . sprintf " < s > Add information about character encoding being s \ n \ t \ t ( default is % s ) " c
let generate_html = " Generate HTML documentation "
let generate_latex = " Generate LaTeX documentation "
let generate_texinfo = " Generate TeXinfo documentation "
let generate_man = " Generate man pages "
let generate_dot = " Generate dot code of top modules dependencies "
let option_not_in_native_code op = " Option " ^ op " ^ not available in native code version . "
let out_file = " < file > Set the output file name , used by texi , latex and dot generators \ n " ^ " \ t \ t ( default is " ^ default_out_file " ) ^\ n " ^ " \ t \ tor the prefix of index files for the HTML generator \ n " ^ " \ t \ t ( default is index ) "
let dot_include_all = " Include all modules in the dot output , not only the \ n " ^ " \ t \ tmodules given on the command line "
let dot_types = " Generate dependency graph for types instead of modules "
let default_dot_colors = [ [ " darkturquoise " ; " darkgoldenrod2 " ; " cyan " ; " green " ; ] ; [ " magenta " ; " yellow " ; " burlywood1 " ; " aquamarine " ; " floralwhite " ; " lightpink " ] ; [ " lightblue " ; " mediumturquoise " ;...
let dot_colors = " < c1 , c2 , . . . , cn >\ n " ^ " \ t \ tUse colors c1 , c1 , . . . , cn in the dot output \ n " ^ " \ t \ t ( default list is " ^ ( String . concat " , \ n \ t \ t " ( List . map ( String . concat " , " ) default_dot_color...
let dot_reduce = " Perform a transitive reduction on the selected dependency graph \ n " ^ " \ t \ tbefore the dot output "
let man_mini = " Generate man pages only for modules , module types , classes \ n " ^ " \ t \ tand class types " ^ man_only
let man_section = " < section > Use < section > in man page files " ^ " ( default is " ^ default_man_section " ) ^ " ^ man_only " ^\ n "
let man_suffix = " < suffix > Use < suffix > for man page files " ^ " ( default is " ^ default_man_suffix " ) ^ " ^ man_only " ^\ n "
let option_title = " < title > Use < title > as title for the generated documentation "
let option_intro = " < file > Use content of < file > as ocamldoc text to use as introduction \ n " ^ " \ t \ t " ( ^ html_latex_texi_only )
let with_parameter_list = " Display the complete list of parameters for functions and \ n " ^ " \ t \ tmethods " ^ html_only
let hide_modules = " < M1 , M2 . M3 , . . . > Hide the given complete module names in generated doc "
let no_header = " Suppress header in generated documentation \ n \ t \ t " ^ latex_texi_only
let no_trailer = " Suppress trailer in generated documentation \ n \ t \ t " ^ latex_texi_only
let separate_files = " Generate one file per toplevel module " ^ latex_only
let latex_title ref_titles = " n , style Associate { n } to the given sectioning style \ n " ^ " \ t \ t ( e . g . ' section ' ) in the latex output " ^ latex_only " ^\ n " ^ " \ t \ tDefault sectioning is :\ n \ t \ t " ^ ( String . concat " \ n \ t \ t " ( ...
let latex_value_prefix = " < string >\ n " ^ " \ t \ tUse < string > as prefix for the LaTeX labels of values . \ n " ^ " \ t \ t ( default is " " \^ default_latex_value_prefix " " ) " ^\
let latex_type_prefix = " < string >\ n " ^ " \ t \ tUse < string > as prefix for the LaTeX labels of types . \ n " ^ " \ t \ t ( default is " " \^ default_latex_type_prefix " " ) " ^\
let latex_type_elt_prefix = " < string >\ n " ^ " \ t \ tUse < string > as prefix for the LaTeX labels of type elements . \ n " ^ " \ t \ t ( default is " " \^ default_latex_type_elt_prefix " " ) " ^\
let latex_extension_prefix = " < string >\ n " ^ " \ t \ tUse < string > as prefix for the LaTeX labels of extensions . \ n " ^ " \ t \ t ( default is " " \^ default_latex_extension_prefix " " ) " ^\