Debian Codegraph @

tools/coqdep/lib/dep_info.ml

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 module Dep = struct
12 type t =
13 | Require of string (* one basename, to which we later append .vo or .vos *)
14 | Ml of string
15 | Other of string (* filenames of dependencies, separated by spaces *)
16
17 let compare a b = match a, b with
18 | Require a, Require b | Ml a, Ml b | Other a, Other b -> CString.compare a b
19 | Require _, _ -> -1
20 | _, Require _ -> 1
21 | Ml _, _ -> -1
22 | _, Ml _ -> 1
23
24 module Set = CSet.Make(struct
25 type nonrec t = t
26 let compare = compare
27 end)
28 end
29
30 type t =
31 { name : string (* This should become [module : Coq_module.t] eventually *)
32 ; deps : Dep.t list
33 }
34
35 let make ~name ~deps = { name; deps }