Typos and basic grammar error fixing (#1280)
parent
9a1ddfa2da
commit
72cfdd56e9
4
Changes
4
Changes
|
@ -179,6 +179,10 @@ Working version
|
|||
|
||||
- GPR#1187: Minimal documentation for compiler plugins
|
||||
(Florian Angeletti)
|
||||
|
||||
- GPR#1202: Fix Typos in comments as well as basic grammar errors.
|
||||
(JP Rodi, review and suggestions by David Allsopp, Max Mouratov,
|
||||
Florian Angeletti, Xavier Leroy, Mark Shinwell and Damien Doligez)
|
||||
|
||||
- GPR#1220: Fix "-keep-docs" option in ocamlopt manpage
|
||||
(Etienne Millon)
|
||||
|
|
|
@ -39,7 +39,7 @@ type specific_operation =
|
|||
| Ioffset_loc of int * addressing_mode (* Add a constant to a location *)
|
||||
| Ifloatarithmem of float_operation * addressing_mode
|
||||
(* Float arith operation with memory *)
|
||||
| Ibswap of int (* endiannes conversion *)
|
||||
| Ibswap of int (* endianness conversion *)
|
||||
| Isqrtf (* Float square root *)
|
||||
| Ifloatsqrtf of addressing_mode (* Float square root from memory *)
|
||||
and float_operation =
|
||||
|
|
|
@ -122,7 +122,7 @@ type specific_operation =
|
|||
| Imulsubf (* floating-point multiply and subtract *)
|
||||
| Inegmulsubf (* floating-point negate, multiply and subtract *)
|
||||
| Isqrtf (* floating-point square root *)
|
||||
| Ibswap of int (* endianess conversion *)
|
||||
| Ibswap of int (* endianness conversion *)
|
||||
|
||||
and arith_operation =
|
||||
Ishiftadd
|
||||
|
|
|
@ -42,7 +42,7 @@ let word_addressed = false
|
|||
Floating-point register map (VFPv{2,3}):
|
||||
d0 - d7 general purpose (not preserved)
|
||||
d8 - d15 general purpose (preserved)
|
||||
d16 - d31 generat purpose (not preserved), VFPv3 only
|
||||
d16 - d31 general purpose (not preserved), VFPv3 only
|
||||
*)
|
||||
|
||||
let int_reg_name =
|
||||
|
|
|
@ -54,7 +54,7 @@ type specific_operation =
|
|||
| Imulsubf (* floating-point multiply and subtract *)
|
||||
| Inegmulsubf (* floating-point negate, multiply and subtract *)
|
||||
| Isqrtf (* floating-point square root *)
|
||||
| Ibswap of int (* endianess conversion *)
|
||||
| Ibswap of int (* endianness conversion *)
|
||||
|
||||
and arith_operation =
|
||||
Ishiftadd
|
||||
|
|
|
@ -43,7 +43,7 @@ let word_addressed = false
|
|||
Floating-point register map:
|
||||
d0 - d7 general purpose (caller-save)
|
||||
d8 - d15 general purpose (callee-save)
|
||||
d16 - d31 generat purpose (caller-save)
|
||||
d16 - d31 general purpose (caller-save)
|
||||
*)
|
||||
|
||||
let int_reg_name =
|
||||
|
|
|
@ -273,7 +273,7 @@ let reset_debug_info () =
|
|||
file_pos_nums := [];
|
||||
file_pos_num_cnt := 1
|
||||
|
||||
(* We only diplay .file if the file has not been seen before. We
|
||||
(* We only display .file if the file has not been seen before. We
|
||||
display .loc for every instruction. *)
|
||||
let emit_debug_info_gen dbg file_emitter loc_emitter =
|
||||
if is_cfi_enabled () &&
|
||||
|
|
|
@ -33,7 +33,7 @@ let word_addressed = false
|
|||
0 temporary, null register for some operations (volatile)
|
||||
1 temporary (volatile)
|
||||
2 - 5 function arguments and results (volatile)
|
||||
6 function arguments and results (persevered by C)
|
||||
6 function arguments and results (preserved by C)
|
||||
7 - 9 general purpose, preserved by C
|
||||
10 allocation limit (preserved by C)
|
||||
11 allocation pointer (preserved by C)
|
||||
|
|
|
@ -114,7 +114,7 @@ let rec longest_path critical_outputs node =
|
|||
[] ->
|
||||
node.length <-
|
||||
if is_critical critical_outputs node.instr.res
|
||||
|| node.instr.desc = Lreloadretaddr (* alway critical *)
|
||||
|| node.instr.desc = Lreloadretaddr (* always critical *)
|
||||
then node.delay
|
||||
else 0
|
||||
| sons ->
|
||||
|
@ -337,7 +337,7 @@ method private reschedule ready_queue date cont =
|
|||
(* Remove node from queue *)
|
||||
let new_queue = ref (remove_instr node ready_queue) in
|
||||
(* Update the start date and number of ancestors emitted of
|
||||
all descendents of this node. Enter those that become ready
|
||||
all descendants of this node. Enter those that become ready
|
||||
in the queue. *)
|
||||
let issue_cycles = self#instr_issue_cycles node.instr in
|
||||
List.iter
|
||||
|
|
|
@ -334,7 +334,7 @@ module Make(I:I) = struct
|
|||
(*
|
||||
Switch according to pattern size
|
||||
Argument from_ind is the starting index, it can be zero
|
||||
or one (when the swicth on the cell 0 has already been performed.
|
||||
or one (when the switch on the cell 0 has already been performed.
|
||||
In that latter case pattern len is string length-1 and is corrected.
|
||||
*)
|
||||
|
||||
|
|
|
@ -622,7 +622,7 @@ let rec un_anf_and_moveable ident_info env (clam : Clambda.ulambda)
|
|||
un_anf_and_moveable ident_info env body
|
||||
| Constant, _, true, false
|
||||
(* A constant expression bound to an unassigned identifier can replace any
|
||||
occurances of the identifier. *)
|
||||
occurrences of the identifier. *)
|
||||
| Moveable, true, true, false ->
|
||||
(* A moveable expression bound to a linear unassigned [Ident.t]
|
||||
may replace the single occurrence of the identifier. *)
|
||||
|
|
|
@ -679,7 +679,7 @@ let rec comp_expr env exp sz cont =
|
|||
comp_expr env (Lprim (Pccall prim_obj_dup, [arg], loc)) sz cont
|
||||
| Lprim (Pduparray _, _, _) ->
|
||||
Misc.fatal_error "Bytegen.comp_expr: Pduparray takes exactly one arg"
|
||||
(* Integer first for enabling futher optimization (cf. emitcode.ml) *)
|
||||
(* Integer first for enabling further optimization (cf. emitcode.ml) *)
|
||||
| Lprim (Pintcomp c, [arg ; (Lconst _ as k)], _) ->
|
||||
let p = Pintcomp (commute_comparison c)
|
||||
and args = [k ; arg] in
|
||||
|
|
|
@ -29,7 +29,7 @@ type compilation_env =
|
|||
stack frame.
|
||||
The ce_heap component gives the positions of variables residing in the
|
||||
heap-allocated environment.
|
||||
The ce_rec component associate offsets to identifiers for functions
|
||||
The ce_rec component associates offsets to identifiers for functions
|
||||
bound by the same let rec as the current function. The offsets
|
||||
are used by the OFFSETCLOSURE instruction to recover the closure
|
||||
pointer of the desired function from the env register (which
|
||||
|
|
|
@ -450,7 +450,7 @@ let pretty_precompiled_res first nexts =
|
|||
|
||||
|
||||
|
||||
(* Identifing some semantically equivalent lambda-expressions,
|
||||
(* Identifying some semantically equivalent lambda-expressions,
|
||||
Our goal here is also to
|
||||
find alpha-equivalent (simple) terms *)
|
||||
|
||||
|
@ -571,7 +571,7 @@ let up_ok (ps,act_p) l =
|
|||
|
||||
|
||||
(*
|
||||
Simplify fonction normalize the first column of the match
|
||||
The simplify function normalizes the first column of the match
|
||||
- records are expanded so that they possess all fields
|
||||
- aliases are removed and replaced by bindings in actions.
|
||||
However or-patterns are simplified differently,
|
||||
|
@ -1835,7 +1835,7 @@ let share_actions_tree sw d =
|
|||
let sw =
|
||||
List.map (fun (cst,act) -> cst,store.Switch.act_store act) sw in
|
||||
|
||||
(* Retrieve all actions, including potentiel default *)
|
||||
(* Retrieve all actions, including potential default *)
|
||||
let acts = store.Switch.act_get_shared () in
|
||||
|
||||
(* Array of actual actions *)
|
||||
|
@ -2106,7 +2106,7 @@ let as_interval_nofail l =
|
|||
| (i,act)::rem ->
|
||||
let act_index =
|
||||
(* In case there is some hole and that a switch is emitted,
|
||||
action 0 will be used as the action of unreacheable
|
||||
action 0 will be used as the action of unreachable
|
||||
cases (cf. switch.ml, make_switch).
|
||||
Hence, this action will be shared *)
|
||||
if some_hole rem then
|
||||
|
@ -2813,7 +2813,7 @@ and compile_no_test divide up_ctx repr partial ctx to_match =
|
|||
or lazy pattern execute arbitrary code that may perform side effects
|
||||
and change the subject values.
|
||||
LM:
|
||||
Lazy pattern was PR #5992, initial patch by lwp25.
|
||||
Lazy pattern was PR#5992, initial patch by lpw25.
|
||||
I have generalized the patch, so as to also find mutable fields.
|
||||
*)
|
||||
|
||||
|
@ -3100,7 +3100,7 @@ let rec flatten_pat_line size p k = match p.pat_desc with
|
|||
| Tpat_tuple args -> args::k
|
||||
| Tpat_or (p1,p2,_) -> flatten_pat_line size p1 (flatten_pat_line size p2 k)
|
||||
| Tpat_alias (p,_,_) -> (* Note: if this 'as' pat is here, then this is a
|
||||
useless binding, solves PR #3780 *)
|
||||
useless binding, solves PR#3780 *)
|
||||
flatten_pat_line size p k
|
||||
| _ -> fatal_error "Matching.flatten_pat_line"
|
||||
|
||||
|
@ -3207,7 +3207,7 @@ let do_for_multiple_match loc paraml pat_act_list partial =
|
|||
with Unused ->
|
||||
assert false (* ; partial_function loc () *)
|
||||
|
||||
(* #PR4828: Believe it or not, the 'paraml' argument below
|
||||
(* PR#4828: Believe it or not, the 'paraml' argument below
|
||||
may not be side effect free. *)
|
||||
|
||||
let param_to_var param = match param with
|
||||
|
|
|
@ -135,7 +135,7 @@ let simplify_exits lam =
|
|||
end
|
||||
| Lstaticraise (i,ls) -> incr_exit i ; List.iter count ls
|
||||
| Lstaticcatch (l1,(i,[]),Lstaticraise (j,[])) ->
|
||||
(* i will be replaced by j in l1, so each occurence of i in l1
|
||||
(* i will be replaced by j in l1, so each occurrence of i in l1
|
||||
increases j's ref count *)
|
||||
count l1 ;
|
||||
let ic = count_exit i in
|
||||
|
|
|
@ -359,7 +359,7 @@ let make_key cases =
|
|||
|
||||
|
||||
(*
|
||||
Intervall test x in [l,h] works by checking x-l in [0,h-l]
|
||||
Interval test x in [l,h] works by checking x-l in [0,h-l]
|
||||
* This may be false for arithmetic modulo 2^31
|
||||
* Subtracting l may change the relative ordering of values
|
||||
and invalid the invariant that matched values are given in
|
||||
|
@ -659,7 +659,7 @@ and enum top cases =
|
|||
(* Minimal density of switches *)
|
||||
let theta = ref 0.33333
|
||||
|
||||
(* Minmal number of tests to make a switch *)
|
||||
(* Minimal number of tests to make a switch *)
|
||||
let switch_min = ref 3
|
||||
|
||||
(* Particular case 0, 1, 2 *)
|
||||
|
@ -699,7 +699,7 @@ let dense {cases} i j =
|
|||
Adaptation of the correction to Bernstein
|
||||
``Correction to `Producing Good Code for the Case Statement' ''
|
||||
S.K. Kannan and T.A. Proebsting
|
||||
Software Practice and Exprience Vol. 24(2) 233 (Feb 1994)
|
||||
Software Practice and Experience Vol. 24(2) 233 (Feb 1994)
|
||||
*)
|
||||
|
||||
let comp_clusters s =
|
||||
|
|
|
@ -95,7 +95,7 @@ module type S =
|
|||
- actions is an array of actions.
|
||||
|
||||
All these arguments specify a switch construct and zyva
|
||||
returns an action that performs the switch,
|
||||
returns an action that performs the switch.
|
||||
*)
|
||||
module Make :
|
||||
functor (Arg : S) ->
|
||||
|
|
|
@ -201,7 +201,7 @@ let get_and_remove_specialised_attribute e =
|
|||
let specialised = parse_specialise_attribute attr in
|
||||
specialised, { e with exp_attributes }
|
||||
|
||||
(* It also remove the attribute from the expression, like
|
||||
(* It also removes the attribute from the expression, like
|
||||
get_inlined_attribute *)
|
||||
let get_tailcall_attribute e =
|
||||
let is_tailcall_attribute = function
|
||||
|
|
|
@ -625,7 +625,7 @@ open M
|
|||
env_init: parameterisation by the local environment
|
||||
(env -> params -> obj_init)
|
||||
(one for each combination of inherited class_init )
|
||||
env: environnement local
|
||||
env: local environment
|
||||
If ids=0 (immediate object), then only env_init is conserved.
|
||||
*)
|
||||
|
||||
|
@ -779,7 +779,7 @@ let transl_class ids cl_id pub_meths cl vflag =
|
|||
if top && concrete then lclass lbody else
|
||||
if top then llets (lbody_virt lambda_unit) else
|
||||
|
||||
(* Now for the hard stuff: prepare for table cacheing *)
|
||||
(* Now for the hard stuff: prepare for table caching *)
|
||||
let envs = Ident.create "envs"
|
||||
and cached = Ident.create "cached" in
|
||||
let lenvs =
|
||||
|
|
|
@ -171,7 +171,7 @@ let compose_coercions c1 c2 =
|
|||
c3
|
||||
*)
|
||||
|
||||
(* Record the primitive declarations occuring in the module compiled *)
|
||||
(* Record the primitive declarations occurring in the module compiled *)
|
||||
|
||||
let primitive_declarations = ref ([] : Primitive.description list)
|
||||
let record_primitive = function
|
||||
|
|
|
@ -114,7 +114,7 @@ let transl_label_init_flambda f =
|
|||
assert(Config.flambda);
|
||||
let method_cache_id = Ident.create "method_cache" in
|
||||
method_cache := Lvar method_cache_id;
|
||||
(* Calling f (usualy Translmod.transl_struct) requires the
|
||||
(* Calling f (usually Translmod.transl_struct) requires the
|
||||
method_cache variable to be initialised to be able to generate
|
||||
method accesses. *)
|
||||
let expr, size = f () in
|
||||
|
|
|
@ -103,7 +103,7 @@ let set_breakpoints pos =
|
|||
set_breakpoint pos)
|
||||
pos
|
||||
|
||||
(* Ensure the current version in installed in current checkpoint. *)
|
||||
(* Ensure the current version is installed in current checkpoint. *)
|
||||
let update_breakpoints () =
|
||||
if !debug_breakpoints then begin
|
||||
prerr_string "Updating breakpoints... ";
|
||||
|
|
|
@ -36,7 +36,7 @@ val breakpoints_at_pc : int -> int list
|
|||
|
||||
(*** Set and remove breakpoints ***)
|
||||
|
||||
(* Ensure the current version in installed in current checkpoint. *)
|
||||
(* Ensure the current version is installed in current checkpoint. *)
|
||||
val update_breakpoints : unit -> unit
|
||||
|
||||
(* Execute given function with no breakpoint in current checkpoint. *)
|
||||
|
|
|
@ -82,6 +82,6 @@ let make_checkpoints = ref
|
|||
"Win32" -> false
|
||||
| _ -> true)
|
||||
|
||||
(*** Environment variables for debugee. ***)
|
||||
(*** Environment variables for debuggee. ***)
|
||||
|
||||
let environment = ref []
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(* *)
|
||||
(* OCaml *)
|
||||
(* *)
|
||||
(* Damien Doligez, projet Moscova, INRIA Rocqencourt *)
|
||||
(* Damien Doligez, projet Moscova, INRIA Rocquencourt *)
|
||||
(* *)
|
||||
(* Copyright 2002 Institut National de Recherche en Informatique et *)
|
||||
(* en Automatique. *)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(* *)
|
||||
(* OCaml *)
|
||||
(* *)
|
||||
(* Damien Doligez, projet Moscova, INRIA Rocqencourt *)
|
||||
(* Damien Doligez, projet Moscova, INRIA Rocquencourt *)
|
||||
(* *)
|
||||
(* Copyright 2002 Institut National de Recherche en Informatique et *)
|
||||
(* en Automatique. *)
|
||||
|
|
|
@ -105,7 +105,7 @@ let eval_path path =
|
|||
(* Install, remove a printer (as in toplevel/topdirs) *)
|
||||
|
||||
(* since 4.00, "topdirs.cmi" is not in the same directory as the standard
|
||||
libray, so we load it beforehand as it cannot be found in the search path. *)
|
||||
library, so we load it beforehand as it cannot be found in the search path. *)
|
||||
let () =
|
||||
let compiler_libs =
|
||||
Filename.concat Config.standard_library "compiler-libs" in
|
||||
|
|
|
@ -140,7 +140,7 @@ let exec_with_runtime =
|
|||
(Filename.quote !program_name)
|
||||
!arguments)
|
||||
|
||||
(* Excute the program directly *)
|
||||
(* Execute the program directly *)
|
||||
let exec_direct =
|
||||
generic_exec
|
||||
(function () ->
|
||||
|
|
|
@ -147,7 +147,7 @@ let cut2 t0 t l =
|
|||
let (after, before) = cut (t0 -- _1) l in
|
||||
after::(cut2_t0 t before)
|
||||
|
||||
(* Separate first elements and last element of a list of checkpoint. *)
|
||||
(* Separate first elements and last element of a list of checkpoints. *)
|
||||
let chk_merge2 cont =
|
||||
let rec chk_merge2_cont =
|
||||
function
|
||||
|
@ -216,7 +216,7 @@ let find_checkpoint_before time =
|
|||
in find !checkpoints
|
||||
|
||||
(* Make a copy of the current checkpoint and clean the checkpoint list. *)
|
||||
(* --- The new checkpoint in not put in the list. *)
|
||||
(* --- The new checkpoint is not put in the list. *)
|
||||
let duplicate_current_checkpoint () =
|
||||
let checkpoint = !current_checkpoint in
|
||||
if not checkpoint.c_valid then
|
||||
|
@ -499,14 +499,14 @@ let rec run () =
|
|||
if not !interrupted then
|
||||
run ()
|
||||
|
||||
(* Run backward the program form current time. *)
|
||||
(* Run the program backward from current time. *)
|
||||
(* Stop at the first breakpoint, or at the beginning of the program. *)
|
||||
let back_run () =
|
||||
if current_time () > _0 then
|
||||
back_to _0 (current_time ())
|
||||
|
||||
(* Step in any direction. *)
|
||||
(* Stop at the first brakpoint, or after `duration' steps. *)
|
||||
(* Stop at the first breakpoint, or after `duration' steps. *)
|
||||
let step duration =
|
||||
if duration >= _0 then
|
||||
step_forward duration
|
||||
|
|
|
@ -208,7 +208,7 @@ let find_double e = do_find_double e
|
|||
|
||||
(*
|
||||
Type of variables:
|
||||
A variable is bound to a char when all its occurences
|
||||
A variable is bound to a char when all its occurrences
|
||||
bind a pattern of length 1.
|
||||
The typical case is:
|
||||
(_ as x) -> char
|
||||
|
@ -577,7 +577,7 @@ let rec firstpos = function
|
|||
| Star r -> firstpos r
|
||||
|
||||
|
||||
(* Berry-sethi followpos *)
|
||||
(* Berry-Sethi followpos *)
|
||||
let followpos size entry_list =
|
||||
let v = Array.make size TransSet.empty in
|
||||
let rec fill s = function
|
||||
|
@ -749,8 +749,8 @@ let reset_state () =
|
|||
|
||||
(* Reset state before processing a given automata.
|
||||
We clear both the memory mapping and
|
||||
the state mapping, as state sharing beetween different
|
||||
automata may lead to incorret estimation of the cell memory size
|
||||
the state mapping, as state sharing between different
|
||||
automata may lead to incorrect estimation of the cell memory size
|
||||
BUG ID 0004517 *)
|
||||
|
||||
|
||||
|
@ -1040,7 +1040,7 @@ let comp_shift gen chars follow st =
|
|||
|
||||
let reachs chars follow st =
|
||||
let gen = create_new_addr_gen () in
|
||||
(* build a association list (char set -> new state) *)
|
||||
(* build an association list (char set -> new state) *)
|
||||
let env = comp_shift gen chars follow st in
|
||||
(* change it into (char set -> new state_num) *)
|
||||
let env =
|
||||
|
|
|
@ -143,7 +143,7 @@ struct
|
|||
(Odoc_html.Naming.complete_method_target m)
|
||||
m.met_value.val_info
|
||||
|
||||
(** This method scan the elements of the given module. *)
|
||||
(** This method scans the elements of the given module. *)
|
||||
method! scan_module_elements m =
|
||||
List.iter
|
||||
(fun ele ->
|
||||
|
|
|
@ -62,7 +62,7 @@ let preprocess sourcefile =
|
|||
exit 2
|
||||
|
||||
(** Analysis of an implementation file. Returns (Some typedtree) if
|
||||
no error occured, else None and an error message is printed.*)
|
||||
no error occurred, else None and an error message is printed.*)
|
||||
|
||||
let tool_name = "ocamldoc"
|
||||
|
||||
|
@ -105,7 +105,7 @@ let process_implementation_file sourcefile =
|
|||
raise e
|
||||
|
||||
(** Analysis of an interface file. Returns (Some signature) if
|
||||
no error occured, else None and an error message is printed.*)
|
||||
no error occurred, else None and an error message is printed.*)
|
||||
let process_interface_file sourcefile =
|
||||
init_path ();
|
||||
let prefixname = Filename.chop_extension sourcefile in
|
||||
|
@ -282,7 +282,7 @@ let rec remove_class_elements_between_stop_in_class_kind k =
|
|||
Odoc_class.Class_constraint (remove_class_elements_between_stop_in_class_kind k1,
|
||||
remove_class_elements_between_stop_in_class_type_kind ctk)
|
||||
|
||||
(** Remove the class elements beetween the stop special comments in a class type kind. *)
|
||||
(** Remove the class elements between the stop special comments in a class type kind. *)
|
||||
and remove_class_elements_between_stop_in_class_type_kind tk =
|
||||
match tk with
|
||||
Odoc_class.Class_signature (inher, l) ->
|
||||
|
|
|
@ -219,12 +219,12 @@ module Analyser =
|
|||
(** The name of the analysed file. *)
|
||||
let file_name = Sig.file_name
|
||||
|
||||
(** This function takes two indexes (start and end) and return the string
|
||||
(** This function takes two indexes (start and end) and returns the string
|
||||
corresponding to the indexes in the file global variable. The function
|
||||
prepare_file must have been called to fill the file global variable.*)
|
||||
let get_string_of_file = Sig.get_string_of_file
|
||||
|
||||
(** This function loads the given file in the file global variable.
|
||||
(** This function loads the given file in the file global variable
|
||||
and sets file_name.*)
|
||||
let prepare_file = Sig.prepare_file
|
||||
|
||||
|
@ -677,7 +677,7 @@ module Analyser =
|
|||
in
|
||||
iter [] [] last_pos (p_cls.Parsetree.pcstr_fields)
|
||||
|
||||
(** Analysis of a [Parsetree.class_expr] and a [Typedtree.class_expr] to get a a couple (class parameters, class kind). *)
|
||||
(** Analysis of a [Parsetree.class_expr] and a [Typedtree.class_expr] to get a pair (class parameters, class kind). *)
|
||||
let rec analyse_class_kind env current_class_name comment_opt last_pos p_class_expr tt_class_exp table =
|
||||
match (p_class_expr.Parsetree.pcl_desc, tt_class_exp.Typedtree.cl_desc) with
|
||||
(Parsetree.Pcl_constr (lid, _), tt_class_exp_desc ) ->
|
||||
|
@ -1424,7 +1424,7 @@ module Analyser =
|
|||
let new_env = Odoc_env.add_module env new_module.m_name in
|
||||
let new_env2 =
|
||||
match new_module.m_type with
|
||||
(* FIXME : can this be Tmty_ident? In this case, we would'nt have the signature *)
|
||||
(* FIXME : can this be Tmty_ident? In this case, we wouldn't have the signature *)
|
||||
Types.Mty_signature s ->
|
||||
Odoc_env.add_signature new_env new_module.m_name
|
||||
~rel: (Name.simple new_module.m_name) s
|
||||
|
@ -1528,7 +1528,7 @@ module Analyser =
|
|||
let new_env = Odoc_env.add_module_type env mt.mt_name in
|
||||
let new_env2 =
|
||||
match sig_mtype with
|
||||
(* FIXME : can this be Tmty_ident? In this case, we would'nt have the signature *)
|
||||
(* FIXME : can this be Tmty_ident? In this case, we wouldn't have the signature *)
|
||||
Some (Types.Mty_signature s) ->
|
||||
Odoc_env.add_signature new_env mt.mt_name ~rel: (Name.simple mt.mt_name) s
|
||||
| _ ->
|
||||
|
|
|
@ -43,7 +43,7 @@ and class_apply = {
|
|||
|
||||
and class_constr = {
|
||||
cco_name : Name.t ; (** The complete name of the applied class *)
|
||||
mutable cco_class : cct option; (** The associated class ot class type if we found it *)
|
||||
mutable cco_class : cct option; (** The associated class of the class type if we found it *)
|
||||
cco_type_parameters : Types.type_expr list; (** The type parameters of the class, if needed *)
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ and class_kind =
|
|||
| Class_constr of class_constr (** a class used to give the type of the defined class,
|
||||
instead of a structure, used in interface only.
|
||||
For example, it will be used with the name "M1.M2....tutu"
|
||||
when the class to is defined like this :
|
||||
when the class toto is defined like this :
|
||||
class toto : int -> tutu *)
|
||||
| Class_constraint of class_kind * class_type_kind
|
||||
(** A class definition with a constraint. *)
|
||||
|
|
|
@ -69,7 +69,7 @@ val info_of_string : string -> Odoc_types.info
|
|||
and return an {!Odoc_types.info} structure. The content of the
|
||||
file must have the same syntax as the content of a special comment.
|
||||
The given module list is used for cross reference.
|
||||
@raise Failure is the file could not be opened or there is a
|
||||
@raise Failure if the file could not be opened or there is a
|
||||
syntax error.
|
||||
*)
|
||||
val info_of_comment_file :
|
||||
|
|
|
@ -795,7 +795,7 @@ let rec assoc_comments_text_elements parent_name module_list t_ele =
|
|||
- if name = parent_name: we are using the name of an element
|
||||
or module in its definition, no need of cross_reference
|
||||
- if the path of name is a suffix of the parent path, we
|
||||
are in the same module, maybe the same function. To decreace
|
||||
are in the same module, maybe the same function. To decrease
|
||||
the false positive rate, we stop here *)
|
||||
if name = parent_name || is_path_suffix () then
|
||||
t_ele
|
||||
|
|
|
@ -313,7 +313,7 @@ let ancestors d =
|
|||
|
||||
let get_children d parents =
|
||||
(* XXXX merge_children used to be declared as a recursive function,
|
||||
but it was not. I've not idea if it a bug or not. One should
|
||||
but it was not. I've no idea if it is a bug or not. One should
|
||||
either fix it (if this is a bug), or simplify the code otherwise. *)
|
||||
|
||||
let merge_children children el =
|
||||
|
|
|
@ -180,7 +180,7 @@ let type_deps t =
|
|||
|
||||
!l
|
||||
|
||||
(** Modify the modules depencies of the given list of modules,
|
||||
(** Modify the module dependencies of the given list of modules,
|
||||
to get the minimum transitivity kernel. *)
|
||||
let kernel_deps_of_modules modules =
|
||||
let graph = List.map
|
||||
|
|
|
@ -45,7 +45,7 @@ val no_stop : bool ref
|
|||
(** We must raise an exception when we find an unknown @-tag. *)
|
||||
val no_custom_tags : bool ref
|
||||
|
||||
(** We must remove the the first characters of each comment line, until the first asterisk '*'. *)
|
||||
(** We must remove the first characters of each comment line, until the first asterisk '*'. *)
|
||||
val remove_stars : bool ref
|
||||
|
||||
(** To keep the code while merging, when we have both .ml and .mli files for a module. *)
|
||||
|
|
|
@ -60,10 +60,10 @@ module Naming =
|
|||
(** The prefix for methods marks. *)
|
||||
let mark_method = "METHOD"
|
||||
|
||||
(** The prefix for code files.. *)
|
||||
(** The prefix for code files. *)
|
||||
let code_prefix = "code_"
|
||||
|
||||
(** The prefix for type files.. *)
|
||||
(** The prefix for type files. *)
|
||||
let type_prefix = "type_"
|
||||
|
||||
(** Return the two html files names for the given module or class name.*)
|
||||
|
@ -285,7 +285,7 @@ class virtual text =
|
|||
*)
|
||||
let b' = Buffer.create 17 (* paragraph buffer *) in
|
||||
let flush b' =
|
||||
(* trim the inner string to avoid outputing empty <p></p> *)
|
||||
(* trim the inner string to avoid outputting empty <p></p> *)
|
||||
let s = String.trim @@ Buffer.contents b' in
|
||||
if s <> "" then
|
||||
begin
|
||||
|
|
|
@ -94,7 +94,7 @@ type info = Odoc_types.info = {
|
|||
i_sees : see list; (** The list of \@see tags. *)
|
||||
i_since : string option; (** The string in the \@since tag. *)
|
||||
i_before : (string * text) list ; (** the version number and text in \@before tag *)
|
||||
i_deprecated : text option; (** The of the \@deprecated tag. *)
|
||||
i_deprecated : text option; (** The description text of the \@deprecated tag. *)
|
||||
i_params : param list; (** The list of parameter descriptions. *)
|
||||
i_raised_exceptions : raised_exception list; (** The list of raised exceptions. *)
|
||||
i_return_value : text option; (** The description text of the return value. *)
|
||||
|
@ -232,7 +232,7 @@ module Exception :
|
|||
ex_name : Name.t ;
|
||||
mutable ex_info : info option ; (** Information found in the optional associated comment. *)
|
||||
ex_args : Odoc_type.constructor_args;
|
||||
ex_ret : Types.type_expr option ; (** The the optional return type of the exception. *)
|
||||
ex_ret : Types.type_expr option ; (** The optional return type of the exception. *)
|
||||
ex_alias : exception_alias option ; (** [None] when the exception is not a rebind. *)
|
||||
mutable ex_loc : location ;
|
||||
mutable ex_code : string option ;
|
||||
|
@ -283,7 +283,7 @@ module Type :
|
|||
}
|
||||
|
||||
type type_manifest = Odoc_type.type_manifest =
|
||||
| Other of Types.type_expr (** Type manifest directly taken from Typedtre. *)
|
||||
| Other of Types.type_expr (** Type manifest directly taken from Typedtree. *)
|
||||
| Object_type of object_field list
|
||||
|
||||
(** Representation of a type. *)
|
||||
|
@ -489,7 +489,7 @@ module Module :
|
|||
{
|
||||
im_name : Name.t ; (** Complete name of the included module. *)
|
||||
mutable im_module : mmt option ; (** The included module or module type, if we found it. *)
|
||||
mutable im_info : Odoc_types.info option ; (** comment associated to the includ directive *)
|
||||
mutable im_info : Odoc_types.info option ; (** comment associated with the include directive *)
|
||||
}
|
||||
|
||||
and module_alias = Odoc_module.module_alias =
|
||||
|
@ -678,10 +678,10 @@ module Module :
|
|||
val reset_type_names : unit -> unit
|
||||
|
||||
(** [string_of_variance t (covariant, invariant)] returns ["+"] if
|
||||
the given information means "covariant", ["-"] if the it means
|
||||
the given information means "covariant", ["-"] if it means
|
||||
"contravariant", orelse [""], and always [""] if the given
|
||||
type is not an abstract type with no manifest (i.e. no need
|
||||
for the variance to be printed.*)
|
||||
for the variance to be printed).*)
|
||||
val string_of_variance : Type.t_type -> (bool * bool) -> string
|
||||
|
||||
(** This function returns a string representing a Types.type_expr. *)
|
||||
|
@ -710,7 +710,7 @@ val string_of_class_type_param_list : Types.type_expr list -> string
|
|||
|
||||
(** This function returns a string representing a [Types.module_type].
|
||||
@param complete indicates if we must print complete signatures
|
||||
or just [sig end]. Default if [false].
|
||||
or just [sig end]. Default is [false].
|
||||
@param code if [complete = false] and the type contains something else
|
||||
than identificators and functors, then the given code is used.
|
||||
*)
|
||||
|
@ -718,7 +718,7 @@ val string_of_module_type : ?code: string -> ?complete: bool -> Types.module_typ
|
|||
|
||||
(** This function returns a string representing a [Types.class_type].
|
||||
@param complete indicates if we must print complete signatures
|
||||
or just [object end]. Default if [false].
|
||||
or just [object end]. Default is [false].
|
||||
*)
|
||||
val string_of_class_type : ?complete: bool -> Types.class_type -> string
|
||||
|
||||
|
@ -749,7 +749,7 @@ val string_of_attribute : Value.t_attribute -> string
|
|||
(** @return a string to describe the given method. *)
|
||||
val string_of_method : Value.t_method -> string
|
||||
|
||||
(** {3 Miscelaneous functions} *)
|
||||
(** {3 Miscellaneous functions} *)
|
||||
|
||||
(** Return the first sentence (until the first dot followed by a blank
|
||||
or the first blank line) of a text.
|
||||
|
@ -782,7 +782,7 @@ val get_titles_in_text : text -> (int * string option * text) list
|
|||
val create_index_lists : 'a list -> ('a -> string) -> 'a list list
|
||||
|
||||
(** Take a type and remove the option top constructor. This is
|
||||
useful when printing labels, we we then remove the top option contructor
|
||||
useful when printing labels, we then remove the top option constructor
|
||||
for optional labels.*)
|
||||
val remove_option : Types.type_expr -> Types.type_expr
|
||||
|
||||
|
@ -849,7 +849,7 @@ val info_string_of_info : info -> string
|
|||
and return an {!Odoc_info.info} structure. The content of the
|
||||
file must have the same syntax as the content of a special comment.
|
||||
The given module list is used for cross reference.
|
||||
@raise Failure is the file could not be opened or there is a
|
||||
@raise Failure if the file could not be opened or there is a
|
||||
syntax error.
|
||||
*)
|
||||
val info_of_comment_file : Module.t_module list -> string -> info
|
||||
|
@ -933,7 +933,7 @@ module Scan :
|
|||
|
||||
(** Scan of a type extension *)
|
||||
|
||||
(** Overide this method to perform controls on the extension's type,
|
||||
(** Override this method to perform controls on the extension's type,
|
||||
private and info. This method is called before scanning the
|
||||
extension's constructors.
|
||||
@return true if the extension's constructors must be scanned.*)
|
||||
|
@ -956,7 +956,7 @@ module Scan :
|
|||
@return true if the class elements must be scanned.*)
|
||||
method scan_class_pre : Class.t_class -> bool
|
||||
|
||||
(** This method scan the elements of the given class. *)
|
||||
(** This method scans the elements of the given class. *)
|
||||
method scan_class_elements : Class.t_class -> unit
|
||||
|
||||
(** Scan of a class. Should not be overridden. It calls [scan_class_pre]
|
||||
|
@ -973,7 +973,7 @@ module Scan :
|
|||
@return true if the class type elements must be scanned.*)
|
||||
method scan_class_type_pre : Class.t_class_type -> bool
|
||||
|
||||
(** This method scan the elements of the given class type. *)
|
||||
(** This method scans the elements of the given class type. *)
|
||||
method scan_class_type_elements : Class.t_class_type -> unit
|
||||
|
||||
(** Scan of a class type. Should not be overridden. It calls [scan_class_type_pre]
|
||||
|
@ -990,7 +990,7 @@ module Scan :
|
|||
@return true if the module elements must be scanned.*)
|
||||
method scan_module_pre : Module.t_module -> bool
|
||||
|
||||
(** This method scan the elements of the given module. *)
|
||||
(** This method scans the elements of the given module. *)
|
||||
method scan_module_elements : Module.t_module -> unit
|
||||
|
||||
(** Scan of a module. Should not be overridden. It calls [scan_module_pre]
|
||||
|
@ -1007,7 +1007,7 @@ module Scan :
|
|||
@return true if the module type elements must be scanned. *)
|
||||
method scan_module_type_pre : Module.t_module_type -> bool
|
||||
|
||||
(** This method scan the elements of the given module type. *)
|
||||
(** This method scans the elements of the given module type. *)
|
||||
method scan_module_type_elements : Module.t_module_type -> unit
|
||||
|
||||
(** Scan of a module type. Should not be overridden. It calls [scan_module_type_pre]
|
||||
|
@ -1024,7 +1024,7 @@ module Scan :
|
|||
(** Computation of dependencies. *)
|
||||
module Dep :
|
||||
sig
|
||||
(** Modify the modules depencies of the given list of modules,
|
||||
(** Modify the module dependencies of the given list of modules,
|
||||
to get the minimum transitivity kernel. *)
|
||||
val kernel_deps_of_modules : Module.t_module list -> unit
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ let print_concat fmt sep f =
|
|||
(** Generation of LaTeX code from text structures. *)
|
||||
class text =
|
||||
object (self)
|
||||
(** Return latex code to make a sectionning according to the given level,
|
||||
(** Return latex code to make a section according to the given level,
|
||||
and with the given latex code. *)
|
||||
method section_style level s =
|
||||
try
|
||||
|
@ -460,7 +460,7 @@ class virtual info =
|
|||
(** The method used to get LaTeX code from a [text]. *)
|
||||
method virtual latex_of_text : Format.formatter -> Odoc_info.text -> unit
|
||||
|
||||
(** The method used to get a [text] from an optionel info structure. *)
|
||||
(** The method used to get a [text] from an optional info structure. *)
|
||||
method virtual text_of_info : ?block: bool -> Odoc_info.info option -> Odoc_info.text
|
||||
|
||||
(** Print LaTeX code for a description, except for the [i_params] field. *)
|
||||
|
@ -817,7 +817,7 @@ class latex =
|
|||
self#latex_of_module_kind fmt father k2;
|
||||
self#latex_of_text fmt [Code ")"]
|
||||
| Module_with (k, s) ->
|
||||
(* TODO: modify when Module_with will be more detailled *)
|
||||
(* TODO: modify when Module_with will be more detailed *)
|
||||
self#latex_of_module_type_kind fmt father k;
|
||||
self#latex_of_text fmt
|
||||
[ Code " ";
|
||||
|
@ -1076,7 +1076,7 @@ class latex =
|
|||
in
|
||||
self#latex_of_text fmt t;
|
||||
self#latex_of_class_parameter_list fmt father c;
|
||||
(* avoid a big gap if the kind is a consrt *)
|
||||
(* avoid a big gap if the kind is a constr *)
|
||||
(
|
||||
match c.cl_kind with
|
||||
Class.Class_constr _ ->
|
||||
|
@ -1268,7 +1268,7 @@ class latex =
|
|||
)
|
||||
|
||||
|
||||
(** Generate the LaTeX style file, if it does not exists. *)
|
||||
(** Generate the LaTeX style file, if it does not exist. *)
|
||||
method generate_style_file =
|
||||
try
|
||||
let dir = Filename.dirname !Global.out_file in
|
||||
|
|
|
@ -1283,7 +1283,7 @@ class man =
|
|||
self#man_of_module_type_body b mt
|
||||
|
||||
| Res_section _ ->
|
||||
(* normaly, we cannot have modules here. *)
|
||||
(* normally, we cannot have modules here. *)
|
||||
()
|
||||
in
|
||||
List.iter f l;
|
||||
|
|
|
@ -46,7 +46,7 @@ let merge_before_tags l =
|
|||
|
||||
let version_separators = Str.regexp "[\\.\\+]";;
|
||||
|
||||
(** Merge two Odoctypes.info struture, completing the information of
|
||||
(** Merge two Odoctypes.info structures, completing the information of
|
||||
the first one with the information in the second one.
|
||||
The merge treatment depends on a given merge_option list.
|
||||
@return the new info structure.*)
|
||||
|
@ -355,7 +355,7 @@ let rec merge_param_info pi_mli pi_ml =
|
|||
Tuple (new_l, t_mli)
|
||||
|
||||
(** Merge of the parameters of two functions/methods/classes, one for a .mli, another for a .ml.
|
||||
The prameters in the .mli are completed by the name in the .ml.*)
|
||||
The parameters in the .mli are completed by the name in the .ml.*)
|
||||
let rec merge_parameters param_mli param_ml =
|
||||
match (param_mli, param_ml) with
|
||||
([], []) -> []
|
||||
|
@ -370,8 +370,8 @@ let merge_classes merge_options mli ml =
|
|||
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;
|
||||
|
||||
(* we must reassociate comments in @param to the the corresponding
|
||||
parameters because the associated comment of a parameter may have been changed y the merge.*)
|
||||
(* we must reassociate comments in @param to the corresponding
|
||||
parameters because the associated comment of a parameter may have been changed by the merge.*)
|
||||
Odoc_class.class_update_parameters_text mli;
|
||||
|
||||
(* merge values *)
|
||||
|
@ -499,8 +499,8 @@ let merge_class_types merge_options mli ml =
|
|||
m.met_value.val_parameters <- (merge_parameters
|
||||
m.met_value.val_parameters
|
||||
m2.met_value.val_parameters) ;
|
||||
(* we must reassociate comments in @param to the the corresponding
|
||||
parameters because the associated comment of a parameter may have been changed y the merge.*)
|
||||
(* we must reassociate comments in @param to the corresponding
|
||||
parameters because the associated comment of a parameter may have been changed by the merge.*)
|
||||
Odoc_value.update_value_parameters_text m.met_value;
|
||||
|
||||
if !Odoc_global.keep_code then
|
||||
|
@ -690,8 +690,8 @@ let rec merge_module_types merge_options mli ml =
|
|||
v.val_parameters <- (merge_parameters
|
||||
v.val_parameters
|
||||
v2.val_parameters) ;
|
||||
(* we must reassociate comments in @param to the the corresponding
|
||||
parameters because the associated comment of a parameter may have been changed y the merge.*)
|
||||
(* we must reassociate comments in @param to the corresponding
|
||||
parameters because the associated comment of a parameter may have been changed by the merge.*)
|
||||
Odoc_value.update_value_parameters_text v;
|
||||
|
||||
if !Odoc_global.keep_code then
|
||||
|
@ -963,8 +963,8 @@ and merge_modules merge_options mli ml =
|
|||
v.val_parameters <- (merge_parameters
|
||||
v.val_parameters
|
||||
v2.val_parameters) ;
|
||||
(* we must reassociate comments in @param to the the corresponding
|
||||
parameters because the associated comment of a parameter may have been changed y the merge.*)
|
||||
(* we must reassociate comments in @param to the corresponding
|
||||
parameters because the associated comment of a parameter may have been changed by the merge.*)
|
||||
Odoc_value.update_value_parameters_text v;
|
||||
|
||||
if !Odoc_global.keep_code then
|
||||
|
|
|
@ -64,7 +64,7 @@ val string_of_info : Odoc_types.info -> string
|
|||
val apply_opt : ('a -> 'b) -> 'a option -> 'b option
|
||||
|
||||
(** Return a string representing a date given as a number of seconds
|
||||
since 1970. The hour is optionnaly displayed. *)
|
||||
since 1970. The hour is optionally displayed. *)
|
||||
val string_of_date : ?absolute:bool -> ?hour:bool -> float -> string
|
||||
|
||||
(* Value returned by string_of_date for current time.
|
||||
|
@ -110,7 +110,7 @@ val remove_ending_newline : string -> string
|
|||
val search_string_backward : pat: string -> s: string -> int
|
||||
|
||||
(** Take a type and remove the option top constructor. This is
|
||||
useful when printing labels, we we then remove the top option contructor
|
||||
useful when printing labels, we then remove the top option constructor
|
||||
for optional labels.*)
|
||||
val remove_option : Types.type_expr -> Types.type_expr
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ and mmt =
|
|||
and included_module = {
|
||||
im_name : Name.t ; (** the name of the included module *)
|
||||
mutable im_module : mmt option ; (** the included module or module type *)
|
||||
mutable im_info : Odoc_types.info option ; (** comment associated to the includ directive *)
|
||||
mutable im_info : Odoc_types.info option ; (** comment associated to the include directive *)
|
||||
}
|
||||
|
||||
and module_alias = {
|
||||
|
@ -442,7 +442,7 @@ and module_parameters ?(trans=true) m =
|
|||
in
|
||||
iter m.m_kind
|
||||
|
||||
(** access to all submodules and sudmobules of submodules ... of the given module.
|
||||
(** access to all submodules and submodules of submodules ... of the given module.
|
||||
@param trans indicates if, for aliased modules, we must perform a transitive search.*)
|
||||
let rec module_all_submodules ?(trans=true) m =
|
||||
let l = module_modules ~trans m in
|
||||
|
@ -451,7 +451,7 @@ let rec module_all_submodules ?(trans=true) m =
|
|||
l
|
||||
l
|
||||
|
||||
(** The module type is a functor if is defined as a functor or if it is an alias for a functor. *)
|
||||
(** The module type is a functor if it is defined as a functor or if it is an alias for a functor. *)
|
||||
let rec module_type_is_functor mt =
|
||||
let rec iter k =
|
||||
match k with
|
||||
|
@ -470,7 +470,7 @@ let rec module_type_is_functor mt =
|
|||
in
|
||||
iter mt.mt_kind
|
||||
|
||||
(** The module is a functor if is defined as a functor or if it is an alias for a functor. *)
|
||||
(** The module is a functor if it is defined as a functor or if it is an alias for a functor. *)
|
||||
let module_is_functor m =
|
||||
let rec iter visited = function
|
||||
Module_functor _ -> true
|
||||
|
|
|
@ -41,7 +41,7 @@ val head : t -> t
|
|||
val depth : t -> int
|
||||
|
||||
(** Returns true if the first name is a prefix of the second name.
|
||||
If the two names are equals, then if is false (strict prefix).*)
|
||||
If the two names are equal, then it is false (strict prefix).*)
|
||||
val prefix : t -> t -> bool
|
||||
|
||||
(** Take two names n1 and n2 = n3.n4 and return n4 if n3=n1 or else n2. *)
|
||||
|
|
|
@ -37,7 +37,7 @@ type parameter = param_info
|
|||
|
||||
(** Functions *)
|
||||
|
||||
(** acces to the name as a string. For tuples, parenthesis and commas are added. *)
|
||||
(** access to the name as a string. For tuples, parentheses and commas are added. *)
|
||||
let complete_name p =
|
||||
let rec iter pi =
|
||||
match pi with
|
||||
|
@ -82,7 +82,7 @@ let desc_by_name pi name =
|
|||
List.assoc name l
|
||||
|
||||
|
||||
(** acces to the list of names ; only one for a simple parameter, or
|
||||
(** access to the list of names ; only one for a simple parameter, or
|
||||
a list for tuples. *)
|
||||
let names pi =
|
||||
let rec iter acc pi =
|
||||
|
|
|
@ -147,7 +147,7 @@ deprecated:
|
|||
raise_exc:
|
||||
T_RAISES Desc
|
||||
{
|
||||
(* isolate the exception construtor name *)
|
||||
(* isolate the exception constructor name *)
|
||||
let s = $2 in
|
||||
match Str.split (Str.regexp (blank^"+")) s with
|
||||
[]
|
||||
|
|
|
@ -46,8 +46,8 @@ exception Use_code of string
|
|||
|
||||
(** Return the given module type where methods and vals have been removed
|
||||
from the signatures. Used when we don't want to print a too long module type.
|
||||
@param code when the code is given, we raise the [Use_code] exception is we
|
||||
encouter a signature, to that the calling function can use the code rather
|
||||
@param code when the code is given, we raise the [Use_code] exception if we
|
||||
encounter a signature, so that the calling function can use the code rather
|
||||
than the "emptied" type.
|
||||
*)
|
||||
let simpl_module_type ?code t =
|
||||
|
|
|
@ -21,7 +21,7 @@ val string_of_type_expr : Types.type_expr -> string
|
|||
|
||||
(** This function returns a string representing a [Types.module_type].
|
||||
@param complete indicates if we must print complete signatures
|
||||
or just [sig end]. Default if [false].
|
||||
or just [sig end]. Default is [false].
|
||||
@param code if [complete = false] and the type contains something else
|
||||
than identificators and functors, then the given code is used.
|
||||
*)
|
||||
|
@ -29,6 +29,6 @@ val string_of_module_type : ?code: string -> ?complete: bool -> Types.module_typ
|
|||
|
||||
(** This function returns a string representing a [Types.class_type].
|
||||
@param complete indicates if we must print complete signatures
|
||||
or just [object end]. Default if [false].
|
||||
or just [object end]. Default is [false].
|
||||
*)
|
||||
val string_of_class_type : ?complete: bool -> Types.class_type -> string
|
||||
|
|
|
@ -50,7 +50,7 @@ class scanner =
|
|||
|
||||
(** Scan of a type extension *)
|
||||
|
||||
(** Overide this method to perform controls on the extension's type,
|
||||
(** Override this method to perform controls on the extension's type,
|
||||
private and info. This method is called before scanning the
|
||||
extensions's constructors.
|
||||
@return true if the extension's constructors must be scanned.*)
|
||||
|
@ -76,7 +76,7 @@ class scanner =
|
|||
@return true if the class elements must be scanned.*)
|
||||
method scan_class_pre (_ : Odoc_class.t_class) = true
|
||||
|
||||
(** This method scan the elements of the given class.
|
||||
(** This method scans the elements of the given class.
|
||||
A VOIR : scan des classes heritees.*)
|
||||
method scan_class_elements c =
|
||||
List.iter
|
||||
|
@ -102,7 +102,7 @@ class scanner =
|
|||
@return true if the class type elements must be scanned.*)
|
||||
method scan_class_type_pre (_ : Odoc_class.t_class_type) = true
|
||||
|
||||
(** This method scan the elements of the given class type.
|
||||
(** This method scans the elements of the given class type.
|
||||
A VOIR : scan des classes heritees.*)
|
||||
method scan_class_type_elements ct =
|
||||
List.iter
|
||||
|
@ -128,7 +128,7 @@ class scanner =
|
|||
@return true if the module elements must be scanned.*)
|
||||
method scan_module_pre (_ : Odoc_module.t_module) = true
|
||||
|
||||
(** This method scan the elements of the given module. *)
|
||||
(** This method scans the elements of the given module. *)
|
||||
method scan_module_elements m =
|
||||
List.iter
|
||||
(fun ele ->
|
||||
|
@ -160,7 +160,7 @@ class scanner =
|
|||
@return true if the module type elements must be scanned. *)
|
||||
method scan_module_type_pre (_ : Odoc_module.t_module_type) = true
|
||||
|
||||
(** This method scan the elements of the given module type. *)
|
||||
(** This method scans the elements of the given module type. *)
|
||||
method scan_module_type_elements mt =
|
||||
List.iter
|
||||
(fun ele ->
|
||||
|
|
|
@ -131,7 +131,7 @@ module Analyser =
|
|||
(** The name of the analysed file. *)
|
||||
let file_name = ref ""
|
||||
|
||||
(** This function takes two indexes (start and end) and return the string
|
||||
(** This function takes two indexes (start and end) and returns the string
|
||||
corresponding to the indexes in the file global variable. The function
|
||||
prepare_file must have been called to fill the file global variable.*)
|
||||
let get_string_of_file the_start the_end =
|
||||
|
@ -253,7 +253,7 @@ module Analyser =
|
|||
end_ = (fun ld -> Loc.start ld.ld_loc);
|
||||
(* Beware, Loc.start is correct in the code above:
|
||||
type_expr's do not hold location information, and ld.ld_loc
|
||||
ends after the documentation comment, sow e use Loc.start as
|
||||
ends after the documentation comment, so we use Loc.start as
|
||||
the least problematic approximation for end_. *)
|
||||
inline_record = begin
|
||||
fun c -> match c.cd_args with
|
||||
|
@ -978,7 +978,7 @@ module Analyser =
|
|||
|
||||
| Parsetree.Psig_module {Parsetree.pmd_name=name; pmd_type=module_type} ->
|
||||
let complete_name = Name.concat current_module_name name.txt in
|
||||
(* get the the module type in the signature by the module name *)
|
||||
(* get the module type in the signature by the module name *)
|
||||
let sig_module_type =
|
||||
try Signature_search.search_module table name.txt
|
||||
with Not_found ->
|
||||
|
@ -1017,7 +1017,7 @@ module Analyser =
|
|||
new_module.m_info <- merge_infos new_module.m_info info_after_opt ;
|
||||
let new_env = Odoc_env.add_module env new_module.m_name in
|
||||
let new_env2 =
|
||||
match new_module.m_type with (* FIXME : can this be a Tmty_ident? in this case, we would'nt have the signature *)
|
||||
match new_module.m_type with (* FIXME : can this be a Tmty_ident? in this case, we wouldn't have the signature *)
|
||||
Types.Mty_signature s -> Odoc_env.add_signature new_env new_module.m_name ~rel: (Name.simple new_module.m_name) s
|
||||
| _ -> new_env
|
||||
in
|
||||
|
@ -1037,7 +1037,7 @@ module Analyser =
|
|||
raise (Failure (Odoc_messages.module_not_found current_module_name name))
|
||||
in
|
||||
match sig_module_type with
|
||||
(* FIXME : can this be a Tmty_ident? in this case, we would'nt have the signature *)
|
||||
(* FIXME : can this be a Tmty_ident? in this case, we wouldn't have the signature *)
|
||||
Types.Mty_signature s ->
|
||||
Odoc_env.add_signature e complete_name ~rel: name s
|
||||
| _ ->
|
||||
|
@ -1152,7 +1152,7 @@ module Analyser =
|
|||
mt.mt_info <- merge_infos mt.mt_info info_after_opt ;
|
||||
let new_env = Odoc_env.add_module_type env mt.mt_name in
|
||||
let new_env2 =
|
||||
match sig_mtype with (* FIXME : can this be a Tmty_ident? in this case, we would'nt have the signature *)
|
||||
match sig_mtype with (* FIXME : can this be a Tmty_ident? in this case, we wouldn't have the signature *)
|
||||
Some (Types.Mty_signature s) -> Odoc_env.add_signature new_env mt.mt_name ~rel: (Name.simple mt.mt_name) s
|
||||
| _ -> new_env
|
||||
in
|
||||
|
@ -1602,7 +1602,7 @@ module Analyser =
|
|||
(*
|
||||
| (Parsetree.Pcty_constr (longident, _) (*of Longident.t * core_type list *),
|
||||
Types.Cty_signature class_signature) ->
|
||||
(* FIXME : this for the case of class contraints :
|
||||
(* FIXME : this for the case of class constraints :
|
||||
class type cons = object
|
||||
method m : int
|
||||
end
|
||||
|
|
|
@ -118,7 +118,7 @@ module Analyser :
|
|||
(** The name of the analysed file. *)
|
||||
val file_name : string ref
|
||||
|
||||
(** This function takes two indexes (start and end) and return the string
|
||||
(** This function takes two indexes (start and end) and returns the string
|
||||
corresponding to the indexes in the file global variable. The function
|
||||
prepare_file must have been called to fill the file global variable.*)
|
||||
val get_string_of_file : int -> int -> string
|
||||
|
@ -150,12 +150,12 @@ module Analyser :
|
|||
or an empty list for an abstract type.
|
||||
[pos_end] is last char of the complete type definition.
|
||||
[pos_limit] is the position of the last char we could use to look for a comment,
|
||||
i.e. usually the beginning on the next element.*)
|
||||
i.e. usually the beginning of the next element.*)
|
||||
val name_comment_from_type_decl :
|
||||
int -> int -> Parsetree.type_declaration -> int * (string * Odoc_types.info option) list
|
||||
|
||||
(** This function converts a [Types.type_expr] into a [Odoc_type.type_kind],
|
||||
by associating the comment found in the parstree of each object field, if any. *)
|
||||
by associating the comment found in the parsetree of each object field, if any. *)
|
||||
val manifest_structure :
|
||||
Odoc_env.env -> (string * Odoc_types.info option) list ->
|
||||
Types.type_expr -> Odoc_type.type_manifest
|
||||
|
@ -173,7 +173,7 @@ module Analyser :
|
|||
Odoc_env.env -> int -> Typedtree.constructor_arguments ->
|
||||
Odoc_type.constructor_args
|
||||
|
||||
(** This function merge two optional info structures. *)
|
||||
(** This function merges two optional info structures. *)
|
||||
val merge_infos :
|
||||
Odoc_types.info option -> Odoc_types.info option ->
|
||||
Odoc_types.info option
|
||||
|
|
|
@ -254,7 +254,7 @@ let string_of_type t =
|
|||
)
|
||||
|
||||
| M.Type_open ->
|
||||
"= .." (* FIXME MG: when introducing new constuctors next time,
|
||||
"= .." (* FIXME MG: when introducing new constructors next time,
|
||||
thanks to setup a minimal correct output *)
|
||||
| M.Type_record l ->
|
||||
P.sprintf "= %s{\n%s\n}\n" (if priv then "private " else "")
|
||||
|
|
|
@ -141,7 +141,7 @@ let indices_names = [
|
|||
(** Module for generating various Texinfo things (menus, xrefs, ...) *)
|
||||
module Texi =
|
||||
struct
|
||||
(** Associations of strings to subsitute in Texinfo code. *)
|
||||
(** Associations of strings to substitute in Texinfo code. *)
|
||||
let subst_strings = [
|
||||
(Str.regexp "@", "@@") ;
|
||||
(Str.regexp "{", "@{") ;
|
||||
|
|
|
@ -210,7 +210,7 @@ rule main = parse
|
|||
else
|
||||
let s = Lexing.lexeme lexbuf in
|
||||
try
|
||||
(* chech if the "{..." or html_title mark was used. *)
|
||||
(* check if the "{..." or html_title mark was used. *)
|
||||
if s.[0] = '<' then
|
||||
let (n, l) = (2, (String.length s - 3)) in
|
||||
let s2 = String.sub s n l in
|
||||
|
|
|
@ -33,7 +33,7 @@ class virtual info =
|
|||
Add a pair here to handle a tag.*)
|
||||
val mutable tag_functions = ([] : (string * (Odoc_info.text -> Odoc_info.text)) list)
|
||||
|
||||
(** @return [etxt] value for an authors list. *)
|
||||
(** @return [text] value for an authors list. *)
|
||||
method text_of_author_list l =
|
||||
match l with
|
||||
[] ->
|
||||
|
@ -265,7 +265,7 @@ class virtual to_text =
|
|||
method text_of_class_type_param_expr_list module_name l =
|
||||
[ Code (self#normal_class_type_param_list module_name l) ]
|
||||
|
||||
(** @return [text] value to represent parameters of a class (with arraows).*)
|
||||
(** @return [text] value to represent parameters of a class (with arrows).*)
|
||||
method text_of_class_params module_name c =
|
||||
Odoc_info.text_concat
|
||||
[Newline]
|
||||
|
|
|
@ -56,7 +56,7 @@ type object_field = {
|
|||
}
|
||||
|
||||
type type_manifest =
|
||||
| Other of Types.type_expr (** Type manifest directly taken from Typedtre. *)
|
||||
| Other of Types.type_expr (** Type manifest directly taken from Typedtree. *)
|
||||
| Object_type of object_field list
|
||||
|
||||
(** Representation of a type. *)
|
||||
|
|
|
@ -56,7 +56,7 @@ and text_element =
|
|||
| Superscript of text (** Superscripts. *)
|
||||
| Subscript of text (** Subscripts. *)
|
||||
| Module_list of string list
|
||||
(** The table of the given modules with their abstract; *)
|
||||
(** The table of the given modules with their abstracts. *)
|
||||
| Index_list (** The links to the various indexes (values, types, ...) *)
|
||||
| Custom of string * text (** to extend \{foo syntax *)
|
||||
| Target of string * string (** (target, code) : to specify code for a specific target format *)
|
||||
|
@ -87,7 +87,7 @@ type info = {
|
|||
i_sees : see list; (** The list of \@see tags. *)
|
||||
i_since : string option; (** The string in the \@since tag. *)
|
||||
i_before : (string * text) list; (** the version number and text in \@before tag *)
|
||||
i_deprecated : text option; (** The of the \@deprecated tag. *)
|
||||
i_deprecated : text option; (** The textual description of the \@deprecated tag. *)
|
||||
i_params : param list; (** The list of parameter descriptions. *)
|
||||
i_raised_exceptions : raised_exception list; (** The list of raised exceptions. *)
|
||||
i_return_value : text option ; (** The description text of the return value. *)
|
||||
|
|
|
@ -919,7 +919,7 @@ let run_main mapper =
|
|||
let mapper () =
|
||||
try mapper (Array.to_list (Array.sub a 1 (n - 3)))
|
||||
with exn ->
|
||||
(* PR #6463 *)
|
||||
(* PR#6463 *)
|
||||
let f _ _ = raise exn in
|
||||
{default_mapper with structure = f; signature = f}
|
||||
in
|
||||
|
|
|
@ -125,7 +125,7 @@ let add_info_attrs info attrs =
|
|||
| None | Some {ds_body=""; _} -> attrs
|
||||
| Some ds -> attrs @ [info_attr ds]
|
||||
|
||||
(* Docstrings not attached to a specifc item *)
|
||||
(* Docstrings not attached to a specific item *)
|
||||
|
||||
type text = docstring list
|
||||
|
||||
|
|
|
@ -707,10 +707,10 @@ and skip_hash_bang = parse
|
|||
| Initial (* There have been no docstrings yet *)
|
||||
| After of docstring list
|
||||
(* There have been docstrings, none of which were
|
||||
preceeded by a blank line *)
|
||||
preceded by a blank line *)
|
||||
| Before of docstring list * docstring list * docstring list
|
||||
(* There have been docstrings, some of which were
|
||||
preceeded by a blank line *)
|
||||
preceded by a blank line *)
|
||||
|
||||
and docstring = Docstrings.docstring
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ and core_type_desc =
|
|||
| Ptyp_arrow of arg_label * core_type * core_type
|
||||
(* T1 -> T2 Simple
|
||||
~l:T1 -> T2 Labelled
|
||||
?l:T1 -> T2 Otional
|
||||
?l:T1 -> T2 Optional
|
||||
*)
|
||||
| Ptyp_tuple of core_type list
|
||||
(* T1 * ... * Tn
|
||||
|
|
|
@ -533,7 +533,7 @@ and expression ctxt f x =
|
|||
(expression reset_ctxt) e (case_list ctxt) l
|
||||
| Pexp_let (rf, l, e) ->
|
||||
(* pp f "@[<2>let %a%a in@;<1 -2>%a@]"
|
||||
(*no identation here, a new line*) *)
|
||||
(*no indentation here, a new line*) *)
|
||||
(* rec_flag rf *)
|
||||
pp f "@[<2>%a in@;<1 -2>%a@]"
|
||||
(bindings reset_ctxt) (rf,l)
|
||||
|
|
|
@ -403,7 +403,7 @@ let bprint_precision : type a b . buffer -> (a, b) precision -> unit =
|
|||
|
||||
(***)
|
||||
|
||||
(* Print the optionnal '+', ' ' or '#' associated to an int conversion. *)
|
||||
(* Print the optional '+', ' ' or '#' associated to an int conversion. *)
|
||||
let bprint_iconv_flag buf iconv = match iconv with
|
||||
| Int_pd | Int_pi -> buffer_add_char buf '+'
|
||||
| Int_sd | Int_si -> buffer_add_char buf ' '
|
||||
|
@ -431,7 +431,7 @@ let bprint_altint_fmt buf ign_flag iconv pad prec c =
|
|||
|
||||
(***)
|
||||
|
||||
(* Print the optionnal '+' associated to a float conversion. *)
|
||||
(* Print the optional '+' associated to a float conversion. *)
|
||||
let bprint_fconv_flag buf fconv = match fconv with
|
||||
| Float_pf | Float_pe | Float_pE
|
||||
| Float_pg | Float_pG | Float_ph | Float_pH ->
|
||||
|
@ -992,7 +992,7 @@ fun pad prec fmtty -> match prec, type_padding pad fmtty with
|
|||
(* Type a format according to an fmtty. *)
|
||||
(* If typing succeed, generate a copy of the format with the same
|
||||
type parameters as the fmtty. *)
|
||||
(* Raise a Failure with an error message in case of type mismatch. *)
|
||||
(* Raise [Failure] with an error message in case of type mismatch. *)
|
||||
let rec type_format :
|
||||
type a1 b1 c1 d1 e1 f1
|
||||
a2 b2 c2 d2 e2 f2 .
|
||||
|
@ -1304,7 +1304,7 @@ let recast :
|
|||
(******************************************************************************)
|
||||
(* Printing tools *)
|
||||
|
||||
(* Add padding spaces arround a string. *)
|
||||
(* Add padding spaces around a string. *)
|
||||
let fix_padding padty width str =
|
||||
let len = String.length str in
|
||||
let width, padty =
|
||||
|
@ -1910,9 +1910,9 @@ let rec strput_acc b acc = match acc with
|
|||
| End_of_acc -> ()
|
||||
|
||||
(******************************************************************************)
|
||||
(* Error managment *)
|
||||
(* Error management *)
|
||||
|
||||
(* Raise a Failure with a pretty-printed error message. *)
|
||||
(* Raise [Failure] with a pretty-printed error message. *)
|
||||
let failwith_message (Format (fmt, _)) =
|
||||
let buf = Buffer.create 256 in
|
||||
let k () acc = strput_acc buf acc; failwith (Buffer.contents buf) in
|
||||
|
@ -1984,7 +1984,7 @@ fun prec fmt -> match prec with
|
|||
| Lit_precision p -> Precision_fmt_EBB (Lit_precision p, fmt)
|
||||
| Arg_precision -> Precision_fmt_EBB (Arg_precision, fmt)
|
||||
|
||||
(* Create a padprec_fmt_ebb forma a padding, a precision and a format. *)
|
||||
(* Create a padprec_fmt_ebb from a padding, a precision and a format. *)
|
||||
(* Copy the padding and the precision to disjoin type parameters of arguments
|
||||
and result. *)
|
||||
let make_padprec_fmt_ebb : type x y z t .
|
||||
|
@ -2002,7 +2002,7 @@ fun pad prec fmt ->
|
|||
(* Format parsing *)
|
||||
|
||||
(* Parse a string representing a format and create a fmt_ebb. *)
|
||||
(* Raise an Failure exception in case of invalid format. *)
|
||||
(* Raise [Failure] in case of invalid format. *)
|
||||
let fmt_ebb_of_string ?legacy_behavior str =
|
||||
(* Parameters naming convention: *)
|
||||
(* - lit_start: start of the literal sequence. *)
|
||||
|
@ -2030,20 +2030,20 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
|
||||
A typical example would be "%+ d": specifying both '+' (if the
|
||||
number is positive, pad with a '+' to get the same width as
|
||||
negative numbres) and ' ' (if the number is positive, pad with
|
||||
negative numbers) and ' ' (if the number is positive, pad with
|
||||
a space) does not make sense, but the legacy (< 4.02)
|
||||
implementation was happy to just ignore the space.
|
||||
*)
|
||||
in
|
||||
|
||||
(* Raise a Failure with a friendly error message. *)
|
||||
(* Raise [Failure] with a friendly error message. *)
|
||||
let invalid_format_message str_ind msg =
|
||||
failwith_message
|
||||
"invalid format %S: at character number %d, %s"
|
||||
str str_ind msg;
|
||||
in
|
||||
|
||||
(* Used when the end of the format (or the current sub-format) was encoutered
|
||||
(* Used when the end of the format (or the current sub-format) was encountered
|
||||
unexpectedly. *)
|
||||
let unexpected_end_of_format end_ind =
|
||||
invalid_format_message end_ind
|
||||
|
@ -2055,7 +2055,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
invalid_format_message str_ind
|
||||
"non-zero widths are unsupported for %c conversions"
|
||||
in
|
||||
(* Raise Failure with a friendly error message about an option dependencie
|
||||
(* Raise [Failure] with a friendly error message about an option dependency
|
||||
problem. *)
|
||||
let invalid_format_without str_ind c s =
|
||||
failwith_message
|
||||
|
@ -2063,7 +2063,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
str str_ind c s
|
||||
in
|
||||
|
||||
(* Raise Failure with a friendly error message about an unexpected
|
||||
(* Raise [Failure] with a friendly error message about an unexpected
|
||||
character. *)
|
||||
let expected_character str_ind expected read =
|
||||
failwith_message
|
||||
|
@ -2196,7 +2196,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
| '0' .. '9' -> parse_literal minus str_ind
|
||||
| ('+' | '-') as symb when legacy_behavior ->
|
||||
(* Legacy mode would accept and ignore '+' or '-' before the
|
||||
integer describing the desired precision; not that this
|
||||
integer describing the desired precision; note that this
|
||||
cannot happen for padding width, as '+' and '-' already have
|
||||
a semantics there.
|
||||
|
||||
|
@ -2271,7 +2271,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
first pad with zeros... To add insult to the injury, the
|
||||
legacy implementation ignores the 0-padding indication and
|
||||
does the 5 padding with spaces instead. We reuse this
|
||||
interpretation for compatiblity, but statically reject this
|
||||
interpretation for compatibility, but statically reject this
|
||||
format when the legacy mode is disabled, to protect strict
|
||||
users from this corner case. *)
|
||||
match get_pad (), get_prec () with
|
||||
|
@ -2591,7 +2591,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
)
|
||||
| _ -> ()
|
||||
|
||||
(* Try to read the optionnal <name> after "@{" or "@[". *)
|
||||
(* Try to read the optional <name> after "@{" or "@[". *)
|
||||
and parse_tag : type e f . bool -> int -> int -> (_, _, e, f) fmt_ebb =
|
||||
fun is_open_tag str_ind end_ind ->
|
||||
try
|
||||
|
@ -2617,7 +2617,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
if is_open_tag then Open_tag sub_format else Open_box sub_format in
|
||||
Fmt_EBB (Formatting_gen (formatting, fmt_rest))
|
||||
|
||||
(* Try to read the optionnal <width offset> after "@;". *)
|
||||
(* Try to read the optional <width offset> after "@;". *)
|
||||
and parse_good_break : type e f . int -> int -> (_, _, e, f) fmt_ebb =
|
||||
fun str_ind end_ind ->
|
||||
let next_ind, formatting_lit =
|
||||
|
@ -2924,7 +2924,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
else incompatible_flag pct_ind str_ind symb "'+'"
|
||||
| false, false, _ -> assert false
|
||||
|
||||
(* Raise a Failure with a friendly error message about incompatible options.*)
|
||||
(* Raise [Failure] with a friendly error message about incompatible options.*)
|
||||
and incompatible_flag : type a . int -> int -> char -> string -> a =
|
||||
fun pct_ind str_ind symb option ->
|
||||
let subfmt = String.sub str pct_ind (str_ind - pct_ind) in
|
||||
|
@ -2939,7 +2939,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
|
|||
(* Guarded string to format conversions *)
|
||||
|
||||
(* Convert a string to a format according to an fmtty. *)
|
||||
(* Raise a Failure with an error message in case of type mismatch. *)
|
||||
(* Raise [Failure] with an error message in case of type mismatch. *)
|
||||
let format_of_string_fmtty str fmtty =
|
||||
let Fmt_EBB fmt = fmt_ebb_of_string str in
|
||||
try Format (type_format fmt fmtty, str)
|
||||
|
@ -2949,7 +2949,7 @@ let format_of_string_fmtty str fmtty =
|
|||
str (string_of_fmtty fmtty)
|
||||
|
||||
(* Convert a string to a format compatible with an other format. *)
|
||||
(* Raise a Failure with an error message in case of type mismatch. *)
|
||||
(* Raise [Failure] with an error message in case of type mismatch. *)
|
||||
let format_of_string_format str (Format (fmt', str')) =
|
||||
let Fmt_EBB fmt = fmt_ebb_of_string str in
|
||||
try Format (type_format fmt (fmtty_of_fmt fmt'), str)
|
||||
|
|
|
@ -189,7 +189,7 @@ to transpose between related format types.
|
|||
NOTE [1]: the typing of Format_subst_ty requires not one format type, but
|
||||
two, one to establish the link between the format argument and the
|
||||
first six parameters, and the other for the link between the format
|
||||
argumant and the last six parameters.
|
||||
argument and the last six parameters.
|
||||
|
||||
| Format_subst_ty : (* %(...%) *)
|
||||
('g, 'h, 'i, 'j, 'k, 'l,
|
||||
|
@ -214,7 +214,7 @@ function that proves that the relation is transitive
|
|||
-> ('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
|
||||
'a3, 'b3, 'c3, 'd3, 'e3, 'f3) fmtty_rel
|
||||
|
||||
does assume that the two input have exactly the same term structure
|
||||
does assume that the two inputs have exactly the same term structure
|
||||
(and is only every used for argument witnesses of the
|
||||
Format_subst_ty constructor).
|
||||
*)
|
||||
|
@ -232,7 +232,7 @@ type block_type =
|
|||
when it leads to a new indentation of the current line *)
|
||||
| Pp_fits (* Internal usage: when a block fits on a single line *)
|
||||
|
||||
(* Formatting element used by the Format pretty-printter. *)
|
||||
(* Formatting element used by the Format pretty-printer. *)
|
||||
type formatting_lit =
|
||||
| Close_box (* @] *)
|
||||
| Close_tag (* @} *)
|
||||
|
@ -245,7 +245,7 @@ type formatting_lit =
|
|||
| Escaped_percent (* @%% *)
|
||||
| Scan_indic of char (* @X *)
|
||||
|
||||
(* Formatting element used by the Format pretty-printter. *)
|
||||
(* Formatting element used by the Format pretty-printer. *)
|
||||
type ('a, 'b, 'c, 'd, 'e, 'f) formatting_gen =
|
||||
| Open_tag : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> (* @{ *)
|
||||
('a, 'b, 'c, 'd, 'e, 'f) formatting_gen
|
||||
|
@ -452,7 +452,7 @@ and ('a, 'b, 'c, 'd, 'e, 'f) fmt =
|
|||
We include a type Custom of "custom converters", where an
|
||||
arbitrary function can be used to convert one or more
|
||||
arguments. There is no syntax for custom converters, it is only
|
||||
inteded for custom processors that wish to rely on the
|
||||
intended for custom processors that wish to rely on the
|
||||
stdlib-defined format GADTs.
|
||||
|
||||
For instance a pre-processor could choose to interpret strings
|
||||
|
|
|
@ -50,7 +50,7 @@ let rec update_mod shape o n =
|
|||
match shape with
|
||||
| Function ->
|
||||
if Obj.tag n = Obj.closure_tag && Obj.size n <= Obj.size o
|
||||
then begin overwrite o n; Obj.truncate o (Obj.size n) (* PR #4008 *) end
|
||||
then begin overwrite o n; Obj.truncate o (Obj.size n) (* PR#4008 *) end
|
||||
else overwrite o (Obj.repr (fun x -> (Obj.obj n : _ -> _) x))
|
||||
| Lazy ->
|
||||
if Obj.tag n = Obj.lazy_tag then
|
||||
|
|
|
@ -734,7 +734,7 @@ and pp_open_box state indent = pp_open_box_gen state indent Pp_box
|
|||
(* Printing queued text.
|
||||
|
||||
[pp_print_flush] prints all pending items in the pretty-printer queue and
|
||||
then flushes the the low level output device of the formatter to effectively
|
||||
then flushes the low level output device of the formatter to actually
|
||||
display printing material.
|
||||
|
||||
[pp_print_newline] behaves as [pp_print_flush] after printing an additional
|
||||
|
@ -950,7 +950,7 @@ let default_pp_mark_close_tag s = "</" ^ s ^ ">"
|
|||
let default_pp_print_open_tag = ignore
|
||||
let default_pp_print_close_tag = ignore
|
||||
|
||||
(* Bulding a formatter given its basic output functions.
|
||||
(* Building a formatter given its basic output functions.
|
||||
Other fields get reasonable default values. *)
|
||||
let pp_make_formatter f g h i j =
|
||||
(* The initial state of the formatter contains a dummy box. *)
|
||||
|
@ -1041,7 +1041,7 @@ and str_formatter = formatter_of_buffer stdbuf
|
|||
|
||||
|
||||
(* [flush_buffer_formatter buf ppf] flushes formatter [ppf],
|
||||
then return the contents of buffer [buff] thst is reset.
|
||||
then returns the contents of buffer [buf] that is reset.
|
||||
Formatter [ppf] is supposed to print to buffer [buf], otherwise this
|
||||
function is not really useful. *)
|
||||
let flush_buffer_formatter buf ppf =
|
||||
|
|
|
@ -84,7 +84,7 @@ external logxor : int32 -> int32 -> int32 = "%int32_xor"
|
|||
(** Bitwise logical exclusive or. *)
|
||||
|
||||
val lognot : int32 -> int32
|
||||
(** Bitwise logical negation *)
|
||||
(** Bitwise logical negation. *)
|
||||
|
||||
external shift_left : int32 -> int -> int32 = "%int32_lsl"
|
||||
(** [Int32.shift_left x y] shifts [x] to the left by [y] bits.
|
||||
|
|
|
@ -84,7 +84,7 @@ external logxor : int64 -> int64 -> int64 = "%int64_xor"
|
|||
(** Bitwise logical exclusive or. *)
|
||||
|
||||
val lognot : int64 -> int64
|
||||
(** Bitwise logical negation *)
|
||||
(** Bitwise logical negation. *)
|
||||
|
||||
external shift_left : int64 -> int -> int64 = "%int64_lsl"
|
||||
(** [Int64.shift_left x y] shifts [x] to the left by [y] bits.
|
||||
|
|
|
@ -99,7 +99,7 @@ external logxor : nativeint -> nativeint -> nativeint = "%nativeint_xor"
|
|||
(** Bitwise logical exclusive or. *)
|
||||
|
||||
val lognot : nativeint -> nativeint
|
||||
(** Bitwise logical negation *)
|
||||
(** Bitwise logical negation. *)
|
||||
|
||||
external shift_left : nativeint -> int -> nativeint = "%nativeint_lsl"
|
||||
(** [Nativeint.shift_left x y] shifts [x] to the left by [y] bits.
|
||||
|
|
|
@ -410,7 +410,7 @@ module Scanning : SCANNING = struct
|
|||
More precisely, given [ic], all successive calls [fscanf ic] must read
|
||||
from the same scanning buffer.
|
||||
This obliged this library to allocated scanning buffers that were
|
||||
not properly garbbage collectable, hence leading to memory leaks.
|
||||
not properly garbage collectable, hence leading to memory leaks.
|
||||
If you need to read from a [Pervasives.in_channel] input channel
|
||||
[ic], simply define a [Scanning.in_channel] formatted input channel as in
|
||||
[let ib = Scanning.from_channel ic], then use [Scanf.bscanf ib] as usual.
|
||||
|
@ -655,7 +655,7 @@ let scan_digit_star digitp width ib =
|
|||
|
||||
let scan_digit_plus basis digitp width ib =
|
||||
(* Ensure we have got enough width left,
|
||||
and read at list one digit. *)
|
||||
and read at least one digit. *)
|
||||
if width = 0 then bad_token_length "digits" else
|
||||
let c = Scanning.checked_peek_char ib in
|
||||
if digitp c then
|
||||
|
@ -1188,7 +1188,7 @@ let stopper_of_formatting_lit fmting =
|
|||
|
||||
|
||||
(******************************************************************************)
|
||||
(* Readers managment *)
|
||||
(* Reader management *)
|
||||
|
||||
(* A call to take_format_readers on a format is evaluated into functions
|
||||
taking readers as arguments and aggregate them into an heterogeneous list *)
|
||||
|
@ -1296,7 +1296,7 @@ fun k ign fmt -> match ign with
|
|||
|
||||
(* Make a generic scanning function. *)
|
||||
(* Scan a stream according to a format and readers obtained by
|
||||
take_format_readers, and aggegate scanned values into an
|
||||
take_format_readers, and aggregate scanned values into an
|
||||
heterogeneous list. *)
|
||||
(* Return the heterogeneous list of scanned values. *)
|
||||
let rec make_scanf : type a c d e f.
|
||||
|
|
|
@ -26,7 +26,7 @@ open Btype
|
|||
If one wants to manipulate a type after type inference (for
|
||||
instance, during code generation or in the debugger), one must
|
||||
first make sure that the type levels are correct, using the
|
||||
function [correct_levels]. Then, this type can be correctely
|
||||
function [correct_levels]. Then, this type can be correctly
|
||||
manipulated by [apply], [expand_head] and [moregeneral].
|
||||
*)
|
||||
|
||||
|
@ -1194,7 +1194,7 @@ let instance_class params cty =
|
|||
cleanup_types ();
|
||||
(params', cty')
|
||||
|
||||
(**** Instanciation for types with free universal variables ****)
|
||||
(**** Instantiation for types with free universal variables ****)
|
||||
|
||||
let rec diff_list l1 l2 =
|
||||
if l1 == l2 then [] else
|
||||
|
@ -1315,9 +1315,9 @@ let subst env level priv abbrev ty params args body =
|
|||
raise exn
|
||||
|
||||
(*
|
||||
Only the shape of the type matters, not whether is is generic or
|
||||
Only the shape of the type matters, not whether it is generic or
|
||||
not. [generic_level] might be somewhat slower, but it ensures
|
||||
invariants on types are enforced (decreasing levels.), and we don't
|
||||
invariants on types are enforced (decreasing levels), and we don't
|
||||
care about efficiency here.
|
||||
*)
|
||||
let apply env params body args =
|
||||
|
@ -1332,10 +1332,10 @@ let apply env params body args =
|
|||
(****************************)
|
||||
|
||||
(*
|
||||
If the environnement has changed, memorized expansions might not
|
||||
If the environment has changed, memorized expansions might not
|
||||
be correct anymore, and so we flush the cache. This is safe but
|
||||
quite pessimistic: it would be enough to flush the cache when a
|
||||
type or module definition is overridden in the environnement.
|
||||
type or module definition is overridden in the environment.
|
||||
*)
|
||||
let previous_env = ref Env.empty
|
||||
(*let string_of_kind = function Public -> "public" | Private -> "private"*)
|
||||
|
@ -1700,8 +1700,8 @@ let rec unify_univar t1 t2 = function
|
|||
end
|
||||
| [] -> raise (Unify [])
|
||||
|
||||
(* Test the occurence of free univars in a type *)
|
||||
(* that's way too expansive. Must do some kind of cacheing *)
|
||||
(* Test the occurrence of free univars in a type *)
|
||||
(* that's way too expensive. Must do some kind of caching *)
|
||||
let occur_univar env ty =
|
||||
let visited = ref TypeMap.empty in
|
||||
let rec occur_rec bound ty =
|
||||
|
@ -1866,7 +1866,7 @@ let deep_occur t0 ty =
|
|||
types are kept distincts, but they are made to (temporally)
|
||||
expand to the same type.
|
||||
2. Abbreviations with at least one parameter are systematically
|
||||
expanded. The overhead does not seem to high, and that way
|
||||
expanded. The overhead does not seem too high, and that way
|
||||
abbreviations where some parameters does not appear in the
|
||||
expansion, such as ['a t = int], are correctly handled. In
|
||||
particular, for this example, unifying ['a t] with ['b t] keeps
|
||||
|
@ -2275,7 +2275,7 @@ let unify_package env unify_list lv1 p1 n1 tl1 lv2 p2 n2 tl2 =
|
|||
&& !package_subtype env p2 n2 tl2 p1 n1 tl1 then () else raise Not_found
|
||||
|
||||
|
||||
(* force unification in Reither when one side has as non-conjunctive type *)
|
||||
(* force unification in Reither when one side has a non-conjunctive type *)
|
||||
let rigid_variants = ref false
|
||||
|
||||
(* drop not force unification in Reither, even in fixed case
|
||||
|
@ -3104,10 +3104,10 @@ let moregen inst_nongen type_pairs env patt subj =
|
|||
moregen inst_nongen type_pairs env patt subj
|
||||
|
||||
(*
|
||||
Non-generic variable can be instanciated only if [inst_nongen] is
|
||||
Non-generic variable can be instantiated only if [inst_nongen] is
|
||||
true. So, [inst_nongen] should be set to false if the subject might
|
||||
contain non-generic variables (and we do not want them to be
|
||||
instanciated).
|
||||
instantiated).
|
||||
Usually, the subject is given by the user, and the pattern
|
||||
is unimportant. So, no need to propagate abbreviations.
|
||||
*)
|
||||
|
@ -3769,8 +3769,8 @@ let rec build_subtype env visited loops posi level t =
|
|||
ty1, tl1
|
||||
| _ -> raise Not_found
|
||||
in
|
||||
(* Fix PR4505: do not set ty to Tvar when it appears in tl1,
|
||||
as this occurence might break the occur check.
|
||||
(* Fix PR#4505: do not set ty to Tvar when it appears in tl1,
|
||||
as this occurrence might break the occur check.
|
||||
XXX not clear whether this correct anyway... *)
|
||||
if List.exists (deep_occur ty) tl1 then raise Not_found;
|
||||
ty.desc <- Tvar None;
|
||||
|
@ -4038,7 +4038,7 @@ and subtype_fields env trace ty1 ty2 cstrs =
|
|||
in
|
||||
List.fold_left
|
||||
(fun cstrs (_, _k1, t1, _k2, t2) ->
|
||||
(* Theses fields are always present *)
|
||||
(* These fields are always present *)
|
||||
subtype_rec env ((t1, t2)::trace) t1 t2 cstrs)
|
||||
cstrs pairs
|
||||
|
||||
|
@ -4499,7 +4499,7 @@ let nondep_cltype_declaration env id decl =
|
|||
clear_hash ();
|
||||
decl
|
||||
|
||||
(* collapse conjonctive types in class parameters *)
|
||||
(* collapse conjunctive types in class parameters *)
|
||||
let rec collapse_conj env visited ty =
|
||||
let ty = repr ty in
|
||||
if List.memq ty visited then () else
|
||||
|
|
|
@ -228,7 +228,7 @@ val enlarge_type: Env.t -> type_expr -> type_expr * bool
|
|||
val subtype: Env.t -> type_expr -> type_expr -> unit -> unit
|
||||
(* [subtype env t1 t2] checks that [t1] is a subtype of [t2].
|
||||
It accumulates the constraints the type variables must
|
||||
enforce and returns a function that inforce this
|
||||
enforce and returns a function that enforces this
|
||||
constraints. *)
|
||||
|
||||
val nondep_type: Env.t -> Ident.t -> type_expr -> type_expr
|
||||
|
|
|
@ -169,7 +169,7 @@ type summary =
|
|||
module TycompTbl =
|
||||
struct
|
||||
(** This module is used to store components of types (i.e. labels
|
||||
and contructors). We keep a representation of each nested
|
||||
and constructors). We keep a representation of each nested
|
||||
"open" and the set of local bindings between each of them. *)
|
||||
|
||||
type 'a t = {
|
||||
|
@ -819,7 +819,7 @@ let find_pers_struct name =
|
|||
let check_pers_struct name =
|
||||
if not (Hashtbl.mem persistent_structures name) then begin
|
||||
(* PR#6843: record the weak dependency ([add_import]) regardless of
|
||||
whether the check suceeds, to help make builds more
|
||||
whether the check succeeds, to help make builds more
|
||||
deterministic. *)
|
||||
add_import name;
|
||||
if (Warnings.is_active (Warnings.No_cmi_file("", None))) then
|
||||
|
|
|
@ -484,7 +484,7 @@ let do_set_args erase_mutable q r = match q with
|
|||
let set_args q r = do_set_args false q r
|
||||
and set_args_erase_mutable q r = do_set_args true q r
|
||||
|
||||
(* filter pss acording to pattern q *)
|
||||
(* filter pss according to pattern q *)
|
||||
let filter_one q pss =
|
||||
let rec filter_rec = function
|
||||
({pat_desc = Tpat_alias(p,_,_)}::ps)::pss ->
|
||||
|
@ -501,7 +501,7 @@ let filter_one q pss =
|
|||
(*
|
||||
Filter pss in the ``extra case''. This applies :
|
||||
- According to an extra constructor (datatype case, non-complete signature).
|
||||
- Acordinng to anything (all-variables case).
|
||||
- According to anything (all-variables case).
|
||||
*)
|
||||
let filter_extra pss =
|
||||
let rec filter_rec = function
|
||||
|
@ -660,7 +660,7 @@ let full_match closing env = match env with
|
|||
->
|
||||
assert false
|
||||
|
||||
(* Written as a non-fragile matching, PR7451 originated from a fragile matching below. *)
|
||||
(* Written as a non-fragile matching, PR#7451 originated from a fragile matching below. *)
|
||||
let should_extend ext env = match ext with
|
||||
| None -> false
|
||||
| Some ext -> begin match env with
|
||||
|
@ -1255,7 +1255,7 @@ let rec pressure_variants tdefs = function
|
|||
end
|
||||
|
||||
|
||||
(* Yet another satisfiable fonction *)
|
||||
(* Yet another satisfiable function *)
|
||||
|
||||
(*
|
||||
This time every_satisfiable pss qs checks the
|
||||
|
@ -1906,7 +1906,7 @@ let rec collect_paths_from_pat r p = match p.pat_desc with
|
|||
(*
|
||||
Actual fragile check
|
||||
1. Collect data types in the patterns of the match.
|
||||
2. One exhautivity check per datatype, considering that
|
||||
2. One exhaustivity check per datatype, considering that
|
||||
the type is extended.
|
||||
*)
|
||||
|
||||
|
@ -2029,9 +2029,9 @@ let fluid pat = irrefutable pat && inactive pat.pat_desc
|
|||
|
||||
|
||||
|
||||
(********************************)
|
||||
(* Exported exhustiveness check *)
|
||||
(********************************)
|
||||
(*********************************)
|
||||
(* Exported exhaustiveness check *)
|
||||
(*********************************)
|
||||
|
||||
(*
|
||||
Fragile check is performed when required and
|
||||
|
@ -2278,7 +2278,7 @@ let all_rhs_idents exp =
|
|||
| _ -> ()
|
||||
|
||||
(* Very hackish, detect unpack pattern compilation
|
||||
and perfom "indirect check for them" *)
|
||||
and perform "indirect check for them" *)
|
||||
let is_unpack exp =
|
||||
List.exists
|
||||
(fun (attr, _) -> attr.txt = "#modulepat") exp.exp_attributes
|
||||
|
|
|
@ -132,7 +132,7 @@ let rec typexp s ty =
|
|||
&& field_kind_repr k <> Fabsent && (repr ty).level < generic_level ->
|
||||
(* do not copy the type of self when it is not generalized *)
|
||||
ty
|
||||
(* cannot do it, since it would omit subsitution
|
||||
(* cannot do it, since it would omit substitution
|
||||
| Tvariant row when not (static_row row) ->
|
||||
ty
|
||||
*)
|
||||
|
|
|
@ -21,9 +21,9 @@ type t
|
|||
|
||||
(*
|
||||
Substitutions are used to translate a type from one context to
|
||||
another. This requires substituing paths for identifiers, and
|
||||
another. This requires substituting paths for identifiers, and
|
||||
possibly also lowering the level of non-generic variables so that
|
||||
it be inferior to the maximum level of the new context.
|
||||
they are inferior to the maximum level of the new context.
|
||||
|
||||
Substitutions can also be used to create a "clean" copy of a type.
|
||||
Indeed, non-variable node of a type are duplicated, with their
|
||||
|
|
|
@ -933,7 +933,7 @@ let compute_variance_type env check (required, loc) decl tyl =
|
|||
(* Prepare *)
|
||||
let params = List.map Btype.repr decl.type_params in
|
||||
let tvl = ref TypeMap.empty in
|
||||
(* Compute occurences in body *)
|
||||
(* Compute occurrences in the body *)
|
||||
let open Variance in
|
||||
List.iter
|
||||
(fun (cn,ty) ->
|
||||
|
@ -1012,7 +1012,7 @@ let compute_variance_type env check (required, loc) decl tyl =
|
|||
|
||||
let add_false = List.map (fun ty -> false, ty)
|
||||
|
||||
(* A parameter is constrained if either is is instantiated,
|
||||
(* A parameter is constrained if it is either instantiated,
|
||||
or it is a variable appearing in another parameter *)
|
||||
let constrained vars ty =
|
||||
match ty.desc with
|
||||
|
@ -1348,7 +1348,7 @@ let transl_type_decl env rec_flag sdecl_list =
|
|||
decl to_check)
|
||||
decls;
|
||||
List.iter (check_abbrev_recursion newenv id_loc_list to_check) tdecls;
|
||||
(* Check that all type variable are closed *)
|
||||
(* Check that all type variables are closed *)
|
||||
List.iter2
|
||||
(fun sdecl tdecl ->
|
||||
let decl = tdecl.typ_type in
|
||||
|
@ -1566,7 +1566,7 @@ let transl_type_extension check_open env loc styext =
|
|||
Btype.iter_type_expr_cstr_args Ctype.generalize ext.ext_type.ext_args;
|
||||
may Ctype.generalize ext.ext_type.ext_ret_type)
|
||||
constructors;
|
||||
(* Check that all type variable are closed *)
|
||||
(* Check that all type variables are closed *)
|
||||
List.iter
|
||||
(fun ext ->
|
||||
match Ctype.closed_extension_constructor ext.ext_type with
|
||||
|
@ -1608,7 +1608,7 @@ let transl_exception env sext =
|
|||
(* Generalize types *)
|
||||
Btype.iter_type_expr_cstr_args Ctype.generalize ext.ext_type.ext_args;
|
||||
may Ctype.generalize ext.ext_type.ext_ret_type;
|
||||
(* Check that all type variable are closed *)
|
||||
(* Check that all type variables are closed *)
|
||||
begin match Ctype.closed_extension_constructor ext.ext_type with
|
||||
Some ty ->
|
||||
raise (Error(ext.ext_loc, Unbound_type_var_ext(ty, ext.ext_type)))
|
||||
|
|
|
@ -152,7 +152,7 @@ and class_expr_desc =
|
|||
(Ident.t * string loc * expression) list * class_expr
|
||||
| Tcl_constraint of
|
||||
class_expr * class_type option * string list * string list * Concr.t
|
||||
(* Visible instance variables, methods and concretes methods *)
|
||||
(* Visible instance variables, methods and concrete methods *)
|
||||
| Tcl_open of override_flag * Path.t * Longident.t loc * Env.t * class_expr
|
||||
|
||||
and class_structure =
|
||||
|
|
|
@ -267,7 +267,7 @@ and class_expr_desc =
|
|||
(Ident.t * string loc * expression) list * class_expr
|
||||
| Tcl_constraint of
|
||||
class_expr * class_type option * string list * string list * Concr.t
|
||||
(* Visible instance variables, methods and concretes methods *)
|
||||
(* Visible instance variables, methods and concrete methods *)
|
||||
| Tcl_open of override_flag * Path.t * Longident.t loc * Env.t * class_expr
|
||||
|
||||
and class_structure =
|
||||
|
@ -313,7 +313,7 @@ and module_expr =
|
|||
(** Annotations for [Tmod_constraint]. *)
|
||||
and module_type_constraint =
|
||||
| Tmodtype_implicit
|
||||
(** The module type constraint has been synthesized during typecheking. *)
|
||||
(** The module type constraint has been synthesized during typechecking. *)
|
||||
| Tmodtype_explicit of module_type
|
||||
(** The module type was in the source file. *)
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ let rec map_rec_type_with_row_types ~rec_flag fn decls rem =
|
|||
else
|
||||
map_rec_type ~rec_flag fn decls rem
|
||||
|
||||
(* Add type extension flags to extension contructors *)
|
||||
(* Add type extension flags to extension constructors *)
|
||||
let map_ext fn exts rem =
|
||||
match exts with
|
||||
| [] -> rem
|
||||
|
|
|
@ -279,7 +279,7 @@ and module_declaration =
|
|||
|
||||
and modtype_declaration =
|
||||
{
|
||||
mtd_type: module_type option; (* Nonte: abstract *)
|
||||
mtd_type: module_type option; (* Note: abstract *)
|
||||
mtd_attributes: Parsetree.attributes;
|
||||
mtd_loc: Location.t;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ and type_desc =
|
|||
| Tpoly of type_expr * type_expr list
|
||||
(** [Tpoly (ty,tyl)] ==> ['a1... 'an. ty],
|
||||
where 'a1 ... 'an are names given to types in tyl
|
||||
and occurences of those types in ty. *)
|
||||
and occurrences of those types in ty. *)
|
||||
|
||||
| Tpackage of Path.t * Longident.t list * type_expr list
|
||||
(** Type of a first-class module (a.k.a package). *)
|
||||
|
@ -186,7 +186,7 @@ and row_field =
|
|||
removing abbreviations.
|
||||
*)
|
||||
and abbrev_memo =
|
||||
| Mnil (** No known abbrevation *)
|
||||
| Mnil (** No known abbreviation *)
|
||||
|
||||
| Mcons of private_flag * Path.t * type_expr * type_expr * abbrev_memo
|
||||
(** Found one abbreviation.
|
||||
|
@ -266,7 +266,7 @@ and value_kind =
|
|||
module Variance : sig
|
||||
type t
|
||||
type f = May_pos | May_neg | May_weak | Inj | Pos | Neg | Inv
|
||||
val null : t (* no occurence *)
|
||||
val null : t (* no occurrence *)
|
||||
val full : t (* strictly invariant *)
|
||||
val covariant : t (* strictly covariant *)
|
||||
val may_inv : t (* maybe invariant *)
|
||||
|
|
|
@ -563,7 +563,7 @@ module Color = struct
|
|||
|
||||
let color_enabled = ref true
|
||||
|
||||
(* either prints the tag of [s] or delegate to [or_else] *)
|
||||
(* either prints the tag of [s] or delegates to [or_else] *)
|
||||
let mark_open_tag ~or_else s =
|
||||
try
|
||||
let style = style_of_tag s in
|
||||
|
|
|
@ -96,7 +96,7 @@ val logxor : t -> t -> t
|
|||
(** Bitwise logical exclusive or. *)
|
||||
|
||||
val lognot : t -> t
|
||||
(** Bitwise logical negation *)
|
||||
(** Bitwise logical negation. *)
|
||||
|
||||
val shift_left : t -> int -> t
|
||||
(** [Targetint.shift_left x y] shifts [x] to the left by [y] bits.
|
||||
|
|
Loading…
Reference in New Issue