http-media-0.8.1.1: Processing HTTP Content-Type and Accept headers

Safe Haskell | Safe-Inferred
Language | Haskell2010

Network.HTTP.Media.Language

Description

Defines the `Language` accept header with an `Accept` instance for use in language negotiation.

Synopsis

- data Language
- toParts :: Language -> [CI ByteString]

# Documentation

data Language Source #

Suitable for HTTP language-ranges as defined in RFC4647.

Specifically:

    language-range = (1*8ALPHA *("-" 1*8alphanum)) / "*"

#### Instances

Instances details

IsString Language Source # |
Instance details Defined in Network.HTTP.Media.Language.Internal Methods fromString :: String -> Language Source #
Show Language Source # |
Instance details Defined in Network.HTTP.Media.Language.Internal Methods showsPrec :: Int -> Language -> ShowS Source # show :: Language -> String Source # showList :: [Language] -> ShowS Source #
Eq Language Source # |
Instance details Defined in Network.HTTP.Media.Language.Internal Methods (==) :: Language -> Language -> Bool Source # (/=) :: Language -> Language -> Bool Source #
Ord Language Source # |

Instance details

Defined in Network.HTTP.Media.Language.Internal

Methods

compare :: Language -> Language -> Ordering Source #

(<) :: Language -> Language -> Bool Source #

(<=) :: Language -> Language -> Bool Source #

(>) :: Language -> Language -> Bool Source #

(>=) :: Language -> Language -> Bool Source #

max :: Language -> Language -> Language Source #

min :: Language -> Language -> Language Source #

Accept Language Source # |
Instance details Defined in Network.HTTP.Media.Language.Internal Methods parseAccept :: ByteString -> Maybe Language Source # matches :: Language -> Language -> Bool Source # moreSpecificThan :: Language -> Language -> Bool Source # hasExtensionParameters :: Proxy Language -> Bool Source #
RenderHeader Language Source # |
Instance details Defined in Network.HTTP.Media.Language.Internal Methods renderHeader :: Language -> ByteString Source #

toParts :: Language -> [CI ByteString] Source #

Converts `Language` to a list of its language parts. The wildcard produces an empty list.