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. gen_Bounded_binds :: SrcSpan -> DerivInstTys -> (LHsBinds GhcPs, Bag AuxBindSpec)

    ghc GHC.Tc.Deriv.Generate

    No documentation available.

  2. parseBoundedEnumOf :: (Bounded a, Enum a) => (a -> Text) -> Text -> Either Text a

    http-api-data Web.HttpApiData

    Parse values based on a precalculated mapping of their Text representation.

    >>> parseBoundedEnumOf toUrlPiece "true" :: Either Text Bool
    Right True
    
    For case insensitive parser see parseBoundedEnumOfI.

  3. parseBoundedEnumOfI :: (Bounded a, Enum a) => (a -> Text) -> Text -> Either Text a

    http-api-data Web.HttpApiData

    Case insensitive. Parse values case insensitively based on a precalculated mapping of their Text representations.

    >>> parseBoundedEnumOfI toUrlPiece "FALSE" :: Either Text Bool
    Right False
    
    For case sensitive parser see parseBoundedEnumOf.

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

  5. parseBoundedQueryParam :: (ToHttpApiData a, Bounded a, Enum a) => Text -> Either Text a

    http-api-data Web.HttpApiData

    Case insensitive. Parse values case insensitively based on ToHttpApiData instance. Uses toQueryParam to get possible values.

  6. parseBoundedTextData :: (Show a, Bounded a, Enum a) => Text -> Either Text a

    http-api-data Web.HttpApiData

    Case insensitive. Parse values case insensitively based on Show instance.

    >>> parseBoundedTextData "true" :: Either Text Bool
    Right True
    
    >>> parseBoundedTextData "FALSE" :: Either Text Bool
    Right False
    
    This can be used as a default implementation for enumeration types:
    >>> data MyData = Foo | Bar | Baz deriving (Show, Bounded, Enum)
    
    >>> instance FromHttpApiData MyData where parseUrlPiece = parseBoundedTextData
    
    >>> parseUrlPiece "foo" :: Either Text MyData
    Right Foo
    

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

    http-api-data Web.HttpApiData

    Case insensitive. Parse values case insensitively based on ToHttpApiData instance. Uses toUrlPiece to get possible values.

  8. lookupBoundedEnumOf :: (Bounded a, Enum a, Eq b) => (a -> b) -> b -> Maybe a

    http-api-data Web.Internal.HttpApiData

    Lookup values based on a precalculated mapping of their representations.

  9. parseBounded :: (Bounded a, Integral a) => Reader Integer -> Text -> Either Text a

    http-api-data Web.Internal.HttpApiData

    Run Reader to parse bounded integral value with bounds checking.

    >>> parseBounded decimal "256" :: Either Text Word8
    Left "out of bounds: `256' (should be between 0 and 255)"
    

  10. parseBoundedEnumOf :: (Bounded a, Enum a) => (a -> Text) -> Text -> Either Text a

    http-api-data Web.Internal.HttpApiData

    Parse values based on a precalculated mapping of their Text representation.

    >>> parseBoundedEnumOf toUrlPiece "true" :: Either Text Bool
    Right True
    
    For case insensitive parser see parseBoundedEnumOfI.

Page 22 of many | Previous | Next