Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d4d79f2
feat: add `EquatableArray<'T>`, an immutable array with value equality
xperiandri Oct 18, 2026
be63a1c
test: cover `EquatableArray` in F#
xperiandri Oct 18, 2026
9e14674
test: check `EquatableArray` from C#
xperiandri Oct 18, 2026
7e8f5ee
docs: list `EquatableArray` in the changelog, the README and the docs
xperiandri Oct 18, 2026
06215b9
fixup! feat: add `EquatableArray<'T>`, an immutable array with value …
xperiandri Nov 14, 2026
10230c9
fixup! test: cover `EquatableArray` in F#
xperiandri Nov 14, 2026
586fa8a
fixup! feat: add `EquatableArray<'T>`, an immutable array with value …
xperiandri Nov 18, 2026
ad7ebe0
fixup! test: cover `EquatableArray` in F#
xperiandri Nov 18, 2026
198250a
fixup! test: check `EquatableArray` from C#
xperiandri Nov 18, 2026
88da542
fixup! docs: list `EquatableArray` in the changelog, the README and t…
xperiandri Nov 18, 2026
56f9b0a
feat: add LINQ extension methods for `EquatableArray`
xperiandri Nov 18, 2026
1f8c2e1
fixup! test: cover `EquatableArray` in F#
xperiandri Nov 18, 2026
3a68a20
fixup! test: cover `EquatableArray` in F#
xperiandri Nov 18, 2026
0489028
fixup! feat: add `EquatableArray<'T>`, an immutable array with value …
xperiandri Nov 19, 2026
63003d3
fixup! test: cover `EquatableArray` in F#
xperiandri Nov 19, 2026
a052f85
fixup! test: check `EquatableArray` from C#
xperiandri Nov 19, 2026
7975c82
fixup! feat: add LINQ extension methods for `EquatableArray`
xperiandri Nov 19, 2026
e7baaff
fixup! feat: add `EquatableArray<'T>`, an immutable array with value …
xperiandri Nov 30, 2026
d68da95
fixup! feat: add LINQ extension methods for `EquatableArray`
xperiandri Nov 30, 2026
6c1d7e0
fixup! test: cover `EquatableArray` in F#
xperiandri Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ module's `.fsi` and the `.fs` on its `.fs`, so that Visual Studio shows them as
│ │ ├── FlatListTuple.fs / FlatListTuple.fsi – Tuple namespace overrides
│ │ ├── FlatListBuilder.fs / FlatListBuilder.fsi
│ │ └── FlatListCE.fs / FlatListCE.fsi
│ ├── EquatableArray/ – ImmutableArray with value semantics, JSON converter, patterns
│ │ ├── EquatableArray.fs / EquatableArray.fsi
│ │ ├── EquatableArrayLinqExtensions.fs / EquatableArrayLinqExtensions.fsi – LINQ operators for C# that do not box the array
│ │ └── EquatableArrayPatterns.fs / EquatableArrayPatterns.fsi
│ ├── IndexedList/ – ImmutableList API surface and builders
│ │ ├── IndexedListTypes.fs
│ │ ├── IndexedList.fs / IndexedList.fsi
Expand Down Expand Up @@ -117,6 +121,8 @@ module's `.fsi` and the `.fs` on its `.fs`, so that Visual Studio shows them as
│ │ ├── FrozenSetTuple.fs / FrozenSetTuple.fsi
│ │ └── FrozenSetCE.fs / FrozenSetCE.fsi
│ └── ComputationExpressions.fs / .fsi – the computation expression instances
├── tests/FSharp.Collections.Immutable.CSharp.Tests/ – MSTest project in C#: collection expressions, ranges, operators, LINQ;
│ uses the category attributes of the F# test project
└── tests/FSharp.Collections.Immutable.Tests/ – MSTest test project
├── TestCategories.fs – centralized custom test category attributes
├── TestCategoriesTests.fs – enforces the test category rules
Expand Down Expand Up @@ -150,8 +156,10 @@ The modules follow ADR 0001 – Per-collection modules (`docsSrc/Explanations/AD

* [`System.Collections.Immutable`](https://www.nuget.org/packages/System.Collections.Immutable/) – immutable collections foundation
* [`FSharp.Core`](https://www.nuget.org/packages/FSharp.Core/) – F# language core library
* [`System.Text.Json`](https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/overview) – the JSON converter of `EquatableArray` (shared framework, no package)
* [`MSTest`](https://github.com/microsoft/testfx) – test framework
* [`Unquote`](https://github.com/SwensenSoftware/unquote) – expressive assertions for complex checks
* [`FSharp.SystemTextJson`](https://github.com/Tarmil/FSharp.SystemTextJson) – JSON tests with F# records and unions
* [`FAKE`](https://fake.build/) – build and release scripting
* [`Argu`](https://github.com/fsprojects/Argu) – command-line parsing for build tooling

Expand Down Expand Up @@ -353,6 +361,7 @@ module MyTypeExtensions =
* Prefix interface names with `I`.
* Do not prefix type parameters with `T` (e.g., use `'Result` instead of `'TResult`).
* Name tests using spaces (e.g., `member this.``Test name with spaces``() : Task = ...`).
* Name C# tests with underscores in place of the spaces (e.g., `public void Test_name_with_underscores ()`).

## Testing

Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
semantics and exceptions. Its `tryFind`, `tryFindIndex` and `tryPick` return `voption`, `choose` and `tryPick` take
functions that return `voption`, and `groupBy`, `partition`, `partitionWith` and `zip` return struct tuples; the
`Parallel` modules of the `Option` and `Tuple` namespaces repeat them with options and reference tuples.
* `EquatableArray<'T>`: a struct over one `ImmutableArray<'T>` with value semantics, for fields of records and unions,
dictionary and set keys and persisted documents (ADR 0002)
* Equality and the hash code use all elements; every caller gets them, C# `==` and `!=` included
* Comparison puts shorter arrays first, then orders by the first different element, in the order of F# comparison
* The default value is the empty array
* Conversion to and from `ImmutableArray<'T>` does not copy; C# collection expressions and ranges work
* A System.Text.Json converter that needs no registration
* The `EquatableArray` module: `empty`, `ofArray`, `ofImmutableArray`, `ofList`, `ofSeq`, `singleton`,
`unsafeOfArray`, `isEmpty`, `length`, `map`, `toImmutableArray`
* The struct partial active patterns `Arr0`, `Arr1`, `Arr2`, `Arr3` and `ArrN`
* `EquatableArrayLinqExtensions`: the LINQ operators that `ImmutableArray<'T>` has in `System.Linq`, as extension methods
for C# that do not box the array (`Aggregate`, `All`, `Any`, `ElementAt`, `ElementAtOrDefault`, `First`,
`FirstOrDefault`, `Last`, `LastOrDefault`, `Select`, `SelectMany`, `Single`, `SingleOrDefault`, `ToArray`,
`ToDictionary` and `Where`); they give the results and the exceptions of `Enumerable`

### Changed

Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<PackageVersion Include="Fake.IO.FileSystem" Version="6.2.0" />
<PackageVersion Include="Fake.Tools.Git" Version="6.2.0" />
<PackageVersion Include="Fantomas.FCS" Version="8.0.10" />
<PackageVersion Include="FSharp.SystemTextJson" Version="1.4.36" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.402" />
<PackageVersion Include="MSTest" Version="4.5.3" />
Expand Down
1 change: 1 addition & 0 deletions FSharp.Collections.Immutable.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"path": "FSharp.Collections.Immutable.slnx",
"projects": [
"src\\FSharp.Collections.Immutable\\FSharp.Collections.Immutable.fsproj",
"tests\\FSharp.Collections.Immutable.CSharp.Tests\\FSharp.Collections.Immutable.CSharp.Tests.csproj",
"tests\\FSharp.Collections.Immutable.Tests\\FSharp.Collections.Immutable.Tests.fsproj"
]
}
Expand Down
1 change: 1 addition & 0 deletions FSharp.Collections.Immutable.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Project Path="src\FSharp.Collections.Immutable\FSharp.Collections.Immutable.fsproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests\FSharp.Collections.Immutable.CSharp.Tests\FSharp.Collections.Immutable.CSharp.Tests.csproj" />
<Project Path="tests\FSharp.Collections.Immutable.Tests\FSharp.Collections.Immutable.Tests.fsproj" />
</Folder>
<Project Path="build\build.fsproj" />
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Please also join the [F# Open Source Group](http://fsharp.github.com)
| Module | .NET type | Computation expression |
|---|---|---|
| `FlatList` | `ImmutableArray<'T>` | `flatList { }` |
| `EquatableArray` | `EquatableArray<'T>`, an `ImmutableArray<'T>` with value equality, comparison and an empty default value | – |
| `ImmutableList` | `ImmutableList<'T>` | – |
| `Stack` | `ImmutableStack<'T>` | – |
| `Queue` | `ImmutableQueue<'T>` | – |
Expand Down
1 change: 1 addition & 0 deletions docsSrc/Explanations/Background.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ While F# has its own built-in immutable collections, System.Collections.Immutabl
| Module | .NET type | Computation expression |
|---|---|---|
| `FlatList` | `ImmutableArray<'T>` | `flatList { }` |
| `EquatableArray` | `EquatableArray<'T>`, an `ImmutableArray<'T>` with value equality, comparison and an empty default value | – |
| `ImmutableList` | `ImmutableList<'T>` | – |
| `Stack` | `ImmutableStack<'T>` | – |
| `Queue` | `ImmutableQueue<'T>` | – |
Expand Down
1 change: 1 addition & 0 deletions docsSrc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ F# bindings for [System.Collections.Immutable](https://learn.microsoft.com/en-us
| Module | .NET type | Computation expression |
|---|---|---|
| `FlatList` | `ImmutableArray<'T>` | `flatList { }` |
| `EquatableArray` | `EquatableArray<'T>`, an `ImmutableArray<'T>` with value equality, comparison and an empty default value | – |
| `ImmutableList` | `ImmutableList<'T>` | – |
| `Stack` | `ImmutableStack<'T>` | – |
| `Queue` | `ImmutableQueue<'T>` | – |
Expand Down
Loading
Loading