Skip to content
IRIS

Documentation

Formatting

Format your PureScript sources from the command line, in CI, or in your editor.

Format a workspace

iris format formats every package’s src and test sources in the current Spago workspace in place:

Terminal
iris format

Use --check in CI to check formatting without changing files. It lists the files that need formatting and exits with status 1:

Terminal
iris format --check

Format a single file

Pass --file to print a file’s formatted output without writing it:

Terminal
iris format --file src/Main.purs

Format in your editor

Editors can use the same formatter through Format Document, which the Iris language server provides.

Options and layout

See the formatting guide for file selection, standard input, --width, --indent, --unicode, and layout conventions.

Iris is in alpha. Commands and APIs may change between releases.