Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. mapAcceptCharset :: [(Charset, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    A specialisation of mapAccept that only takes Charset as its input, to avoid ambiguous-type errors when using string literal overloading.

    getHeader >>= maybe render406Error renderResource . mapAcceptCharset
    [ ("utf-8",    inUtf8)
    , ("us-ascii", inAscii)
    ]
    

  2. mapAcceptEncoding :: [(Encoding, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    A specialisation of mapAccept that only takes Encoding as its input, to avoid ambiguous-type errors when using string literal overloading.

    getHeader >>= maybe render406Error renderResource . mapAcceptEncoding
    [ ("compress", compress)
    , ("identity", id)
    ]
    

  3. mapAcceptLanguage :: [(Language, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    A specialisation of mapAccept that only takes Language as its input, to avoid ambiguous-type errors when using string literal overloading.

    getHeader >>= maybe render406Error renderResource . mapAcceptLanguage
    [ ("en-gb", inBritishEnglish)
    , ("fr",    inFrench)
    ]
    

  4. mapAcceptMedia :: [(MediaType, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    A specialisation of mapAccept that only takes MediaType as its input, to avoid ambiguous-type errors when using string literal overloading.

    getHeader >>= maybe render406Error renderResource . mapAcceptMedia
    [ ("text/html",        asHtml)
    , ("application/json", asJson)
    ]
    

  5. mapContent :: Accept a => [(a, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    The equivalent of matchContent above, except the resulting choice is mapped to another value.

    getContentType >>= maybe send415Error readRequestBodyWith . mapContent
    [ ("application" // "json", parseJson)
    , ("text" // "plain",       parseText)
    ]
    

  6. mapContentCharset :: [(Charset, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    A specialisation of mapContent that only takes Charset as its input, to avoid ambiguous-type errors when using string literal overloading.

    getContentCharset >>=
    maybe send415Error readRequestBodyWith . mapContentCharset
    [ ("utf-8",    parseUtf8)
    , ("us-ascii", parseAscii)
    ]
    

  7. mapContentEncoding :: [(Encoding, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    A specialisation of mapContent that only takes Encoding as its input, to avoid ambiguous-type errors when using string literal overloading.

    getContentEncoding >>=
    maybe send415Error readRequestBodyWith . mapContentEncoding
    [ ("compress", decompress)
    , ("identity", id)
    ]
    

  8. mapContentLanguage :: [(Language, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    A specialisation of mapContent that only takes Language as its input, to avoid ambiguous-type errors when using string literal overloading.

    getContentLanguage >>=
    maybe send415Error readRequestBodyWith . mapContentLanguage
    [ ("en-gb", parseBritishEnglish)
    , ("fr",    parseFrench)
    ]
    

  9. mapContentMedia :: [(MediaType, b)] -> ByteString -> Maybe b

    http-media Network.HTTP.Media

    A specialisation of mapContent that only takes MediaType as its input, to avoid ambiguous-type errors when using string literal overloading.

    getContentType >>=
    maybe send415Error readRequestBodyWith . mapContentMedia
    [ ("application/json", parseJson)
    , ("text/plain",       parseText)
    ]
    

  10. mapQuality :: Accept a => [(a, b)] -> [Quality a] -> Maybe b

    http-media Network.HTTP.Media

    The equivalent of matchQuality above, except the resulting choice is mapped to another value. Convenient for specifying how to translate the resource into each of its available formats.

    parseQuality header >>= maybe render406Error renderResource . mapQuality
    [ ("text" // "html",        asHtml)
    , ("application" // "json", asJson)
    ]
    

Page 113 of many | Previous | Next