forever act repeats the action infinitely.
Sparks off a new thread to run the IO computation passed as the first argument, and returns the ThreadId of the newly created thread.
The new thread will be a lightweight thread; if you want to use a foreign library that uses thread-local storage, use Control.Concurrent.forkOS instead.
GHC note: the new thread inherits the masked state of the parent (see Control.Exception.mask).
The newly created thread has an exception handler that discards the exceptions BlockedIndefinitelyOnMVar, BlockedIndefinitelyOnSTM, and ThreadKilled, and passes all other exceptions to the uncaught exception handler (see setUncaughtExceptionHandler).
Like forkIO, but the child thread is created with asynchronous exceptions unmasked (see Control.Exception.mask).
Like forkIO, this sparks off a new thread to run the IO computation passed as the first argument, and returns the ThreadId of the newly created thread.
However, forkOS creates a bound thread, which is necessary if you need to call foreign (non-Haskell) libraries that make use of thread-local state, such as OpenGL (see Control.Concurrent#boundthreads).
Using forkOS instead of forkIO makes no difference at all to the scheduling behaviour of the Haskell runtime system. It is a common misconception that you need to use forkOS instead of forkIO to avoid blocking all the Haskell threads when making a foreign call; this isn't the case. To allow foreign calls to be made without blocking all the Haskell threads (with GHC), it is only necessary to use the -threaded option when linking your program, and to make sure the foreign import is not marked unsafe.
forM is mapM with its arguments flipped.
Plus, OpT, Yoneda, CoYoneda, Free, Cofree, Density, Codensity, CoT, CodensityAsk, Initialize, Finalize, Decompose, Recompose
Explicit universal quantification: uses an explicitly given test case generator.
Like forAll, but tries to shrink the argument for failing test cases.
a variant of deepseq that is useful in some circumstances:
> force x = x `deepseq` x
force x fully evaluates x, and then returns it. Note that force x only performs evaluation when the value of force x itself is demanded, so essentially it turns shallow evaluation into deep evaluation.
Simulation engine for doing simple force-based layout, e.g. for trees or graphs. See the diagrams-contrib package for usage examples.
Execute the joystick callback set by joystickCallback once (if one exists). This is done in a synchronous fashion within the current context, i.e. when forceJoystickCallback returns, the callback will have already happened.
Show more results