Skip to content

Commit 6524344

Browse files
committed
fix errors due to the changes of the printtyp api
1 parent 858b91b commit 6524344

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/odoc_wiki/odoc_import.ml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ 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
3534
| Types.Tlink t2 | Types.Tsubst (t2, _) -> need_parent t2
3635
| Types.Tconstr _ ->
@@ -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,7 +116,7 @@ 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
123121
| Types.Tlink t2 | Types.Tsubst (t2, _) -> is_arrow_type t2
124122
(* | Types.Ttuple _ *)
@@ -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 _

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.13.0"}
21+
"ocaml" {= "4.14.0" | = "4.14.1" | = "4.14.2"}
2222
"base-threads"
2323
"base-unix"
2424
"ocamlfind"

0 commit comments

Comments
 (0)