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.
unsafeUnboundedIntegerCodec :: JSONCodec Integerautodocodec Autodocodec This is an unsafe (unchecked) version of integerCodec.
unsafeUnboundedNaturalCodec :: JSONCodec Naturalautodocodec Autodocodec This is an unsafe (unchecked) version of naturalCodec.
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
unsafeUnboundedIntegerCodec :: JSONCodec Integerautodocodec Autodocodec.Codec This is an unsafe (unchecked) version of integerCodec.
unsafeUnboundedNaturalCodec :: JSONCodec Naturalautodocodec Autodocodec.Codec This is an unsafe (unchecked) version of naturalCodec.
arcLengthBounded :: HasArcLength p => N p -> p -> Interval (N p)diagrams-lib Diagrams.Parametric arcLengthBounded eps x approximates the arc length of x. The true arc length is guaranteed to lie within the interval returned, which will have a size of at most eps.
getArcLengthBounded :: (Num n, Ord n) => n -> ArcLength n -> Interval ndiagrams-lib Diagrams.Segment Given a specified tolerance, project out the cached arc length if it is accurate enough; otherwise call the generic arc length function with the given tolerance.
integerToBounded :: (Integral a, Bounded a) => Integer -> Maybe arelude Relude.Numeric Transforms an integer number to a bounded integral. It returns Nothing for integers outside the bound of the return type.
>>> integerToBounded @Int 42 Just 42
>>> integerToBounded @Int8 1024 Nothing
>>> integerToBounded @Int (toInteger (minBound :: Int)) Just (-9223372036854775808) >>> integerToBounded @Int $ (toInteger (minBound :: Int)) - 1 Nothing
>>> integerToBounded @Int (toInteger (maxBound :: Int)) Just 9223372036854775807 >>> integerToBounded @Int $ (toInteger (maxBound :: Int)) + 1 Nothing
If you want to convert Int or Word to a bounded type, take a look at toIntegralSized function instead.simpleUnboundedQDisc :: IO (QDisc t)network-transport-tcp Network.Transport.TCP A very simple QDisc backed by an unbounded channel.
-
singletons-base Data.Singletons.Base.Enum No documentation available.