summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/ST.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Internal/ST.hs')
-rw-r--r--packages/base/src/Internal/ST.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/base/src/Internal/ST.hs b/packages/base/src/Internal/ST.hs
index c98ff0e..92654e4 100644
--- a/packages/base/src/Internal/ST.hs
+++ b/packages/base/src/Internal/ST.hs
@@ -109,12 +109,12 @@ newVector x n = do
109 109
110{-# INLINE ioReadM #-} 110{-# INLINE ioReadM #-}
111ioReadM :: Storable t => Matrix t -> Int -> Int -> IO t 111ioReadM :: Storable t => Matrix t -> Int -> Int -> IO t
112ioReadM m r c = ioReadV (xdat m) (r * (ti $ xRow m) + c * (ti $ xCol m)) 112ioReadM m r c = ioReadV (xdat m) (r * xRow m + c * xCol m)
113 113
114 114
115{-# INLINE ioWriteM #-} 115{-# INLINE ioWriteM #-}
116ioWriteM :: Storable t => Matrix t -> Int -> Int -> t -> IO () 116ioWriteM :: Storable t => Matrix t -> Int -> Int -> t -> IO ()
117ioWriteM m r c val = ioWriteV (xdat m) (r * (ti $ xRow m) + c * (ti $ xCol m)) val 117ioWriteM m r c val = ioWriteV (xdat m) (r * xRow m + c * xCol m) val
118 118
119 119
120newtype STMatrix s t = STMatrix (Matrix t) 120newtype STMatrix s t = STMatrix (Matrix t)