Fix bug in MVector.reverse
authorMax Bolingbroke <batterseapower@hotmail.com>
Mon, 9 Feb 2009 14:16:47 +0000 (14:16 +0000)
committerMax Bolingbroke <batterseapower@hotmail.com>
Mon, 9 Feb 2009 14:16:47 +0000 (14:16 +0000)
Data/Vector/MVector.hs

index 4770eda..8291486 100644 (file)
@@ -251,5 +251,6 @@ reverse v = reverse_loop 0 (length v - 1)
                                  y <- unsafeRead v j
                                  unsafeWrite v i y
                                  unsafeWrite v j x
+                                 reverse_loop (i + 1) (j - 1)
     reverse_loop _ _ = return ()