Modulestreamly-core-0.3.1Haskell2010
Streamly.Internal.Data.RingArray.Generic
Contents
Synopsis
- data RingArray
- type Ring
- value emptyOf
- value createOf
- value seek
- value unsafeInsertRingWith
- value toMutArray
- value copyToMutArray
- value toStreamWith
- Packagestreamly-core-0.3.1
- Exports9
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceGeneric.hs
Deprecated. Please use RingArray instead.
Generation
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
Move the ring head clockwise (+ve adj) or counter clockwise (-ve adj) by the given amount.
Conversion
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.
Copy out the mutable ring to a mutable Array.
Seek by n and then read the entire ring. Use take on the stream to restrict the reads.