Bool -> IO () -> IO ()

addFinalizer :: key -> IO () -> IO ()
base System.Mem.Weak
A specialised version of mkWeakPtr, object returned is simply thrown away (however the finalizer will be remembered by the garbage collector, and will still be run when the key becomes unreachable). Note: adding a finalizer to a Foreign.ForeignPtr.ForeignPtr using addFinalizer won't work as well as using the specialised version Foreign.ForeignPtr.addForeignPtrFinalizer because the latter version adds the finalizer to the primitive ForeignPtr# object inside, whereas the generic addFinalizer will add the finalizer to the box. Optimisations tend to remove the box, which may cause the finalizer to run earlier than you intended. The same motivation justifies the existence of Control.Concurrent.MVar.addMVarFinalizer and Data.IORef.mkWeakIORef (the non-uniformity is accidental).
unless :: Monad m => Bool -> m () -> m ()
base Control.Monad
The reverse of when.
when :: Monad m => Bool -> m () -> m ()
base Control.Monad
Conditional execution of monadic expressions. For example, > when debug (putStr "Debugging\n") will output the string Debugging\n if the Boolean value debug is True, and otherwise do nothing.
addForeignPtrFinalizer :: ForeignPtr a -> IO () -> IO ()
base Foreign.Concurrent
This function adds a finalizer to the given ForeignPtr. The finalizer will run after the last reference to the foreign object is dropped, but before all previously registered finalizers for the same object.
addMVarFinalizer :: MVar a -> IO () -> IO ()
base Control.Concurrent.MVar
Add a finalizer to an MVar (GHC only). See Foreign.ForeignPtr and System.Mem.Weak for more about finalizers.
finally :: IO a -> IO b -> IO a
base Control.Exception.Base, base Control.Exception, base Control.OldException
A specialised variant of bracket with just a computation to run afterward.
onException :: IO a -> IO b -> IO a
base Control.Exception.Base, base Control.Exception
Like finally, but only performs the final action if there was an exception raised by the computation.
setEcho :: IODevice a => a -> Bool -> IO ()
base GHC.IO.Device
setRaw :: IODevice a => a -> Bool -> IO ()
base GHC.IO.Device
assert :: Bool -> a -> a
base Control.Exception.Base, base Control.Exception, base Control.OldException
If the first argument evaluates to True, then the result is the second argument. Otherwise an AssertionFailed exception is raised, containing a String with the source file and line number of the call to assert. Assertions can normally be turned on or off with a compiler flag (for GHC, assertions are normally on unless optimisation is turned on with -O or the -fignore-asserts option is given). When assertions are turned off, the first argument to assert is ignored, and the second argument is returned as the result.
breakpointCond :: Bool -> a -> a
base GHC.Exts
closeOnEnd :: Stream x => x -> Bool -> IO ()
HTTP Network.Stream
bracket_ :: IO a -> IO b -> IO c -> IO c
base Control.Exception.Base, base Control.Exception, base Control.OldException
A variant of bracket computation is not required.
(*>) :: Applicative f => f a -> f b -> f b
base Control.Applicative
insert :: HashTable key val -> key -> val -> IO ()
base Data.HashTable
Inserts a key/value mapping into the hash table. Note that insert doesn't remove the old entry from the table - the behaviour is like an association list, the most-recently-inserted mapping for a key in the table. The reason for this is to keep insert as efficient as possible. If you need to update a mapping, then we provide update.
ext0 :: (Typeable a, Typeable b) => c a -> c b -> c a
syb Data.Generics.Aliases
Flexible type extension
(<*) :: Applicative f => f a -> f b -> f a
base Control.Applicative
seq :: a -> b -> b
base Prelude
Evaluates its first argument to head normal form, and then returns its second argument as the result.
par :: a -> b -> b
base GHC.Conc.Sync, base GHC.Conc
par :: a -> b -> b
parallel Control.Parallel
Indicates that it may be beneficial to evaluate the first argument in parallel with the second. Returns the value of the second argument. a `par` b is exactly equivalent semantically to b. par is generally used when the value of a is likely to be required later, but not immediately. Also it is a good idea to ensure that a is not a trivial computation, otherwise the cost of spawning it in parallel overshadows the benefits obtained by running it in parallel. Note that actual parallelism is only supported by certain implementations (GHC with the -threaded option, and GPH, for now). On other implementations, par a b = b.

Show more results