HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulestreamly-core-0.2.2Haskell2010

Streamly.Internal.Data.Ring.Generic

  • 1 type
  • 7 values

Generation

2 declarations
valuewriteLastN :: MonadIO m => Int -> Fold m a (Ring a)
#

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

Modification

2 declarations
valueseek :: MonadIO m => Int -> Ring a -> m (Ring a)
#

Move the ring head clockwise (+ve adj) or counter clockwise (-ve adj) by the given amount.

Conversion

3 declarations
valuetoMutArray :: MonadIO m => Int -> Int -> Ring 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 Ring, the user of this API needs to ensure that the ring is not mutated during and after the conversion.