Copyright | (c) 2019 Composewell Technologies |
---|---|
License | BSD-3-Clause |
Maintainer | streamly@composewell.com |
Stability | pre-release |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Array a = Array {}
- nil :: Array a
- writeN :: MonadIO m => Int -> Fold m a (Array a)
- write :: MonadIO m => Fold m a (Array a)
- writeLastN :: MonadIO m => Int -> Fold m a (Array a)
- fromStreamDN :: MonadIO m => Int -> Stream m a -> m (Array a)
- fromStreamD :: MonadIO m => Stream m a -> m (Array a)
- fromStreamN :: MonadIO m => Int -> SerialT m a -> m (Array a)
- fromStream :: MonadIO m => SerialT m a -> m (Array a)
- fromListN :: Int -> [a] -> Array a
- fromList :: [a] -> Array a
- length :: Array a -> Int
- read :: Monad m => Unfold m (Array a) a
- toStreamD :: Monad m => Array a -> Stream m a
- toStreamDRev :: Monad m => Array a -> Stream m a
- toStream :: Monad m => Array a -> SerialT m a
- toStreamRev :: Monad m => Array a -> SerialT m a
- foldl' :: (b -> a -> b) -> b -> Array a -> b
- foldr :: (a -> b -> b) -> b -> Array a -> b
- streamFold :: Monad m => (SerialT m a -> m b) -> Array a -> m b
- fold :: Monad m => Fold m a b -> Array a -> m b
- getIndexUnsafe :: Array a -> Int -> a
- strip :: (a -> Bool) -> Array a -> Array a
Documentation
Boxed arrays.
Instances
MonadFail Array | |
Defined in Data.Primitive.Array | |
MonadFix Array | |
Defined in Data.Primitive.Array | |
MonadZip Array | |
Foldable Array | |
Defined in Data.Primitive.Array fold :: Monoid m => Array m -> m # foldMap :: Monoid m => (a -> m) -> Array a -> m # foldMap' :: Monoid m => (a -> m) -> Array a -> m # foldr :: (a -> b -> b) -> b -> Array a -> b # foldr' :: (a -> b -> b) -> b -> Array a -> b # foldl :: (b -> a -> b) -> b -> Array a -> b # foldl' :: (b -> a -> b) -> b -> Array a -> b # foldr1 :: (a -> a -> a) -> Array a -> a # foldl1 :: (a -> a -> a) -> Array a -> a # elem :: Eq a => a -> Array a -> Bool # maximum :: Ord a => Array a -> a # minimum :: Ord a => Array a -> a # | |
Eq1 Array | Since: primitive-0.6.4.0 |
Ord1 Array | Since: primitive-0.6.4.0 |
Defined in Data.Primitive.Array | |
Read1 Array | Since: primitive-0.6.4.0 |
Defined in Data.Primitive.Array | |
Show1 Array | Since: primitive-0.6.4.0 |
Traversable Array | |
Alternative Array | |
Applicative Array | |
Functor Array | |
Monad Array | |
MonadPlus Array | |
NFData1 Array | |
Defined in Data.Primitive.Array | |
Lift a => Lift (Array a :: Type) | |
Data a => Data (Array a) | |
Defined in Data.Primitive.Array gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Array a -> c (Array a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Array a) # toConstr :: Array a -> Constr # dataTypeOf :: Array a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Array a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Array a)) # gmapT :: (forall b. Data b => b -> b) -> Array a -> Array a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Array a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Array a -> r # gmapQ :: (forall d. Data d => d -> u) -> Array a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Array a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Array a -> m (Array a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Array a -> m (Array a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Array a -> m (Array a) # | |
Monoid (Array a) | |
Semigroup (Array a) | Since: primitive-0.6.3.0 |
IsList (Array a) | |
Read a => Read (Array a) | |
Show a => Show (Array a) | |
NFData a => NFData (Array a) | |
Defined in Data.Primitive.Array | |
Eq a => Eq (Array a) | |
Ord a => Ord (Array a) | Lexicographic ordering. Subject to change between major versions. |
type Item (Array a) | |
Defined in Data.Primitive.Array |
Construction
Elimination
Random Access
getIndexUnsafe :: Array a -> Int -> a Source #
O(1) Lookup the element at the given index. Index starts from 0. Does not check the bounds.
Since: 0.8.0