on master help sign in
Move unsafeFreeze docs

--HG-- extra : convert_revision : 4e916dcb7f60665888f4f26f755b00a017bf5225

commitdfd8d2cead421e6fcb0d908df8385f81c8581499 authorBryan O'Sullivan <bos@serpentine.com> dateSun 15 Aug 2010, 20:55 (16 years ago) parent9d5cf02
1 file changed+2−3
Data/Text/Array.hs+2−3
Data/Text/Array.hs+2−3
@@ -88,9 +88,6 @@ instance IArray (MArray s) where
8888 length (MArray len _ba) = len
8989 {-# INLINE length #-}
9090
91−-- | Freeze a mutable array. Do not mutate the 'MArray' afterwards!
92−unsafeFreeze :: MArray s -> ST s (Array)
93−
9491-- | Create an uninitialized mutable array.
9592unsafeNew :: forall s. Int -> ST s (MArray s)
9693unsafeNew n =
@@ -107,6 +104,8 @@ unsafeNew n =
107104 (# s2#, marr# #) -> (# s2#, MArray n marr# #)
108105{-# INLINE unsafeNew #-}
109106
107+-- | Freeze a mutable array. Do not mutate the 'MArray' afterwards!
108+unsafeFreeze :: MArray s -> ST s (Array)
110109unsafeFreeze (MArray len mba#) = ST $ \s# ->
111110 (# s#, Array len (unsafeCoerce# mba#) #)
112111{-# INLINE unsafeFreeze #-}