on master help sign in
Add Streamly.Data.Array.Unboxed.Mut
commitc4dd0cb22516884b2847488e5b2309b9b82dabb1 authorAdithya Kumar <adithya@composewell.com> dateTue 16 Aug 2022, 15:24 (4 years ago) parente3e60ca
3 files changed+62−1
core/src/Streamly/Data/Array/Unboxed/Mut.hs+59 core/streamly-core.cabal+2−1 streamly.cabal+1
core/src/Streamly/Data/Array/Unboxed/Mut.hsnew file+59
@@ -0,0 +1,59 @@
1+-- |
2+-- Module : Streamly.Data.Array.Unboxed.Mut
3+-- Copyright : (c) 2022 Composewell Technologies
4+--
5+-- License : BSD3
6+-- Maintainer : streamly@composewell.com
7+-- Stability : released
8+-- Portability : GHC
9+--
10+-- This module provides mutable arrays suitable for long lived data storage,
11+-- random access, and mutation.
12+--
13+
14+module Streamly.Data.Array.Unboxed.Mut
15+ (
16+ Array
17+
18+ -- * Arrays
19+ -- ** Construction
20+
21+ -- Uninitialized Arrays
22+ , newArray
23+
24+ -- From containers
25+ , fromListN
26+ , fromList
27+ , writeN -- drop new
28+ , write -- full buffer
29+ -- writeLastN
30+
31+ -- ** Appending elements
32+ , snoc
33+
34+ -- ** Appending streams
35+ , appendN
36+ , append
37+
38+ -- ** Inplace mutation
39+ , putIndex
40+
41+ -- ** Random access
42+ , getIndex
43+
44+ -- ** Elimination
45+ , toList
46+ , read
47+ , readRev
48+
49+ -- ** Casting
50+ , cast
51+ , asBytes
52+
53+ -- ** Size
54+ , length
55+ )
56+where
57+
58+import Prelude hiding (length, read)
59+import Streamly.Internal.Data.Array.Unboxed.Mut
core/streamly-core.cabal+2−1
@@ -338,8 +338,9 @@ library
338338 , Streamly.Data.Stream
339339 , Streamly.Data.Fold
340340 , Streamly.Data.Fold.Tee
341− , Streamly.Data.Array.Unboxed
342341 , Streamly.Data.Unfold
342+ , Streamly.Data.Array.Unboxed
343+ , Streamly.Data.Array.Unboxed.Mut
343344
344345 if flag(dev)
345346 exposed-modules:
streamly.cabal+1
@@ -215,6 +215,7 @@ extra-source-files:
215215 core/src/Streamly/Data/Unfold.hs
216216 core/src/Streamly/Internal/Data/Fold/Window.hs
217217 core/src/Streamly/Data/Array/Unboxed.hs
218+ core/src/Streamly/Data/Array/Unboxed/Mut.hs
218219 core/src/Streamly/Internal/Data/Time/Clock/Darwin.c
219220 core/src/Streamly/Internal/Data/Time/Clock/Windows.c
220221 core/streamly-core.cabal