x;      !"#$%&'()*+,-./0123456789:(c) 2013-2015 Leon P SmithBSD3leon@melding-monads.comNone $+=C6DAdditional configuration options for creating an Inotify descriptor.The size of the buffer used to receive events from the kernel. This is an artifact of this binding, not inotify itself.yIdentifies the watch for which this event occurs. It is one of the watch descriptors returned by a previous call to 0 or 1.3contains bits that describe the event that occurredA unique integer that connects related events. Currently this is only used for rename events, and allows the resulting pair of  in_MOVE_FROM and  in_MOVE_TO. events to be connected by the application.The name field is only present when an event is returned for a file inside a watched directory; it identifies the file pathname relative to the watched directory.@The proper Haskell interpretation of this seems to be to use  and then unpack it to a ;( or decode it using the text package. A newtype wrapper for the  field of the . An empty type used to denote  K values that can be sent to the kernel when setting up an inotify watch. An empty type used to denote  L values that can be received from the kernel in an inotify event message. Represents the mask, which in inotify terminology is a union of bit flags representing various event types and watch options.iThe type parameter is a phantom type that tracks whether a particular flag is used to set up a watch ( ") or when receiving an event. ( N) Polymorphic parameters mean that the flag may appear in either context. represents a watch descriptor, which is used to identify events and to cancel the watch. Every watch descriptor is associated with a particular inotify descriptor and can only be used with that descriptor; incorrect behavior will otherwise result. represents an inotify descriptor, to which watches can be added and events can be read from. Internally, it also includes a buffer of events that have been delivered to the application from the kernel but haven't been processed.3Compute the intersection (bitwise and) of two masks)Do the two masks have any bits in common?BAre the bits of the first mask a subset of the bits of the second?>File was accessed. Includes the files of a watched directory.Metadata changed, e.g., permissions, timestamps, extended attributes, link count (since Linux 2.6.25), UID, GID, etc. Includes the files of a watched directory.ZFile was closed. This is not a separate flag, but a convenience definition such that  <  = SFile opened for writing was closed. Includes the files of a watched directory.VFile not opened for writing was closed. Includes the files of a watched directory.,File/directory created in watched directory.2File/directory deleted from watched directory.*Watched file/directory was itself deleted.AFile was modified. Includes the files of a watched directory.(Watched file/directory was itself moved.YFile was moved. This is not a separate flag, but a convenience definition such that  <   = !. RFile moved out of watched directory. Includes the files of a watched directory.!PFile moved into watched directory. Includes the files of a watched directory."?File was opened. Includes the files of a watched directory.#YA union of all flags above; this is not a separate flag but a convenience definition.$L(since Linux 2.6.15) Don't dereference pathname if it is a symbolic link.%a(since Linux 2.6.36) By default, when watching events on the children of a directory, events are generated for children even after they have been unlinked from the directory. This can result in large numbers of uninteresting events for some applications (e.g., if watching /tmp, in which many applications create temporary files whose names are immediately unlinked). Specifying IN_EXCL_UNLINK changes the default behavior, so that events are not generated for children after they have been unlinked from the watched directory.&fAdd (OR) events to watch mask for this pathname if it already exists (instead of replacing mask).'<Monitor pathname for one event, then remove from watch list.(>(since Linux 2.6.15) Only watch pathname if it is a directory.)Watch was removed explicitly (2G) or automatically (file was deleted, or file system was unmounted).*%Subject of this event is a directory.+\Event queue overflowed (wd is -1 for this event). The size of the queue is available at procsysfsinotify/max_queued_events.,4File system containing watched object was unmounted.-aCreates an inotify socket descriptor that watches can be added to and events can be read from..Default configuration options/QCreates an inotify socket descriptor with custom configuration options. Calls 'inotify_init1(IN_NONBLOCK | IN_CLOEXEC).0Adds a watch on the inotify descriptor, returns a watch descriptor. The mask controls which events are delivered to your application, as well as some additional options. This function is thread safe.1 A variant of 0 that operates on a >., which is a file path represented as strict  ByteString;. One weakness of the current implementation is that if 1 throws an ??, then any unicode paths will be mangled in the error message.2Stops watching a path for changes. This watch descriptor must be associated with the particular inotify port, otherwise undefined behavior can happen.3This function is thread safe. This binding ignores inotify_rm_watch's errno when it is EINVALQ, so it is ok to delete a previously removed or non-existent watch descriptor.kHowever long lived applications that set and remove many watches should still endeavor to avoid calling 2D on removed watch descriptors, due to possible wrap-around bugs.3;Returns an inotify event, blocking until one is available.If the inotify descriptor is closed, this function will return an event from the buffer, if available. Otherwise, it will throw an ?N. It is safe to call this function from multiple threads at the same time.4;Returns an inotify event, blocking until one is available.After this returns an event, the next read from the inotify descriptor will return the same event. This read will not result in a system call.If the inotify descriptor is closed, this function will return an event from the buffer, if available. Otherwise, it will throw an @.KIt is safe to call this function from multiple threads at the same time.5>Returns an inotify event only if one is immediately available.If the inotify descriptor is closed, this function will return an event from the buffer, if available. Otherwise, it will return A.IOne possible downside of the current implementation is that returning AX necessarily results in a system call, unless the inotify descriptor has been closed.6>Returns an inotify event only if one is immediately available.If this returns an event, then the next read from the inotify descriptor will return the same event, and this read will not result in a system call.If the inotify descriptor is closed, this function will return an event from the buffer, if available. Otherwise, it will return A.IOne possible downside of the current implementation is that returning AX necessarily results in a system call, unless the inotify descriptor has been closed.75Returns an inotify event only if one is available in  'Inotify'\'1s buffer. This won't ever make a system call.85Returns an inotify event only if one is available in  'Inotify'\'1s buffer. This won't ever make a system call.If this returns an event, then the next read from the inotify descriptor will return the same event, and this read will not result in a system call.9cCloses an inotify descriptor, freeing the resources associated with it. This will also raise an ?% in any threads that are blocked on 3.qAttempting to use a descriptor after it is closed will safely raise an exception. It is perfectly safe to call 9K multiple times, which is idempotent and will not result in an exception.xDescriptors will be closed after they are garbage collected, via a finalizer, although it is often preferable to call 9 yourself.:'Has the inotify descriptor been closed?BComputes the union of two  s.Q CDEFGHIJKLM !"#$%&'()*+,-./01234NO56789:PQRSTBUVW;  !"#$%&'()*+,-./0123456789:;  -9:/.012357468 !"#$%&'()*+,@  CDEFGHIJKLM !"#$%&'()*+,-./01234NO56789:PQRSTBUVWX       !"#$%&'()*+,-./0123456789:;<=>?:@ABCD:EF:EG:;HIJKLMNOPQRSTUVWXYZ[\]^linux_2vYPgbBKr4mCcyzkOi6JqqSystem.Linux.InotifyGHC.IOgetFileSystemEncodingInotifyOptions bufferSizeEventwdmaskcookienameCookie WatchFlag EventFlagMaskWatchInotifyisect hasOverlapisSubset in_ACCESS in_ATTRIBin_CLOSEin_CLOSE_WRITEin_CLOSE_NOWRITE in_CREATE in_DELETEin_DELETE_SELF in_MODIFY in_MOVE_SELFin_MOVE in_MOVED_FROM in_MOVED_TOin_OPEN in_ALL_EVENTSin_DONT_FOLLOWin_EXCL_UNLINK in_MASK_ADD in_ONESHOT in_ONLYDIR in_IGNOREDin_ISDIR in_Q_OVERFLOW in_UNMOUNTinitdefaultInotifyOptionsinitWithaddWatch addWatch_rmWatchgetEvent peekEventgetEventNonBlockingpeekEventNonBlockinggetEventFromBufferpeekEventFromBuffercloseisClosedbaseGHC.BaseStringghc-prim GHC.Classes== Data.Monoid<>unix_A3WgcI5QiHK4PDo4jSYdwQ System.Posix.ByteString.FilePath RawFilePathGHC.IO.Exception IOExceptionIOErrorNothing $fMonoidMaskfdRef bufferLockbufferbufSizestartRefendRef c_unsafe_readc_inotify_rm_watchc_inotify_add_watchc_inotify_init1 fillBuffer getMessage closeFdRef withFdRefwithFdRefErrorfdClosedwithLock$fHashableWatch $fOrdInotify $fShowInotify