Hoogle Search
Within LTS Haskell 24.67 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
settingsInstallShutdownHandler :: Settings -> IO () -> IO ()warp Network.Wai.Handler.Warp.Internal An action to install a handler (e.g. Unix signal handler) to close a listen socket. The first argument is an action to close the listen socket. Default: no action Since 3.0.1
forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadIdbase-compat Control.Concurrent.Compat 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.groupAllWith :: Ord b => (a -> b) -> [a] -> [NonEmpty a]base-compat Data.List.NonEmpty.Compat groupAllWith operates like groupWith, but sorts the list first so that each equivalence class has, at most, one list in the output
groupAllWith1 :: Ord b => (a -> b) -> NonEmpty a -> NonEmpty (NonEmpty a)base-compat Data.List.NonEmpty.Compat groupAllWith1 is to groupWith1 as groupAllWith is to groupWith
-
base-compat Data.Monoid.Compat No documentation available.
-
base-compat Data.Semigroup.Compat No documentation available.
mallocForeignPtr :: Storable a => IO (ForeignPtr a)base-compat Foreign.ForeignPtr.Safe.Compat 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.mallocForeignPtrArray :: Storable a => Int -> IO (ForeignPtr a)base-compat Foreign.ForeignPtr.Safe.Compat 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.
mallocForeignPtrArray0 :: Storable a => Int -> IO (ForeignPtr a)base-compat Foreign.ForeignPtr.Safe.Compat 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.
mallocForeignPtrBytes :: Int -> IO (ForeignPtr a)base-compat Foreign.ForeignPtr.Safe.Compat This function is similar to mallocForeignPtr, except that the size of the memory required is given explicitly as a number of bytes.