HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulestreamly-core-0.3.1Haskell2010

Streamly.Internal.Data.RingArray.Generic

Contents
  1. Generation
  2. Modification
  3. Conversion
Synopsis
typetype Ring = RingArray
#

Deprecated. Please use RingArray instead.

Generation

valuecreateOf :: MonadIO m => Int -> Fold m a (RingArray a)

Note that it is not safe to return a reference to the mutable RingArray using a scan as the RingArray is continuously getting mutated. You could however copy out the RingArray.

Modification

Conversion

valuetoMutArray :: MonadIO m => Int -> Int -> RingArray a -> m (MutArray a)

toMutArray rignHeadAdjustment lengthToRead ring. Convert the ring into a boxed mutable array. Note that the returned MutArray shares the same underlying memory as the RingArray, the user of this API needs to ensure that the ring is not mutated during and after the conversion.