Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/odoc_wiki/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ OCAMLDUCEFIND ?= ocamlducefind
OCAMLDOC ?= ${OCAMLFIND} ocamldoc
OCAMLDUCEDOC ?= ${OCAMLDUCEFIND} ocamldoc

OCAMLC ?= ${OCAMLFIND} ocamlc
OCAMLC ?= ${OCAMLFIND} ocamlc -package str
OCAMLDUCEC ?= ${OCAMLDUCEFIND} ocamlc
OCAMLOPT ?= ${OCAMLFIND} ocamlopt
OCAMLOPT ?= ${OCAMLFIND} ocamlopt -package str
OCAMLDUCEOPT ?= ${OCAMLDUCEFIND} ocamlopt
OCAMLDEP ?= ${OCAMLFIND} ocamldep
OCAMLDUCEDEP ?= ${OCAMLDUCEFIND} ocamldep
Expand Down
19 changes: 8 additions & 11 deletions src/odoc_wiki/odoc_import.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,17 @@ let (modtype_fmt, flush_modtype_fmt, modtype_set_margin) = new_fmt ()

let string_of_type_expr ?(margin = default_margin) t =
type_set_margin margin;
Printtyp.mark_loops t;
Printtyp.type_scheme_max ~b_reset_names: false type_fmt t;
Printtyp.shared_type_scheme type_fmt t;
flush_type_fmt ()

let raw_string_of_type_list ?(margin = default_margin) sep type_list =
let buf = Buffer.create 256 in
let fmt = Format.formatter_of_buffer buf in
Format.pp_set_margin fmt margin;
let rec need_parent t =
match t.Types.desc with
match Types.get_desc t with
Types.Tarrow _ | Types.Ttuple _ -> true
| Types.Tlink t2 | Types.Tsubst t2 -> need_parent t2
| Types.Tlink t2 | Types.Tsubst (t2, _) -> need_parent t2
| Types.Tconstr _ ->
false
(* | Types.Tvar | Types.Tunivar | Types.Tobject _ | Types.Tpoly _ *)
Expand All @@ -41,17 +40,16 @@ let raw_string_of_type_list ?(margin = default_margin) sep type_list =
| _ -> false
in
let print_one_type variance t =
Printtyp.mark_loops t;
if need_parent t then
(
Format.fprintf fmt "(%s" variance;
Printtyp.type_scheme_max ~b_reset_names: false fmt t;
Printtyp.shared_type_scheme fmt t;
Format.fprintf fmt ")"
)
else
(
Format.fprintf fmt "%s" variance;
Printtyp.type_scheme_max ~b_reset_names: false fmt t
Printtyp.shared_type_scheme fmt t
)
in
begin match type_list with
Expand Down Expand Up @@ -118,9 +116,9 @@ let string_of_class_type_param_list ?margin l =
(if par then "]" else "")

let rec is_arrow_type t =
match t.Types.desc with
match Types.get_desc t with
Types.Tarrow _ -> true
| Types.Tlink t2 | Types.Tsubst t2 -> is_arrow_type t2
| Types.Tlink t2 | Types.Tsubst (t2, _) -> is_arrow_type t2
(* | Types.Ttuple _ *)
(* | Types.Tconstr _ *)
(* | Types.Tvar | Types.Tunivar | Types.Tobject _ | Types.Tpoly _ *)
Expand All @@ -140,7 +138,6 @@ let string_of_class_params ?(margin = default_margin) c =
Odoc_misc.remove_option t
else
t in
Printtyp.mark_loops t;
Format.fprintf fmt "@[<hov 2>%s%s%a%s@] ->@ "
(
match label with
Expand All @@ -149,7 +146,7 @@ let string_of_class_params ?(margin = default_margin) c =
| Asttypes.Optional s -> "?"^s^":"
)
(if parent then "(" else "") (* TODO open_box ?*)
(Printtyp.type_scheme_max ~b_reset_names:false) ty
(Printtyp.shared_type_scheme) ty
(if parent then ")" else "");
iter ctype
| Types.Cty_signature _
Expand Down
2 changes: 1 addition & 1 deletion src/odoc_wiki/odoc_wiki.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ module Generator = struct
| Type_record l ->
bs b (" "^(self#delimiter "~=")^" ");
if priv then bs b "private " ;
self#html_of_record b indent father l ;
self#html_of_record b ~indent ~father l ;
);
bs b ">>";
self#html_of_info b t.ty_info;
Expand Down
2 changes: 1 addition & 1 deletion wikidoc.opam
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ remove: [
[ "rm" "-f" "%{bin}%/latex_of_wiki" ]
]
depends: [
"ocaml" {>= "4.10.0" & < "4.13.0"}
"ocaml" {>= "4.14.0" & < "5.1.0"}
"base-threads"
"base-unix"
"ocamlfind"
Expand Down