Commits

Bryan O'Sullivan committed 6e79c98

Move unsafeFreeze docs

  • Participants
  • Parent commits 0d11ec8

Comments (0)

Files changed (1)

Data/Text/Array.hs

     length (MArray len _ba) = len
     {-# INLINE length #-}
 
--- | Freeze a mutable array. Do not mutate the 'MArray' afterwards!
-unsafeFreeze :: MArray s -> ST s (Array)
-
 -- | Create an uninitialized mutable array.
 unsafeNew :: forall s. Int -> ST s (MArray s)
 unsafeNew n =
            (# s2#, marr# #) -> (# s2#, MArray n marr# #)
 {-# INLINE unsafeNew #-}
 
+-- | Freeze a mutable array. Do not mutate the 'MArray' afterwards!
+unsafeFreeze :: MArray s -> ST s (Array)
 unsafeFreeze (MArray len mba#) = ST $ \s# ->
                                  (# s#, Array len (unsafeCoerce# mba#) #)
 {-# INLINE unsafeFreeze #-}