Skip to content

Commit

Permalink
Only load deprecated when available.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jul 22, 2023
1 parent 6434bad commit 6eba126
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lang/runtime.ml
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,8 @@ let load_libs ?(error_on_no_stdlib = true) ?parse_only ?(deprecated = true)
failwith "Could not find default stdlib.liq library!")
else from_file ?parse_only ~ns:(Some file) ~lib:true file;
let file = Filename.concat (Filename.concat dir "extra") "deprecations.liq" in
if deprecated then
if Sys.file_exists file then
from_file ?parse_only ~ns:(Some file) ~lib:true file
else Printf.eprintf "Warning: could not find deprecated library %s\n%!" file
if deprecated && Sys.file_exists file then
from_file ?parse_only ~ns:(Some file) ~lib:true file

let from_file = from_file ~ns:None

Expand Down

0 comments on commit 6eba126

Please sign in to comment.