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. parseBoundedEnumOfI :: (Bounded a, Enum a) => (a -> Text) -> Text -> Either Text a

    http-api-data Web.Internal.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.

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

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

    http-api-data Web.Internal.HttpApiData

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

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

    http-api-data Web.Internal.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
    

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

    http-api-data Web.Internal.HttpApiData

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

  6. sRGBBounded :: (Ord b, Floating b, Integral a, Bounded a) => a -> a -> a -> Colour b

    colour Data.Colour.SRGB

    Construct a colour from an sRGB specification. Input components are expected to be in the range [0..maxBound].

  7. toSRGBBounded :: (RealFrac b, Floating b, Integral a, Bounded a) => Colour b -> RGB a

    colour Data.Colour.SRGB

    Return the approximate sRGB colour components in the range [0..maxBound]. Out of range values are clamped.

  8. data Unbounded a

    postgresql-simple Database.PostgreSQL.Simple.Time

    No documentation available.

  9. unboundedToBuilder :: (a -> Builder) -> Unbounded a -> Builder

    postgresql-simple Database.PostgreSQL.Simple.Time

    No documentation available.

  10. shownBoundedEnumCodec :: (Show enum, Eq enum, Enum enum, Bounded enum) => JSONCodec enum

    autodocodec Autodocodec

    A codec for a Bounded Enum that uses its Show instance to have the values correspond to literal Text values.

    Example usage

    >>> data Fruit = Apple | Orange deriving (Show, Eq, Enum, Bounded)
    
    >>> let c = shownBoundedEnumCodec
    
    >>> toJSONVia c Apple
    String "Apple"
    
    >>> JSON.parseMaybe (parseJSONVia c) (String "Orange") :: Maybe Fruit
    Just Orange
    

Page 23 of many | Previous | Next