Hoogle Search

Within LTS Haskell 24.58 (ghc-9.10.3)

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

  1. docHead :: Doc -> (Maybe Char, Doc)

    ghc GHC.Utils.Ppr

    Get the first character of a document. We also return a new document, equivalent to the original one but faster to render. Use it to avoid work duplication.

  2. sHeader :: Scheme -> PprColour

    ghc GHC.Utils.Ppr.Colour

    No documentation available.

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

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

    http-api-data Web.HttpApiData

    Parse HTTP header value.

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

    http-api-data Web.HttpApiData

    Parse HTTP header value in a Maybe.

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

  6. 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==")
    

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

    http-api-data Web.HttpApiData

    Convert to HTTP header value.

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

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

    http-api-data Web.Internal.HttpApiData

    Parse HTTP header value.

  10. 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"
    

Page 158 of many | Previous | Next