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. onBimapFirst :: Bifunctor t => t a c -> (c -> d) -> (a -> b) -> t b d

    overhang Overhang

    Hang on the "left" mapping portion of a Bifunctor.

    onBimapFirst t g f = bimap f g t
    

  2. parallelFirst :: [IO (Maybe a)] -> IO (Maybe a)

    parallel-io Control.Concurrent.ParallelIO.Global

    Run the list of computations in parallel, returning the result of the first thread that completes with (Just x), if any. Users of the global pool must call stopGlobalPool from the main thread at the end of their program. See also parallelFirst.

  3. parallelFirstE :: [IO (Maybe a)] -> IO (Maybe (Either SomeException a))

    parallel-io Control.Concurrent.ParallelIO.Global

    Run the list of computations in parallel, returning the result of the first thread that completes with (Just x), if any, and reporting any exception explicitly. Users of the global pool must call stopGlobalPool from the main thread at the end of their program. See also parallelFirstE.

  4. parallelFirst :: Pool -> [IO (Maybe a)] -> IO (Maybe a)

    parallel-io Control.Concurrent.ParallelIO.Local

    Run the list of computations in parallel, returning the result of the first thread that completes with (Just x), if any Has the following properties:

    1. Never creates more or less unblocked threads than are specified to live in the pool. NB: this count includes the thread executing parallelInterleaved. This should minimize contention and hence pre-emption, while also preventing starvation.
    2. On return all actions have either been performed or cancelled (with ThreadKilled exceptions).
    3. The above properties are true even if parallelFirst is used by an action which is itself being executed by one of the parallel combinators.
    4. If any of the IO actions throws an exception, the exception thrown by the first throwing action in the input list will be thrown by parallelFirst. Importantly, at the time the exception is thrown there is no guarantee that the other parallel actions have been completed or cancelled.
    The motivation for this choice is that waiting for the all threads to either return or throw before throwing the first exception will almost always cause GHC to show the "Blocked indefinitely in MVar operation" exception rather than the exception you care about. The reason for this behaviour can be seen by considering this machine state:
    1. The main thread has used the parallel combinators to spawn two threads, thread 1 and thread 2. It is blocked on both of them waiting for them to return either a result or an exception via an MVar.
    2. Thread 1 and thread 2 share another (empty) MVar, the "wait handle". Thread 2 is waiting on the handle, while thread 1 will eventually put into the handle.
    Consider what happens when thread 1 is buggy and throws an exception before putting into the handle. Now thread 2 is blocked indefinitely, and so the main thread is also blocked indefinetly waiting for the result of thread 2. GHC has no choice but to throw the uninformative exception. However, what we really wanted to see was the original exception thrown in thread 1! By having the main thread abandon its wait for the results of the spawned threads as soon as the first exception comes in, we give this exception a chance to actually be displayed.

  5. parallelFirstE :: Pool -> [IO (Maybe a)] -> IO (Maybe (Either SomeException a))

    parallel-io Control.Concurrent.ParallelIO.Local

    As parallelFirst, but instead of throwing exceptions that are thrown by subcomputations, they are returned in a data structure. As a result, property 4 of parallelFirst is not preserved, and therefore if your IO actions can depend on each other and may throw exceptions your program may die with "blocked indefinitely" exceptions rather than informative messages.

  6. NullsFirst :: Nulls

    relational-schemas Database.Custom.IBMDB2

    No documentation available.

  7. NullsFirst :: Nulls

    relational-schemas Database.Custom.MySQL

    No documentation available.

  8. NullsFirst :: Nulls

    relational-schemas Database.Custom.Oracle

    No documentation available.

  9. NullsFirst :: Nulls

    relational-schemas Database.Custom.PostgreSQL

    No documentation available.

  10. NullsFirst :: Nulls

    relational-schemas Database.Custom.SQLServer

    No documentation available.

Page 117 of many | Previous | Next