Moduleghc-boot-10.0.0.20260917GHC2024
GHC.Data.SmallArray
Small-array
Contents
Synopsis
- data SmallMutableArray
- data SmallArray
- value newSmallArray
- value writeSmallArray
- value freezeSmallArray
- value unsafeFreezeSmallArray
- value indexSmallArray
- value sizeofSmallArray
- value listToArray
- value smallArrayFromList
- value smallArrayToList
- value mapSmallArray
- value foldMapSmallArray
- value replicateSmallArrayIO
- value mapSmallArrayIO
- value mapSmallArrayM_
- value imapSmallArrayM_
- value rnfSmallArray
- type SmallMutableArrayIO
- value newSmallArrayIO
- value writeSmallArrayIO
- value unsafeFreezeSmallArrayIO
- Packageghc-boot-10.0.0.20260917
- Exports22
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceSmallArray.hs
Constructors
Instances2Show, Binary
Show a => Show (SmallArray a)Defined in ghc-boot-10.0.0.20260917 · GHC.Data.SmallArrayBinary a => Binary (SmallArray a)Defined in ghc-boot-10.0.0.20260917 · GHC.Data.SmallArray
newSmallArray :: Intsize
-> ainitial contents
-> State# s-> (# State# s, SmallMutableArray s a #)
freezeSmallArray :: SmallMutableArray s asource
-> Intoffset
-> Intlength
-> State# s-> (# State# s, SmallArray a #)
Copy and freeze a slice of a mutable array.
Freeze a mutable array (no copy!)
Index a small-array (no bounds checking!)
Get the size of a SmallArray
Convert a list into an array.
Construct a SmallArray from a list. This is different from listToArray since the list elements fill the SmallArray sequentially without recalculating the indices or remapping to other element types.
Construct a list from a SmallArray.
Map a function over the elements of a SmallArray
Fold the values of a SmallArray into a 'Monoid m' of choice
Execute the IO action the given number of times and store the results in a SmallArray.
Apply the IO action to every element, producing a new SmallArray.
Apply the monadic action to every element, ignoring the results.
Apply the monadic action to every element and its index, ignoring the results.
Force the elements of the given SmallArray