reflex-0.6: Higher-order Functional Reactive Programming

Safe HaskellNone
LanguageHaskell98

Data.AppendMap

Contents

Description

Map with a better Monoid instance

Map has mappend = union, which is left-biased. AppendMap has mappend = unionWith mappend instead.

Synopsis

Documentation

type AppendMap = MonoidalMap Source #

Deprecated: Use MonoidalMap instead

pattern AppendMap :: Map k v -> MonoidalMap k v Source #

Deprecated: Use MonoidalMap instead

_unAppendMap :: MonoidalMap k v -> Map k v Source #

Deprecated: Use getMonoidalMap instead

nonEmptyDelete :: Ord k => k -> MonoidalMap k a -> Maybe (MonoidalMap k a) Source #

Deletes a key, returning Nothing if the result is empty.

mapMaybeNoNull :: (a -> Maybe b) -> MonoidalMap token a -> Maybe (MonoidalMap token b) Source #

showTree :: forall k a. (Show k, Show a) => MonoidalMap k a -> String Source #

showTreeWith :: forall k a. (k -> a -> String) -> Bool -> Bool -> MonoidalMap k a -> String Source #

delete :: Ord k => k -> MonoidalMap k a -> MonoidalMap k a #

O(log n). Delete a key and its value from the map. When the key is not a member of the map, the original map is returned.

newtype MonoidalMap k a #

A Map with monoidal accumulation

Constructors

MonoidalMap 

Fields

Instances
FunctorWithIndex k (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

imap :: (k -> a -> b) -> MonoidalMap k a -> MonoidalMap k b #

imapped :: (Indexable k p, Settable f) => p a (f b) -> MonoidalMap k a -> f (MonoidalMap k b) #

FoldableWithIndex k (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

ifoldMap :: Monoid m => (k -> a -> m) -> MonoidalMap k a -> m #

ifolded :: (Indexable k p, Contravariant f, Applicative f) => p a (f a) -> MonoidalMap k a -> f (MonoidalMap k a) #

ifoldr :: (k -> a -> b -> b) -> b -> MonoidalMap k a -> b #

ifoldl :: (k -> b -> a -> b) -> b -> MonoidalMap k a -> b #

ifoldr' :: (k -> a -> b -> b) -> b -> MonoidalMap k a -> b #

ifoldl' :: (k -> b -> a -> b) -> b -> MonoidalMap k a -> b #

TraversableWithIndex k (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

itraverse :: Applicative f => (k -> a -> f b) -> MonoidalMap k a -> f (MonoidalMap k b) #

itraversed :: (Indexable k p, Applicative f) => p a (f b) -> MonoidalMap k a -> f (MonoidalMap k b) #

Ord k => TraverseMin k (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

traverseMin :: (Indexable k p, Applicative f) => p v (f v) -> MonoidalMap k v -> f (MonoidalMap k v) #

Ord k => TraverseMax k (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

traverseMax :: (Indexable k p, Applicative f) => p v (f v) -> MonoidalMap k v -> f (MonoidalMap k v) #

Functor (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

fmap :: (a -> b) -> MonoidalMap k a -> MonoidalMap k b #

(<$) :: a -> MonoidalMap k b -> MonoidalMap k a #

Foldable (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

fold :: Monoid m => MonoidalMap k m -> m #

foldMap :: Monoid m => (a -> m) -> MonoidalMap k a -> m #

foldr :: (a -> b -> b) -> b -> MonoidalMap k a -> b #

foldr' :: (a -> b -> b) -> b -> MonoidalMap k a -> b #

foldl :: (b -> a -> b) -> b -> MonoidalMap k a -> b #

foldl' :: (b -> a -> b) -> b -> MonoidalMap k a -> b #

foldr1 :: (a -> a -> a) -> MonoidalMap k a -> a #

foldl1 :: (a -> a -> a) -> MonoidalMap k a -> a #

toList :: MonoidalMap k a -> [a] #

null :: MonoidalMap k a -> Bool #

length :: MonoidalMap k a -> Int #

elem :: Eq a => a -> MonoidalMap k a -> Bool #

maximum :: Ord a => MonoidalMap k a -> a #

minimum :: Ord a => MonoidalMap k a -> a #

sum :: Num a => MonoidalMap k a -> a #

product :: Num a => MonoidalMap k a -> a #

Traversable (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

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

sequenceA :: Applicative f => MonoidalMap k (f a) -> f (MonoidalMap k a) #

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

sequence :: Monad m => MonoidalMap k (m a) -> m (MonoidalMap k a) #

ToJSONKey k => ToJSON1 (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> MonoidalMap k a -> Value #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [MonoidalMap k a] -> Value #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> MonoidalMap k a -> Encoding #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [MonoidalMap k a] -> Encoding #

(FromJSONKey k, Ord k) => FromJSON1 (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (MonoidalMap k a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [MonoidalMap k a] #

Ord k => Eq1 (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

liftEq :: (a -> b -> Bool) -> MonoidalMap k a -> MonoidalMap k b -> Bool #

Ord k => Ord1 (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

liftCompare :: (a -> b -> Ordering) -> MonoidalMap k a -> MonoidalMap k b -> Ordering #

Show k => Show1 (MonoidalMap k) 
Instance details

Defined in Data.Map.Monoidal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> MonoidalMap k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [MonoidalMap k a] -> ShowS #

Filterable (MonoidalMap k) # 
Instance details

Defined in Data.AppendMap

Methods

mapMaybe :: (a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k b #

catMaybes :: MonoidalMap k (Maybe a) -> MonoidalMap k a #

filter :: (a -> Bool) -> MonoidalMap k a -> MonoidalMap k a #

(Ord k, Semigroup a) => IsList (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Associated Types

type Item (MonoidalMap k a) :: * #

Methods

fromList :: [Item (MonoidalMap k a)] -> MonoidalMap k a #

fromListN :: Int -> [Item (MonoidalMap k a)] -> MonoidalMap k a #

toList :: MonoidalMap k a -> [Item (MonoidalMap k a)] #

(Eq k, Eq a) => Eq (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

(==) :: MonoidalMap k a -> MonoidalMap k a -> Bool #

(/=) :: MonoidalMap k a -> MonoidalMap k a -> Bool #

(Data k, Data a, Ord k) => Data (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MonoidalMap k a -> c (MonoidalMap k a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MonoidalMap k a) #

toConstr :: MonoidalMap k a -> Constr #

dataTypeOf :: MonoidalMap k a -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> MonoidalMap k a -> MonoidalMap k a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MonoidalMap k a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MonoidalMap k a -> r #

gmapQ :: (forall d. Data d => d -> u) -> MonoidalMap k a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MonoidalMap k a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MonoidalMap k a -> m (MonoidalMap k a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MonoidalMap k a -> m (MonoidalMap k a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MonoidalMap k a -> m (MonoidalMap k a) #

(Ord k, Ord a) => Ord (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

compare :: MonoidalMap k a -> MonoidalMap k a -> Ordering #

(<) :: MonoidalMap k a -> MonoidalMap k a -> Bool #

(<=) :: MonoidalMap k a -> MonoidalMap k a -> Bool #

(>) :: MonoidalMap k a -> MonoidalMap k a -> Bool #

(>=) :: MonoidalMap k a -> MonoidalMap k a -> Bool #

max :: MonoidalMap k a -> MonoidalMap k a -> MonoidalMap k a #

min :: MonoidalMap k a -> MonoidalMap k a -> MonoidalMap k a #

(Ord k, Read k, Read a) => Read (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

(Show k, Show a) => Show (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

showsPrec :: Int -> MonoidalMap k a -> ShowS #

show :: MonoidalMap k a -> String #

showList :: [MonoidalMap k a] -> ShowS #

(Ord k, Semigroup a) => Semigroup (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

(<>) :: MonoidalMap k a -> MonoidalMap k a -> MonoidalMap k a #

sconcat :: NonEmpty (MonoidalMap k a) -> MonoidalMap k a #

stimes :: Integral b => b -> MonoidalMap k a -> MonoidalMap k a #

(Ord k, Semigroup a) => Monoid (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

mempty :: MonoidalMap k a #

mappend :: MonoidalMap k a -> MonoidalMap k a -> MonoidalMap k a #

mconcat :: [MonoidalMap k a] -> MonoidalMap k a #

(ToJSON a, ToJSONKey k) => ToJSON (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

(FromJSONKey k, Ord k, FromJSON a) => FromJSON (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Default (MonoidalMap k a) # 
Instance details

Defined in Data.AppendMap

Methods

def :: MonoidalMap k a #

(NFData k, NFData a) => NFData (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

rnf :: MonoidalMap k a -> () #

Ord k => Ixed (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

ix :: Index (MonoidalMap k a) -> Traversal' (MonoidalMap k a) (IxValue (MonoidalMap k a)) #

Ord k => At (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

at :: Index (MonoidalMap k a) -> Lens' (MonoidalMap k a) (Maybe (IxValue (MonoidalMap k a))) #

Wrapped (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Associated Types

type Unwrapped (MonoidalMap k a) :: * #

AsEmpty (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

_Empty :: Prism' (MonoidalMap k a) () #

(Ord k, Additive q) => Additive (MonoidalMap k q) Source # 
Instance details

Defined in Reflex.Patch

(Ord k, Group q) => Group (MonoidalMap k q) Source # 
Instance details

Defined in Reflex.Patch

(Ord k, Query v) => Query (MonoidalMap k v) Source # 
Instance details

Defined in Reflex.Query.Class

Associated Types

type QueryResult (MonoidalMap k v) :: * Source #

Newtype (MonoidalMap k a) (Map k a) 
Instance details

Defined in Data.Map.Monoidal

Methods

pack :: Map k a -> MonoidalMap k a #

unpack :: MonoidalMap k a -> Map k a #

Each (MonoidalMap k a) (MonoidalMap k b) a b 
Instance details

Defined in Data.Map.Monoidal

Methods

each :: Traversal (MonoidalMap k a) (MonoidalMap k b) a b #

type Item (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

type Item (MonoidalMap k a) = (k, a)
type Index (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

type Index (MonoidalMap k a) = k
type IxValue (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

type IxValue (MonoidalMap k a) = a
type Unwrapped (MonoidalMap k a) 
Instance details

Defined in Data.Map.Monoidal

type Unwrapped (MonoidalMap k a) = Map k a
type QueryResult (MonoidalMap k v) Source # 
Instance details

Defined in Reflex.Query.Class

Orphan instances

Filterable (MonoidalMap k) Source # 
Instance details

Methods

mapMaybe :: (a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k b #

catMaybes :: MonoidalMap k (Maybe a) -> MonoidalMap k a #

filter :: (a -> Bool) -> MonoidalMap k a -> MonoidalMap k a #

Default (MonoidalMap k a) Source # 
Instance details

Methods

def :: MonoidalMap k a #