bimaps-0.1.0.0: bijections with multiple implementations.

Data.Bijection.Vector

Contents

Description

A bijection between boxed, immutable vectors.

Synopsis

# Documentation

data Vector a :: * -> * #

Boxed vectors, supporting efficient slicing.

Instances

 Methods(>>=) :: Vector a -> (a -> Vector b) -> Vector b #(>>) :: Vector a -> Vector b -> Vector b #return :: a -> Vector a #fail :: String -> Vector a # Methodsfmap :: (a -> b) -> Vector a -> Vector b #(<\$) :: a -> Vector b -> Vector a # Methodspure :: a -> Vector a #(<*>) :: Vector (a -> b) -> Vector a -> Vector b #(*>) :: Vector a -> Vector b -> Vector b #(<*) :: Vector a -> Vector b -> Vector a # Methodsfold :: Monoid m => Vector m -> m #foldMap :: Monoid m => (a -> m) -> Vector a -> m #foldr :: (a -> b -> b) -> b -> Vector a -> b #foldr' :: (a -> b -> b) -> b -> Vector a -> b #foldl :: (b -> a -> b) -> b -> Vector a -> b #foldl' :: (b -> a -> b) -> b -> Vector a -> b #foldr1 :: (a -> a -> a) -> Vector a -> a #foldl1 :: (a -> a -> a) -> Vector a -> a #toList :: Vector a -> [a] #null :: Vector a -> Bool #length :: Vector a -> Int #elem :: Eq a => a -> Vector a -> Bool #maximum :: Ord a => Vector a -> a #minimum :: Ord a => Vector a -> a #sum :: Num a => Vector a -> a #product :: Num a => Vector a -> a # Methodstraverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #sequence :: Monad m => Vector (m a) -> m (Vector a) # Methodsempty :: Vector a #(<|>) :: Vector a -> Vector a -> Vector a #some :: Vector a -> Vector [a] #many :: Vector a -> Vector [a] # Methodsmzero :: Vector a #mplus :: Vector a -> Vector a -> Vector a # MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) a -> m (Vector a) #basicUnsafeThaw :: PrimMonad m => Vector a -> m (Mutable Vector (PrimState m) a) #basicLength :: Vector a -> Int #basicUnsafeSlice :: Int -> Int -> Vector a -> Vector a #basicUnsafeIndexM :: Monad m => Vector a -> Int -> m a #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) a -> Vector a -> m () #elemseq :: Vector a -> a -> b -> b # IsList (Vector a) Associated Typestype Item (Vector a) :: * # MethodsfromList :: [Item (Vector a)] -> Vector a #fromListN :: Int -> [Item (Vector a)] -> Vector a #toList :: Vector a -> [Item (Vector a)] # Eq a => Eq (Vector a) Methods(==) :: Vector a -> Vector a -> Bool #(/=) :: Vector a -> Vector a -> Bool # Data a => Data (Vector a) Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #toConstr :: Vector a -> Constr #dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) # Ord a => Ord (Vector a) Methodscompare :: Vector a -> Vector a -> Ordering #(<) :: Vector a -> Vector a -> Bool #(<=) :: Vector a -> Vector a -> Bool #(>) :: Vector a -> Vector a -> Bool #(>=) :: Vector a -> Vector a -> Bool #max :: Vector a -> Vector a -> Vector a #min :: Vector a -> Vector a -> Vector a # Read a => Read (Vector a) MethodsreadsPrec :: Int -> ReadS (Vector a) #readList :: ReadS [Vector a] # Show a => Show (Vector a) MethodsshowsPrec :: Int -> Vector a -> ShowS #show :: Vector a -> String #showList :: [Vector a] -> ShowS # Monoid (Vector a) Methodsmappend :: Vector a -> Vector a -> Vector a #mconcat :: [Vector a] -> Vector a # NFData a => NFData (Vector a) Methodsrnf :: Vector a -> () # type Mutable Vector type Mutable Vector = MVector type Item (Vector a) type Item (Vector a) = a type Dom (Vector c) Source # type Dom (Vector c) = Int type Cod (Vector c) Source # type Cod (Vector c) = c

# Orphan instances

 DomCod (Vector c) Source # Associated Typestype Dom (Vector c) :: * Source #type Cod (Vector c) :: * Source # Methodsmember :: Vector c -> Dom (Vector c) -> Bool Source #lookup :: Vector c -> Dom (Vector c) -> Maybe (Cod (Vector c)) Source #deleteDC :: Vector c -> Dom (Vector c) -> Maybe (Cod (Vector c), Vector c) Source #insertDC :: Vector c -> (Dom (Vector c), Cod (Vector c)) -> Vector c Source #toListDC :: Vector c -> [(Dom (Vector c), Cod (Vector c))] Source #nullDC :: Vector c -> Bool Source #sizeDC :: Vector c -> Int Source #fromListDC :: [(Dom (Vector c), Cod (Vector c))] -> Vector c Source #