unicode-collation-0.1.3.6: Haskell implementation of the Unicode Collation Algorithm
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Collate.Lang

Synopsis

Documentation

data Lang Source #

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

Instances

Instances details
IsString Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

fromString :: String -> Lang #

Show Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

showsPrec :: Int -> Lang -> ShowS #

show :: Lang -> String #

showList :: [Lang] -> ShowS #

Binary Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

put :: Lang -> Put #

get :: Get Lang #

putList :: [Lang] -> Put #

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 #

Lift Lang Source # 
Instance details

Defined in Text.Collate.Lang

Methods

lift :: Quote m => Lang -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Lang -> Code m 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.