Use unsafeTake and unsafeDrop in unstablePartition
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Thu, 10 Dec 2009 12:11:05 +0000 (12:11 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Thu, 10 Dec 2009 12:11:05 +0000 (12:11 +0000)
Data/Vector/Generic.hs

index 8236c93..f1906d3 100644 (file)
@@ -886,7 +886,7 @@ unstablePartition_new f (New.New p) = runST (
     mv <- p
     i <- M.unstablePartition f mv
     v <- unsafeFreeze mv
-    return (take i v, drop i v))
+    return (unsafeTake i v, unsafeDrop i v))
 
 {-# RULES