functor (G : G)
  (W : sig
         type edge = G.E.t
         type t
         val weight : edge -> 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