bcp47-0.1.0.0: Language tags as specified by BCP 47

Safe HaskellNone
LanguageHaskell2010

Data.BCP47.Trie.Internal

Synopsis

Documentation

newtype Trie a Source #

A trie mapping BCP47 tags to values

Constructors

Trie 

Fields

Instances
Functor Trie Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

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

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

Foldable Trie Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

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

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

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

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

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

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

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

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

toList :: Trie a -> [a] #

null :: Trie a -> Bool #

length :: Trie a -> Int #

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

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

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

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

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

Traversable Trie Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

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

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

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

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

Eq a => Eq (Trie a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

(==) :: Trie a -> Trie a -> Bool #

(/=) :: Trie a -> Trie a -> Bool #

Ord a => Ord (Trie a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

compare :: Trie a -> Trie a -> Ordering #

(<) :: Trie a -> Trie a -> Bool #

(<=) :: Trie a -> Trie a -> Bool #

(>) :: Trie a -> Trie a -> Bool #

(>=) :: Trie a -> Trie a -> Bool #

max :: Trie a -> Trie a -> Trie a #

min :: Trie a -> Trie a -> Trie a #

Show a => Show (Trie a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

showsPrec :: Int -> Trie a -> ShowS #

show :: Trie a -> String #

showList :: [Trie a] -> ShowS #

Semigroup a => Semigroup (Trie a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

(<>) :: Trie a -> Trie a -> Trie a #

sconcat :: NonEmpty (Trie a) -> Trie a #

stimes :: Integral b => b -> Trie a -> Trie a #

Semigroup a => Monoid (Trie a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

mempty :: Trie a #

mappend :: Trie a -> Trie a -> Trie a #

mconcat :: [Trie a] -> Trie a #

Arbitrary a => Arbitrary (Trie a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

arbitrary :: Gen (Trie a) #

shrink :: Trie a -> [Trie a] #

fromList :: [(BCP47, a)] -> Trie a Source #

Construct a Trie from a list of tag/value pairs.

singleton :: BCP47 -> a -> Trie a Source #

Construct a Trie from a single tag/value pair.

union :: Trie a -> Trie a -> Trie a Source #

A left-biased union of two Trie structures. The left value is prefered when duplicate tags are found.

unionWith :: (a -> a -> a) -> Trie a -> Trie a -> Trie a Source #

union with a combining function.

unionUsing :: (Maybe a -> Maybe a -> Maybe a) -> Trie a -> Trie a -> Trie a Source #

data Trie2 a Source #

Constructors

Trie2 (Maybe a) (Map Subtags (Trie2 a)) 
Instances
Functor Trie2 Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

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

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

Foldable Trie2 Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

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

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

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

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

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

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

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

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

toList :: Trie2 a -> [a] #

null :: Trie2 a -> Bool #

length :: Trie2 a -> Int #

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

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

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

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

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

Traversable Trie2 Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

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

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

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

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

Eq a => Eq (Trie2 a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

(==) :: Trie2 a -> Trie2 a -> Bool #

(/=) :: Trie2 a -> Trie2 a -> Bool #

Ord a => Ord (Trie2 a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

compare :: Trie2 a -> Trie2 a -> Ordering #

(<) :: Trie2 a -> Trie2 a -> Bool #

(<=) :: Trie2 a -> Trie2 a -> Bool #

(>) :: Trie2 a -> Trie2 a -> Bool #

(>=) :: Trie2 a -> Trie2 a -> Bool #

max :: Trie2 a -> Trie2 a -> Trie2 a #

min :: Trie2 a -> Trie2 a -> Trie2 a #

Show a => Show (Trie2 a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

showsPrec :: Int -> Trie2 a -> ShowS #

show :: Trie2 a -> String #

showList :: [Trie2 a] -> ShowS #

Semigroup a => Semigroup (Trie2 a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

(<>) :: Trie2 a -> Trie2 a -> Trie2 a #

sconcat :: NonEmpty (Trie2 a) -> Trie2 a #

stimes :: Integral b => b -> Trie2 a -> Trie2 a #

Monoid a => Monoid (Trie2 a) Source # 
Instance details

Defined in Data.BCP47.Trie.Internal

Methods

mempty :: Trie2 a #

mappend :: Trie2 a -> Trie2 a -> Trie2 a #

mconcat :: [Trie2 a] -> Trie2 a #

data Subtags Source #

Instances
Eq Subtags Source # 
Instance details

Defined in Data.BCP47.Internal.Subtags

Methods

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

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

Ord Subtags Source # 
Instance details

Defined in Data.BCP47.Internal.Subtags

Show Subtags Source # 
Instance details

Defined in Data.BCP47.Internal.Subtags

Generic Subtags Source # 
Instance details

Defined in Data.BCP47.Internal.Subtags

Associated Types

type Rep Subtags :: Type -> Type #

Methods

from :: Subtags -> Rep Subtags x #

to :: Rep Subtags x -> Subtags #

Arbitrary Subtags Source # 
Instance details

Defined in Data.BCP47.Internal.Subtags

type Rep Subtags Source # 
Instance details

Defined in Data.BCP47.Internal.Subtags

union2 :: Trie2 a -> Trie2 a -> Trie2 a Source #

union2Using :: (Maybe a -> Maybe a -> Maybe a) -> Trie2 a -> Trie2 a -> Trie2 a Source #