https://fsharp.github.io/fsharp-compiler-docs
To improve the content of the FSharp.Compiler.Service library documentation, contribute to the XML /// documentation in the
signature files (*.fsi) in the FSharp.Compiler.Service implementation.
-
Fork and clone https://github.com/dotnet/fsharp locally, see below
-
Contribute to docs directory and src/Compiler directory and submit work to
mainbranch of dotnet/fsharp -
Once accepted your work will be published through a rebuild here. A rebuild is triggered daily at 17:30 UTC or you can trigger it yourself by submitting a dummy change.
The docs are generated by using fsdocs tool from FSharp.Formatting.
Everything is driven by build.fsx, a Fun.Build script.
You need a .NET 10 SDK to run it. The default pipeline does the following:
-
Clones dotnet/fsharp (shallow,
mainbranch) into the git-ignoredfsharpfolder, unless it already exists. -
Builds
FSharp.Compiler.Service.slnxwith the SDK thatfsharp/global.jsonpins, using dotnet/fsharp's owneng/common/dotnet.shbootstrap so that SDK does not need to be on your PATH. -
Restores the
fsdocstool and theFSharp.Compiler.Serviceproject in this repo. -
Runs
fsdocs buildagainstfsharp/docsand writes the site tooutput.dotnet fsi build.fsx
To pick up new upstream changes, delete the fsharp folder and run the pipeline again.
To generate the docs from a dotnet/fsharp checkout you already have, for example a fork with
docs changes in progress, point FSHARP_REPO at it. The clone step is skipped and that checkout
is built and read in place:
FSHARP_REPO=~/Projects/fsharp dotnet fsi build.fsx
Once a build has run, iterate on the docs with live reload:
dotnet fsi build.fsx -- -p Watch
Anything after the pipeline name is passed on to fsdocs watch, for example -- -p Watch --nolaunch --port 8080.
Run dotnet fsi build.fsx -- -h to list the pipelines.
This repo is published via GitHub Actions. On each push to main, build.fsx runs, and the outputs (which are written to the output directory by fsdocs) are pushed to the gh-pages branch. This repo is configured to host using GitHub Pages from this branch.