Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. onceFork :: IO a -> IO (IO a)

    extra Extra

    Like once, but immediately starts running the computation on a background thread.

    \(x :: IO Int) -> join (onceFork x) == x
    \(x :: IO Int) -> (do a <- onceFork x; a; a) == x
    

  2. bifor1_ :: (Bifoldable1 t, Apply f) => t a c -> (a -> f b) -> (c -> f d) -> f ()

    semigroupoids Data.Semigroup.Bifoldable

    No documentation available.

  3. plusForeignPtr :: ForeignPtr a -> Int -> ForeignPtr b

    base-compat Foreign.ForeignPtr.Compat

    Advances the given address by the given offset in bytes. The new ForeignPtr shares the finalizer of the original, equivalent from a finalization standpoint to just creating another reference to the original. That is, the finalizer will not be called before the new ForeignPtr is unreachable, nor will it be called an additional time due to this call, and the finalizer will be called with the same address that it would have had this call not happened, *not* the new address.

  4. addForeignPtrFinalizer :: FinalizerPtr a -> ForeignPtr a -> IO ()

    base-compat Foreign.ForeignPtr.Safe.Compat

    This function adds a finalizer to the given foreign object. The finalizer will run before all other finalizers for the same object which have already been registered.

  5. addForeignPtrFinalizerEnv :: FinalizerEnvPtr env a -> Ptr env -> ForeignPtr a -> IO ()

    base-compat Foreign.ForeignPtr.Safe.Compat

    Like addForeignPtrFinalizer but the finalizer is passed an additional environment parameter.

  6. castForeignPtr :: ForeignPtr a -> ForeignPtr b

    base-compat Foreign.ForeignPtr.Safe.Compat

    This function casts a ForeignPtr parameterised by one type into another type.

  7. finalizeForeignPtr :: ForeignPtr a -> IO ()

    base-compat Foreign.ForeignPtr.Safe.Compat

    Causes the finalizers associated with a foreign pointer to be run immediately. The foreign pointer must not be used again after this function is called. If the foreign pointer does not support finalizers, this is a no-op.

  8. 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.

  9. 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.

  10. 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.

Page 427 of many | Previous | Next