diff options
Diffstat (limited to 'lib/Data/Packed/ST.hs')
-rw-r--r-- | lib/Data/Packed/ST.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Data/Packed/ST.hs b/lib/Data/Packed/ST.hs index 1311ff9..ed0a05e 100644 --- a/lib/Data/Packed/ST.hs +++ b/lib/Data/Packed/ST.hs | |||
@@ -89,6 +89,7 @@ readVector = safeIndexV unsafeReadVector | |||
89 | writeVector :: Storable t => STVector s t -> Int -> t -> ST s () | 89 | writeVector :: Storable t => STVector s t -> Int -> t -> ST s () |
90 | writeVector = safeIndexV unsafeWriteVector | 90 | writeVector = safeIndexV unsafeWriteVector |
91 | 91 | ||
92 | {-# NOINLINE newVector #-} | ||
92 | newVector :: Element t => t -> Int -> ST s (STVector s t) | 93 | newVector :: Element t => t -> Int -> ST s (STVector s t) |
93 | newVector v = unsafeThawVector . constant v | 94 | newVector v = unsafeThawVector . constant v |
94 | 95 | ||
@@ -154,5 +155,6 @@ readMatrix = safeIndexM unsafeReadMatrix | |||
154 | writeMatrix :: Storable t => STMatrix s t -> Int -> Int -> t -> ST s () | 155 | writeMatrix :: Storable t => STMatrix s t -> Int -> Int -> t -> ST s () |
155 | writeMatrix = safeIndexM unsafeWriteMatrix | 156 | writeMatrix = safeIndexM unsafeWriteMatrix |
156 | 157 | ||
158 | {-# NOINLINE newMatrix #-} | ||
157 | newMatrix :: Element t => t -> Int -> Int -> ST s (STMatrix s t) | 159 | newMatrix :: Element t => t -> Int -> Int -> ST s (STMatrix s t) |
158 | newMatrix v r c = unsafeThawMatrix . reshape c . constant v $ r*c | 160 | newMatrix v r c = unsafeThawMatrix . reshape c . constant v $ r*c |