diff options
author | Alberto Ruiz <aruiz@um.es> | 2008-10-22 12:59:18 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2008-10-22 12:59:18 +0000 |
commit | faeaf6d261b760e628c1e63551d822d16876c0cc (patch) | |
tree | 45e3e2d1460d72e1fd037e19d4470963b75cc00e /lib/Data/Packed/ST.hs | |
parent | 9d9b1274a522e1bf0c5dea210765a0368ebb74a5 (diff) |
-Wall
Diffstat (limited to 'lib/Data/Packed/ST.hs')
-rw-r--r-- | lib/Data/Packed/ST.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Data/Packed/ST.hs b/lib/Data/Packed/ST.hs index ed0a05e..91b7968 100644 --- a/lib/Data/Packed/ST.hs +++ b/lib/Data/Packed/ST.hs | |||
@@ -30,9 +30,7 @@ module Data.Packed.ST ( | |||
30 | ) where | 30 | ) where |
31 | 31 | ||
32 | import Data.Packed.Internal | 32 | import Data.Packed.Internal |
33 | import Data.Array.Storable | ||
34 | import Control.Monad.ST | 33 | import Control.Monad.ST |
35 | import Data.Array.ST | ||
36 | import Foreign | 34 | import Foreign |
37 | 35 | ||
38 | {-# INLINE ioReadV #-} | 36 | {-# INLINE ioReadV #-} |
@@ -97,13 +95,13 @@ newVector v = unsafeThawVector . constant v | |||
97 | 95 | ||
98 | {-# INLINE ioReadM #-} | 96 | {-# INLINE ioReadM #-} |
99 | ioReadM :: Storable t => Matrix t -> Int -> Int -> IO t | 97 | ioReadM :: Storable t => Matrix t -> Int -> Int -> IO t |
100 | ioReadM (MC nr nc cv) r c = ioReadV cv (r*nc+c) | 98 | ioReadM (MC _ nc cv) r c = ioReadV cv (r*nc+c) |
101 | ioReadM (MF nr nc fv) r c = ioReadV fv (c*nr+r) | 99 | ioReadM (MF nr _ fv) r c = ioReadV fv (c*nr+r) |
102 | 100 | ||
103 | {-# INLINE ioWriteM #-} | 101 | {-# INLINE ioWriteM #-} |
104 | ioWriteM :: Storable t => Matrix t -> Int -> Int -> t -> IO () | 102 | ioWriteM :: Storable t => Matrix t -> Int -> Int -> t -> IO () |
105 | ioWriteM (MC nr nc cv) r c val = ioWriteV cv (r*nc+c) val | 103 | ioWriteM (MC _ nc cv) r c val = ioWriteV cv (r*nc+c) val |
106 | ioWriteM (MF nr nc fv) r c val = ioWriteV fv (c*nr+r) val | 104 | ioWriteM (MF nr _ fv) r c val = ioWriteV fv (c*nr+r) val |
107 | 105 | ||
108 | newtype STMatrix s t = STMatrix (Matrix t) | 106 | newtype STMatrix s t = STMatrix (Matrix t) |
109 | 107 | ||