(.using
 [library
  [lux "*"
   ["$" documentation {"+" documentation:}]
   ["@" target]
   [control
    ["<>" parser
     ["<[0]>" code]]]
   [data
    ["[0]" text {"+" \n}
     ["%" format {"+" format}]]]
   [macro
    ["[0]" template]]]]
 [\\library
  ["[0]" /]])

(documentation: /.Concern
  "A particular concern to watch-out for.")

(documentation: /.also
  ""
  [(also left right)])

(documentation: (/.Watcher !)
  "Machinery for watching a file-system for changes to files and directories.")

(documentation: /.polling
  (format "A simple watcher that works for any file-system."
          "Polls files and directories to detect changes.")
  [(polling fs)])

(documentation: /.mock
  (format "A fake/emulated watcher."
          \n "Must be given a path separator for the file-system.")
  [(mock separator)])

(for [@.jvm (as_is (documentation: /.default
                     "The default watcher for the default file-system."))]
     (as_is))

(.def: .public documentation
  (.List $.Module)
  (`` (`` ($.module /._
                    ""
                    [..Concern
                     ..also
                     ..Watcher
                     ..polling
                     ..mock
                     ($.default /.creation)
                     ($.default /.creation?)
                     ($.default /.modification)
                     ($.default /.modification?)
                     ($.default /.deletion)
                     ($.default /.deletion?)
                     ($.default /.all)
                     ($.default /.not_being_watched)
                     ($.default /.cannot_poll_a_non_existent_directory)
                     (~~ (for [@.jvm (~~ (as_is ..default))]
                              (~~ (as_is))))]
                    []))))
