on dea4c4e help sign in
110 lines 2.2 kB history raw
1{-# OPTIONS_GHC -fno-warn-orphans #-}
3#include "inline.hs"
5-- |
6-- Module : Streamly.Internal.Data.Array.Prim
7-- Copyright : (c) 2020 Composewell Technologies
8--
9-- License : BSD-3-Clause
10-- Maintainer : streamly@composewell.com
11-- Stability : experimental
12-- Portability : GHC
13--
14module Streamly.Internal.Data.Array.Prim
15 (
16 Array
18 -- * Construction
20 -- Pure List APIs
21 , A.fromListN
22 , A.fromList
24 -- Stream Folds
25 , fromStreamN
26 , fromStream
28 -- Monadic APIs
29 -- , newArray
30 , A.writeN -- drop new
31 , A.write -- full buffer
33 -- * Elimination
35 , A.toList
36 , toStream
37 , toStreamRev
38 , read
39 , unsafeRead
41 -- * Random Access
42 , length
43 , null
44 , last
45 -- , (!!)
46 , readIndex
47 , A.unsafeIndex
48 -- , readIndices
49 -- , readRanges
51 -- , readFrom -- read from a given position to the end of file
52 -- , readFromRev -- read from a given position to the beginning of file
53 -- , readTo -- read from beginning up to the given position
54 -- , readToRev -- read from end to the given position in file
55 -- , readFromTo
56 -- , readFromThenTo
58 -- , readChunksOfFrom
59 -- , ...
61 -- , writeIndex
62 -- , writeFrom -- start writing at the given position
63 -- , writeFromRev
64 -- , writeTo -- write from beginning up to the given position
65 -- , writeToRev
66 -- , writeFromTo
67 -- , writeFromThenTo
68 --
69 -- , writeChunksOfFrom
70 -- , ...
72 -- , writeIndex
73 -- , writeIndices
74 -- , writeRanges
76 -- -- * Search
77 -- , bsearch
78 -- , bsearchIndex
79 -- , find
80 -- , findIndex
81 -- , findIndices
83 -- -- * In-pace mutation (for Mutable Array type)
84 -- , partitionBy
85 -- , shuffleBy
86 -- , foldtWith
87 -- , foldbWith
89 -- * Immutable Transformations
90-- , streamTransform
92 -- * Folding Arrays
93 , streamFold
94 , fold
96 -- * Folds with Array as the container
97-- , D.lastN
99 -- * Streaming array operations
101 , concat
102 , compact
104 )
105where
107import Streamly.Internal.Data.Array.Prim.Types (Array(..), length)
108import qualified Streamly.Internal.Data.Array.Prim.Types as A
110#include "Streamly/Internal/Data/Array/PrimInclude.hs"