Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class MVector ( Mutable v) a => Vector (v :: Type -> Type ) a
- type VB = Vector
- type VU = Vector
- type VP = Vector
- type VS = Vector
- newtype VMap kv vv k v = VMap { }
- empty :: ( Vector kv k, Vector vv v) => VMap kv vv k v
- size :: Vector kv k => VMap kv vv k v -> Int
- lookup :: ( Ord k, Vector kv k, Vector vv v) => k -> VMap kv vv k v -> Maybe v
- findWithDefault :: ( Ord k, Vector kv k, Vector vv v) => v -> k -> VMap kv vv k v -> v
- member :: ( Ord k, Vector kv k) => k -> VMap kv vv k v -> Bool
- notMember :: ( Ord k, Vector kv k) => k -> VMap kv vv k v -> Bool
- map :: ( Vector vv a, Vector vv b) => (a -> b) -> VMap kv vv k a -> VMap kv vv k b
- mapMaybe :: ( Vector kv k, Vector vv a, Vector vv b) => (a -> Maybe b) -> VMap kv vv k a -> VMap kv vv k b
- mapWithKey :: ( Vector kv k, Vector vv a, Vector vv b) => (k -> a -> b) -> VMap kv vv k a -> VMap kv vv k b
- filter :: ( Vector kv k, Vector vv v) => (k -> v -> Bool ) -> VMap kv vv k v -> VMap kv vv k v
- fold :: ( Vector vv m, Monoid m) => VMap kv vv k m -> m
- foldl :: Vector vv v => (a -> v -> a) -> a -> VMap kv vv k v -> a
- foldlWithKey :: ( Vector kv k, Vector vv v) => (a -> k -> v -> a) -> a -> VMap kv vv k v -> a
- foldMap :: ( Vector vv v, Monoid m) => (v -> m) -> VMap kv vv k v -> m
- foldMapWithKey :: ( Vector kv k, Vector vv v, Monoid m) => (k -> v -> m) -> VMap kv vv k v -> m
- fromMap :: ( Vector kv k, Vector vv v) => Map k v -> VMap kv vv k v
- toMap :: ( Vector kv k, Vector vv v) => VMap kv vv k v -> Map k v
- fromList :: ( Ord k, Vector kv k, Vector vv v) => [(k, v)] -> VMap kv vv k v
- fromListN :: ( Ord k, Vector kv k, Vector vv v) => Int -> [(k, v)] -> VMap kv vv k v
- toList :: ( Vector kv k, Vector vv v) => VMap kv vv k v -> [(k, v)]
- toAscList :: ( Vector kv k, Vector vv v) => VMap kv vv k v -> [(k, v)]
- keys :: Vector kv k => VMap kv vv k v -> [k]
- elems :: Vector vv v => VMap kv vv k v -> [v]
- fromAscList :: ( Eq k, Vector kv k, Vector vv v) => [(k, v)] -> VMap kv vv k v
- fromAscListN :: ( Eq k, Vector kv k, Vector vv v) => Int -> [(k, v)] -> VMap kv vv k v
- fromAscListWithKey :: ( Eq k, Vector kv k, Vector vv v) => (k -> v -> v -> v) -> [(k, v)] -> VMap kv vv k v
- fromAscListWithKeyN :: ( Eq k, Vector kv k, Vector vv v) => Int -> (k -> v -> v -> v) -> [(k, v)] -> VMap kv vv k v
- fromDistinctAscList :: ( Vector kv k, Vector vv v) => [(k, v)] -> VMap kv vv k v
- fromDistinctAscListN :: ( Vector kv k, Vector vv v) => Int -> [(k, v)] -> VMap kv vv k v
- internMaybe :: ( Vector kv k, Ord k) => k -> VMap kv vv k v -> Maybe k
- null :: ( Vector vv v, Vector kv k) => VMap kv vv k v -> Bool
- splitAt :: ( Vector vv v, Vector kv k) => Int -> VMap kv vv k v -> ( VMap kv vv k v, VMap kv vv k v)
- data KVMVector kmv vmv s a
- data KVVector kv vv a
- normalize :: ( Vector kv k, Vector vv v, Ord k) => KVVector kv vv (k, v) -> KVVector kv vv (k, v)
- normalizeM :: ( Ord k, PrimMonad m, Vector kv k, Vector vv v) => KVMVector ( Mutable kv) ( Mutable vv) ( PrimState m) (k, v) -> m ( KVMVector ( Mutable kv) ( Mutable vv) ( PrimState m) (k, v))
Documentation
class MVector ( Mutable v) a => Vector (v :: Type -> Type ) a Source #
Class of immutable vectors. Every immutable vector is associated with its
mutable version through the
Mutable
type family. Methods of this class
should not be used directly. Instead,
Data.Vector.Generic
and other
Data.Vector modules provide safe and fusible wrappers.
Minimum complete implementation:
Instances
newtype VMap kv vv k v Source #
Instances
( Vector kv k, Vector vv v, Ord k) => IsList ( VMap kv vv k v) Source # | |
( Eq (kv k), Eq (vv v)) => Eq ( VMap kv vv k v) Source # | |
( Show k, Show v, Vector kv k, Vector vv v) => Show ( VMap kv vv k v) Source # | |
Generic ( VMap kv vv k v) Source # | |
( Vector kv k, Vector vv v, Ord k) => Semigroup ( VMap kv vv k v) Source # | |
( Vector kv k, Vector vv v, Ord k) => Monoid ( VMap kv vv k v) Source # | |
( Typeable kv, Typeable vv, ToCBOR k, ToCBOR v, Ord k, Vector kv k, Vector vv v) => ToCBOR ( VMap kv vv k v) Source # | |
( Typeable kv, Typeable vv, FromCBOR k, FromCBOR v, Ord k, Vector kv k, Vector vv v) => FromCBOR ( VMap kv vv k v) Source # | |
( NFData (kv k), NFData (vv v)) => NFData ( VMap kv vv k v) Source # | |
( NoThunks (kv k), NoThunks (vv v), Typeable kv, Typeable vv, Typeable k, Typeable v) => NoThunks ( VMap kv vv k v) Source # | |
type Rep ( VMap kv vv k v) Source # | |
Defined in Data.VMap |
|
type Item ( VMap kv vv k v) Source # | |
mapMaybe :: ( Vector kv k, Vector vv a, Vector vv b) => (a -> Maybe b) -> VMap kv vv k a -> VMap kv vv k b Source #
mapWithKey :: ( Vector kv k, Vector vv a, Vector vv b) => (k -> a -> b) -> VMap kv vv k a -> VMap kv vv k b Source #
filter :: ( Vector kv k, Vector vv v) => (k -> v -> Bool ) -> VMap kv vv k v -> VMap kv vv k v Source #
foldlWithKey :: ( Vector kv k, Vector vv v) => (a -> k -> v -> a) -> a -> VMap kv vv k v -> a Source #
foldMapWithKey :: ( Vector kv k, Vector vv v, Monoid m) => (k -> v -> m) -> VMap kv vv k v -> m Source #
fromAscListWithKey :: ( Eq k, Vector kv k, Vector vv v) => (k -> v -> v -> v) -> [(k, v)] -> VMap kv vv k v Source #
fromAscListWithKeyN :: ( Eq k, Vector kv k, Vector vv v) => Int -> (k -> v -> v -> v) -> [(k, v)] -> VMap kv vv k v Source #
splitAt :: ( Vector vv v, Vector kv k) => Int -> VMap kv vv k v -> ( VMap kv vv k v, VMap kv vv k v) Source #
data KVMVector kmv vmv s a Source #
Instances
data KVVector kv vv a Source #
Instances
( Vector kv k, Vector vv v) => Vector ( KVVector kv vv) (k, v) Source # | |
Defined in Data.VMap.KVVector basicUnsafeFreeze :: PrimMonad m => Mutable ( KVVector kv vv) ( PrimState m) (k, v) -> m ( KVVector kv vv (k, v)) Source # basicUnsafeThaw :: PrimMonad m => KVVector kv vv (k, v) -> m ( Mutable ( KVVector kv vv) ( PrimState m) (k, v)) Source # basicLength :: KVVector kv vv (k, v) -> Int Source # basicUnsafeSlice :: Int -> Int -> KVVector kv vv (k, v) -> KVVector kv vv (k, v) Source # basicUnsafeIndexM :: Monad m => KVVector kv vv (k, v) -> Int -> m (k, v) Source # basicUnsafeCopy :: PrimMonad m => Mutable ( KVVector kv vv) ( PrimState m) (k, v) -> KVVector kv vv (k, v) -> m () Source # elemseq :: KVVector kv vv (k, v) -> (k, v) -> b -> b Source # |
|
( Vector kv k, Vector vv v, Ord k) => IsList ( KVVector kv vv (k, v)) Source # | |
Defined in Data.VMap.KVVector |
|
( Eq (kv k), Eq (vv v)) => Eq ( KVVector kv vv (k, v)) Source # | |
( Show (kv k), Show (vv v)) => Show ( KVVector kv vv (k, v)) Source # | |
Generic ( KVVector kv vv a) Source # | |
( Vector kv k, Vector vv v, Ord k) => Semigroup ( KVVector kv vv (k, v)) Source # | |
( Vector kv k, Vector vv v, Ord k) => Monoid ( KVVector kv vv (k, v)) Source # | |
( ToCBOR k, ToCBOR v, Ord k, Vector kv k, Vector vv v, Typeable kv, Typeable vv) => ToCBOR ( KVVector kv vv (k, v)) Source # | |
Defined in Data.VMap.KVVector |
|
( FromCBOR k, FromCBOR v, Ord k, Vector kv k, Vector vv v, Typeable kv, Typeable vv) => FromCBOR ( KVVector kv vv (k, v)) Source # | |
( NFData (kv k), NFData (vv v)) => NFData ( KVVector kv vv (k, v)) Source # | |
Defined in Data.VMap.KVVector |
|
( NoThunks (kv k), NoThunks (vv v), Typeable kv, Typeable vv, Typeable k, Typeable v) => NoThunks ( KVVector kv vv (k, v)) Source # | |
type Mutable ( KVVector kv vv) Source # | |
type Rep ( KVVector kv vv a) Source # | |
Defined in Data.VMap.KVVector |
|
type Item ( KVVector kv vv (k, v)) Source # | |
Defined in Data.VMap.KVVector |