Hoogle Search

Within LTS Haskell 24.41 (ghc-9.10.3)

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

  1. (|$|) :: Semigroup t => (a -> b) -> a -> PerfT IO t b

    perf Perf.Types

    lift a pure, unnamed function application to PerfT

  2. (<$$>) :: Doc -> Doc -> Doc

    prettyprinter-compat-ansi-wl-pprint Text.PrettyPrint.ANSI.Leijen

    No documentation available.

  3. (<$>) :: Doc -> Doc -> Doc

    prettyprinter-compat-ansi-wl-pprint Text.PrettyPrint.ANSI.Leijen

    No documentation available.

  4. (.:$) :: SafeJSON a => Object -> Key -> Parser a

    safe-json Data.SafeJSON

    Similar to .:, but uses safeFromJSON instead of parseJSON to parse the value in the given field.

  5. (.:$!) :: SafeJSON a => Object -> Key -> Parser (Maybe a)

    safe-json Data.SafeJSON

    Similar to .:!, but uses safeFromJSON instead of parseJSON to maybe parse the value in the given field.

  6. (.:$?) :: SafeJSON a => Object -> Key -> Parser (Maybe a)

    safe-json Data.SafeJSON

    Similar to .:?, but uses safeFromJSON instead of parseJSON to maybe parse the value in the given field.

  7. (.=$) :: (SafeJSON a, KeyValue e kv) => Key -> a -> kv

    safe-json Data.SafeJSON

    Similarly to .=, but uses safeToJSON instead of toJSON to convert the value in that key-value pair.

  8. (<<$>>) :: (a -> IO b) -> Maybe a -> IO (Maybe b)

    status-notifier-item StatusNotifier.Util

    No documentation available.

  9. (|$) :: forall t (m :: Type -> Type) a b . (IsStream t, MonadAsync m) => (t m a -> t m b) -> t m a -> t m b

    streamly Streamly.Internal.Data.Stream.IsStream

    Parallel transform application operator; applies a stream transformation function t m a -> t m b to a stream t m a concurrently; the input stream is evaluated asynchronously in an independent thread yielding elements to a buffer and the transformation function runs in another thread consuming the input from the buffer. |$ is just like regular function application operator $ except that it is concurrent. If you read the signature as (t m a -> t m b) -> (t m a -> t m b) you can look at it as a transformation that converts a transform function to a buffered concurrent transform function. The following code prints a value every second even though each stage adds a 1 second delay.

    >>> :{
    Stream.drain $
    Stream.mapM (\x -> threadDelay 1000000 >> print x)
    |$ Stream.replicateM 3 (threadDelay 1000000 >> return 1)
    :}
    1
    1
    1
    
    Concurrent Since: 0.3.0 (Streamly)

  10. (|$.) :: (IsStream t, MonadAsync m) => (t m a -> m b) -> t m a -> m b

    streamly Streamly.Internal.Data.Stream.IsStream

    Parallel fold application operator; applies a fold function t m a -> m b to a stream t m a concurrently; The the input stream is evaluated asynchronously in an independent thread yielding elements to a buffer and the folding action runs in another thread consuming the input from the buffer. If you read the signature as (t m a -> m b) -> (t m a -> m b) you can look at it as a transformation that converts a fold function to a buffered concurrent fold function. The . at the end of the operator is a mnemonic for termination of the stream. In the example below, each stage introduces a delay of 1 sec but output is printed every second because both stages are concurrent.

    >>> import Control.Concurrent (threadDelay)
    
    >>> import Streamly.Prelude ((|$.))
    
    >>> :{
    Stream.foldlM' (\_ a -> threadDelay 1000000 >> print a) (return ())
    |$. Stream.replicateM 3 (threadDelay 1000000 >> return 1)
    :}
    1
    1
    1
    
    Concurrent Since: 0.3.0 (Streamly)

Page 76 of many | Previous | Next