unicode-collation-0.1.3: Haskell implementation of the Unicode Collation Algorithm
Safe HaskellNone
LanguageHaskell2010

Text.Collate.Lang

Synopsis

Documentation

data Lang Source #

Represents a BCP 47 language tag (https://tools.ietf.org/html/bcp47).

Instances

Instances details
Eq Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

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

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

Ord Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

compare :: Lang -> Lang -> Ordering #

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

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

(>) :: Lang -> Lang -> Bool #

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

max :: Lang -> Lang -> Lang #

min :: Lang -> Lang -> Lang #

Show Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

showsPrec :: Int -> Lang -> ShowS #

show :: Lang -> String #

showList :: [Lang] -> ShowS #

IsString Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

fromString :: String -> Lang #

Binary Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

put :: Lang -> Put #

get :: Get Lang #

putList :: [Lang] -> Put #

Lift Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

lift :: Lang -> Q Exp #

liftTyped :: Lang -> Q (TExp Lang) #

parseLang :: Text -> Either String Lang Source #

Parse a BCP 47 language tag as a Lang.

renderLang :: Lang -> Text Source #

Render a Lang in BCP 47 form.

lookupLang :: Lang -> [(Lang, a)] -> Maybe (Lang, a) Source #

Find best match for a Lang in an association list.