Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

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

    http-media Network.HTTP.Media

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

    getHeader >>= maybe render406Error encodeResourceWith . mapAcceptBytes
    [ ("abc", abc)
    , ("xyz", xyz)
    ]
    

  2. 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)
    ]
    

  3. 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)
    ]
    

  4. 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)
    ]
    

  5. 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)
    ]
    

  6. 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)
    ]
    

  7. 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)
    ]
    

  8. 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)
    ]
    

  9. 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)
    ]
    

  10. 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)
    ]
    

Page 113 of many | Previous | Next