all -package:foldl package:base-prelude

Determines whether all elements of the structure satisfy the predicate.
Boolean monoid under conjunction (&&).
>>> getAll (All True <> mempty <> All False)
False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8]))
False
When invoked inside mask, this function allows a masked asynchronous exception to be raised, if one exists. It is equivalent to performing an interruptible operation (see #interruptible), but does not involve any actual blocking. When called outside mask, or inside uninterruptibleMask, this function has no effect.
This thread has exceeded its allocation limit. See setAllocationCounter and enableAllocationLimit.
currently in a foreign call
This is thrown when the user calls error. The first String is the argument given to error, second String is the location.
Thrown when the program attempts to call atomically, from the stm package, inside another call to atomically.
Perform a series of STM actions atomically. Using atomically inside an unsafePerformIO or unsafeInterleaveIO subverts some of guarantees that STM provides. It makes it possible to run a transaction inside of another transaction, depending on when the thunk is evaluated. If a nested transaction is attempted, an exception is thrown by the runtime. It is possible to safely use atomically inside unsafePerformIO or unsafeInterleaveIO, but the typechecker does not rule out programs that may attempt nested transactions, meaning that the programmer must take special care to prevent these. However, there are functions for creating transactional variables that can always be safely called in unsafePerformIO. See: newTVarIO, newTChanIO, newBroadcastTChanIO, newTQueueIO, newTBQueueIO, and newTMVarIO. Using unsafePerformIO inside of atomically is also dangerous but for different reasons. See unsafeIOToSTM for more on this.
Disable allocation limit processing for the current thread.
Enables the allocation counter to be treated as a limit for the current thread. When the allocation limit is enabled, if the allocation counter counts down below zero, the thread will be sent the AllocationLimitExceeded asynchronous exception. When this happens, the counter is reinitialised (by default to 100K, but tunable with the +RTS -xq option) so that it can handle the exception and perform any necessary clean up. If it exhausts this additional allowance, another AllocationLimitExceeded exception is sent, and so forth. Like other asynchronous exceptions, the AllocationLimitExceeded exception is deferred while the thread is inside mask or an exception handler in catch. Note that memory allocation is unrelated to live memory, also known as heap residency. A thread can allocate a large amount of memory and retain anything between none and all of it. It is better to think of the allocation limit as a limit on CPU time, rather than a limit on memory. Compared to using timeouts, allocation limits don't count time spent blocked or in foreign calls.
A specialised variant of bracket with just a computation to run afterward.
Fork a thread and call the supplied function when the thread is about to terminate, with an exception or a returned value. The function is called with asynchronous exceptions masked.
forkFinally action and_then =
mask $ \restore ->
forkIO $ try (restore action) >>= and_then
This function is useful for informing the parent when a child terminates, for example.
Return the current value of the allocation counter for the current thread.
Allocate some memory and return a ForeignPtr to it. The memory will be released automatically when the ForeignPtr is discarded. mallocForeignPtr is equivalent to
do { p <- malloc; newForeignPtr finalizerFree p }
although it may be implemented differently internally: you may not assume that the memory returned by mallocForeignPtr has been allocated with malloc. GHC notes: mallocForeignPtr has a heavily optimised implementation in GHC. It uses pinned memory in the garbage collected heap, so the ForeignPtr does not require a finalizer to free the memory. Use of mallocForeignPtr and associated functions is strongly recommended in preference to newForeignPtr with a finalizer.
This function is similar to mallocArray, but yields a memory area that has a finalizer attached that releases the memory area. As with mallocForeignPtr, it is not guaranteed that the block of memory was allocated by malloc.
This function is similar to mallocArray0, but yields a memory area that has a finalizer attached that releases the memory area. As with mallocForeignPtr, it is not guaranteed that the block of memory was allocated by malloc.
This function is similar to mallocForeignPtr, except that the size of the memory required is given explicitly as a number of bytes.
Every thread has an allocation counter that tracks how much memory has been allocated by the thread. The counter is initialized to zero, and setAllocationCounter sets the current value. The allocation counter counts *down*, so in the absence of a call to setAllocationCounter its value is the negation of the number of bytes of memory allocated by the thread. There are two things that you can do with this counter: Allocation accounting is accurate only to about 4Kbytes.