@@ -200,7 +200,7 @@ import qualified Streamly.Internal.Unicode.Stream as U
200200-- | Watch configuration, used to specify the events of interest and the
201201-- behavior of the watch.
202202--
203−-- /Internal/
203+-- /Pre-release/
204204--
205205data Config = Config
206206 { watchRec :: Bool
@@ -213,7 +213,7 @@ data Config = Config
213213
214214-- | Whether a setting is 'On' or 'Off'.
215215--
216−-- /Internal/
216+-- /Pre-release/
217217--
218218data Toggle = On | Off
219219
@@ -238,7 +238,7 @@ setFlag mask status cfg@Config{..} =
238238--
239239-- /default: Off/
240240--
241−-- /Internal/
241+-- /Pre-release/
242242--
243243setRecursiveMode :: Bool -> Config -> Config
244244setRecursiveMode rec cfg@Config{} = cfg {watchRec = rec}
@@ -251,7 +251,7 @@ foreign import capi
251251--
252252-- /default: On/
253253--
254−-- /Internal/
254+-- /Pre-release/
255255--
256256setFollowSymLinks :: Toggle -> Config -> Config
257257setFollowSymLinks s = setFlag iN_DONT_FOLLOW (toggle s)
@@ -264,7 +264,7 @@ foreign import capi
264264--
265265-- /default: On/
266266--
267−-- /Internal/
267+-- /Pre-release/
268268--
269269setUnwatchMoved :: Toggle -> Config -> Config
270270setUnwatchMoved = setFlag iN_EXCL_UNLINK
@@ -280,7 +280,7 @@ foreign import capi
280280-- | What to do if a watch already exists when 'openWatch' or 'addToWatch' is
281281-- called for a path.
282282--
283−-- /Internal/
283+-- /Pre-release/
284284--
285285data WhenExists =
286286 AddIfExists -- ^ Do not set an existing setting to 'Off' only set to 'On'
@@ -294,7 +294,7 @@ data WhenExists =
294294--
295295-- /default: FailIfExists/
296296--
297−-- /Internal/
297+-- /Pre-release/
298298--
299299setWhenExists :: WhenExists -> Config -> Config
300300setWhenExists val cfg =
@@ -312,7 +312,7 @@ foreign import capi
312312--
313313-- /default: Off/
314314--
315−-- /Internal/
315+-- /Pre-release/
316316--
317317setOneShot :: Toggle -> Config -> Config
318318setOneShot = setFlag iN_ONESHOT
@@ -325,7 +325,7 @@ foreign import capi
325325--
326326-- /default: Off/
327327--
328−-- /Internal/
328+-- /Pre-release/
329329--
330330setOnlyDir :: Toggle -> Config -> Config
331331setOnlyDir = setFlag iN_ONLYDIR
@@ -341,7 +341,7 @@ foreign import capi
341341--
342342-- /default: On/
343343--
344−-- /Internal/
344+-- /Pre-release/
345345--
346346setRootDeleted :: Toggle -> Config -> Config
347347setRootDeleted = setFlag iN_DELETE_SELF
@@ -353,7 +353,7 @@ foreign import capi
353353--
354354-- /default: On/
355355--
356−-- /Internal/
356+-- /Pre-release/
357357--
358358setRootMoved :: Toggle -> Config -> Config
359359setRootMoved = setFlag iN_MOVE_SELF
@@ -366,7 +366,7 @@ foreign import capi
366366--
367367-- /default: On/
368368--
369−-- /Internal/
369+-- /Pre-release/
370370--
371371setMetadataChanged :: Toggle -> Config -> Config
372372setMetadataChanged = setFlag iN_ATTRIB
@@ -378,7 +378,7 @@ foreign import capi
378378--
379379-- /default: On/
380380--
381−-- /Internal/
381+-- /Pre-release/
382382--
383383setAccessed :: Toggle -> Config -> Config
384384setAccessed = setFlag iN_ACCESS
@@ -390,7 +390,7 @@ foreign import capi
390390--
391391-- /default: On/
392392--
393−-- /Internal/
393+-- /Pre-release/
394394--
395395setOpened :: Toggle -> Config -> Config
396396setOpened = setFlag iN_OPEN
@@ -402,7 +402,7 @@ foreign import capi
402402--
403403-- /default: On/
404404--
405−-- /Internal/
405+-- /Pre-release/
406406--
407407setWriteClosed :: Toggle -> Config -> Config
408408setWriteClosed = setFlag iN_CLOSE_WRITE
@@ -414,7 +414,7 @@ foreign import capi
414414--
415415-- /default: On/
416416--
417−-- /Internal/
417+-- /Pre-release/
418418--
419419setNonWriteClosed :: Toggle -> Config -> Config
420420setNonWriteClosed = setFlag iN_CLOSE_NOWRITE
@@ -426,7 +426,7 @@ foreign import capi
426426--
427427-- /default: On/
428428--
429−-- /Internal/
429+-- /Pre-release/
430430--
431431setCreated :: Toggle -> Config -> Config
432432setCreated = setFlag iN_CREATE
@@ -438,7 +438,7 @@ foreign import capi
438438--
439439-- /default: On/
440440--
441−-- /Internal/
441+-- /Pre-release/
442442--
443443setDeleted :: Toggle -> Config -> Config
444444setDeleted = setFlag iN_DELETE
@@ -450,7 +450,7 @@ foreign import capi
450450--
451451-- /default: On/
452452--
453−-- /Internal/
453+-- /Pre-release/
454454--
455455setMovedFrom :: Toggle -> Config -> Config
456456setMovedFrom = setFlag iN_MOVED_FROM
@@ -462,7 +462,7 @@ foreign import capi
462462--
463463-- /default: On/
464464--
465−-- /Internal/
465+-- /Pre-release/
466466--
467467setMovedTo :: Toggle -> Config -> Config
468468setMovedTo = setFlag iN_MOVED_TO
@@ -474,7 +474,7 @@ foreign import capi
474474--
475475-- /default: On/
476476--
477−-- /Internal/
477+-- /Pre-release/
478478--
479479setModified :: Toggle -> Config -> Config
480480setModified = setFlag iN_MODIFY
@@ -483,7 +483,7 @@ setModified = setFlag iN_MODIFY
483483--
484484-- /default: On/
485485--
486−-- /Internal/
486+-- /Pre-release/
487487--
488488setAllEvents :: Toggle -> Config -> Config
489489setAllEvents s cfg =
@@ -517,7 +517,7 @@ setAllEvents s cfg =
517517-- * 'setWhenExists' 'AddIfExists'
518518-- * 'setAllEvents' 'On'
519519--
520−-- /Internal/
520+-- /Pre-release/
521521--
522522defaultConfig :: Config
523523defaultConfig =
@@ -556,7 +556,7 @@ foreign import ccall unsafe
556556-- | Create a 'Watch' handle. 'addToWatch' can be used to add paths being
557557-- monitored by this watch.
558558--
559−-- /Internal/
559+-- /Pre-release/
560560--
561561createWatch :: IO Watch
562562createWatch = do
@@ -634,7 +634,7 @@ ensureTrailingSlash path =
634634-- being monitored under @root@ via the watch handle @watch@. @root@ must be
635635-- an absolute path and @subpath@ must be relative to @root@.
636636--
637−-- /Internal/
637+-- /Pre-release/
638638--
639639addToWatch :: Config -> Watch -> Array Word8 -> Array Word8 -> IO ()
640640addToWatch cfg@Config{..} watch@(Watch handle wdMap) root0 path0 = do
@@ -698,7 +698,7 @@ foreign import ccall unsafe
698698-- adding you need to provide the original path which was used to add the
699699-- Watch.
700700--
701−-- /Internal/
701+-- /Pre-release/
702702--
703703removeFromWatch :: Watch -> Array Word8 -> IO ()
704704removeFromWatch (Watch handle wdMap) path = do
@@ -722,7 +722,7 @@ removeFromWatch (Watch handle wdMap) path = do
722722-- monitoring the paths for file system events. Returns a 'Watch' handle which
723723-- can then be used to read the event stream or to close the watch.
724724--
725−-- /Internal/
725+-- /Pre-release/
726726--
727727openWatch :: Config -> NonEmpty (Array Word8) -> IO Watch
728728openWatch cfg paths = do
@@ -732,7 +732,7 @@ openWatch cfg paths = do
732732
733733-- | Close a 'Watch' handle.
734734--
735−-- /Internal/
735+-- /Pre-release/
736736--
737737closeWatch :: Watch -> IO ()
738738closeWatch (Watch h _) = hClose h
@@ -746,7 +746,7 @@ newtype Cookie = Cookie Word32 deriving (Show, Eq)
746746-- | An Event generated by the file system. Use the accessor functions to
747747-- examine the event.
748748--
749−-- /Internal/
749+-- /Pre-release/
750750--
751751data Event = Event
752752 { eventWd :: CInt
@@ -856,7 +856,7 @@ watchToStream cfg wt@(Watch handle _) = do
856856-- [Array.fromCString\# "dir"#]
857857-- @
858858--
859−-- /Internal/
859+-- /Pre-release/
860860--
861861watchPathsWith ::
862862 (Config -> Config) -> NonEmpty (Array Word8) -> SerialT IO Event
@@ -868,7 +868,7 @@ watchPathsWith f = watchTreesWith (f . setRecursiveMode False)
868868-- watchPaths = watchPathsWith id
869869-- @
870870--
871−-- /Internal/
871+-- /Pre-release/
872872--
873873watchPaths :: NonEmpty (Array Word8) -> SerialT IO Event
874874watchPaths = watchPathsWith id
@@ -897,7 +897,7 @@ watchPaths = watchPathsWith id
897897--
898898-- See the Linux __inotify__ man page for more details.
899899--
900−-- /Internal/
900+-- /Pre-release/
901901--
902902watchTreesWith ::
903903 (Config -> Config) -> NonEmpty (Array Word8) -> SerialT IO Event
@@ -929,7 +929,7 @@ watchTrees = watchTreesWith id
929929--
930930-- TBD: we can possibly update the watch root on a move self event.
931931--
932−-- /Internal/
932+-- /Pre-release/
933933--
934934getRoot :: Event -> Array Word8
935935getRoot Event{..} =
@@ -946,7 +946,7 @@ getRoot Event{..} =
946946-- | Get the file system object path for which the event is generated, relative
947947-- to the watched root. The path is a "/" separated array of bytes.
948948--
949−-- /Internal/
949+-- /Pre-release/
950950--
951951getRelPath :: Event -> Array Word8
952952getRelPath Event{..} = eventRelPath
@@ -955,7 +955,7 @@ getRelPath Event{..} = eventRelPath
955955-- | Get the absolute file system object path for which the event is generated.
956956-- The path is a "/" separated array of bytes.
957957--
958−-- /Internal/
958+-- /Pre-release/
959959--
960960getAbsPath :: Event -> Array Word8
961961getAbsPath ev = getRoot ev <> getRelPath ev
@@ -965,7 +965,7 @@ getAbsPath ev = getRoot ev <> getRelPath ev
965965-- connect the 'isMovedFrom' and 'isMovedTo' events, if both the events belong
966966-- to the same move operation then they will have the same cookie value.
967967--
968−-- /Internal/
968+-- /Pre-release/
969969--
970970getCookie :: Event -> Cookie
971971getCookie Event{..} = Cookie eventCookie
@@ -993,7 +993,7 @@ foreign import capi
993993-- some events.. The user application must scan everything under the watched
994994-- paths to know the current state.
995995--
996−-- /Internal/
996+-- /Pre-release/
997997--
998998isOverflow :: Event -> Bool
999999isOverflow = getFlag iN_Q_OVERFLOW
@@ -1012,7 +1012,7 @@ foreign import capi
10121012--
10131013-- /Occurs only for a watched path/
10141014--
1015−-- /Internal/
1015+-- /Pre-release/
10161016--
10171017isRootUnwatched :: Event -> Bool
10181018isRootUnwatched = getFlag iN_IGNORED
@@ -1025,7 +1025,7 @@ isRootUnwatched = getFlag iN_IGNORED
10251025--
10261026-- /Occurs only for a watched path/
10271027--
1028−-- /Internal/
1028+-- /Pre-release/
10291029--
10301030isRootDeleted :: Event -> Bool
10311031isRootDeleted = getFlag iN_DELETE_SELF
@@ -1034,7 +1034,7 @@ isRootDeleted = getFlag iN_DELETE_SELF
10341034--
10351035-- /Occurs only for a watched path/
10361036--
1037−-- /Internal/
1037+-- /Pre-release/
10381038--
10391039isRootMoved :: Event -> Bool
10401040isRootMoved = getFlag iN_MOVE_SELF
@@ -1048,7 +1048,7 @@ foreign import capi
10481048--
10491049-- /Occurs only for a watched path/
10501050--
1051−-- /Internal/
1051+-- /Pre-release/
10521052--
10531053isRootUnmounted :: Event -> Bool
10541054isRootUnmounted = getFlag iN_UNMOUNT
@@ -1069,7 +1069,7 @@ isRootUnmounted = getFlag iN_UNMOUNT
10691069--
10701070-- /Can occur for watched path or a file inside it/
10711071--
1072−-- /Internal/
1072+-- /Pre-release/
10731073--
10741074isMetadataChanged :: Event -> Bool
10751075isMetadataChanged = getFlag iN_ATTRIB
@@ -1082,7 +1082,7 @@ isMetadataChanged = getFlag iN_ATTRIB
10821082--
10831083-- /Occurs only for a file inside the watched directory/
10841084--
1085−-- /Internal/
1085+-- /Pre-release/
10861086--
10871087isAccessed :: Event -> Bool
10881088isAccessed = getFlag iN_ACCESS
@@ -1091,7 +1091,7 @@ isAccessed = getFlag iN_ACCESS
10911091--
10921092-- /Occurs only for a file inside the watched directory/
10931093--
1094−-- /Internal/
1094+-- /Pre-release/
10951095--
10961096isOpened :: Event -> Bool
10971097isOpened = getFlag iN_OPEN
@@ -1100,7 +1100,7 @@ isOpened = getFlag iN_OPEN
11001100--
11011101-- /Occurs only for a file inside the watched directory/
11021102--
1103−-- /Internal/
1103+-- /Pre-release/
11041104--
11051105isWriteClosed :: Event -> Bool
11061106isWriteClosed = getFlag iN_CLOSE_WRITE
@@ -1112,7 +1112,7 @@ isWriteClosed = getFlag iN_CLOSE_WRITE
11121112--
11131113-- /Can occur for watched path or a file inside it/
11141114--
1115−-- /Internal/
1115+-- /Pre-release/
11161116--
11171117isNonWriteClosed :: Event -> Bool
11181118isNonWriteClosed = getFlag iN_CLOSE_NOWRITE
@@ -1128,7 +1128,7 @@ isNonWriteClosed = getFlag iN_CLOSE_NOWRITE
11281128--
11291129-- /Occurs only for an object inside the watched directory/
11301130--
1131−-- /Internal/
1131+-- /Pre-release/
11321132--
11331133isCreated :: Event -> Bool
11341134isCreated = getFlag iN_CREATE
@@ -1137,7 +1137,7 @@ isCreated = getFlag iN_CREATE
11371137--
11381138-- /Occurs only for an object inside the watched directory/
11391139--
1140−-- /Internal/
1140+-- /Pre-release/
11411141--
11421142isDeleted :: Event -> Bool
11431143isDeleted = getFlag iN_DELETE
@@ -1150,7 +1150,7 @@ isDeleted = getFlag iN_DELETE
11501150--
11511151-- /Occurs only for an object inside the watched directory/
11521152--
1153−-- /Internal/
1153+-- /Pre-release/
11541154--
11551155isMovedFrom :: Event -> Bool
11561156isMovedFrom = getFlag iN_MOVED_FROM
@@ -1160,7 +1160,7 @@ isMovedFrom = getFlag iN_MOVED_FROM
11601160--
11611161-- /Occurs only for an object inside the watched directory/
11621162--
1163−-- /Internal/
1163+-- /Pre-release/
11641164--
11651165isMovedTo :: Event -> Bool
11661166isMovedTo = getFlag iN_MOVED_TO
@@ -1170,7 +1170,7 @@ isMovedTo = getFlag iN_MOVED_TO
11701170--
11711171-- /Occurs only for an object inside the watched directory/
11721172--
1173−-- /Internal/
1173+-- /Pre-release/
11741174--
11751175isModified :: Event -> Bool
11761176isModified = getFlag iN_MODIFY
@@ -1184,7 +1184,7 @@ foreign import capi
11841184
11851185-- | Determine whether the event is for a directory path.
11861186--
1187−-- /Internal/
1187+-- /Pre-release/
11881188--
11891189isDir :: Event -> Bool
11901190isDir = getFlag iN_ISDIR