aqEnqueue (bfsChanged state) (bfsPassEnder state)
search state -- Continue with the next pass.
-search :: forall s gr a b w. (Graph gr, Real w) => BFState s gr a b w -> ST s ()
+search :: (Graph gr, Real w) => BFState s gr a b w -> ST s ()
search state = do
Just node <- aqDequeue (bfsChanged state)
if node == bfsPassEnder state