gleamunison/cli_watch

gleamunison watch <file.lisp> — re-verify on every save.

Unison’s run> watch expressions, adapted to our scratch-file workflow: poll the file’s mtime, and when it moves, re-run the verify pipeline and print the result. The decision (poll) is separate from the action (verify) so the decision is unit-testable with real files.

Types

pub type Poll {
  Changed(mtime: Int)
  Unchanged
  Missing
}

Constructors

  • Changed(mtime: Int)
  • Unchanged
  • Missing

Values

pub fn command(path: String) -> Nil

Watch loop: verify once, then re-verify on every mtime bump, forever.

pub fn poll(path: String, last_mtime: Int) -> Poll

One watch decision: has the file changed since last_mtime?

pub fn usage() -> String

Help text fragment for the CLI banner.

✨ Search Document