vector-sized-1.0.3.0: Size tagged vectors

Safe HaskellNone
LanguageHaskell2010

Data.Vector.Generic.Sized.Internal

Synopsis

Documentation

newtype Vector v (n :: Nat) a Source #

A wrapper to tag vectors with a type level length.

Be careful when using the constructor here to not construct sized vectors which have a different length than that specified in the type parameter!

Constructors

Vector (v a) 

Instances

Functor v => Functor (Vector v n) Source # 

Methods

fmap :: (a -> b) -> Vector v n a -> Vector v n b #

(<$) :: a -> Vector v n b -> Vector v n a #

Foldable v => Foldable (Vector v n) Source # 

Methods

fold :: Monoid m => Vector v n m -> m #

foldMap :: Monoid m => (a -> m) -> Vector v n a -> m #

foldr :: (a -> b -> b) -> b -> Vector v n a -> b #

foldr' :: (a -> b -> b) -> b -> Vector v n a -> b #

foldl :: (b -> a -> b) -> b -> Vector v n a -> b #

foldl' :: (b -> a -> b) -> b -> Vector v n a -> b #

foldr1 :: (a -> a -> a) -> Vector v n a -> a #

foldl1 :: (a -> a -> a) -> Vector v n a -> a #

toList :: Vector v n a -> [a] #

null :: Vector v n a -> Bool #

length :: Vector v n a -> Int #

elem :: Eq a => a -> Vector v n a -> Bool #

maximum :: Ord a => Vector v n a -> a #

minimum :: Ord a => Vector v n a -> a #

sum :: Num a => Vector v n a -> a #

product :: Num a => Vector v n a -> a #

Traversable v => Traversable (Vector v n) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Vector v n a -> f (Vector v n b) #

sequenceA :: Applicative f => Vector v n (f a) -> f (Vector v n a) #

mapM :: Monad m => (a -> m b) -> Vector v n a -> m (Vector v n b) #

sequence :: Monad m => Vector v n (m a) -> m (Vector v n a) #

Eq1 v => Eq1 (Vector v n) Source # 

Methods

liftEq :: (a -> b -> Bool) -> Vector v n a -> Vector v n b -> Bool #

Ord1 v => Ord1 (Vector v n) Source # 

Methods

liftCompare :: (a -> b -> Ordering) -> Vector v n a -> Vector v n b -> Ordering #

Show1 v => Show1 (Vector v n) Source # 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Vector v n a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Vector v n a] -> ShowS #

Eq (v a) => Eq (Vector v n a) Source # 

Methods

(==) :: Vector v n a -> Vector v n a -> Bool #

(/=) :: Vector v n a -> Vector v n a -> Bool #

(Data (v a), Typeable * a, Typeable (* -> *) v, KnownNat n) => Data (Vector v n a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector v n a -> c (Vector v n a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector v n a) #

toConstr :: Vector v n a -> Constr #

dataTypeOf :: Vector v n a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Vector v n a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector v n a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector v n a -> Vector v n a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector v n a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector v n a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector v n a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector v n a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector v n a -> m (Vector v n a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector v n a -> m (Vector v n a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector v n a -> m (Vector v n a) #

Ord (v a) => Ord (Vector v n a) Source # 

Methods

compare :: Vector v n a -> Vector v n a -> Ordering #

(<) :: Vector v n a -> Vector v n a -> Bool #

(<=) :: Vector v n a -> Vector v n a -> Bool #

(>) :: Vector v n a -> Vector v n a -> Bool #

(>=) :: Vector v n a -> Vector v n a -> Bool #

max :: Vector v n a -> Vector v n a -> Vector v n a #

min :: Vector v n a -> Vector v n a -> Vector v n a #

Show (v a) => Show (Vector v n a) Source # 

Methods

showsPrec :: Int -> Vector v n a -> ShowS #

show :: Vector v n a -> String #

showList :: [Vector v n a] -> ShowS #

Generic (Vector v n a) Source # 

Associated Types

type Rep (Vector v n a) :: * -> * #

Methods

from :: Vector v n a -> Rep (Vector v n a) x #

to :: Rep (Vector v n a) x -> Vector v n a #

NFData (v a) => NFData (Vector v n a) Source # 

Methods

rnf :: Vector v n a -> () #

type Rep (Vector Vector n) # 
type Rep (Vector Vector n) = Finite n
type Mutable (Vector v n) # 
type Mutable (Vector v n) = MVector (Mutable v) n
type Rep (Vector v n a) Source # 
type Rep (Vector v n a) = D1 * (MetaData "Vector" "Data.Vector.Generic.Sized.Internal" "vector-sized-1.0.3.0-3CIZIdU8O7sAUrFv3sIpo2" True) (C1 * (MetaCons "Vector" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (v a))))