Hoogle Search

Within LTS Haskell 24.69 (ghc-9.10.3)

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

  1. unixOpenPipe :: (HasCallStack, MonadIO m) => [Int32] -> Int32 -> m ()

    gi-glib GI.GLib.Functions

    Similar to the UNIX pipe() call, but on modern systems like Linux uses the pipe2() system call, which atomically creates a pipe with the configured flags. As of GLib 2.78, the supported flags are O_CLOEXEC/FD_CLOEXEC (see below) and O_NONBLOCK. Prior to GLib 2.78, only FD_CLOEXEC was supported — if you wanted to configure O_NONBLOCK then that had to be done separately with fcntl(). Since GLib 2.80, the constants UnixPipeEndRead and UnixPipeEndWrite can be used as mnemonic indexes in fds. It is a programmer error to call this function with unsupported flags, and a critical warning will be raised. As of GLib 2.78, it is preferred to pass O_CLOEXEC in, rather than FD_CLOEXEC, as that matches the underlying pipe() API more closely. Prior to 2.78, only FD_CLOEXEC was supported. Support for FD_CLOEXEC may be deprecated and removed in future. Since: 2.30

  2. unixSetFdNonblocking :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m ()

    gi-glib GI.GLib.Functions

    Control the non-blocking state of the given file descriptor, according to nonblock. On most systems this uses O_NONBLOCK, but on some older ones may use O_NDELAY. Since: 2.30

  3. unixSignalAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> SourceFunc -> m Word32

    gi-glib GI.GLib.Functions

    A convenience function for unixSignalSourceNew, which attaches to the default MainContext. You can remove the watch using sourceRemove. Since: 2.30

  4. unixSignalSourceNew :: (HasCallStack, MonadIO m) => Int32 -> m Source

    gi-glib GI.GLib.Functions

    Create a Source that will be dispatched upon delivery of the UNIX signal signum. In GLib versions before 2.36, only SIGHUP, SIGINT, SIGTERM can be monitored. In GLib 2.36, SIGUSR1 and SIGUSR2 were added. In GLib 2.54, SIGWINCH was added. Note that unlike the UNIX default, all sources which have created a watch will be dispatched, regardless of which underlying thread invoked unixSignalSourceNew. For example, an effective use of this function is to handle SIGTERM cleanly; flushing any outstanding files, and then calling mainLoopQuit. It is not safe to do any of this from a regular UNIX signal handler; such a handler may be invoked while malloc() or another library function is running, causing reentrancy issues if the handler attempts to use those functions. None of the GLib/GObject API is safe against this kind of reentrancy. The interaction of this source when combined with native UNIX functions like sigprocmask() is not defined. The source will not initially be associated with any MainContext and must be added to one with sourceAttach before it will be executed. Since: 2.30

  5. clearCompletionPrefix :: MonadIO m => Completion -> m ()

    gi-glib GI.GLib.Structs.Completion

    Set the value of the “prefix” field to Nothing. When overloading is enabled, this is equivalent to

    clear #prefix
    

  6. getCompletionPrefix :: MonadIO m => Completion -> m (Maybe Text)

    gi-glib GI.GLib.Structs.Completion

    Get the value of the “prefix” field. When overloading is enabled, this is equivalent to

    get completion #prefix
    

  7. setCompletionPrefix :: MonadIO m => Completion -> CString -> m ()

    gi-glib GI.GLib.Structs.Completion

    Set the value of the “prefix” field. When overloading is enabled, this is equivalent to

    set completion [ #prefix := value ]
    

  8. dateTimeNewFromUnixLocal :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe DateTime)

    gi-glib GI.GLib.Structs.DateTime

    Creates a DateTime corresponding to the given Unix time t in the local time zone. Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset. This call can fail (returning Nothing) if t represents a time outside of the supported range of DateTime. You should release the return value by calling dateTimeUnref when you are done with it. Since: 2.26

  9. dateTimeNewFromUnixLocalUsec :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe DateTime)

    gi-glib GI.GLib.Structs.DateTime

    Creates a DateTime corresponding to the given Unix time t in the local time zone. Unix time is the number of microseconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset. This call can fail (returning NULL) if t represents a time outside of the supported range of DateTime. You should release the return value by calling dateTimeUnref when you are done with it. Since: 2.80

  10. dateTimeNewFromUnixUtc :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe DateTime)

    gi-glib GI.GLib.Structs.DateTime

    Creates a DateTime corresponding to the given Unix time t in UTC. Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC. This call can fail (returning Nothing) if t represents a time outside of the supported range of DateTime. You should release the return value by calling dateTimeUnref when you are done with it. Since: 2.26

Page 119 of many | Previous | Next