persistent-documentation-0.1.0.4: Documentation DSL for persistent entities
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.StrMap

Synopsis

Documentation

newtype StrMap k a Source #

A StrMap is sort of like a HashMap, but sorts the keys on a Text representation. Additionally, it has more useful Semigroup and Monoid instances that (<>) the values when present.

Since: 0.1.0.0

Constructors

StrMap (Map (AsStr k) a) 

Instances

Instances details
Eq a => Eq (StrMap k a) Source # 
Instance details

Defined in Data.StrMap

Methods

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

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

Ord a => Ord (StrMap k a) Source # 
Instance details

Defined in Data.StrMap

Methods

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

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

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

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

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

max :: StrMap k a -> StrMap k a -> StrMap k a #

min :: StrMap k a -> StrMap k a -> StrMap k a #

(Show k, Show a) => Show (StrMap k a) Source # 
Instance details

Defined in Data.StrMap

Methods

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

show :: StrMap k a -> String #

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

Semigroup a => Semigroup (StrMap k a) Source # 
Instance details

Defined in Data.StrMap

Methods

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

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

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

Semigroup a => Monoid (StrMap k a) Source # 
Instance details

Defined in Data.StrMap

Methods

mempty :: StrMap k a #

mappend :: StrMap k a -> StrMap k a -> StrMap k a #

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

insert :: Show k => k -> a -> StrMap k a -> StrMap k a Source #

Insert a value into a StrMap.

Since: 0.1.0.0

lookup :: Show k => k -> StrMap k a -> Maybe a Source #

Lookup a value in the StrMap.

Since: 0.1.0.0

data AsStr k Source #

A datatype for representing the keys of entries in a StrMap. Contains the original value as well as the Textual representation of that value.

The Eq and Ord instances only use the Text value.

Since: 0.1.0.0

Constructors

AsStr 

Fields

Instances

Instances details
Eq (AsStr k) Source # 
Instance details

Defined in Data.StrMap

Methods

(==) :: AsStr k -> AsStr k -> Bool #

(/=) :: AsStr k -> AsStr k -> Bool #

Ord (AsStr k) Source # 
Instance details

Defined in Data.StrMap

Methods

compare :: AsStr k -> AsStr k -> Ordering #

(<) :: AsStr k -> AsStr k -> Bool #

(<=) :: AsStr k -> AsStr k -> Bool #

(>) :: AsStr k -> AsStr k -> Bool #

(>=) :: AsStr k -> AsStr k -> Bool #

max :: AsStr k -> AsStr k -> AsStr k #

min :: AsStr k -> AsStr k -> AsStr k #

Show k => Show (AsStr k) Source # 
Instance details

Defined in Data.StrMap

Methods

showsPrec :: Int -> AsStr k -> ShowS #

show :: AsStr k -> String #

showList :: [AsStr k] -> ShowS #

asStr :: Show k => k -> AsStr k Source #

Pack a value into an AsStr of that value.

Since: 0.1.0.0