aeson-2.2.1.0: Fast JSON parsing and encoding
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Aeson.KeyMap

Description

An abstract interface for maps from JSON keys to values.

Since: 2.0.0.0

Synopsis

Map Type

data KeyMap v Source #

A map from JSON key type Key to v.

Instances

Instances details
Arbitrary1 KeyMap Source #

Since: 2.0.3.0

Instance details

Defined in Data.Aeson.KeyMap

Methods

liftArbitrary :: Gen a -> Gen (KeyMap a) #

liftShrink :: (a -> [a]) -> KeyMap a -> [KeyMap a] #

FromJSON1 KeyMap Source #

Since: 2.0.1.0

Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (KeyMap a) Source #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [KeyMap a] Source #

liftOmittedField :: Maybe a -> Maybe (KeyMap a) Source #

ToJSON1 KeyMap Source # 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> KeyMap a -> Value Source #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [KeyMap a] -> Value Source #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> KeyMap a -> Encoding Source #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [KeyMap a] -> Encoding Source #

liftOmitField :: (a -> Bool) -> KeyMap a -> Bool Source #

Foldable KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

fold :: Monoid m => KeyMap m -> m #

foldMap :: Monoid m => (a -> m) -> KeyMap a -> m #

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

foldr :: (a -> b -> b) -> b -> KeyMap a -> b #

foldr' :: (a -> b -> b) -> b -> KeyMap a -> b #

foldl :: (b -> a -> b) -> b -> KeyMap a -> b #

foldl' :: (b -> a -> b) -> b -> KeyMap a -> b #

foldr1 :: (a -> a -> a) -> KeyMap a -> a #

foldl1 :: (a -> a -> a) -> KeyMap a -> a #

toList :: KeyMap a -> [a] #

null :: KeyMap a -> Bool #

length :: KeyMap a -> Int #

elem :: Eq a => a -> KeyMap a -> Bool #

maximum :: Ord a => KeyMap a -> a #

minimum :: Ord a => KeyMap a -> a #

sum :: Num a => KeyMap a -> a #

product :: Num a => KeyMap a -> a #

Traversable KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

traverse :: Applicative f => (a -> f b) -> KeyMap a -> f (KeyMap b) #

sequenceA :: Applicative f => KeyMap (f a) -> f (KeyMap a) #

mapM :: Monad m => (a -> m b) -> KeyMap a -> m (KeyMap b) #

sequence :: Monad m => KeyMap (m a) -> m (KeyMap a) #

Functor KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

fmap :: (a -> b) -> KeyMap a -> KeyMap b #

(<$) :: a -> KeyMap b -> KeyMap a #

Align KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

nil :: KeyMap a #

Semialign KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

align :: KeyMap a -> KeyMap b -> KeyMap (These a b) #

alignWith :: (These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

Zip KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

zip :: KeyMap a -> KeyMap b -> KeyMap (a, b) #

zipWith :: (a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

Filterable KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

mapMaybe :: (a -> Maybe b) -> KeyMap a -> KeyMap b #

catMaybes :: KeyMap (Maybe a) -> KeyMap a #

filter :: (a -> Bool) -> KeyMap a -> KeyMap a #

Witherable KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

wither :: Applicative f => (a -> f (Maybe b)) -> KeyMap a -> f (KeyMap b) #

witherM :: Monad m => (a -> m (Maybe b)) -> KeyMap a -> m (KeyMap b) #

filterA :: Applicative f => (a -> f Bool) -> KeyMap a -> f (KeyMap a) #

witherMap :: Applicative m => (KeyMap b -> r) -> (a -> m (Maybe b)) -> KeyMap a -> m r #

FoldableWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

ifoldMap :: Monoid m => (Key -> a -> m) -> KeyMap a -> m #

ifoldMap' :: Monoid m => (Key -> a -> m) -> KeyMap a -> m #

ifoldr :: (Key -> a -> b -> b) -> b -> KeyMap a -> b #

ifoldl :: (Key -> b -> a -> b) -> b -> KeyMap a -> b #

ifoldr' :: (Key -> a -> b -> b) -> b -> KeyMap a -> b #

ifoldl' :: (Key -> b -> a -> b) -> b -> KeyMap a -> b #

FunctorWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

imap :: (Key -> a -> b) -> KeyMap a -> KeyMap b #

TraversableWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

itraverse :: Applicative f => (Key -> a -> f b) -> KeyMap a -> f (KeyMap b) #

SemialignWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

ialignWith :: (Key -> These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

ZipWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

izipWith :: (Key -> a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

FilterableWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

imapMaybe :: (Key -> a -> Maybe b) -> KeyMap a -> KeyMap b #

ifilter :: (Key -> a -> Bool) -> KeyMap a -> KeyMap a #

WitherableWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

iwither :: Applicative f => (Key -> a -> f (Maybe b)) -> KeyMap a -> f (KeyMap b) #

iwitherM :: Monad m => (Key -> a -> m (Maybe b)) -> KeyMap a -> m (KeyMap b) #

ifilterA :: Applicative f => (Key -> a -> f Bool) -> KeyMap a -> f (KeyMap a) #

value ~ Value => KeyValue Value (KeyMap value) Source #

Constructs a singleton KeyMap. For calling functions that demand an Object for constructing objects. To be used in conjunction with mconcat. Prefer to use object where possible.

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.=) :: ToJSON v => Key -> v -> KeyMap value Source #

explicitToField :: (v -> Value) -> Key -> v -> KeyMap value Source #

value ~ Value => KeyValueOmit Value (KeyMap value) Source # 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.?=) :: ToJSON v => Key -> v -> KeyMap value Source #

explicitToFieldOmit :: (v -> Bool) -> (v -> Value) -> Key -> v -> KeyMap value Source #

Lift v => Lift (KeyMap v :: TYPE LiftedRep) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

lift :: Quote m => KeyMap v -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => KeyMap v -> Code m (KeyMap v) #

Arbitrary v => Arbitrary (KeyMap v) Source #

Since: 2.0.3.0

Instance details

Defined in Data.Aeson.KeyMap

Methods

arbitrary :: Gen (KeyMap v) #

shrink :: KeyMap v -> [KeyMap v] #

CoArbitrary v => CoArbitrary (KeyMap v) Source #

Since: 2.0.3.0

Instance details

Defined in Data.Aeson.KeyMap

Methods

coarbitrary :: KeyMap v -> Gen b -> Gen b #

Function v => Function (KeyMap v) Source #

Since: 2.0.3.0

Instance details

Defined in Data.Aeson.KeyMap

Methods

function :: (KeyMap v -> b) -> KeyMap v :-> b #

FromJSON v => FromJSON (KeyMap v) Source #

Since: 2.0.1.0

Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON v => ToJSON (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data v => Data (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

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

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

toConstr :: KeyMap v -> Constr #

dataTypeOf :: KeyMap v -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (KeyMap v)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (KeyMap v)) #

gmapT :: (forall b. Data b => b -> b) -> KeyMap v -> KeyMap v #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> KeyMap v -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> KeyMap v -> r #

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

gmapQi :: Int -> (forall d. Data d => d -> u) -> KeyMap v -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) #

Monoid (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

mempty :: KeyMap v #

mappend :: KeyMap v -> KeyMap v -> KeyMap v #

mconcat :: [KeyMap v] -> KeyMap v #

Semigroup (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

(<>) :: KeyMap v -> KeyMap v -> KeyMap v #

sconcat :: NonEmpty (KeyMap v) -> KeyMap v #

stimes :: Integral b => b -> KeyMap v -> KeyMap v #

IsList (KeyMap v) Source #

Since: 2.0.2.0

Instance details

Defined in Data.Aeson.KeyMap

Associated Types

type Item (KeyMap v) #

Methods

fromList :: [Item (KeyMap v)] -> KeyMap v #

fromListN :: Int -> [Item (KeyMap v)] -> KeyMap v #

toList :: KeyMap v -> [Item (KeyMap v)] #

Read v => Read (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Show v => Show (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

showsPrec :: Int -> KeyMap v -> ShowS #

show :: KeyMap v -> String #

showList :: [KeyMap v] -> ShowS #

NFData v => NFData (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

rnf :: KeyMap v -> () #

Eq v => Eq (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

(==) :: KeyMap v -> KeyMap v -> Bool #

(/=) :: KeyMap v -> KeyMap v -> Bool #

Ord v => Ord (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

compare :: KeyMap v -> KeyMap v -> Ordering #

(<) :: KeyMap v -> KeyMap v -> Bool #

(<=) :: KeyMap v -> KeyMap v -> Bool #

(>) :: KeyMap v -> KeyMap v -> Bool #

(>=) :: KeyMap v -> KeyMap v -> Bool #

max :: KeyMap v -> KeyMap v -> KeyMap v #

min :: KeyMap v -> KeyMap v -> KeyMap v #

Hashable v => Hashable (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

hashWithSalt :: Int -> KeyMap v -> Int #

hash :: KeyMap v -> Int #

type Item (KeyMap v) Source # 
Instance details

Defined in Data.Aeson.KeyMap

type Item (KeyMap v) = (Key, v)

Query

null :: KeyMap v -> Bool Source #

Is the map empty?

lookup :: Key -> KeyMap v -> Maybe v Source #

Return the value to which the specified key is mapped, or Nothing if this map contains no mapping for the key.

(!?) :: KeyMap v -> Key -> Maybe v Source #

Return the value to which the specified key is mapped, or Nothing if this map contains no mapping for the key.

This is a flipped version of lookup.

Since: 2.1.1.0

size :: KeyMap v -> Int Source #

Return the number of key-value mappings in this map.

member :: Key -> KeyMap a -> Bool Source #

Is the key a member of the map?

Construction

empty :: KeyMap v Source #

Construct an empty map.

singleton :: Key -> v -> KeyMap v Source #

Construct a map with a single element.

Insertion

insert :: Key -> v -> KeyMap v -> KeyMap v Source #

Associate the specified value with the specified key in this map. If this map previously contained a mapping for the key, the old value is replaced.

insertWith :: (a -> a -> a) -> Key -> a -> KeyMap a -> KeyMap a Source #

Insert with a function combining new and old values, taken in that order.

Since: 2.1.1.0

Deletion

delete :: Key -> KeyMap v -> KeyMap v Source #

Remove the mapping for the specified key from this map if present.

Update

alterF :: Functor f => (Maybe v -> f (Maybe v)) -> Key -> KeyMap v -> f (KeyMap v) Source #

alterF can be used to insert, delete, or update a value in a map.

Combine

difference :: KeyMap v -> KeyMap v' -> KeyMap v Source #

Difference of two maps. Return elements of the first map not existing in the second.

union :: KeyMap v -> KeyMap v -> KeyMap v Source #

The (left-biased) union of two maps. It prefers the first map when duplicate keys are encountered, i.e. (union == unionWith const).

unionWith :: (v -> v -> v) -> KeyMap v -> KeyMap v -> KeyMap v Source #

The union with a combining function.

unionWithKey :: (Key -> v -> v -> v) -> KeyMap v -> KeyMap v -> KeyMap v Source #

The union with a combining function.

intersection :: KeyMap a -> KeyMap b -> KeyMap a Source #

The (left-biased) intersection of two maps (based on keys).

intersectionWith :: (a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c Source #

The intersection with a combining function.

intersectionWithKey :: (Key -> a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c Source #

The intersection with a combining function.

alignWith :: (These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c Source #

Generalized union with combining function.

alignWithKey :: (Key -> These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c Source #

Generalized union with combining function.

Lists

fromList :: [(Key, v)] -> KeyMap v Source #

Construct a map with the supplied mappings. If the list contains duplicate mappings, the later mappings take precedence.

>>> fromList [("a", 'x'), ("a", 'y')]
fromList [("a",'y')]

fromListWith :: (v -> v -> v) -> [(Key, v)] -> KeyMap v Source #

Construct a map from a list of elements. Uses the provided function, f, to merge duplicate entries with (f newVal oldVal).

toList :: KeyMap v -> [(Key, v)] Source #

Return a list of this map's keys and elements.

The order is not stable. Use toAscList for stable ordering.

toAscList :: KeyMap v -> [(Key, v)] Source #

Return a list of this map's elements in ascending order based of the textual key.

elems :: KeyMap v -> [v] Source #

Return a list of this map' elements.

Since: 2.0.3.0

Maps

fromHashMap :: HashMap Key v -> KeyMap v Source #

Convert a HashMap to a KeyMap.

toHashMap :: KeyMap v -> HashMap Key v Source #

Convert a KeyMap to a HashMap.

fromMap :: Map Key v -> KeyMap v Source #

Convert a Map to a KeyMap.

toMap :: KeyMap v -> Map Key v Source #

Convert a KeyMap to a Map.

fromMapText :: Map Text v -> KeyMap v Source #

Convert a Map Textto a KeyMap.

Since: 2.0.2.0

toMapText :: KeyMap v -> Map Text v Source #

Convert a KeyMap to a Map Text.

Since: 2.0.2.0

Traversal

Map

map :: (a -> b) -> KeyMap a -> KeyMap b Source #

Map a function over all values in the map.

mapWithKey :: (Key -> a -> b) -> KeyMap a -> KeyMap b Source #

Map a function over all values in the map.

Since: 2.1.0.0

mapKeyVal :: (Key -> Key) -> (v1 -> v2) -> KeyMap v1 -> KeyMap v2 Source #

Transform the keys and values of a KeyMap.

traverse :: Applicative f => (v1 -> f v2) -> KeyMap v1 -> f (KeyMap v2) Source #

Perform an Applicative action for each key-value pair in a KeyMap and produce a KeyMap of all the results.

traverseWithKey :: Applicative f => (Key -> v1 -> f v2) -> KeyMap v1 -> f (KeyMap v2) Source #

Perform an Applicative action for each key-value pair in a KeyMap and produce a KeyMap of all the results.

Folds

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

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

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

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

foldMapWithKey :: Monoid m => (Key -> a -> m) -> KeyMap a -> m Source #

foldrWithKey :: (Key -> v -> a -> a) -> a -> KeyMap v -> a Source #

Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).

Conversions

keys :: KeyMap v -> [Key] Source #

Return a list of this map's keys.

Filter

filter :: (v -> Bool) -> KeyMap v -> KeyMap v Source #

Filter all keys/values that satisfy some predicate.

filterWithKey :: (Key -> v -> Bool) -> KeyMap v -> KeyMap v Source #

Filter all keys/values that satisfy some predicate.

mapMaybe :: (a -> Maybe b) -> KeyMap a -> KeyMap b Source #

Map values and collect the Just results.

mapMaybeWithKey :: (Key -> v -> Maybe u) -> KeyMap v -> KeyMap u Source #

Map values and collect the Just results.

Key Type

data Key Source #

Instances

Instances details
Arbitrary Key Source #

Since: 2.0.3.0

Instance details

Defined in Data.Aeson.Key

Methods

arbitrary :: Gen Key #

shrink :: Key -> [Key] #

CoArbitrary Key Source #

Since: 2.0.3.0

Instance details

Defined in Data.Aeson.Key

Methods

coarbitrary :: Key -> Gen b -> Gen b #

Function Key Source #

Since: 2.0.3.0

Instance details

Defined in Data.Aeson.Key

Methods

function :: (Key -> b) -> Key :-> b #

FromJSON Key Source # 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Key Source # 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Key Source # 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Key Source # 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Key -> c Key #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Key #

toConstr :: Key -> Constr #

dataTypeOf :: Key -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Key) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Key) #

gmapT :: (forall b. Data b => b -> b) -> Key -> Key #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r #

gmapQ :: (forall d. Data d => d -> u) -> Key -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Key -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Key -> m Key #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key #

IsString Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

fromString :: String -> Key #

Monoid Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

mempty :: Key #

mappend :: Key -> Key -> Key #

mconcat :: [Key] -> Key #

Semigroup Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

(<>) :: Key -> Key -> Key #

sconcat :: NonEmpty Key -> Key #

stimes :: Integral b => b -> Key -> Key #

Read Key Source # 
Instance details

Defined in Data.Aeson.Key

Show Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

NFData Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

rnf :: Key -> () #

Eq Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Ord Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

compare :: Key -> Key -> Ordering #

(<) :: Key -> Key -> Bool #

(<=) :: Key -> Key -> Bool #

(>) :: Key -> Key -> Bool #

(>=) :: Key -> Key -> Bool #

max :: Key -> Key -> Key #

min :: Key -> Key -> Key #

Hashable Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

hashWithSalt :: Int -> Key -> Int #

hash :: Key -> Int #

FoldableWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

ifoldMap :: Monoid m => (Key -> a -> m) -> KeyMap a -> m #

ifoldMap' :: Monoid m => (Key -> a -> m) -> KeyMap a -> m #

ifoldr :: (Key -> a -> b -> b) -> b -> KeyMap a -> b #

ifoldl :: (Key -> b -> a -> b) -> b -> KeyMap a -> b #

ifoldr' :: (Key -> a -> b -> b) -> b -> KeyMap a -> b #

ifoldl' :: (Key -> b -> a -> b) -> b -> KeyMap a -> b #

FunctorWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

imap :: (Key -> a -> b) -> KeyMap a -> KeyMap b #

TraversableWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

itraverse :: Applicative f => (Key -> a -> f b) -> KeyMap a -> f (KeyMap b) #

SemialignWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

ialignWith :: (Key -> These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

ZipWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

izipWith :: (Key -> a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

Lift Key Source # 
Instance details

Defined in Data.Aeson.Key

Methods

lift :: Quote m => Key -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Key -> Code m Key #

FilterableWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

imapMaybe :: (Key -> a -> Maybe b) -> KeyMap a -> KeyMap b #

ifilter :: (Key -> a -> Bool) -> KeyMap a -> KeyMap a #

WitherableWithIndex Key KeyMap Source # 
Instance details

Defined in Data.Aeson.KeyMap

Methods

iwither :: Applicative f => (Key -> a -> f (Maybe b)) -> KeyMap a -> f (KeyMap b) #

iwitherM :: Monad m => (Key -> a -> m (Maybe b)) -> KeyMap a -> m (KeyMap b) #

ifilterA :: Applicative f => (Key -> a -> f Bool) -> KeyMap a -> f (KeyMap a) #