Hoogle Search

Within LTS Haskell 24.32 (ghc-9.10.3)

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

  1. TypeNumber :: Type

    hslua-core HsLua.Core.Types

    type of Lua numbers. See Number

  2. stripeNumber :: Resource a -> !Int

    resource-pool Data.Pool.Introspection

    No documentation available.

  3. boundedEnumCodec :: (Eq enum, Enum enum, Bounded enum) => (enum -> Text) -> JSONCodec enum

    autodocodec Autodocodec

    A codec for a Bounded Enum that uses the provided function to have the values correspond to literal Text values.

    Example usage

    >>> data Fruit = Apple | Orange deriving (Show, Eq, Enum, Bounded)
    
    >>> :{
    let c = boundedEnumCodec $ \case
    Apple -> "foo"
    Orange -> "bar"
    :}
    
    >>> toJSONVia c Apple
    String "foo"
    
    >>> JSON.parseMaybe (parseJSONVia c) (String "bar") :: Maybe Fruit
    Just Orange
    

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

  5. boundedEnumCodec :: (Eq enum, Enum enum, Bounded enum) => (enum -> Text) -> JSONCodec enum

    autodocodec Autodocodec.Codec

    A codec for a Bounded Enum that uses the provided function to have the values correspond to literal Text values.

    Example usage

    >>> data Fruit = Apple | Orange deriving (Show, Eq, Enum, Bounded)
    
    >>> :{
    let c = boundedEnumCodec $ \case
    Apple -> "foo"
    Orange -> "bar"
    :}
    
    >>> toJSONVia c Apple
    String "foo"
    
    >>> JSON.parseMaybe (parseJSONVia c) (String "bar") :: Maybe Fruit
    Just Orange
    

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

    autodocodec Autodocodec.Codec

    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
    

  7. toEnum :: Enum a => Int -> a

    rio RIO.Partial

    Convert from an Int.

  8. fromEnum :: Enum a => a -> Int

    rio RIO.Prelude

    Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int.

  9. linenumber :: XmlSource s => Integer -> s -> LString

    xml Text.XML.Light.Lexer

    No documentation available.

  10. fromEnum :: Enum a => a -> Int

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

Page 106 of many | Previous | Next