FUTHARK-DOC(1)

πŸ“¦
version 0.25.32 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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.
  • -o outdir β€” 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>

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