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.
-
hslua-core HsLua.Core.Types type of Lua numbers. See Number
stripeNumber :: Resource a -> !Intresource-pool Data.Pool.Introspection No documentation available.
boundedEnumCodec :: (Eq enum, Enum enum, Bounded enum) => (enum -> Text) -> JSONCodec enumautodocodec 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
shownBoundedEnumCodec :: (Show enum, Eq enum, Enum enum, Bounded enum) => JSONCodec enumautodocodec 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
boundedEnumCodec :: (Eq enum, Enum enum, Bounded enum) => (enum -> Text) -> JSONCodec enumautodocodec 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
shownBoundedEnumCodec :: (Show enum, Eq enum, Enum enum, Bounded enum) => JSONCodec enumautodocodec 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
-
rio RIO.Partial Convert from an Int.
fromEnum :: Enum a => a -> Intrio 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.
linenumber :: XmlSource s => Integer -> s -> LStringxml Text.XML.Light.Lexer No documentation available.
fromEnum :: Enum a => a -> IntCabal-syntax Distribution.Compat.Prelude No documentation available.