forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeta.mli
52 lines (40 loc) · 997 Bytes
/
meta.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(** META file parsing/printing *)
open! Stdune
open! Import
type t =
{ name : Lib_name.t option
; entries : entry list
}
and entry =
| Comment of string
| Rule of rule
| Package of t
and rule =
{ var : string
; predicates : predicate list
; action : action
; value : string
}
and action = Set | Add
and predicate =
| Pos of string
| Neg of string
module Simplified : sig
module Rules : sig
type t =
{ set_rules : rule list
; add_rules : rule list
}
end
type t =
{ name : Lib_name.t option
; vars : Rules.t String.Map.t
; subs : t list
}
val pp : Format.formatter -> t -> unit
end
val load : Path.t -> name:Lib_name.t option -> Simplified.t
(** Builtin META files for libraries distributed with the compiler. For when ocamlfind is
not installed. *)
val builtins : stdlib_dir:Path.t -> version:Ocaml_version.t -> Simplified.t Lib_name.Map.t
val pp : Format.formatter -> entry list -> unit