Skip to content

Commit 99484ca

Browse files
authored
Merge pull request #21 from ocsigen/fix-version-issue-before-5.1
Fix version issue before 5.1
2 parents a711eb3 + 7317ffe commit 99484ca

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

src/odoc_wiki/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ OCAMLDUCEFIND ?= ocamlducefind
88
OCAMLDOC ?= ${OCAMLFIND} ocamldoc
99
OCAMLDUCEDOC ?= ${OCAMLDUCEFIND} ocamldoc
1010

11-
OCAMLC ?= ${OCAMLFIND} ocamlc
11+
OCAMLC ?= ${OCAMLFIND} ocamlc -package str
1212
OCAMLDUCEC ?= ${OCAMLDUCEFIND} ocamlc
13-
OCAMLOPT ?= ${OCAMLFIND} ocamlopt
13+
OCAMLOPT ?= ${OCAMLFIND} ocamlopt -package str
1414
OCAMLDUCEOPT ?= ${OCAMLDUCEFIND} ocamlopt
1515
OCAMLDEP ?= ${OCAMLFIND} ocamldep
1616
OCAMLDUCEDEP ?= ${OCAMLDUCEFIND} ocamldep

src/odoc_wiki/odoc_import.ml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,17 @@ let (modtype_fmt, flush_modtype_fmt, modtype_set_margin) = new_fmt ()
2121

2222
let string_of_type_expr ?(margin = default_margin) t =
2323
type_set_margin margin;
24-
Printtyp.mark_loops t;
25-
Printtyp.type_scheme_max ~b_reset_names: false type_fmt t;
24+
Printtyp.shared_type_scheme type_fmt t;
2625
flush_type_fmt ()
2726

2827
let raw_string_of_type_list ?(margin = default_margin) sep type_list =
2928
let buf = Buffer.create 256 in
3029
let fmt = Format.formatter_of_buffer buf in
3130
Format.pp_set_margin fmt margin;
3231
let rec need_parent t =
33-
match t.Types.desc with
32+
match Types.get_desc t with
3433
Types.Tarrow _ | Types.Ttuple _ -> true
35-
| Types.Tlink t2 | Types.Tsubst t2 -> need_parent t2
34+
| Types.Tlink t2 | Types.Tsubst (t2, _) -> need_parent t2
3635
| Types.Tconstr _ ->
3736
false
3837
(* | Types.Tvar | Types.Tunivar | Types.Tobject _ | Types.Tpoly _ *)
@@ -41,17 +40,16 @@ let raw_string_of_type_list ?(margin = default_margin) sep type_list =
4140
| _ -> false
4241
in
4342
let print_one_type variance t =
44-
Printtyp.mark_loops t;
4543
if need_parent t then
4644
(
4745
Format.fprintf fmt "(%s" variance;
48-
Printtyp.type_scheme_max ~b_reset_names: false fmt t;
46+
Printtyp.shared_type_scheme fmt t;
4947
Format.fprintf fmt ")"
5048
)
5149
else
5250
(
5351
Format.fprintf fmt "%s" variance;
54-
Printtyp.type_scheme_max ~b_reset_names: false fmt t
52+
Printtyp.shared_type_scheme fmt t
5553
)
5654
in
5755
begin match type_list with
@@ -118,9 +116,9 @@ let string_of_class_type_param_list ?margin l =
118116
(if par then "]" else "")
119117

120118
let rec is_arrow_type t =
121-
match t.Types.desc with
119+
match Types.get_desc t with
122120
Types.Tarrow _ -> true
123-
| Types.Tlink t2 | Types.Tsubst t2 -> is_arrow_type t2
121+
| Types.Tlink t2 | Types.Tsubst (t2, _) -> is_arrow_type t2
124122
(* | Types.Ttuple _ *)
125123
(* | Types.Tconstr _ *)
126124
(* | Types.Tvar | Types.Tunivar | Types.Tobject _ | Types.Tpoly _ *)
@@ -140,7 +138,6 @@ let string_of_class_params ?(margin = default_margin) c =
140138
Odoc_misc.remove_option t
141139
else
142140
t in
143-
Printtyp.mark_loops t;
144141
Format.fprintf fmt "@[<hov 2>%s%s%a%s@] ->@ "
145142
(
146143
match label with
@@ -149,7 +146,7 @@ let string_of_class_params ?(margin = default_margin) c =
149146
| Asttypes.Optional s -> "?"^s^":"
150147
)
151148
(if parent then "(" else "") (* TODO open_box ?*)
152-
(Printtyp.type_scheme_max ~b_reset_names:false) ty
149+
(Printtyp.shared_type_scheme) ty
153150
(if parent then ")" else "");
154151
iter ctype
155152
| Types.Cty_signature _

src/odoc_wiki/odoc_wiki.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ module Generator = struct
12911291
| Type_record l ->
12921292
bs b (" "^(self#delimiter "~=")^" ");
12931293
if priv then bs b "private " ;
1294-
self#html_of_record b indent father l ;
1294+
self#html_of_record b ~indent ~father l ;
12951295
);
12961296
bs b ">>";
12971297
self#html_of_info b t.ty_info;

wikidoc.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ remove: [
1818
[ "rm" "-f" "%{bin}%/latex_of_wiki" ]
1919
]
2020
depends: [
21-
"ocaml" {>= "4.10.0" & < "4.13.0"}
21+
"ocaml" {>= "4.14.0" & < "5.1.0"}
2222
"base-threads"
2323
"base-unix"
2424
"ocamlfind"

0 commit comments

Comments
 (0)