.\" Generated by scdoc 1.11.4 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "haredoc" "1" "2026-06-01" .PP .SH NAME .PP haredoc - read and format Hare documentation .PP .SH SYNOPSIS .PP \fBharedoc\fR [-hanNt] [-F \fIformat\fR] [-T \fItagset\fR] [\fIidentifier\fR|\fIpath\fR] .PP .SH DESCRIPTION .PP \fBharedoc\fR reads documentation from a source file or module.\& If no identifier or path is supplied, documentation is read from the Hare module contained in the current working directory, or from the root of the standard library if the current working directory doesn'\&t contain a Hare module (see \fBhare-module\fR(5)).\& .PP If an identifier is supplied, it'\&s first looked up as a declaration.\& If no suitable declaration exists, it'\&s looked up as a module instead.\& The identifier may also include a trailing ::, in which case it will always be treated as a module.\& The identifier is resolved using the algorithm described in \fBDEPENDENCY RESOLUTION\fR in \fBhare-module\fR(5).\& .PP .SH OPTIONS .PP \fB-h\fR .RS 4 Print the help text.\& .PP .RE \fB-a\fR .RS 4 Show undocumented members.\& .PP .RE \fB-F\fR \fIformat\fR .RS 4 Select output format (one of "html" or "tty").\& The default is "tty".\& .PP .RE \fB-n\fR .RS 4 Include file names and line numbers of symbol declarations in the output (only applies to \fB-Ftty\fR).\& .PP .RE \fB-N\fR .RS 4 Print the file name and line number of a single symbol to stdout, then exit.\& .PP .RE \fB-t\fR .RS 4 Disable HTML template (only applies to \fB-Fhtml\fR).\& .PP .RE \fB-T\fR \fItagset\fR .RS 4 Set or unset build tags.\& See \fBBUILD TAGS\fR in \fBhare-module\fR(5).\& .PP .RE .SH CUSTOMIZING COLORS .PP Unless the \fBNO_COLOR\fR environment variable is set to a non-empty string, colors are rendered in the terminal with ANSI SGR escape sequences.\& These sequences can be customized with the \fBHAREDOC_COLORS\fR environment variable, which follows this whitespace-delimited format: .PP .RS 4 HAREDOC_COLORS='\&\fIkey\fR=\fIseq\fR \fIkey\fR=\fIseq\fR \fI.\&.\&.\&\fR'\& .PP .RE Each \fIkey=seq\fR entry assigns a valid \fIseq\fR SGR sequence to a \fIkey\fR syntax category.\& A valid \fIseq\fR must consist only of digits and semicolons, or must be a single underscore "_".\& Here are the initial default entries: .PP .PD 0 .IP 1. 4 normal "0" .IP 2. 4 primary "_" (-> normal) .IP 3. 4 ident "_" (-> normal) .IP 4. 4 comment "1" .IP 5. 4 constant "_" (-> primary) .IP 6. 4 function "_" (-> primary) .IP 7. 4 global "_" (-> primary) .IP 8. 4 typedef "_" (-> primary) .IP 9. 4 import_alias "_" (-> normal) .IP 10. 4 secondary "_" (-> normal) .IP 11. 4 keyword "94" .IP 12. 4 type "96" .IP 13. 4 attribute "33" .IP 14. 4 operator "1" .IP 15. 4 punctuation "_" (-> normal) .IP 16. 4 rune_string "91" .IP 17. 4 number "95" .IP 18. 4 label "_" (-> normal) .PD .PP Any number of entries can be specified.\& If a \fIseq\fR is an underscore "_", then the sequence specified for "normal" is used, unless \fIkey\fR is "constant", "function", "global", or "typedef", in which case the sequence specified for "primary" is used.\& Otherwise, if a \fIseq\fR is invalid, blank, empty, or absent, its corresponding default sequence is used.\& .PP For example: .PP .RS 4 HAREDOC_COLORS='\&comment=3 primary=1;4 attribute=41'\& haredoc log:: .PP .RE .SH ENVIRONMENT .PP The following environment variables affect \fBharedoc\fR'\&s execution: .PP .TS l lx l lx l lx l lx. T{ \fBHAREPATH\fR T} T{ The list of directories to search for modules in.\& See \fBhare-module\fR(5).\& T} T{ \fBNO_COLOR\fR T} T{ Disables all color output when set to a non-empty string.\& T} T{ \fBHAREDOC_COLORS\fR T} T{ See \fBCUSTOMIZING COLORS\fR.\& T} T{ \fBHAREDOC_HTML_SRC\fR T} T{ fmt:: string which expands to a URL where a symbol'\&s source code is browsable online (used for \fB-Fhtml\fR) when the file path relative to the working directory and the line number is given as the first and second argument to fmt:: respectively.\& T} .TE .sp 1 .SH SEE ALSO .PP \fBharedoc\fR(5)