Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
postgresql-simple Database.PostgreSQL.Simple.TypeInfo.Static No documentation available.
-
postgresql-simple Database.PostgreSQL.Simple.TypeInfo.Static No documentation available.
setNumStripes :: Maybe Int -> PoolConfig a -> PoolConfig aresource-pool Data.Pool Set the number of stripes in the pool. If set to Nothing (the default value), the pool will create the amount of stripes equal to the number of capabilities. This ensures that threads never compete over access to the same stripe and results in a very good performance in a multi-threaded environment.
poolNumStripes :: PoolConfig a -> !Maybe Intresource-pool Data.Pool.Internal No documentation available.
setNumStripes :: Maybe Int -> PoolConfig a -> PoolConfig aresource-pool Data.Pool.Internal Set the number of stripes in the pool. If set to Nothing (the default value), the pool will create the amount of stripes equal to the number of capabilities. This ensures that threads never compete over access to the same stripe and results in a very good performance in a multi-threaded environment.
setNumStripes :: Maybe Int -> PoolConfig a -> PoolConfig aresource-pool Data.Pool.Introspection Set the number of stripes in the pool. If set to Nothing (the default value), the pool will create the amount of stripes equal to the number of capabilities. This ensures that threads never compete over access to the same stripe and results in a very good performance in a multi-threaded environment.
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
enumCodec :: Eq enum => NonEmpty (enum, Codec context enum enum) -> Codec context enum enumautodocodec Autodocodec A codec for an enum that can be written each with their own codec.
WARNING
If you don't provide a string for one of the type's constructors, the last codec in the list will be used instead.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