Source file DepGraph.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
include Map.Make (ModuleUnit)

let pp fmt_value fmt graph =
  Fmt.(Dump.list (Dump.pair ModuleUnit.pp fmt_value)) fmt (bindings graph)

let show pp_target graph = Fmt.str "%a" (pp pp_target) graph

let pp_both pp_source pp_target ppf graph =
  Fmt.vbox
    Fmt.(
      list
        (pair pp_source (fun ppf v ->
             Fmt.pf ppf "@[<hov 4>  [ %a ]@]" (Fmt.list ~sep:Fmt.sp pp_target) v)))
    ppf (bindings graph)