[Instead of giving bnb a queue type witness and a node, pass a queue containing the node.
tobias@goedderz.info**20150312131637
 Ignore-this: 5a83470abcb7351857a229b1c3f17f87
 
 In addition, qualified some names and made variable naming more consistent.
] hunk ./src/Igor2/RuleDevelopment/Matching.hs 20
-import Utils.BranchAndBound (bnb, NodeValue(LowerBound, Solution), Bag,
+import Utils.BranchAndBound (bnb, Bag)
+import qualified Utils.BranchAndBound as Bag (empty, insert)
+import qualified Utils.BranchAndBound as BnB (
+    NodeValue(LowerBound, Solution),
hunk ./src/Igor2/RuleDevelopment/Matching.hs 161
-        valueOfBnbNode :: MatchingBnbNode -> NodeValue Int
-        valueOfBnbNode x@(BnbNode _ _ [])    = Solution   (keyOfBnbNode x)
-        valueOfBnbNode x@(BnbNode _ _ (_:_)) = LowerBound (keyOfBnbNode x)
+        valueOfBnbNode :: MatchingBnbNode -> BnB.NodeValue Int
+        valueOfBnbNode x@(BnbNode _ _ [])    = BnB.Solution   (keyOfBnbNode x)
+        valueOfBnbNode x@(BnbNode _ _ (_:_)) = BnB.LowerBound (keyOfBnbNode x)
hunk ./src/Igor2/RuleDevelopment/Matching.hs 165
-        bnbNodeOps :: NodeOps Int Int MatchingBnbNode
-        bnbNodeOps = NodeOps
-            { keyOf = keyOfBnbNode
-            , children = childrenOfBnbNode
-            , valueOf = valueOfBnbNode
+        bnbNodeOps :: BnB.NodeOps Int Int MatchingBnbNode
+        bnbNodeOps = BnB.NodeOps
+            { BnB.keyOf = keyOfBnbNode
+            , BnB.children = childrenOfBnbNode
+            , BnB.valueOf = valueOfBnbNode
hunk ./src/Igor2/RuleDevelopment/Matching.hs 172
-        initial_node :: MatchingBnbNode
-        initial_node = BnbNode (LT, []) [] ioMatrix
+        initialNode = BnbNode (LT, []) [] ioMatrix
hunk ./src/Igor2/RuleDevelopment/Matching.hs 174
-        _queue_witness :: Bag Int MatchingBnbNode
-        _queue_witness = undefined
+        initialQueue :: Bag Int MatchingBnbNode
+        initialQueue = Bag.insert (keyOfBnbNode initialNode, initialNode) Bag.empty
hunk ./src/Igor2/RuleDevelopment/Matching.hs 178
-        solutions = bnb _queue_witness bnbNodeOps initial_node
+        solutions = bnb bnbNodeOps initialQueue
hunk ./src/Utils/BranchAndBound.hs 7
-    (bnb, NodeValue(..), Bag(), NodeOps(..), PriorityQueue)
+    (bnb, NodeValue(..), Bag(), NodeOps(..), PriorityQueue, empty, insert)
hunk ./src/Utils/BranchAndBound.hs 33
-    singleton :: (k, n) -> q k n
hunk ./src/Utils/BranchAndBound.hs 58
-    singleton :: (k, n) -> Bag k n
-    singleton x = insert x empty
-
hunk ./src/Utils/BranchAndBound.hs 91
-bnb :: forall q k v n. (Ord k, Ord v, Bounded v, PriorityQueue q k n) => (q k n) -> NodeOps k v n -> n -> [n]
-bnb _queue_witness nodeOps x =
+bnb :: forall q k v n. (Ord k, Ord v, Bounded v, PriorityQueue q k n) => NodeOps k v n -> (q k n) -> [n]
+bnb nodeOps initialQueue =
hunk ./src/Utils/BranchAndBound.hs 98
-        initial_state = BnbState
-            { queue = singleton (withKey x) `asTypeOf` _queue_witness
+        initialState = BnbState
+            { queue = initialQueue
hunk ./src/Utils/BranchAndBound.hs 148
-    in solutions $ execState bnb' initial_state
+    in solutions $ execState bnb' initialState