hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit d0fbc33e751f82c50a955a65a15d70bbdb1afda4
parent ae7b17bbbcdcf92538925d93900651075fdd71fd
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat,  9 Dec 2023 21:15:53 -0500

docs: rename hare-doc(5) to haredoc(5)

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
MMakefile | 4++--
Ddocs/hare-doc.5.scd | 67-------------------------------------------------------------------
Mdocs/haredoc.1.scd | 2+-
Adocs/haredoc.5.scd | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 70 insertions(+), 70 deletions(-)

diff --git a/Makefile b/Makefile @@ -79,11 +79,11 @@ docs: \ docs/haredoc.1 \ docs/hare-run.1 \ docs/hare-test.1 \ - docs/hare-doc.5 \ + docs/haredoc.5 \ docs/hare-module.5 MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test -MAN5 = hare-doc hare-module +MAN5 = haredoc hare-module bootstrap: @BINOUT=$(BINOUT) ./scripts/genbootstrap diff --git a/docs/hare-doc.5.scd b/docs/hare-doc.5.scd @@ -1,67 +0,0 @@ -hare-doc(5) - -# NAME - -hare-doc - Hare documentation format - -# DESCRIPTION - -Hare documentation is written in a simple markup language. *haredoc*(1) will -display the documentation literally, without any additional formatting. Other -tools may format Hare documentation into other formats. - -Text may be written normally, broken into several lines to conform to the -80-column limit. To begin a new paragraph, insert an empty line. - -References to other declarations and modules may be written in brackets, like -this: [[os::stdout]]. References to modules should include a trailing :: in the -identifier: [[os::exec::]]. - -A bulleted list can be started by opening a line with "-", optionally preceded -by a space. Each line opened like this begins a new list item. To complete the -list, insert an empty line. - -Code samples may be used by starting a line with a single tab, optionally -preceded by a space. - -This markup language is extracted from Hare comments preceding exported symbols -in your source code, and from a file named "README" in your module directory, if -present. - -# EXAMPLE - -``` -// Foos the bars. See also [[foobar]]. -// -// If you instead want to bar the foos, use one of the functions in -// [[bar::foo::]]. -// -// - First, the bars are obtained. -// - They are then fooed. -// - Finally, the result is returned. -// -// let x = example(); -// assert(x == 0); -export fn example() int = 0; -``` - -# NOTES - -It's expected that tools which parse documentation for the purpose of converting -it into another format will perform additional processing to decouple the -content from its original textual representation: - -- Line breaks within a paragraph or list item should be ignored. -- Repeated whitespace outside of a code sample should be collapsed. -- Multiple code samples separated by empty lines should be collapsed into one - code sample, so the empty lines are moved into the code sample itself. - -*hare::parse::doc::* in the standard library handles all of this processing for -you. - -Parsers are permitted (and encouraged) to error out on invalid input, such as a -malformed or unterminated [[reference]]. - -# SEE ALSO - -*haredoc*(1) diff --git a/docs/haredoc.1.scd b/docs/haredoc.1.scd @@ -93,4 +93,4 @@ The following environment variables affect *haredoc*'s execution: # SEE ALSO -*hare-doc*(5) +*haredoc*(5) diff --git a/docs/haredoc.5.scd b/docs/haredoc.5.scd @@ -0,0 +1,67 @@ +haredoc(5) + +# NAME + +haredoc - Hare documentation format + +# DESCRIPTION + +Hare documentation is written in a simple markup language. *haredoc*(1) will +display the documentation literally, without any additional formatting. Other +tools may format Hare documentation into other formats. + +Text may be written normally, broken into several lines to conform to the +80-column limit. To begin a new paragraph, insert an empty line. + +References to other declarations and modules may be written in brackets, like +this: [[os::stdout]]. References to modules should include a trailing :: in the +identifier: [[os::exec::]]. + +A bulleted list can be started by opening a line with "-", optionally preceded +by a space. Each line opened like this begins a new list item. To complete the +list, insert an empty line. + +Code samples may be used by starting a line with a single tab, optionally +preceded by a space. + +This markup language is extracted from Hare comments preceding exported symbols +in your source code, and from a file named "README" in your module directory, if +present. + +# EXAMPLE + +``` +// Foos the bars. See also [[foobar]]. +// +// If you instead want to bar the foos, use one of the functions in +// [[bar::foo::]]. +// +// - First, the bars are obtained. +// - They are then fooed. +// - Finally, the result is returned. +// +// let x = example(); +// assert(x == 0); +export fn example() int = 0; +``` + +# NOTES + +It's expected that tools which parse documentation for the purpose of converting +it into another format will perform additional processing to decouple the +content from its original textual representation: + +- Line breaks within a paragraph or list item should be ignored. +- Repeated whitespace outside of a code sample should be collapsed. +- Multiple code samples separated by empty lines should be collapsed into one + code sample, so the empty lines are moved into the code sample itself. + +*hare::parse::doc::* in the standard library handles all of this processing for +you. + +Parsers are permitted (and encouraged) to error out on invalid input, such as a +malformed or unterminated [[reference]]. + +# SEE ALSO + +*haredoc*(1)