sig
  module type G =
    sig
      type t
      module V : Sig.COMPARABLE
      module E :
        sig
          type t
          type label
          val label : Path.G.E.t -> Path.G.E.label
          val dst : Path.G.E.t -> V.t
        end
      val iter_succ_e : (Path.G.E.t -> unit) -> Path.G.t -> V.t -> unit
    end
  module type WEIGHT =
    sig
      type label
      type t
      val weight : Path.WEIGHT.label -> Path.WEIGHT.t
      val compare : Path.WEIGHT.t -> Path.WEIGHT.t -> int
      val add : Path.WEIGHT.t -> Path.WEIGHT.t -> Path.WEIGHT.t
      val zero : Path.WEIGHT.t
    end
  module Dijkstra :
    functor (G : G->
      functor
        (W : sig
               type label = G.E.label
               type t
               val weight : label -> t
               val compare : t -> t -> int
               val add : t -> t -> t
               val zero : t
             end->
        sig
          val shortest_path :
            Path.G.t -> G.V.t -> G.V.t -> Path.G.E.t list * W.t
        end
  module Check :
    functor
      (G : sig
             type t
             module V : Sig.COMPARABLE
             val iter_succ : (V.t -> unit) -> Path.Check.t -> V.t -> unit
           end->
      sig
        type path_checker
        val create : Path.G.t -> Path.Check.path_checker
        val check_path : Path.Check.path_checker -> G.V.t -> G.V.t -> bool
      end
end