Hoogle Search

Within LTS Haskell 24.69 (ghc-9.10.3)

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

  1. sHeader :: Scheme -> PprColour

    ghc GHC.Utils.Ppr.Colour

    No documentation available.

  2. parseBoundedHeader :: (ToHttpApiData a, Bounded a, Enum a) => ByteString -> Either Text a

    http-api-data Web.HttpApiData

    Parse values based on ToHttpApiData instance. Uses toHeader to get possible values.

  3. parseHeader :: FromHttpApiData a => ByteString -> Either Text a

    http-api-data Web.HttpApiData

    Parse HTTP header value.

  4. parseHeaderMaybe :: FromHttpApiData a => ByteString -> Maybe a

    http-api-data Web.HttpApiData

    Parse HTTP header value in a Maybe.

    >>> parseHeaderMaybe "hello" :: Maybe Text
    Just "hello"
    

  5. parseHeaderWithPrefix :: FromHttpApiData a => ByteString -> ByteString -> Either Text a

    http-api-data Web.HttpApiData

    Parse given bytestring then parse the rest of the input using parseHeader.

    data BasicAuthToken = BasicAuthToken Text deriving (Show)
    
    instance FromHttpApiData BasicAuthToken where
    parseHeader h     = BasicAuthToken <$> parseHeaderWithPrefix "Basic " h
    parseQueryParam p = BasicAuthToken <$> parseQueryParam p
    
    >>> parseHeader "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" :: Either Text BasicAuthToken
    Right (BasicAuthToken "QWxhZGRpbjpvcGVuIHNlc2FtZQ==")
    

  6. toHeader :: ToHttpApiData a => a -> ByteString

    http-api-data Web.HttpApiData

    Convert to HTTP header value.

  7. parseBoundedHeader :: (ToHttpApiData a, Bounded a, Enum a) => ByteString -> Either Text a

    http-api-data Web.Internal.HttpApiData

    Parse values based on ToHttpApiData instance. Uses toHeader to get possible values.

  8. parseHeader :: FromHttpApiData a => ByteString -> Either Text a

    http-api-data Web.Internal.HttpApiData

    Parse HTTP header value.

  9. parseHeaderMaybe :: FromHttpApiData a => ByteString -> Maybe a

    http-api-data Web.Internal.HttpApiData

    Parse HTTP header value in a Maybe.

    >>> parseHeaderMaybe "hello" :: Maybe Text
    Just "hello"
    

  10. parseHeaderWithPrefix :: FromHttpApiData a => ByteString -> ByteString -> Either Text a

    http-api-data Web.Internal.HttpApiData

    Parse given bytestring then parse the rest of the input using parseHeader.

    data BasicAuthToken = BasicAuthToken Text deriving (Show)
    
    instance FromHttpApiData BasicAuthToken where
    parseHeader h     = BasicAuthToken <$> parseHeaderWithPrefix "Basic " h
    parseQueryParam p = BasicAuthToken <$> parseQueryParam p
    
    >>> parseHeader "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" :: Either Text BasicAuthToken
    Right (BasicAuthToken "QWxhZGRpbjpvcGVuIHNlc2FtZQ==")
    

Page 158 of many | Previous | Next