Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. boundedEnumFrom :: (Enum a, Bounded a) => a -> [a]

    base GHC.Enum

    No documentation available.

  2. boundedEnumFromThen :: (Enum a, Bounded a) => a -> a -> [a]

    base GHC.Enum

    No documentation available.

  3. boundedPrim :: Int -> (a -> Ptr Word8 -> IO (Ptr Word8)) -> BoundedPrim a

    bytestring Data.ByteString.Builder.Prim.Internal

    No documentation available.

  4. boundedWrite :: Int -> Poke -> Write

    blaze-builder Blaze.ByteString.Builder.Internal.Write

    boundedWrite size write creates a bounded write from a write that does not write more than size bytes.

  5. boundedClassKey :: Unique

    ghc GHC.Builtin.Names

    No documentation available.

  6. boundedClassName :: Name

    ghc GHC.Builtin.Names

    No documentation available.

  7. boundedEnumLaws :: (Enum a, Bounded a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws

    quickcheck-classes Test.QuickCheck.Classes

    Tests the same properties as enumLaws except that it requires the type to have a Bounded instance. These tests avoid taking the successor of the maximum element or the predecessor of the minimal element.

  8. boundedBounds :: Bounded a => Bounds a

    autodocodec Autodocodec

    No documentation available.

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

  10. boundedIntegralCodec :: (Integral i, Bounded i) => JSONCodec i

    autodocodec Autodocodec

    A codec for bounded integers like Int, Int8, and Word. This codec will not have a name, and it will use the boundedNumberBounds to add number bounds.

    >>> let c = boundedIntegralCodec :: JSONCodec Int8
    
    >>> toJSONVia c 5
    Number 5.0
    
    >>> JSON.parseMaybe (parseJSONVia c) (Number 100)
    Just 100
    
    >>> JSON.parseMaybe (parseJSONVia c) (Number 200)
    Nothing
    

Page 11 of many | Previous | Next