Copyright | (C) 2015-2016 Oleg Grenrus |
---|---|
License | BSD3 |
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- merge :: (forall a. (a -> a -> a) -> ValueF a -> ValueF a -> ValueF a) -> Value -> Value -> Value
- mergeA :: Functor f => (forall a. (a -> a -> f a) -> ValueF a -> ValueF a -> f (ValueF a)) -> Value -> Value -> f Value
- lodashMerge :: Value -> Value -> Value
- data ValueF a
- type ObjectF a = HashMap Text a
- type ArrayF a = Vector a
Documentation
merge :: (forall a. (a -> a -> a) -> ValueF a -> ValueF a -> ValueF a) -> Value -> Value -> Value Source #
mergeA :: Functor f => (forall a. (a -> a -> f a) -> ValueF a -> ValueF a -> f (ValueF a)) -> Value -> Value -> f Value Source #
Generic merge, in arbitrary context.
Since: aeson-extra-0.3.1.0
lodashMerge :: Value -> Value -> Value Source #
Example of using merge
. see https://lodash.com/docs#merge:
Note: not tested against JavaScript lodash, so may disagree in the results.
Since: 0.4.1.0
An algebra of Value
Since: aeson-extra-0.3.1.0
Instances
Functor ValueF Source # | |
Foldable ValueF Source # | |
Defined in Data.Aeson.Extra.Recursive fold :: Monoid m => ValueF m -> m # foldMap :: Monoid m => (a -> m) -> ValueF a -> m # foldr :: (a -> b -> b) -> b -> ValueF a -> b # foldr' :: (a -> b -> b) -> b -> ValueF a -> b # foldl :: (b -> a -> b) -> b -> ValueF a -> b # foldl' :: (b -> a -> b) -> b -> ValueF a -> b # foldr1 :: (a -> a -> a) -> ValueF a -> a # foldl1 :: (a -> a -> a) -> ValueF a -> a # elem :: Eq a => a -> ValueF a -> Bool # maximum :: Ord a => ValueF a -> a # minimum :: Ord a => ValueF a -> a # | |
Traversable ValueF Source # | |
Eq a => Eq (ValueF a) Source # | |
Data a => Data (ValueF a) Source # | |
Defined in Data.Aeson.Extra.Recursive gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ValueF a -> c (ValueF a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ValueF a) # toConstr :: ValueF a -> Constr # dataTypeOf :: ValueF a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ValueF a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ValueF a)) # gmapT :: (forall b. Data b => b -> b) -> ValueF a -> ValueF a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ValueF a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ValueF a -> r # gmapQ :: (forall d. Data d => d -> u) -> ValueF a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ValueF a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ValueF a -> m (ValueF a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ValueF a -> m (ValueF a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ValueF a -> m (ValueF a) # | |
Read a => Read (ValueF a) Source # | |
Show a => Show (ValueF a) Source # | |