FUTHARK-DOC(1)
π FUTHARK-DOC(1) β bestie's guide to futhark-doc π
okay so real talk, futhark-doc is the little command that turns your Futhark code into documentation for you. no cap. it lives in the Futhark manual and it is, genuinely, iconic.
β¨ NAME β¨
futhark-doc β generate documentation for Futhark code π
πΈ SYNOPSIS πΈ
futhark doc [options...] dir
π¦ DESCRIPTION π¦
so futhark doc generates HTML-formatted documentation straight out of your Futhark code. literally one HTML file per .fut file in the directory you point it at, plus every file you can reach through import expressions. and here's the thing bestie β the whole thing gets treated as one cohesive whole, so it has to be type-correct. no half-finished vibes allowed, sorry π
want your definitions documented? prefix them with a block of line comments starting with -- | (peep the example further down, it's giving tutorial). Simple Markdown syntax works inside those comments too, so you can be cute about it. and if you want to link to another identifier, the notation is:
`name`@namespace
where namespace has to be exactly one of term, type, or mtype. π«Ά oh and heads up β module names live in the term namespace, iykyk. also!! a file can have a leading documentation comment, and that one gets treated as the file abstract. main character comment energy, honestly π
now, the part I'm obsessed with: futhark doc will ignore any file whose documentation comment consists solely of the word "ignore". sole word. just ignore. that's it. this is so useful for files that contain tests, or files that are otherwise just not relevant to whoever's reading your docs. bye bestie, not today π
π OPTIONS π
-hβ print help text to standard output and exit.-ooutdir β the name of the directory that's gonna hold the generated documentation. π this one is mandatory β no outdir, no docs, fr fr.-v,--verboseβ print status messages to stderr while it's running, so you can watch the progress like it's a live stream β¨-Vβ print version information on standard output and exit.
π EXAMPLES π
-- | Gratuitous re-implementation of `map`@term.
--
-- Does exactly the same.
let mymap = ...
see what I mean? that leading -- | block is the doc comment, and `map`@term is the fancy link notation. ate, honestly. π
π SEE ALSO π
futhark-test <#futhark-test-1>futhark-bench <#futhark-bench-1>
π COPYRIGHT π
2013-2020, DIKU, University of Copenhagen
and that's the whole page bestie!! π this was futhark-doc from the Futhark manual, version 0.25.32, dated Mar 11, 2026. go forth and document your code, you're gonna slay π«Άβ¨π
π¦ where this page comes from
- ubuntu resolute: futhark 0.25.32-3build1 Β· ISC
- ubuntu stonking: futhark 0.25.32-3build1 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms