Debian Codegraph @

tools/dune_rule_gen/coq_rules.mli

raw symbols SCIP
1 (************************************************************************)
2 (* This file is licensed under The MIT License *)
3 (* See LICENSE for more information *)
4 (* (c) MINES ParisTech 2018-2019 *)
5 (* (c) INRIA 2020-2022 *)
6 (* Written by: Emilio Jesús Gallego Arias *)
7 (* Written by: Rudi Grinberg *)
8 (************************************************************************)
9
10 module Theory : sig
11 (** A theory binding; directories should be relative to Coq's
12 sources root *)
13 type t =
14 { directory : Path.t
15 (** Directory of the theory *)
16 ; dirname: string list
17 (** Coq's logical path *)
18 ; implicit : bool
19 (** Use -R or -Q *)
20 ; deps : string list
21 (** Adds as -Q user-contrib/X X *)
22 }
23 end
24
25 (** theory kind *)
26 module Boot_type : sig
27
28 type t =
29 Corelib
30 (** Standard library *)
31 | NoInit
32 (** Standalone library (without Coq's core lib, for example the prelude) *)
33 | Regular of { corelib : Theory.t; noinit : bool }
34 (** Regular library, qualified with -Q, [corelib] controls where
35 the Corelib is.
36
37 [noinit = true] only means there is no implicit dep on the
38 prelude, it may still depend on Corelib (unlike [NoInit]). *)
39
40 end
41
42 module Context : sig
43 type t
44
45 (** *)
46 val make :
47 root_lvl:int
48 -> theory:Theory.t
49 -> user_flags:Arg.t list
50 -> boot:Boot_type.t
51 -> rule:Coq_module.Rule_type.t (* quick, native, etc... *)
52 -> async:bool
53 -> dir_info:Coq_module.t Dir_info.t (* contents of the directory scan *)
54 -> split:bool (* whether we are building rocq-runtime + rocq-core or only rocq-core *)
55 -> t
56
57 end
58
59 (** [gen_vo_rules root_lvl rule flags tname boot] Builds dune rules
60 for the *current* directory, assuming that we will do [-R
61 . tname]. The parameter [boot] controls the kind of the current
62 theory. [root_lvl] tells the rule generator how many levels up the
63 root Coq sources are. [flags] add extra flags to coqc, such as
64 `-async on` *)
65 val vo_rules :
66 dir_info :Coq_module.t Dir_info.t
67 -> cctx:Context.t
68 -> Dune_file.Rule.t list Dune_file.Subdir.t list
69
70 val coqnative_rules :
71 dir_info :Coq_module.t Dir_info.t
72 -> cctx:Context.t
73 -> Dune_file.Rule.t list Dune_file.Subdir.t list
74
75 val install_rules :
76 dir_info :Coq_module.t Dir_info.t
77 -> cctx:Context.t
78 -> Dune_file.Install.t list Dune_file.Subdir.t list