dune/src/top_closure.mli

26 lines
485 B
OCaml
Raw Normal View History

open Stdune
2016-12-02 13:54:32 +00:00
2018-03-03 11:53:04 +00:00
module type Keys = sig
2016-12-02 13:54:32 +00:00
type t
2018-03-03 11:53:04 +00:00
type elt
val empty : t
val add : t -> elt -> t
val mem : t -> elt -> bool
2016-12-02 13:54:32 +00:00
end
2018-03-03 11:53:04 +00:00
module type S = sig
type key
2016-12-02 13:54:32 +00:00
(** Returns [Error cycle] in case the graph is not a DAG *)
2018-03-03 11:53:04 +00:00
val top_closure
: key:('a -> key)
-> deps:('a -> 'a list)
-> 'a list
-> ('a list, 'a list) result
2016-12-02 13:54:32 +00:00
end
2018-03-03 11:53:04 +00:00
module Int : S with type key := int
module String : S with type key := string
module Make(Keys : Keys) : S with type key := Keys.elt