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. enumerate :: forall (f :: Type -> Type) . (Enumerable a, Typeable f, Sized f) => Shared f a

    size-based Control.Enumerable

    No documentation available.

  2. enumerate :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Bounded a, Enumerable a) => t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerate = enumerateFrom minBound
    
    Enumerate a Bounded type from its minBound to maxBound

  3. enumerate :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Bounded a, Enumerable a) => t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerate = enumerateFrom minBound
    
    Enumerate a Bounded type from its minBound to maxBound

  4. enumerateFrom :: forall t (m :: Type -> Type) . (Enumerable a, IsStream t, Monad m) => a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateFrom from generates a stream starting with the element from, enumerating up to maxBound when the type is Bounded or generating an infinite stream when the type is not Bounded.

    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFrom (0 :: Int)
    [0,1,2,3]
    
    For Fractional types, enumeration is numerically stable. However, no overflow or underflow checks are performed.
    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFrom 1.1
    [1.1,2.1,3.1,4.1]
    

  5. enumerateFrom :: forall t (m :: Type -> Type) . (Enumerable a, IsStream t, Monad m) => a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateFrom from generates a stream starting with the element from, enumerating up to maxBound when the type is Bounded or generating an infinite stream when the type is not Bounded.

    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFrom (0 :: Int)
    [0,1,2,3]
    
    For Fractional types, enumeration is numerically stable. However, no overflow or underflow checks are performed.
    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFrom 1.1
    [1.1,2.1,3.1,4.1]
    

  6. enumerateFromBounded :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Enumerable a, Bounded a) => a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateFromBounded = enumerateFromTo from maxBound
    
    enumerateFrom for Bounded Enum types.

  7. enumerateFromFractional :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Fractional a) => a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    Numerically stable enumeration from a Fractional number in steps of size 1. enumerateFromFractional from generates a stream whose first element is from and the successive elements are in increments of 1. No overflow or underflow checks are performed. This is the equivalent to enumFrom for Fractional types. For example:

    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFromFractional 1.1
    [1.1,2.1,3.1,4.1]
    

  8. enumerateFromIntegral :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Integral a, Bounded a) => a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    Enumerate an Integral type. enumerateFromIntegral from generates a stream whose first element is from and the successive elements are in increments of 1. The stream is bounded by the size of the Integral type.

    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFromIntegral (0 :: Int)
    [0,1,2,3]
    

  9. enumerateFromStepIntegral :: forall t (m :: Type -> Type) a . (IsStream t, Monad m, Integral a) => a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateFromStepIntegral from step generates an infinite stream whose first element is from and the successive elements are in increments of step. CAUTION: This function is not safe for finite integral types. It does not check for overflow, underflow or bounds.

    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFromStepIntegral 0 2
    [0,2,4,6]
    
    >>> Stream.toList $ Stream.take 3 $ Stream.enumerateFromStepIntegral 0 (-2)
    [0,-2,-4]
    

  10. enumerateFromThen :: forall t (m :: Type -> Type) . (Enumerable a, IsStream t, Monad m) => a -> a -> t m a

    streamly Streamly.Internal.Data.Stream.IsStream

    enumerateFromThen from then generates a stream whose first element is from, the second element is then and the successive elements are in increments of then - from. Enumeration can occur downwards or upwards depending on whether then comes before or after from. For Bounded types the stream ends when maxBound is reached, for unbounded types it keeps enumerating infinitely.

    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFromThen 0 2
    [0,2,4,6]
    
    >>> Stream.toList $ Stream.take 4 $ Stream.enumerateFromThen 0 (-2)
    [0,-2,-4,-6]
    

Page 81 of many | Previous | Next