primitive-extras-0.10.1.1: Extras for the "primitive" library
Safe HaskellNone
LanguageHaskell2010

PrimitiveExtras.By6Bits

Synopsis

Documentation

data By6Bits e Source #

An immutable space-efficient sparse array, which can only store not more than 64 elements.

Instances

Instances details
Foldable By6Bits Source # 
Instance details

Defined in PrimitiveExtras.By6Bits

Methods

fold :: Monoid m => By6Bits m -> m Source #

foldMap :: Monoid m => (a -> m) -> By6Bits a -> m Source #

foldMap' :: Monoid m => (a -> m) -> By6Bits a -> m Source #

foldr :: (a -> b -> b) -> b -> By6Bits a -> b Source #

foldr' :: (a -> b -> b) -> b -> By6Bits a -> b Source #

foldl :: (b -> a -> b) -> b -> By6Bits a -> b Source #

foldl' :: (b -> a -> b) -> b -> By6Bits a -> b Source #

foldr1 :: (a -> a -> a) -> By6Bits a -> a Source #

foldl1 :: (a -> a -> a) -> By6Bits a -> a Source #

toList :: By6Bits a -> [a] Source #

null :: By6Bits a -> Bool Source #

length :: By6Bits a -> Int Source #

elem :: Eq a => a -> By6Bits a -> Bool Source #

maximum :: Ord a => By6Bits a -> a Source #

minimum :: Ord a => By6Bits a -> a Source #

sum :: Num a => By6Bits a -> a Source #

product :: Num a => By6Bits a -> a Source #

Eq a => Eq (By6Bits a) Source # 
Instance details

Defined in PrimitiveExtras.By6Bits

Methods

(==) :: By6Bits a -> By6Bits a -> Bool Source #

(/=) :: By6Bits a -> By6Bits a -> Bool Source #

Show a => Show (By6Bits a) Source # 
Instance details

Defined in PrimitiveExtras.By6Bits

singleton :: Int -> e -> By6Bits e Source #

An array with a single element at the specified index.

pair :: Int -> e -> Int -> e -> By6Bits e Source #

insert :: Int -> e -> By6Bits e -> By6Bits e Source #

Insert an element value at the index. It's your obligation to ensure that the index is empty before the operation.

replace :: Int -> e -> By6Bits e -> By6Bits e Source #

adjust :: (e -> e) -> Int -> By6Bits e -> By6Bits e Source #

unset :: Int -> By6Bits e -> By6Bits e Source #

Remove an element.

lookup :: Int -> By6Bits e -> Maybe e Source #

Lookup an item at the index.

focusAt :: Monad m => Focus a m b -> Int -> By6Bits a -> m (b, By6Bits a) Source #

toMaybeList :: By6Bits e -> [Maybe e] Source #

Convert into a list representation.

onElementAtFocus :: Monad m => Int -> Focus a m b -> Focus (By6Bits a) m b Source #

Orphan instances

Foldable By6Bits Source # 
Instance details

Methods

fold :: Monoid m => By6Bits m -> m Source #

foldMap :: Monoid m => (a -> m) -> By6Bits a -> m Source #

foldMap' :: Monoid m => (a -> m) -> By6Bits a -> m Source #

foldr :: (a -> b -> b) -> b -> By6Bits a -> b Source #

foldr' :: (a -> b -> b) -> b -> By6Bits a -> b Source #

foldl :: (b -> a -> b) -> b -> By6Bits a -> b Source #

foldl' :: (b -> a -> b) -> b -> By6Bits a -> b Source #

foldr1 :: (a -> a -> a) -> By6Bits a -> a Source #

foldl1 :: (a -> a -> a) -> By6Bits a -> a Source #

toList :: By6Bits a -> [a] Source #

null :: By6Bits a -> Bool Source #

length :: By6Bits a -> Int Source #

elem :: Eq a => a -> By6Bits a -> Bool Source #

maximum :: Ord a => By6Bits a -> a Source #

minimum :: Ord a => By6Bits a -> a Source #

sum :: Num a => By6Bits a -> a Source #

product :: Num a => By6Bits a -> a Source #

Eq a => Eq (By6Bits a) Source # 
Instance details

Methods

(==) :: By6Bits a -> By6Bits a -> Bool Source #

(/=) :: By6Bits a -> By6Bits a -> Bool Source #

Show a => Show (By6Bits a) Source # 
Instance details