Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add support for OCaml 5.0
  • Loading branch information
kit-ty-kate committed Nov 16, 2022
1 parent fb469f4 commit 01a6f2c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/mode_build.ml
Expand Up @@ -123,7 +123,7 @@ let rec build debug
(PackageSet.cardinal packages);
if debug >= 2 then (
List.iter (printf " - %s\n") pretty_packages;
flush Pervasives.stdout
flush Stdlib.stdout
)
);

Expand Down Expand Up @@ -207,7 +207,7 @@ let rec build debug
(List.length files);
if debug >= 2 then (
List.iter (fun { ft_path = path } -> printf " - %s\n" path) files;
flush Pervasives.stdout
flush Stdlib.stdout
)
);

Expand Down
16 changes: 8 additions & 8 deletions src/supermin.ml
Expand Up @@ -296,27 +296,27 @@ let () =
main ()
with
| Unix.Unix_error (code, fname, "") -> (* from a syscall *)
Printexc.print_backtrace Pervasives.stderr;
Printexc.print_backtrace Stdlib.stderr;
error "error: %s: %s" fname (Unix.error_message code)
| Unix.Unix_error (code, fname, param) -> (* from a syscall *)
Printexc.print_backtrace Pervasives.stderr;
Printexc.print_backtrace Stdlib.stderr;
error "error: %s: %s: %s" fname (Unix.error_message code) param
| Failure msg -> (* from failwith/failwithf *)
Printexc.print_backtrace Pervasives.stderr;
Printexc.print_backtrace Stdlib.stderr;
error "failure: %s" msg
| Librpm.Multiple_matches (package, count) -> (* from librpm *)
Printexc.print_backtrace Pervasives.stderr;
Printexc.print_backtrace Stdlib.stderr;
error "RPM error: %d occurrences for %s" count package
| Invalid_argument msg -> (* probably should never happen *)
Printexc.print_backtrace Pervasives.stderr;
Printexc.print_backtrace Stdlib.stderr;
error "internal error: invalid argument: %s" msg
| Assert_failure (file, line, char) -> (* should never happen *)
Printexc.print_backtrace Pervasives.stderr;
Printexc.print_backtrace Stdlib.stderr;
error "internal error: assertion failed at %s, line %d, char %d"
file line char
| Not_found -> (* should never happen *)
Printexc.print_backtrace Pervasives.stderr;
Printexc.print_backtrace Stdlib.stderr;
error "internal error: Not_found exception was thrown"
| exn -> (* something not matched above *)
Printexc.print_backtrace Pervasives.stderr;
Printexc.print_backtrace Stdlib.stderr;
error "exception: %s" (Printexc.to_string exn)
4 changes: 2 additions & 2 deletions src/utils.ml
Expand Up @@ -40,7 +40,7 @@ let dir_exists name =
try (stat name).st_kind = S_DIR
with Unix_error _ -> false

let uniq ?(cmp = Pervasives.compare) xs =
let uniq ?(cmp = Stdlib.compare) xs =
let rec loop acc = function
| [] -> acc
| [x] -> x :: acc
Expand All @@ -51,7 +51,7 @@ let uniq ?(cmp = Pervasives.compare) xs =
in
List.rev (loop [] xs)

let sort_uniq ?(cmp = Pervasives.compare) xs =
let sort_uniq ?(cmp = Stdlib.compare) xs =
let xs = List.sort cmp xs in
let xs = uniq ~cmp xs in
xs
Expand Down

0 comments on commit 01a6f2c

Please sign in to comment.