sig val weight : change -> int val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result val update : change -> D.state -> D.state * D.left array end -> S