Permalink
Browse files

Fixing ml-doc.

  • Loading branch information...
ppedrot committed May 1, 2014
1 parent f3b3b6e commit c7b9eebd6e754672d0d57ea6a376bd3d7abf0159
Showing with 49 additions and 61 deletions.
  1. +3 −3 Makefile.build
  2. +1 −1 ide/sentence.ml
  3. +9 −14 kernel/nativecode.ml
  4. +6 −9 lib/serialize.ml
  5. +3 −3 library/declaremods.ml
  6. +3 −3 plugins/micromega/coq_micromega.ml
  7. +6 −6 plugins/micromega/mfourier.ml
  8. +18 −22 stm/stm.ml
View
@@ -707,13 +707,13 @@ $(OCAMLDOCDIR)/coq.tex: $(DOCMLIS:.mli=.cmi)
-intro $(OCAMLDOCDIR)/docintro -o $@
mli-doc: $(DOCMLIS:.mli=.cmi)
- $(OCAMLDOC) -html -rectypes -I $(MYCAMLP4LIB) $(MLINCLUDES)\
+ $(OCAMLDOC) -html -rectypes -I +threads -I $(MYCAMLP4LIB) $(MLINCLUDES) $(COQIDEFLAGS)\
$(DOCMLIS) -d $(OCAMLDOCDIR)/html -colorize-code \
-t "Coq mlis documentation" -intro $(OCAMLDOCDIR)/docintro \
-css-style style.css
ml-dot: $(MLFILES)
- $(OCAMLDOC) -dot -dot-reduce -rectypes -I $(CAMLLIB) -I $(MYCAMLP4LIB) $(MLINCLUDES)\
+ $(OCAMLDOC) -dot -dot-reduce -rectypes -I +threads -I $(CAMLLIB) -I $(MYCAMLP4LIB) $(MLINCLUDES) $(COQIDEFLAGS)\
$(filter $(addsuffix /%.ml,$(CORESRCDIRS)),$(MLFILES)) -o $(OCAMLDOCDIR)/coq.dot
%_dep.png: %.dot
@@ -729,7 +729,7 @@ OCAMLDOC_MLLIBD = $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ \
$(OCAMLDOC_MLLIBD)
ml-doc:
- $(OCAMLDOC) -html -rectypes $(LOCALINCLUDES) -d $(SOURCEDOCDIR) $(MLSTATICFILES)
+ $(OCAMLDOC) -html -rectypes -I +threads $(MLINCLUDES) $(COQIDEFLAGS) -d $(OCAMLDOCDIR) $(MLSTATICFILES)
parsing/parsing.dot : | parsing/parsing.mllib.d parsing/highparsing.mllib.d
$(OCAMLDOC_MLLIBD)
View
@@ -67,7 +67,7 @@ let rec grab_sentence_stop (start:GText.iter) =
(forward_search is_sentence_end start)#forward_char
(** Search forward the first character immediately after a "." sentence end
- (and not just a "{" or "}" or comment end *)
+ (and not just a "\{" or "\}" or comment end *)
let rec grab_ending_dot (start:GText.iter) =
let is_ending_dot s = is_sentence_end s && s#char = Char.code '.' in
View
@@ -21,7 +21,7 @@ open Pre_env
compiler. mllambda represents a fragment of ML, and can easily be printed
to OCaml code. *)
-(** Local names {{{**)
+(** Local names **)
type lname = { lname : name; luid : int }
@@ -42,9 +42,8 @@ let reset_lname = lname_ctr := -1
let fresh_lname n =
incr lname_ctr;
{ lname = n; luid = !lname_ctr }
- (**}}}**)
-(** Global names {{{ **)
+(** Global names **)
type gname =
| Gind of string * inductive (* prefix, inductive name *)
| Gconstruct of string * constructor (* prefix, constructor name *)
@@ -136,9 +135,8 @@ let reset_normtbl () = normtbl_ctr := -1
let fresh_gnormtbl l =
incr normtbl_ctr;
Gnormtbl (l,!normtbl_ctr)
- (**}}}**)
-(** Symbols (pre-computed values) {{{**)
+(** Symbols (pre-computed values) **)
type symbol =
| SymbValue of Nativevalues.t
@@ -241,9 +239,9 @@ let symbols_tbl_name = Ginternal "symbols_tbl"
let get_symbols_tbl () =
let tbl = Array.make (HashtblSymbol.length symb_tbl) dummy_symb in
- HashtblSymbol.iter (fun x i -> tbl.(i) <- x) symb_tbl; tbl(**}}}**)
+ HashtblSymbol.iter (fun x i -> tbl.(i) <- x) symb_tbl; tbl
-(** Lambda to Mllambda {{{**)
+(** Lambda to Mllambda **)
type primitive =
| Mk_prod
@@ -1250,9 +1248,8 @@ let mllambda_of_lambda auxdefs l t =
(* final result : global list, fv, ml *)
else
(!global_stack, (fv_named, fv_rel), mkMLlam (Array.of_list params) ml)
- (**}}}**)
-(** Code optimization {{{**)
+(** Code optimization **)
(** Optimization of match and fix *)
@@ -1408,9 +1405,8 @@ let optimize_stk stk =
Glet(Gconstant (prefix, c), optimize gdef body)
| _ -> g in
List.map optimize_global stk
- (**}}}**)
-(** Printing to ocaml {{{**)
+(** Printing to ocaml **)
(* Redefine a bunch of functions in module Names to generate names
acceptable to OCaml. *)
let string_of_id s = Unicode.ascii_of_ident (string_of_id s)
@@ -1708,9 +1704,9 @@ let pp_global fmt g =
pp_gname gn pp_ldecls params
pp_mllam (MLmatch(annot,a,accu,bs))
| Gcomment s ->
- Format.fprintf fmt "@[(* %s *)@]@." s(**}}}**)
+ Format.fprintf fmt "@[(* %s *)@]@." s
-(** Compilation of elements in environment {{{**)
+(** Compilation of elements in environment **)
let rec compile_with_fv env sigma auxdefs l t =
let (auxdefs,(fv_named,fv_rel),ml) = mllambda_of_lambda auxdefs l t in
if List.is_empty fv_named && List.is_empty fv_rel then (auxdefs,ml)
@@ -1961,6 +1957,5 @@ let update_locations (ind_updates,const_updates) =
let add_header_comment mlcode s =
Gcomment s :: mlcode
-(** }}} **)
(* vim: set filetype=ocaml foldmethod=marker: *)
View
@@ -19,7 +19,7 @@ open Interface
open Xml_datatype
(* Marshalling of basic types and type constructors *)
-module Xml_marshalling = struct (* {{{ *)
+module Xml_marshalling = struct
exception Marshal_error
@@ -370,12 +370,12 @@ let to_feedback xml = match xml with
content = to_feedback_content content }
| _ -> raise Marshal_error
-end (* }}} *)
+end
include Xml_marshalling
(* Reification of basic types and type constructors, and functions
from to xml *)
-module ReifType : sig (* {{{ *)
+module ReifType : sig
type 'a val_t
@@ -609,7 +609,7 @@ end = struct
(pr_xml (of_option_state { opt_sync = true; opt_depr = false;
opt_name = "name1"; opt_value = IntValue (Some 37) }));
-end (* }}} *)
+end
open ReifType
(** Types reification, checked with explicit casts *)
@@ -755,7 +755,7 @@ let abstract_eval_call handler (c : 'a call) : 'a value =
with any ->
Fail (handler.handle_exn any)
-(** brain dead code, edit if protocol messages are added/removed {{{ *)
+(** brain dead code, edit if protocol messages are added/removed *)
let of_answer (q : 'a call) (v : 'a value) : xml = match q with
| Add _ -> of_value (of_value_type add_rty_t ) (Obj.magic v)
| Edit_at _ -> of_value (of_value_type edit_at_rty_t ) (Obj.magic v)
@@ -833,15 +833,14 @@ let to_call : xml -> unknown call =
| "Interp" -> Interp (mkCallArg interp_sty_t a)
| "StopWorker" -> StopWorker (mkCallArg stop_worker_sty_t a)
| _ -> raise Marshal_error)
-(* }}} *)
(** misc *)
let is_feedback = function
| Element ("feedback", _, _) -> true
| _ -> false
-(** {{{ Debug printing *)
+(** Debug printing *)
let pr_value_gen pr = function
| Good v -> "GOOD " ^ pr v
@@ -885,8 +884,6 @@ let pr_call call = match call with
| Interp x -> str_of_call call ^ " " ^ print interp_sty_t x
| StopWorker x -> str_of_call call ^ " " ^ print stop_worker_sty_t x
-(* }}} *)
-
let document to_string_fmt =
Printf.printf "=== Available calls ===\n\n";
Array.iter (fun (cname, csty, crty) ->
View
@@ -332,7 +332,7 @@ let () = ModSubstObjs.set_missing_handler handle_missing_substobjs
-(** {6 From module expression to substitutive objects *)
+(** {6 From module expression to substitutive objects} *)
(** Turn a chain of [MSEapply] into the head module_path and the
list of module_path parameters (deepest param coming first).
@@ -668,7 +668,7 @@ let declare_module interp_modast id args res mexpr_o fs =
end
-(** {6 Module types : start, end, declare *)
+(** {6 Module types : start, end, declare} *)
module RawModTypeOps = struct
@@ -787,7 +787,7 @@ let declare_include interp me_asts =
end
-(** {6 Module operations handling summary freeze/unfreeze *)
+(** {6 Module operations handling summary freeze/unfreeze} *)
let protect_summaries f =
let fs = Summary.freeze_summaries ~marshallable:`No in
@@ -45,7 +45,7 @@ type tag = Tag.t
(**
* An atom is of the form:
- * pExpr1 {<,>,=,<>,<=,>=} pExpr2
+ * pExpr1 \{<,>,=,<>,<=,>=\} pExpr2
* where pExpr1, pExpr2 are polynomial expressions (see Micromega). pExprs are
* parametrized by 'cst, which is used as the type of constants.
*)
@@ -112,7 +112,7 @@ let rec ids_of_formula f =
(**
* A clause is a list of (tagged) nFormulas.
* nFormulas are normalized formulas, i.e., of the form:
- * cPol {=,<>,>,>=} 0
+ * cPol \{=,<>,>,>=\} 0
* with cPol compact polynomials (see the Pol inductive type in EnvRing.v).
*)
@@ -246,7 +246,7 @@ let rec add_term t0 = function
module ISet = Set.Make(Int)
(**
- * Given a set of integers s={i0,...,iN} and a list m, return the list of
+ * Given a set of integers s=\{i0,...,iN\} and a list m, return the list of
* elements of m that are at position i0,...,iN.
*)
@@ -19,10 +19,10 @@ struct
type interval = num option * num option
(** None models the absence of bound i.e. infinity *)
(** As a result,
- - None , None -> ]-oo,+oo[
- - None , Some v -> ]-oo,v]
- - Some v, None -> [v,+oo[
- - Some v, Some v' -> [v,v']
+ - None , None -> \]-oo,+oo\[
+ - None , Some v -> \]-oo,v\]
+ - Some v, None -> \[v,+oo\[
+ - Some v, Some v' -> \[v,v'\]
Intervals needs to be explicitely normalised.
*)
@@ -117,7 +117,7 @@ and cstr_info = {
}
-(** A system of constraints has the form [{sys = s ; vars = v}].
+(** A system of constraints has the form [\{sys = s ; vars = v\}].
[s] is a hashtable mapping a normalised vector to a [cstr_info] record where
- [bound] is an interval
- [prf_idx] is the set of hypothese indexes (i.e. constraints in the initial system) used to obtain the current constraint.
@@ -499,7 +499,7 @@ let pick_small_value bnd =
then ceiling_num i (* why not *) else i
-(** [solution s1 sys_l = Some(sn,[(vn-1,sn-1);...; (v1,s1)]@sys_l)]
+(** [solution s1 sys_l = Some(sn,\[(vn-1,sn-1);...; (v1,s1)\]\@sys_l)]
then [sn] is a system which contains only [black_v] -- if it existed in [s1]
and [sn+1] is obtained by projecting [vn] out of [sn]
@raise SystemContradiction if system [s] has no solution
Oops, something went wrong.

0 comments on commit c7b9eeb

Please sign in to comment.