Hoogle Search
Within LTS Haskell 24.41 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
dateTimeToUnix :: (HasCallStack, MonadIO m) => DateTime -> m Int64gi-glib GI.GLib.Structs.DateTime Gives the Unix time corresponding to datetime, rounding down to the nearest second. Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the time zone associated with datetime. Since: 2.26
dateTimeToUnixUsec :: (HasCallStack, MonadIO m) => DateTime -> m Int64gi-glib GI.GLib.Structs.DateTime Gives the Unix time corresponding to datetime, in microseconds. Unix time is the number of microseconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the time zone associated with datetime. Since: 2.80
iOChannelUnixGetFd :: (HasCallStack, MonadIO m) => IOChannel -> m Int32gi-glib GI.GLib.Structs.IOChannel Returns the file descriptor of the IOChannel. On Windows this function returns the file descriptor or socket of the IOChannel.
iOChannelUnixNew :: (HasCallStack, MonadIO m) => Int32 -> m IOChannelgi-glib GI.GLib.Structs.IOChannel Creates a new IOChannel given a file descriptor. On UNIX systems this works for plain files, pipes, and sockets. The returned IOChannel has a reference count of 1. The default encoding for IOChannel is UTF-8. If your application is reading output from a command using via pipe, you may need to set the encoding to the encoding of the current locale (see getCharset) with the iOChannelSetEncoding function. By default, the fd passed will not be closed when the final reference to the IOChannel data structure is dropped. If you want to read raw binary data without interpretation, then call the iOChannelSetEncoding function with Nothing for the encoding argument. This function is available in GLib on Windows, too, but you should avoid using it on Windows. The domain of file descriptors and sockets overlap. There is no way for GLib to know which one you mean in case the argument you pass to this function happens to be both a valid file descriptor and socket. If that happens a warning is issued, and GLib assumes that it is the file descriptor you mean.
optionContextGetStrictPosix :: (HasCallStack, MonadIO m) => OptionContext -> m Boolgi-glib GI.GLib.Structs.OptionContext Returns whether strict POSIX code is enabled. See optionContextSetStrictPosix for more information. Since: 2.44
optionContextSetStrictPosix :: (HasCallStack, MonadIO m) => OptionContext -> Bool -> m ()gi-glib GI.GLib.Structs.OptionContext Sets strict POSIX mode. By default, this mode is disabled. In strict POSIX mode, the first non-argument parameter encountered (eg: filename) terminates argument processing. Remaining arguments are treated as non-options and are not attempted to be parsed. If strict POSIX mode is disabled then parsing is done in the GNU way where option arguments can be freely mixed with non-options. As an example, consider "ls foo -l". With GNU style parsing, this will list "foo" in long mode. In strict POSIX style, this will list the files named "foo" and "-l". It may be useful to force strict POSIX mode when creating "verb style" command line tools. For example, the "gsettings" command line tool supports the global option "--schemadir" as well as many subcommands ("get", "set", etc.) which each have their own set of arguments. Using strict POSIX mode will allow parsing the global options up to the verb name while leaving the remaining options to be parsed by the relevant subcommand (which can be determined by examining the verb name, which should be present in argv[1] after parsing). Since: 2.44
sourceAddUnixFd :: (HasCallStack, MonadIO m) => Source -> Int32 -> [IOCondition] -> m (Ptr ())gi-glib GI.GLib.Structs.Source Monitors fd for the IO events in events. The tag returned by this function can be used to remove or modify the monitoring of the fd using sourceRemoveUnixFd or sourceModifyUnixFd. It is not necessary to remove the fd before destroying the source; it will be cleaned up automatically. This API is only intended to be used by implementations of Source. Do not call this API on a Source that you did not create. As the name suggests, this function is not available on Windows. Since: 2.36
sourceModifyUnixFd :: (HasCallStack, MonadIO m) => Source -> Ptr () -> [IOCondition] -> m ()gi-glib GI.GLib.Structs.Source Updates the event mask to watch for the fd identified by tag. tag is the tag returned from sourceAddUnixFd. If you want to remove a fd, don't set its event mask to zero. Instead, call sourceRemoveUnixFd. This API is only intended to be used by implementations of Source. Do not call this API on a Source that you did not create. As the name suggests, this function is not available on Windows. Since: 2.36
sourceQueryUnixFd :: (HasCallStack, MonadIO m) => Source -> Ptr () -> m [IOCondition]gi-glib GI.GLib.Structs.Source Queries the events reported for the fd corresponding to tag on source during the last poll. The return value of this function is only defined when the function is called from the check or dispatch functions for source. This API is only intended to be used by implementations of Source. Do not call this API on a Source that you did not create. As the name suggests, this function is not available on Windows. Since: 2.36
sourceRemoveUnixFd :: (HasCallStack, MonadIO m) => Source -> Ptr () -> m ()gi-glib GI.GLib.Structs.Source Reverses the effect of a previous call to sourceAddUnixFd. You only need to call this if you want to remove an fd from being watched while keeping the same source around. In the normal case you will just want to destroy the source. This API is only intended to be used by implementations of Source. Do not call this API on a Source that you did not create. As the name suggests, this function is not available on Windows. Since: 2.36