Commits

Aleksey Khudyakov committed 6f1f025

Use unsafeIndex
at this point code should work

Comments (0)

Files changed (1)

System/Random/MWC/CondensedTable.hs

 import Data.Int
 import Data.Bits
 import qualified Data.Vector.Generic         as G
-import           Data.Vector.Generic           ((++),(!))
+import           Data.Vector.Generic           ((++))
 import qualified Data.Vector.Generic.Mutable as M
 import qualified Data.Vector.Unboxed         as U
 import qualified Data.Vector                 as V
   | i < nc    = cc `at` ((i - nb) `shiftR` 8 )
   | otherwise = dd `at` ( i - nc)
   where
-    at arr j = (!) arr (fromIntegral j)
+    at arr j = G.unsafeIndex arr (fromIntegral j)
 
 
 ----------------------------------------------------------------