hw-prim-0.5.0.3: Primitive functions and data types

Safe HaskellNone
LanguageHaskell2010

HaskellWorks.Data.Vector.StorableVectorLike

Synopsis

Documentation

class StorableVectorLike v e where Source #

Class of values that support storable vector like operations

Minimal complete definition

sImap, sMap, sUnfoldr, sUnfoldrN

Methods

sImap :: (Storable a, Storable b) => (Int -> a -> b) -> v a -> v b Source #

sMap :: (Storable a, Storable b) => (a -> b) -> v a -> v b Source #

sUnfoldr :: Storable a => (b -> Maybe (a, b)) -> b -> v a Source #

sUnfoldrN :: Storable a => Int -> (b -> Maybe (a, b)) -> b -> v a Source #

Instances

StorableVectorLike Vector Word8 Source # 

Methods

sImap :: (Storable a, Storable b) => (Int -> a -> b) -> Vector a -> Vector b Source #

sMap :: (Storable a, Storable b) => (a -> b) -> Vector a -> Vector b Source #

sUnfoldr :: Storable a => (b -> Maybe (a, b)) -> b -> Vector a Source #

sUnfoldrN :: Storable a => Int -> (b -> Maybe (a, b)) -> b -> Vector a Source #

StorableVectorLike Vector Word16 Source # 

Methods

sImap :: (Storable a, Storable b) => (Int -> a -> b) -> Vector a -> Vector b Source #

sMap :: (Storable a, Storable b) => (a -> b) -> Vector a -> Vector b Source #

sUnfoldr :: Storable a => (b -> Maybe (a, b)) -> b -> Vector a Source #

sUnfoldrN :: Storable a => Int -> (b -> Maybe (a, b)) -> b -> Vector a Source #

StorableVectorLike Vector Word32 Source # 

Methods

sImap :: (Storable a, Storable b) => (Int -> a -> b) -> Vector a -> Vector b Source #

sMap :: (Storable a, Storable b) => (a -> b) -> Vector a -> Vector b Source #

sUnfoldr :: Storable a => (b -> Maybe (a, b)) -> b -> Vector a Source #

sUnfoldrN :: Storable a => Int -> (b -> Maybe (a, b)) -> b -> Vector a Source #

StorableVectorLike Vector Word64 Source # 

Methods

sImap :: (Storable a, Storable b) => (Int -> a -> b) -> Vector a -> Vector b Source #

sMap :: (Storable a, Storable b) => (a -> b) -> Vector a -> Vector b Source #

sUnfoldr :: Storable a => (b -> Maybe (a, b)) -> b -> Vector a Source #

sUnfoldrN :: Storable a => Int -> (b -> Maybe (a, b)) -> b -> Vector a Source #