on 52ddfee help sign in
65 lines 1.2 kB history raw
1{-# LANGUAGE CPP #-}
2-- |
3-- Module : Streamly.Data.MutArray.Generic
4-- Copyright : (c) 2020 Composewell Technologies
5-- License : BSD3-3-Clause
6-- Maintainer : streamly@composewell.com
7-- Stability : experimental
8-- Portability : GHC
9--
10-- Unconstrained version of "Streamly.Data.MutArray" module.
11--
12-- See the "Streamly.Data.MutArray" module for documentation.
13--
14module Streamly.Data.MutArray.Generic
16 -- * Setup
17 -- | To execute the code examples provided in this module in ghci, please
18 -- run the following commands first.
19 --
20 -- $setup
22 -- * Type
23 MutArray
25 -- * Construction
26 , new
27 , fromListN
28 , fromList
29 , writeN
30 , write
32 -- * Appending elements
33 , snoc
35 -- * Inplace mutation
36 , putIndex
37 , putIndexUnsafe
38 , modifyIndex
39 , modifyIndexUnsafe
40 -- , modify
42 -- * Random reads
43 , getIndex
44 , getIndexUnsafe
46 -- * Conversion
47 , toList
49 -- * Streams
50 , read
51 , readRev
53 -- * Unfolds
54 , reader
55 -- , readerRev
57 -- * Size
58 , length
59 )
60where
62import Streamly.Internal.Data.MutArray.Generic
63import Prelude hiding (read, length)
65#include "DocTestDataMutArrayGeneric.hs"