Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Synopsis
- data Array n a
- singleton :: a -> Array Sz1 a
- getSingleton# :: Array Sz1 a -> (#a#)
- getSingletonA :: Applicative f => Array Sz1 a -> f a
- arrayToSmallArray :: Array n a -> SmallArray a
- splitArray :: Size n -> Array (Twice n) a -> (Array n a, Array n a)
- append :: Size n -> Array n a -> Array n a -> Array (Twice n) a
- arraySplitListN :: Size n -> [a] -> (Array n a, [a])
- fromList :: Size n -> [a] -> Array n a
Documentation
Instances
Functor (Array n) Source # | |
Foldable (Array n) Source # | |
Defined in Data.CompactSequence.Internal.Array fold :: Monoid m => Array n m -> m # foldMap :: Monoid m => (a -> m) -> Array n a -> m # foldr :: (a -> b -> b) -> b -> Array n a -> b # foldr' :: (a -> b -> b) -> b -> Array n a -> b # foldl :: (b -> a -> b) -> b -> Array n a -> b # foldl' :: (b -> a -> b) -> b -> Array n a -> b # foldr1 :: (a -> a -> a) -> Array n a -> a # foldl1 :: (a -> a -> a) -> Array n a -> a # elem :: Eq a => a -> Array n a -> Bool # maximum :: Ord a => Array n a -> a # minimum :: Ord a => Array n a -> a # | |
Traversable (Array n) Source # | |
getSingleton# :: Array Sz1 a -> (#a#) Source #
getSingletonA :: Applicative f => Array Sz1 a -> f a Source #
arrayToSmallArray :: Array n a -> SmallArray a Source #
append :: Size n -> Array n a -> Array n a -> Array (Twice n) a Source #
Append two arrays of the same size. We take the size
of the argument arrays so we can build the result array
before loading the first argument array into cache. Is
this the right approach? Not sure. We *certainly* don't
want to just use <>
, because
arraySplitListN :: Size n -> [a] -> (Array n a, [a]) Source #