Skip to content

Commit

Permalink
Fix Toploop deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
emillon committed Aug 2, 2022
1 parent a1c1167 commit e117d11
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/findlib/topfind.ml.in
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ let load pkglist =


begin try
match Hashtbl.find Toploop.directive_table "ppx" with
match Hashtbl.find (Toploop.directive_table [@ocaml.alert "-deprecated"]) "ppx" with
| Toploop.Directive_string fn ->
fn ppx; !log (ppx ^ ": activated")
| _ -> assert false
Expand Down Expand Up @@ -252,8 +252,7 @@ let protect f arg =

(* Add "#require" directive: *)

Hashtbl.add
Toploop.directive_table
Toploop.add_directive
"require"
(Toploop.Directive_string
(fun s ->
Expand All @@ -262,8 +261,7 @@ Hashtbl.add
;;

(* Add "#predicates" directive: *)
Hashtbl.add
Toploop.directive_table
Toploop.add_directive
"predicates"
(Toploop.Directive_string
(fun s ->
Expand All @@ -274,8 +272,7 @@ Hashtbl.add

(* Add "#camlp4o" directive: *)

Hashtbl.add
Toploop.directive_table
Toploop.add_directive
"camlp4o"
(Toploop.Directive_none
(fun () ->
Expand All @@ -287,8 +284,7 @@ Hashtbl.add

(* Add "#camlp4r" directive: *)

Hashtbl.add
Toploop.directive_table
Toploop.add_directive
"camlp4r"
(Toploop.Directive_none
(fun () ->
Expand All @@ -301,8 +297,7 @@ Hashtbl.add

(* Add "#list" directive: *)

Hashtbl.add
Toploop.directive_table
Toploop.add_directive
"list"
(Toploop.Directive_none
(fun () ->
Expand All @@ -313,8 +308,7 @@ Hashtbl.add

(* Add "#thread" directive: *)

Hashtbl.add
Toploop.directive_table
Toploop.add_directive
"thread"
(Toploop.Directive_none
(fun () ->
Expand Down

0 comments on commit e117d11

Please sign in to comment.