Skip to content

Commit

Permalink
Remove coq's own to_iflags in favor of Lib.L.to_iflags
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg authored and ejgallego committed Mar 30, 2019
1 parent 87f195d commit f310396
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 1 addition & 7 deletions src/coq_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ let coq_debug = false
file are. This seems to correspond to src_dir. *)
module Util = struct

let to_iflags dirs =
Arg_spec.S
(Path.Set.fold dirs ~init:[] ~f:(fun dir acc ->
Arg_spec.Path dir :: A "-I" :: acc)
|> List.rev)

let include_paths ts ~stdlib_dir =
let dirs =
List.fold_left ts ~init:Path.Set.empty ~f:(fun acc t ->
Expand All @@ -26,7 +20,7 @@ module Util = struct
Path.Set.remove dirs stdlib_dir

let include_flags ts ~stdlib_dir =
to_iflags (include_paths ts ~stdlib_dir)
Lib.L.to_iflags (include_paths ts ~stdlib_dir)
end

type coq_context =
Expand Down
2 changes: 2 additions & 0 deletions src/lib.mli
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ module L : sig
type lib
type nonrec t = t list

val to_iflags : Path.Set.t -> ('a, 'b) Arg_spec.t

val include_paths : t -> stdlib_dir:Path.t -> Path.Set.t
val include_flags : t -> stdlib_dir:Path.t -> _ Arg_spec.t

Expand Down

0 comments on commit f310396

Please sign in to comment.