Marey.Analyzers 1.0.0

dotnet add package Marey.Analyzers --version 1.0.0
                    
NuGet\Install-Package Marey.Analyzers -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Marey.Analyzers" Version="1.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Marey.Analyzers" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Marey.Analyzers">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Marey.Analyzers --version 1.0.0
                    
#r "nuget: Marey.Analyzers, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Marey.Analyzers@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Marey.Analyzers&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Marey.Analyzers&version=1.0.0
                    
Install as a Cake Tool

Marey.Analyzers

F# analyzers for Marey's unit witnesses, for Ionide and the fsharp-analyzers CLI. Each offers a fix for a call the compiler refuses for want of the right witness:

let t = Array.init 24 (fun i -> float i * 0.025<s>)
let x = t |> Array.map (fun t -> 0.5 * 9.81<m/s^2> * t * t)

Chart.lineIn t x                  // MAREY001: inserts U.second U.metre
Chart.lineIn U.metre U.metre t x  // MAREY002: U.second for the first
Chart.line t x                    // MAREY003: Chart.lineIn U.second U.metre t x,
                                  //   or Chart.line (U.second.Of t) (U.metre.Of x)

A witness is the one Marey declares for the measure as written, U.metrePerSecondSquared for m/s^2. A measure Marey declares no witness for is composed as it is written: V/m is U.div U.volt U.metre, and a torque in N m stays U.mul U.newton U.metre rather than becoming joules. A plain float gets U.unspecified. An argument's unit is read from its type where the argument is a name (t, run.Times); for an argument of another shape, no fix is offered.

A file that compiles gets no message.

Using it

The package is a development dependency with nothing to reference: its analyzers are in analyzers/dotnet/fs, where a host loads them.

<PackageReference Include="Marey.Analyzers" Version="…" PrivateAssets="all" />

The CLI runs them over a project:

dotnet tool install fsharp-analyzers
dotnet fsharp-analyzers --project App.fsproj --analyzers-path ~/.nuget/packages/marey.analyzers/<version>/analyzers/dotnet/fs

In VS Code, Ionide runs them as you type and offers the fixes as quick fixes, with "FSharp.enableAnalyzers": true and the same folder in "FSharp.analyzersPath".

Built against FSharp.Analyzers.SDK 0.41.0, which is what a host has to run: a host loads only analyzers built against its own SDK. The fixes themselves are Marey.Witnesses, which a tool that checks F# itself calls directly.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 40 11/23/2026
1.0.0-rc.3 56 11/12/2026
1.0.0-rc.2 62 11/3/2026
1.0.0-rc.1 62 11/2/2026