--- a/src/hypotheses_filtering.ml
+++ b/src/hypotheses_filtering.ml
@@ -1687,8 +1687,9 @@
 
 module W = struct 
   type label = PdlGraph.E.label
+  type edge = PdlGraph.E.t
   type t = int
-  let weight x = x
+  let weight x = PdlGraph.E. label x
   let zero = 0
   let add = (+)
   let compare = compare
