A line comment starts with --
and is followed by any sequence of characters. A line that contains a comment canāt contain anything other than a comment and whitespace.
Multi-line comments are supported by starting a comment block with {-
and ending it with -}
.
Comments in Unison aren't actually committed to the Unison codebase. For that reason they're used primarily to annotate code while you're working on it, and not for documentation. If you want to add a comment to a definition that will be persisted in the codebase, use the Doc
syntax.
{-
Hi there!
{-
This is a valid comment
-}
Comments will disappear when added to the codebase!
-}
A line starting with ---
is a fold. Any text following the fold is ignored by Unison.
--- Anything below this line is ignored by Unison.