├── .config └── dotnet-tools.json ├── .github ├── dependabot.yml └── workflows │ ├── docs.yml │ └── pr.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── FSharp.Core └── FSharp.Core.fsproj ├── LICENSE ├── README.md ├── docs ├── img │ ├── favicon.ico │ └── logo.png └── index.md └── dummyVersion.txt /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "fsdocs-tool": { 6 | "version": "21.0.0-beta-001", 7 | "commands": [ 8 | "fsdocs" 9 | ], 10 | "rollForward": false 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | 9 | - package-ecosystem: "nuget" 10 | directory: "/" 11 | schedule: 12 | interval: "daily" 13 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Release docs 2 | 3 | on: 4 | schedule: 5 | # Triggers the workflow every day at 17:30 UTC 6 | - cron: "30 17 * * *" 7 | push: 8 | branches: 9 | - main 10 | workflow_dispatch: 11 | 12 | env: 13 | FSHARP_DIR: fsharp 14 | 15 | jobs: 16 | build: 17 | runs-on: windows-latest 18 | steps: 19 | - uses: actions/checkout@v4 20 | - name: Checkout fsharp main 21 | uses: actions/checkout@v4 22 | with: 23 | repository: dotnet/fsharp 24 | path: ${{ env.FSHARP_DIR }} 25 | ref: main 26 | - name: Setup .NET for FSharp 27 | uses: actions/setup-dotnet@v4 28 | with: 29 | global-json-file: ${{ env.FSHARP_DIR }}/global.json 30 | - name: Restore tools 31 | run: dotnet tool restore 32 | - name: Restore local FSharp.Core project in current repo 33 | run: dotnet restore FSharp.Core\FSharp.Core.fsproj 34 | - name: Build FSharp.Core in fsharp main 35 | run: dotnet build src\FSharp.Core\FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true 36 | working-directory: ${{ env.FSHARP_DIR }} 37 | - name: Run fsdocs 38 | env: 39 | # allow roll forward to latest major version - this would happen for us if we invoked the fsdocs tool instead of invoking the binary directly 40 | DOTNET_ROLL_FORWARD: "LatestMajor" 41 | # need previews because .NET 8 is what's being used at runtime 42 | DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1" 43 | run: dotnet fsdocs build --sourcefolder ${{ env.FSHARP_DIR }} 44 | - name: Deploy 45 | uses: peaceiris/actions-gh-pages@v4 46 | with: 47 | personal_token: ${{ secrets.GITHUB_TOKEN }} 48 | publish_dir: ./output 49 | publish_branch: gh-pages 50 | force_orphan: true 51 | -------------------------------------------------------------------------------- /.github/workflows/pr.yml: -------------------------------------------------------------------------------- 1 | name: Pull request checks 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "**" 7 | 8 | env: 9 | FSHARP_DIR: fsharp 10 | FSF_DIR: FSharp.Formatting 11 | BUILDING_USING_DOTNET: true 12 | 13 | jobs: 14 | build: 15 | runs-on: windows-latest 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Checkout fsharp main 19 | uses: actions/checkout@v4 20 | with: 21 | repository: dotnet/fsharp 22 | path: ${{ env.FSHARP_DIR }} 23 | ref: main 24 | - name: Setup .NET for FSharp 25 | uses: actions/setup-dotnet@v4 26 | with: 27 | global-json-file: ${{ env.FSHARP_DIR }}/global.json 28 | - name: Restore tools 29 | run: dotnet tool restore 30 | - name: Restore local FSharp.Core project in current repo 31 | run: dotnet restore FSharp.Core\FSharp.Core.fsproj 32 | - name: Build FSharp.Core in fsharp main 33 | run: dotnet build src\FSharp.Core\FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true 34 | working-directory: ${{ env.FSHARP_DIR }} 35 | - name: Run fsdocs 36 | env: 37 | # allow roll forward to latest major version - this would happen for us if we invoked the fsdocs tool instead of invoking the binary directly 38 | DOTNET_ROLL_FORWARD: "LatestMajor" 39 | # need previews because .NET 8 is what's being used at runtime 40 | DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1" 41 | run: dotnet fsdocs build --sourcefolder ${{ env.FSHARP_DIR }} 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | packages 2 | paket-files 3 | .ionide 4 | _public 5 | .vscode 6 | .paket 7 | fsharp/ 8 | FSharp.Formatting/ 9 | .fsdocs/ 10 | FSharp.Core/obj/ 11 | tmp/ 12 | .idea/ 13 | output/ -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at fsharp@fsharp.org. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | 77 | -------------------------------------------------------------------------------- /FSharp.Core/FSharp.Core.fsproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | F# Software Foundation; Microsoft; F# Contributors 6 | The core library for F# 7 | The core library F# 8 | Copyright 2003-2020 9 | true 10 | 11 | true 12 | Library 13 | false 14 | true 15 | MIT 16 | 6.0.3 17 | true 18 | 19 | 20 | 21 | $(MSBuildThisFileDirectory)..\..\fsharp\artifacts\bin\FSharp.Core\Debug\netstandard2.1\FSharp.Core.dll 22 | 23 | 24 | $(MSBuildThisFileDirectory)..\fsharp\artifacts\bin\FSharp.Core\Debug\netstandard2.1\FSharp.Core.dll 25 | 26 | 27 | 28 | 29 | https://github.com/dotnet/fsharp/blob/main/License.txt 30 | https://fsharp.github.io/fsharp-core-docs/ 31 | https://fsharp.org/img/logo/fsharp128.png 32 | F#;async;fsharp;streaming 33 | https://github.com/dotnet/fsharp/ 34 | https://fsharp.org 35 | https://github.com/dotnet/fsharp/blob/main/License.txt 36 | main 37 | https://github.com/dotnet/fsharp/blob/main/release-notes.md 38 | git 39 | true 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 F# Software Foundation Repositories 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FSharp.Core API documentation generation 2 | 3 | 4 | 5 | ## Contributing to Library Content 6 | 7 | To improve the content of the F# Core library documentation, contribute to the XML `///` documentation in the 8 | signature files (`*.fsi`) in the FSharp.Core implementation. 9 | 10 | * Fork and clone locally, see below, as a subdirectory of your copy of `fsharp-core-docs` 11 | 12 | * Contribute to [the FSharp.Core directory](https://github.com/dotnet/fsharp/tree/main/src/fsharp/FSharp.Core) 13 | 14 | * Submit work to `main` branch of 15 | 16 | * Update the `dotnet tool` if new versions are released. 17 | 18 | ## Contributing to Generation of API Docs 19 | 20 | The docs are generated by using `fsdocs` tool from FSharp.Formatting. If you want to improve the generation process: 21 | 22 | * Contribute to the API Docs mode and/or HTML generator in [FSharp.Formatting.ApiDocs](https://github.com/fsprojects/FSharp.Formatting/tree/main/src/FSharp.Formatting.ApiDocs) and [the `fsdocs` tool](https://github.com/fsprojects/FSharp.Formatting/tree/main/src/FSharp.Formatting.CommandTool) 23 | 24 | * Submit work to the `main` branch of 25 | 26 | * Update the `dotnet tool` if new versions are released. 27 | 28 | ## Build steps 29 | 30 | dotnet tool restore 31 | dotnet restore FSharp.Core 32 | dotnet fsdocs build 33 | 34 | For now, we want to pick up the latest copies of FSharp.Formatting and FSharp.Core, and set you up to make contributions to these. So we ask you to clone local copies of these: 35 | 36 | (start in 'fsharp-core-docs') 37 | dotnet restore FSharp.Core 38 | dotnet tool restore 39 | 40 | (make fsharp-compiler-docs/fsharp) 41 | git clone https://github.com/dotnet/fsharp --depth 1 -b main 42 | 43 | (build 'fsharp-core-docs/fsharp') 44 | pushd fsharp 45 | dotnet build src\FSharp.Core\FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true 46 | popd 47 | 48 | Then do iterative development using: 49 | 50 | (from 'fsharp-core-docs') 51 | dotnet fsdocs watch --sourcefolder fsharp 52 | 53 | ## CI Pipeline 54 | 55 | This repo is published via GitHub Actions. On each push to main, the docs are built, 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, so once the generated files are pushed the update is nearly-instant. 56 | 57 | To build the very latest and freshest docs the CI does this: 58 | 59 | 1. build dotnet/fsharp `main` branch (where we assume latest doc updates have been pushed). 60 | 61 | 2. generate the documentation using the local dotnet fsdocs tool. 62 | -------------------------------------------------------------------------------- /docs/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fsharp/fsharp-core-docs/01485748befaddde5df0b0a1a757588316ff3015/docs/img/favicon.ico -------------------------------------------------------------------------------- /docs/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fsharp/fsharp-core-docs/01485748befaddde5df0b0a1a757588316ff3015/docs/img/logo.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | 2 | # F# Core Library Documentation 3 | 4 | This site contains the documentation for the FSharp.Core library used in all F# code. 5 | 6 | FSharp.Core contains functionality for basic F# definitions, operations for collections such as lists, maps and sequences, 7 | and library functionality for quotations, reflections, events, asynchronous programming and native interoperability. 8 | 9 | The following namespaces are available: 10 | 11 | * [FSharp.Core](reference/fsharp-core.html) - Basic definitions of options, functions, operators, results and formatting. 12 | 13 | * [FSharp.Collections](reference/fsharp-collections.html) - Operations for collections such as lists, arrays, sets, maps and sequences. See also [F# Collection Types](https://docs.microsoft.com/dotnet/fsharp/language-reference/fsharp-collection-types) in the F# Language Guide. 14 | 15 | * [FSharp.Control](reference/fsharp-control.html) - Library functionality for asynchronous programming, events and agents. See also [F# Asynchronous Programming](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/async-expressions) in the F# Language Guide. 16 | 17 | * [FSharp.Linq](reference/fsharp-linq.html) - Library functionality for F# query syntax and interoperability with .NET Expressions. See also [F# Query Expressions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/query-expressions) in the F# Language Guide. 18 | 19 | * [FSharp.Quotations](reference/fsharp-quotations.html) - Library functionality for F# quotations. See also [F# Code Quotations](https://docs.microsoft.com/dotnet/fsharp/language-reference/code-quotations) in the F# Language Guide. 20 | 21 | * [FSharp.Reflection](reference/fsharp-reflection.html) - Library functionality for accessing additional information about F# types and F# values at runtime, augmenting that available through [System.Reflection](https://docs.microsoft.com/dotnet/api/system.reflection). See also [F# Reflection](https://en.wikibooks.org/wiki/F_Sharp_Programming/Reflection) in the F# Wiki Book. 22 | 23 | * [FSharp.NativeInterop](reference/fsharp-nativeinterop.html) - Basic functionality for native interopability. See also [F# External Functions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/functions/external-functions) in the F# Language Guide. 24 | 25 | * [FSharp.Core.CompilerServices](reference/fsharp-core-compilerservices.html) - Library functionality for supporting type providers and code generated by the F# compiler. See also [F# Type Providers](https://docs.microsoft.com/en-us/dotnet/fsharp/tutorials/type-providers/) in the F# Language Guide. 26 | 27 | ## Contributing to this documentation 28 | 29 | To contribute to this documentation site and its content, please see [the notes in the corresponding GitHub repository](https://github.com/fsharp/fsharp-core-docs). 30 | -------------------------------------------------------------------------------- /dummyVersion.txt: -------------------------------------------------------------------------------- 1 | 20 2 | --------------------------------------------------------------------------------