Skip to content

Commit

Permalink
Fix 4.08/4.09 build
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Nov 8, 2023
1 parent c111084 commit b5f0a35
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/opamCompat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,15 @@ Quoting commands for execution by cmd.exe is difficult.

include Stdlib.Filename
end

module List = struct
[@@@warning "-32"]

let concat_map f l =
let rec aux f acc = function
| [] -> List.rev acc
| x :: l ->
let xs = f x in
aux f (List.rev_append xs acc) l
in aux f [] l
end
5 changes: 5 additions & 0 deletions src/core/opamCompat.mli
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ module Filename: sig
string -> ?stdin:string -> ?stdout:string -> ?stderr:string
-> string list -> string
end

module List : sig
(* NOTE: OCaml >= 4.10 *)
val concat_map : ('a -> 'b list) -> 'a list -> 'b list
end

0 comments on commit b5f0a35

Please sign in to comment.