Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

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

  1. newForeignPtr :: MonadIO m => FinalizerPtr a -> Ptr a -> m (ForeignPtr a)

    unliftio UnliftIO.Foreign

    Lifted newForeignPtr.

  2. newForeignPtrEnv :: MonadIO m => FinalizerEnvPtr env a -> Ptr env -> Ptr a -> m (ForeignPtr a)

    unliftio UnliftIO.Foreign

    Lifted newForeignPtrEnv.

  3. newForeignPtr_ :: MonadIO m => Ptr a -> m (ForeignPtr a)

    unliftio UnliftIO.Foreign

    Lifted newForeignPtr_.

  4. newGHCForeignPtr :: MonadUnliftIO m => Ptr a -> m () -> m (ForeignPtr a)

    unliftio UnliftIO.Foreign

    Unlifted newForeignPtr.

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

    unliftio UnliftIO.Foreign

    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.

  6. touchForeignPtr :: MonadIO m => ForeignPtr a -> m ()

    unliftio UnliftIO.Foreign

    Lifted touchForeignPtr.

  7. unsafeForeignPtrToPtr :: ForeignPtr a -> Ptr a

    unliftio UnliftIO.Foreign

    This function extracts the pointer component of a foreign pointer. This is a potentially dangerous operations, as if the argument to unsafeForeignPtrToPtr is the last usage occurrence of the given foreign pointer, then its finalizer(s) will be run, which potentially invalidates the plain pointer just obtained. Hence, touchForeignPtr must be used wherever it has to be guaranteed that the pointer lives on - i.e., has another usage occurrence. To avoid subtle coding errors, hand written marshalling code should preferably use withForeignPtr rather than combinations of unsafeForeignPtrToPtr and touchForeignPtr. However, the latter routines are occasionally preferred in tool generated marshalling code.

  8. withForeignPtr :: MonadUnliftIO m => ForeignPtr a -> (Ptr a -> m b) -> m b

    unliftio UnliftIO.Foreign

    Unlifted withForeignPtr.

  9. hWaitForInput :: MonadIO m => Handle -> Int -> m Bool

    unliftio UnliftIO.IO

    Lifted version of hWaitForInput

  10. pooledForConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)

    unliftio UnliftIO.Internals.Async

    Similar to pooledForConcurrentlyN but with number of threads set from getNumCapabilities. Usually this is useful for CPU bound tasks.

Page 424 of many | Previous | Next