MonadicTypes.NET.Analyzers 0.3.0-preview.2

This is a prerelease version of MonadicTypes.NET.Analyzers.
dotnet add package MonadicTypes.NET.Analyzers --version 0.3.0-preview.2
                    
NuGet\Install-Package MonadicTypes.NET.Analyzers -Version 0.3.0-preview.2
                    
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="MonadicTypes.NET.Analyzers" Version="0.3.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MonadicTypes.NET.Analyzers" Version="0.3.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="MonadicTypes.NET.Analyzers" />
                    
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 MonadicTypes.NET.Analyzers --version 0.3.0-preview.2
                    
#r "nuget: MonadicTypes.NET.Analyzers, 0.3.0-preview.2"
                    
#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 MonadicTypes.NET.Analyzers@0.3.0-preview.2
                    
#: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=MonadicTypes.NET.Analyzers&version=0.3.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MonadicTypes.NET.Analyzers&version=0.3.0-preview.2&prerelease
                    
Install as a Cake Tool

MonadicTypes.NET.Analyzers

Opt-in Roslyn diagnostics for precise MonadicTypes.NET usage hazards. The package is a build-time analyzer and adds no runtime dependency.

Install

dotnet add package MonadicTypes.NET.Analyzers --prerelease

The current rule, MT0001, warns when Option<T> is compared directly with null. Option<T> is a value type, so that syntax does not test absence; use IsNone, IsSome, or compare with Option<T>.None. Nullable reference and nullable value comparisons remain unaffected.

MT0002 warns when an instance or multi-input Map produces another Result or Option, or when MapError produces a railway in the error slot. These create nested railway values where Bind or BindError is usually intended. Nested values can be legitimate data; suppress MT0002 at those explicit boundaries.

The diagnostic is intentionally opt-in. Consumers can configure its severity in .editorconfig or suppress it at a documented boundary.

Apache-2.0. Developed with AI assistance.

Repository API reference

Documented public members: 0

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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
0.3.0-preview.2 331 9/12/2026
0.3.0-preview.1 56 9/12/2026