NMap-0.12: A transparent nested Map structure

Data.NMap

# Documentation

data NMap k a Source #

Instances

 Monad (NMap k) Source # Methods(>>=) :: NMap k a -> (a -> NMap k b) -> NMap k b #(>>) :: NMap k a -> NMap k b -> NMap k b #return :: a -> NMap k a #fail :: String -> NMap k a # Functor (NMap k) Source # Methodsfmap :: (a -> b) -> NMap k a -> NMap k b #(<\$) :: a -> NMap k b -> NMap k a # Source # Methodspure :: a -> NMap k a #(<*>) :: NMap k (a -> b) -> NMap k a -> NMap k b #(*>) :: NMap k a -> NMap k b -> NMap k b #(<*) :: NMap k a -> NMap k b -> NMap k a # Foldable (NMap k) Source # Methodsfold :: Monoid m => NMap k m -> m #foldMap :: Monoid m => (a -> m) -> NMap k a -> m #foldr :: (a -> b -> b) -> b -> NMap k a -> b #foldr' :: (a -> b -> b) -> b -> NMap k a -> b #foldl :: (b -> a -> b) -> b -> NMap k a -> b #foldl' :: (b -> a -> b) -> b -> NMap k a -> b #foldr1 :: (a -> a -> a) -> NMap k a -> a #foldl1 :: (a -> a -> a) -> NMap k a -> a #toList :: NMap k a -> [a] #null :: NMap k a -> Bool #length :: NMap k a -> Int #elem :: Eq a => a -> NMap k a -> Bool #maximum :: Ord a => NMap k a -> a #minimum :: Ord a => NMap k a -> a #sum :: Num a => NMap k a -> a #product :: Num a => NMap k a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> NMap k a -> f (NMap k b) #sequenceA :: Applicative f => NMap k (f a) -> f (NMap k a) #mapM :: Monad m => (a -> m b) -> NMap k a -> m (NMap k b) #sequence :: Monad m => NMap k (m a) -> m (NMap k a) # (Eq a, Eq k) => Eq (NMap k a) Source # Methods(==) :: NMap k a -> NMap k a -> Bool #(/=) :: NMap k a -> NMap k a -> Bool # (Show a, Show b) => Show (NMap a b) Source # MethodsshowsPrec :: Int -> NMap a b -> ShowS #show :: NMap a b -> String #showList :: [NMap a b] -> ShowS # Ord k => Monoid (NMap k b) Source # Methodsmempty :: NMap k b #mappend :: NMap k b -> NMap k b -> NMap k b #mconcat :: [NMap k b] -> NMap k b #

(.<) :: Ord k => t -> [(k, NMap k a)] -> (t, NMap k a) infixr 0 Source #

(.>) :: t -> a -> (t, NMap k a) infixr 0 Source #

drawNMap :: (Show k, Show a) => NMap k a -> String Source #

mapKeys :: Ord k2 => (k1 -> k2) -> NMap k1 a -> NMap k2 a Source #

mapWithKey :: (k -> a -> b) -> NMap k a -> NMap k b Source #

mapWithKey0 :: (k -> a -> b) -> k -> NMap k a -> NMap k b Source #

traverseKeys :: (Ord k2, Applicative t) => (k1 -> t k2) -> NMap k1 a -> t (NMap k2 a) Source #

traverseWithKey :: (Ord k, Applicative t) => (k -> a -> t b) -> NMap k a -> t (NMap k b) Source #

bitraverse :: (Applicative t, Ord k2) => (k1 -> t k2) -> (a1 -> t a2) -> NMap k1 a1 -> t (NMap k2 a2) Source #

bisequence :: (Applicative t, Ord k) => NMap (t k) (t a) -> t (NMap k a) Source #

mapKeysM :: (Ord k2, Monad m) => (k1 -> m k2) -> NMap k1 a -> m (NMap k2 a) Source #

fromList :: Ord k => [(k, NMap k a)] -> NMap k a Source #

elems :: NMap k a -> [a] Source #

delete :: Ord k => [k] -> NMap k a -> NMap k a Source #

delete0 :: Ord k => k -> NMap k a -> NMap k a Source #

rootKeys :: NMap k a -> [k] Source #

roots :: NMap k a -> Map k (NMap k a) Source #

lookup :: Ord k => k -> NMap k a -> Maybe (Either (NMap k a) a) Source #

(!) :: Ord k => NMap k a -> [k] -> a Source #

member :: Ord k => k -> NMap k a -> Bool Source #

branch :: Ord k => [k] -> a -> NMap k a Source #

branch0 :: Ord k => k -> a -> NMap k a Source #

insert :: Ord k => [k] -> a -> NMap k a -> NMap k a Source #

insert0 :: Ord k => k -> a -> NMap k a -> NMap k a Source #