diff --git a/.github/workflows/fable.yml b/.github/workflows/fable.yml index 343e63f25..6cd83b6e9 100644 --- a/.github/workflows/fable.yml +++ b/.github/workflows/fable.yml @@ -8,44 +8,6 @@ on: jobs: - testfable3: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Restore - run: git submodule update --init --recursive - - name: Remove global json - run: rm global.json - - name: Set target framework to net6 instead of net8 - uses: Mudlet/xmlstarlet-action@master - with: - args: edit --inplace --update "/Project/PropertyGroup/TargetFrameworks" --value "netstandard2.0;netstandard2.1;net6.0" ./src/FSharpPlus/FSharpPlus.fsproj - - name: Setup .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 8.0.x - 7.0.x - 6.0.x - - name: Restore tools - run: dotnet tool restore - - name: Create global.json - working-directory: tests/FSharpPlusFable.Tests - run: mv fable3-global.json global.json - - name: Install fable - run: dotnet tool install --global Fable --version 3.7.22 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - name: Install npm dependencies - working-directory: tests/FSharpPlusFable.Tests - run: npm install - - name: Run Fable tests - working-directory: tests/FSharpPlusFable.Tests - run: fable . --outDir bin --runScript ./bin - testfable4: runs-on: ubuntu-latest @@ -81,30 +43,3 @@ jobs: working-directory: tests/FSharpPlusFable.Tests run: fable . --outDir bin --runScript ./bin - testFable3SubsetOnCore: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Restore - run: git submodule update --init --recursive - - name: Remove global json - run: rm global.json - - name: Setup .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 8.0.x - 7.0.x - 6.0.x - - name: Restore tools - run: dotnet tool restore - # - name: Run tests (Fable2 subset but on .net) - # working-directory: tests/FSharpPlusFable.Tests - # run: dotnet run -c Fable - - name: Run tests (Fable3 subset but on .net) - working-directory: tests/FSharpPlusFable.Tests - run: dotnet run -c Fable3 - - name: Run tests (Full subset for of tests .net) - working-directory: tests/FSharpPlusFable.Tests - run: dotnet run -c Release diff --git a/docsrc/content/abstraction-alternative.fsx b/docsrc/content/abstraction-alternative.fsx index e72041d5f..afe228443 100644 --- a/docsrc/content/abstraction-alternative.fsx +++ b/docsrc/content/abstraction-alternative.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Alternative diff --git a/docsrc/content/abstraction-applicative.fsx b/docsrc/content/abstraction-applicative.fsx index 3758b575f..f88534077 100644 --- a/docsrc/content/abstraction-applicative.fsx +++ b/docsrc/content/abstraction-applicative.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Applicative diff --git a/docsrc/content/abstraction-bifoldable.fsx b/docsrc/content/abstraction-bifoldable.fsx index 3d8fb12e0..37ce6f36a 100644 --- a/docsrc/content/abstraction-bifoldable.fsx +++ b/docsrc/content/abstraction-bifoldable.fsx @@ -94,7 +94,7 @@ Examples -------- *) -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus open FSharpPlus.Control diff --git a/docsrc/content/abstraction-bifunctor.fsx b/docsrc/content/abstraction-bifunctor.fsx index 7863e501e..d50e49107 100644 --- a/docsrc/content/abstraction-bifunctor.fsx +++ b/docsrc/content/abstraction-bifunctor.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Bifunctor ======= diff --git a/docsrc/content/abstraction-bitraversable.fsx b/docsrc/content/abstraction-bitraversable.fsx index f41a72897..451669a91 100644 --- a/docsrc/content/abstraction-bitraversable.fsx +++ b/docsrc/content/abstraction-bitraversable.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Bitraversable diff --git a/docsrc/content/abstraction-comonad.fsx b/docsrc/content/abstraction-comonad.fsx index 2a18d3164..a5492bb4e 100644 --- a/docsrc/content/abstraction-comonad.fsx +++ b/docsrc/content/abstraction-comonad.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Comonad diff --git a/docsrc/content/abstraction-contravariant.fsx b/docsrc/content/abstraction-contravariant.fsx index 1932bc072..25b65ed94 100644 --- a/docsrc/content/abstraction-contravariant.fsx +++ b/docsrc/content/abstraction-contravariant.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Contravariant diff --git a/docsrc/content/abstraction-foldable.fsx b/docsrc/content/abstraction-foldable.fsx index 0dfd35df1..a7dfe0c1e 100644 --- a/docsrc/content/abstraction-foldable.fsx +++ b/docsrc/content/abstraction-foldable.fsx @@ -81,7 +81,7 @@ Examples -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus open FSharpPlus.Data diff --git a/docsrc/content/abstraction-functor.fsx b/docsrc/content/abstraction-functor.fsx index 4bd0e7671..b41e8a0b6 100644 --- a/docsrc/content/abstraction-functor.fsx +++ b/docsrc/content/abstraction-functor.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Functor diff --git a/docsrc/content/abstraction-misc.fsx b/docsrc/content/abstraction-misc.fsx index 21c1d1ad4..3762f3acd 100644 --- a/docsrc/content/abstraction-misc.fsx +++ b/docsrc/content/abstraction-misc.fsx @@ -16,7 +16,7 @@ Here are some other abstractions, not present in the diagram. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open System open FSharpPlus diff --git a/docsrc/content/abstraction-monad.fsx b/docsrc/content/abstraction-monad.fsx index eb1fce5ad..113f54e7d 100644 --- a/docsrc/content/abstraction-monad.fsx +++ b/docsrc/content/abstraction-monad.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Monad diff --git a/docsrc/content/abstraction-monoid.fsx b/docsrc/content/abstraction-monoid.fsx index 45c0088bd..e79d881a9 100644 --- a/docsrc/content/abstraction-monoid.fsx +++ b/docsrc/content/abstraction-monoid.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Monoid diff --git a/docsrc/content/abstraction-profunctor.fsx b/docsrc/content/abstraction-profunctor.fsx index e8ac497ca..625273574 100644 --- a/docsrc/content/abstraction-profunctor.fsx +++ b/docsrc/content/abstraction-profunctor.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Profunctor diff --git a/docsrc/content/abstraction-traversable.fsx b/docsrc/content/abstraction-traversable.fsx index b6441d6a4..53b6856c6 100644 --- a/docsrc/content/abstraction-traversable.fsx +++ b/docsrc/content/abstraction-traversable.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Traversable diff --git a/docsrc/content/abstraction-zipapplicative.fsx b/docsrc/content/abstraction-zipapplicative.fsx index 6a5dde11b..c4fbed33d 100644 --- a/docsrc/content/abstraction-zipapplicative.fsx +++ b/docsrc/content/abstraction-zipapplicative.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Zip Applicative (aka Non-sequential Applicative) diff --git a/docsrc/content/applicative-functors.fsx b/docsrc/content/applicative-functors.fsx index 3252bc7c9..8dd85e8a6 100644 --- a/docsrc/content/applicative-functors.fsx +++ b/docsrc/content/applicative-functors.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Functors and Applicatives diff --git a/docsrc/content/computation-expressions.fsx b/docsrc/content/computation-expressions.fsx index d34684df9..35d98f432 100644 --- a/docsrc/content/computation-expressions.fsx +++ b/docsrc/content/computation-expressions.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus open FSharpPlus.Data diff --git a/docsrc/content/extension-methods.fsx b/docsrc/content/extension-methods.fsx index 68c363d9d..08215fa9d 100644 --- a/docsrc/content/extension-methods.fsx +++ b/docsrc/content/extension-methods.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus (** diff --git a/docsrc/content/extensions.fsx b/docsrc/content/extensions.fsx index 6ed266d50..afd5b22e0 100644 --- a/docsrc/content/extensions.fsx +++ b/docsrc/content/extensions.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Extensions diff --git a/docsrc/content/generic-doc.fsx b/docsrc/content/generic-doc.fsx index 9dfeece0c..8b8c0f615 100644 --- a/docsrc/content/generic-doc.fsx +++ b/docsrc/content/generic-doc.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus (** diff --git a/docsrc/content/index.fsx b/docsrc/content/index.fsx index ce5baf743..4ac722b02 100644 --- a/docsrc/content/index.fsx +++ b/docsrc/content/index.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** FSharpPlus diff --git a/docsrc/content/lens.fsx b/docsrc/content/lens.fsx index 37c3815ef..b8d0f74bc 100644 --- a/docsrc/content/lens.fsx +++ b/docsrc/content/lens.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Lens diff --git a/docsrc/content/numerics.fsx b/docsrc/content/numerics.fsx index 8fdacae31..819eb05a7 100644 --- a/docsrc/content/numerics.fsx +++ b/docsrc/content/numerics.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus (** diff --git a/docsrc/content/operators-common.fsx b/docsrc/content/operators-common.fsx index f309e5996..d405e8892 100644 --- a/docsrc/content/operators-common.fsx +++ b/docsrc/content/operators-common.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus (** diff --git a/docsrc/content/parsing.fsx b/docsrc/content/parsing.fsx index 09d7aa09d..249d4f3e6 100644 --- a/docsrc/content/parsing.fsx +++ b/docsrc/content/parsing.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. open System -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus (** # Parsing diff --git a/docsrc/content/tutorial.fsx b/docsrc/content/tutorial.fsx index 9536d204d..7c0527eae 100644 --- a/docsrc/content/tutorial.fsx +++ b/docsrc/content/tutorial.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Introducing FSharpPlus diff --git a/docsrc/content/type-all.fsx b/docsrc/content/type-all.fsx index c9e96f19f..d0439faa9 100644 --- a/docsrc/content/type-all.fsx +++ b/docsrc/content/type-all.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** All diff --git a/docsrc/content/type-any.fsx b/docsrc/content/type-any.fsx index efdc9e7d6..fbb4763a8 100644 --- a/docsrc/content/type-any.fsx +++ b/docsrc/content/type-any.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Any diff --git a/docsrc/content/type-choicet.fsx b/docsrc/content/type-choicet.fsx index 9eb6099f0..243da2a1d 100644 --- a/docsrc/content/type-choicet.fsx +++ b/docsrc/content/type-choicet.fsx @@ -10,6 +10,6 @@ Examples *) -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus \ No newline at end of file diff --git a/docsrc/content/type-compose.fsx b/docsrc/content/type-compose.fsx index 674a7e4a4..5f8906259 100644 --- a/docsrc/content/type-compose.fsx +++ b/docsrc/content/type-compose.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Compose diff --git a/docsrc/content/type-const.fsx b/docsrc/content/type-const.fsx index d908c9753..806a0d871 100644 --- a/docsrc/content/type-const.fsx +++ b/docsrc/content/type-const.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Const<'T,'U> ============ diff --git a/docsrc/content/type-cont.fsx b/docsrc/content/type-cont.fsx index 9ab3b3669..fe5adf0d7 100644 --- a/docsrc/content/type-cont.fsx +++ b/docsrc/content/type-cont.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Cont<'R,'U> diff --git a/docsrc/content/type-contt.fsx b/docsrc/content/type-contt.fsx index 549fe4532..d37a32257 100644 --- a/docsrc/content/type-contt.fsx +++ b/docsrc/content/type-contt.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! diff --git a/docsrc/content/type-coproduct.fsx b/docsrc/content/type-coproduct.fsx index 438e6b391..b30b7cc9f 100644 --- a/docsrc/content/type-coproduct.fsx +++ b/docsrc/content/type-coproduct.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! diff --git a/docsrc/content/type-dlist.fsx b/docsrc/content/type-dlist.fsx index 23c946ac6..8c66e8e9b 100644 --- a/docsrc/content/type-dlist.fsx +++ b/docsrc/content/type-dlist.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** DList diff --git a/docsrc/content/type-dual.fsx b/docsrc/content/type-dual.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-dual.fsx +++ b/docsrc/content/type-dual.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-endo.fsx b/docsrc/content/type-endo.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-endo.fsx +++ b/docsrc/content/type-endo.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-first.fsx b/docsrc/content/type-first.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-first.fsx +++ b/docsrc/content/type-first.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-free.fsx b/docsrc/content/type-free.fsx index c886aff5d..75b029829 100644 --- a/docsrc/content/type-free.fsx +++ b/docsrc/content/type-free.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Free<'Functor<'T>, 'T> ====================== diff --git a/docsrc/content/type-identity.fsx b/docsrc/content/type-identity.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-identity.fsx +++ b/docsrc/content/type-identity.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-kleisli.fsx b/docsrc/content/type-kleisli.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-kleisli.fsx +++ b/docsrc/content/type-kleisli.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-last.fsx b/docsrc/content/type-last.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-last.fsx +++ b/docsrc/content/type-last.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-listt.fsx b/docsrc/content/type-listt.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-listt.fsx +++ b/docsrc/content/type-listt.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-matrix.fsx b/docsrc/content/type-matrix.fsx index 76f3d6461..d578a5290 100644 --- a/docsrc/content/type-matrix.fsx +++ b/docsrc/content/type-matrix.fsx @@ -1,8 +1,8 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" -#r @"../../src/FSharpPlus.TypeLevel/bin/Release/netstandard2.0/FSharpPlus.TypeLevel.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus.TypeLevel/bin/Release/net8.0/FSharpPlus.TypeLevel.dll" (** Matrix<'NumType,'Rows,'Cols> diff --git a/docsrc/content/type-mult.fsx b/docsrc/content/type-mult.fsx index 9eb6099f0..243da2a1d 100644 --- a/docsrc/content/type-mult.fsx +++ b/docsrc/content/type-mult.fsx @@ -10,6 +10,6 @@ Examples *) -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus \ No newline at end of file diff --git a/docsrc/content/type-nonempty-map.fsx b/docsrc/content/type-nonempty-map.fsx index 53c4bc450..3c9aa0150 100644 --- a/docsrc/content/type-nonempty-map.fsx +++ b/docsrc/content/type-nonempty-map.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** NonEmptyMap<'Key, 'Value> ================ diff --git a/docsrc/content/type-nonempty-set.fsx b/docsrc/content/type-nonempty-set.fsx index 0bd1365f2..f55b2e030 100644 --- a/docsrc/content/type-nonempty-set.fsx +++ b/docsrc/content/type-nonempty-set.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** NonEmptySet<'T> ================ diff --git a/docsrc/content/type-nonempty.fsx b/docsrc/content/type-nonempty.fsx index ddfcd2d64..c5df3f06a 100644 --- a/docsrc/content/type-nonempty.fsx +++ b/docsrc/content/type-nonempty.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** NonEmptyList<'T> ================ diff --git a/docsrc/content/type-optiont.fsx b/docsrc/content/type-optiont.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-optiont.fsx +++ b/docsrc/content/type-optiont.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-parallelarray.fsx b/docsrc/content/type-parallelarray.fsx index 8eeb15681..68f44e5dc 100644 --- a/docsrc/content/type-parallelarray.fsx +++ b/docsrc/content/type-parallelarray.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** ParallelArray<'T> ================= diff --git a/docsrc/content/type-reader.fsx b/docsrc/content/type-reader.fsx index 5e516eba3..3cc910130 100644 --- a/docsrc/content/type-reader.fsx +++ b/docsrc/content/type-reader.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Reader<'R,'T> ============= diff --git a/docsrc/content/type-readert.fsx b/docsrc/content/type-readert.fsx index b6da36f54..65153b41d 100644 --- a/docsrc/content/type-readert.fsx +++ b/docsrc/content/type-readert.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-resultt.fsx b/docsrc/content/type-resultt.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-resultt.fsx +++ b/docsrc/content/type-resultt.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-seqt.fsx b/docsrc/content/type-seqt.fsx index e004f249a..e316986fc 100644 --- a/docsrc/content/type-seqt.fsx +++ b/docsrc/content/type-seqt.fsx @@ -2,7 +2,7 @@ // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" // For some reason AsyncDownloadString is not found during doc build. The following is a dumb implementation just to make the compiler happy. // TODO find out why. diff --git a/docsrc/content/type-state.fsx b/docsrc/content/type-state.fsx index e47190152..834d39739 100644 --- a/docsrc/content/type-state.fsx +++ b/docsrc/content/type-state.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** State<'S,'T> ============ diff --git a/docsrc/content/type-statet.fsx b/docsrc/content/type-statet.fsx index 9eb6099f0..243da2a1d 100644 --- a/docsrc/content/type-statet.fsx +++ b/docsrc/content/type-statet.fsx @@ -10,6 +10,6 @@ Examples *) -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus \ No newline at end of file diff --git a/docsrc/content/type-validation.fsx b/docsrc/content/type-validation.fsx index 3e0738849..5b8725415 100644 --- a/docsrc/content/type-validation.fsx +++ b/docsrc/content/type-validation.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Validation<'Error, 'T> ====================== diff --git a/docsrc/content/type-valueoptiont.fsx b/docsrc/content/type-valueoptiont.fsx index c0fd33567..cc5ad49c0 100644 --- a/docsrc/content/type-valueoptiont.fsx +++ b/docsrc/content/type-valueoptiont.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** TO-DO Add some docs here ! ========================= diff --git a/docsrc/content/type-vector.fsx b/docsrc/content/type-vector.fsx index 8c8ce7184..b9187c799 100644 --- a/docsrc/content/type-vector.fsx +++ b/docsrc/content/type-vector.fsx @@ -1,8 +1,8 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" -#r @"../../src/FSharpPlus.TypeLevel/bin/Release/netstandard2.0/FSharpPlus.TypeLevel.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus.TypeLevel/bin/Release/net8.0/FSharpPlus.TypeLevel.dll" (** Vector<'NumType,'Dimension> diff --git a/docsrc/content/type-writer.fsx b/docsrc/content/type-writer.fsx index 76513a840..ece06d5eb 100644 --- a/docsrc/content/type-writer.fsx +++ b/docsrc/content/type-writer.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** Writer<'Monoid,'T> ================== diff --git a/docsrc/content/type-writert.fsx b/docsrc/content/type-writert.fsx index 9eb6099f0..243da2a1d 100644 --- a/docsrc/content/type-writert.fsx +++ b/docsrc/content/type-writert.fsx @@ -10,6 +10,6 @@ Examples *) -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" open FSharpPlus \ No newline at end of file diff --git a/docsrc/content/type-ziplist.fsx b/docsrc/content/type-ziplist.fsx index 2b0e29d82..f1b537bbf 100644 --- a/docsrc/content/type-ziplist.fsx +++ b/docsrc/content/type-ziplist.fsx @@ -1,7 +1,7 @@ (*** hide ***) // This block of code is omitted in the generated HTML documentation. Use // it to define helpers that you do not want to show in the documentation. -#r @"../../src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" (** ZipList<'T> =========== diff --git a/docsrc/tools/Program.fs b/docsrc/tools/Program.fs index 5e57476e6..d9121fcea 100644 --- a/docsrc/tools/Program.fs +++ b/docsrc/tools/Program.fs @@ -61,7 +61,7 @@ Target.create "Build" (fun _ -> OutputDirectory = output ProjectParameters = ("root", root)::info Projects = rootDir @@ "src/FSharpPlus/FSharpPlus.fsproj" - TargetPath = rootDir @@ "src/FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" + TargetPath = rootDir @@ "src/FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" SourceRepository = githubLink @@ "tree/master" } ) ) diff --git a/docsrc/tools/doclib.fs b/docsrc/tools/doclib.fs index 3200f6e6d..683fc289a 100644 --- a/docsrc/tools/doclib.fs +++ b/docsrc/tools/doclib.fs @@ -1025,7 +1025,7 @@ module ProcessUtils = type ProcessResult = { ExitCode : int; stdout : string; stderr : string } -let executeProcess (exe, cmdline, workingDir, (env:(string*string) list option)) = +let executeProcess (exe:string, cmdline:string, workingDir, (env:(string*string) list option)) = let psi = System.Diagnostics.ProcessStartInfo (exe, cmdline, UseShellExecute = false, diff --git a/docsrc/tools/docsTool.fsproj b/docsrc/tools/docsTool.fsproj index 7bd2f31f8..e57c3b809 100644 --- a/docsrc/tools/docsTool.fsproj +++ b/docsrc/tools/docsTool.fsproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 diff --git a/docsrc/tools/tools.fs b/docsrc/tools/tools.fs index 3a19d0f7d..f3d4a7f20 100644 --- a/docsrc/tools/tools.fs +++ b/docsrc/tools/tools.fs @@ -5,7 +5,7 @@ let () x y = IO.Path.Combine(x,y) module Path = // Paths with template/source/output locations - let bin = __SOURCE_DIRECTORY__ "../../src/FSharpPlus/bin/Release/netstandard2.0/" + let bin = __SOURCE_DIRECTORY__ "../../src/FSharpPlus/bin/Release/net8.0/" let content = __SOURCE_DIRECTORY__ "../content" let output = __SOURCE_DIRECTORY__ "../../docs" let templates = __SOURCE_DIRECTORY__ "./templates" diff --git a/src/FSharpPlus.Docs/FSharpPlus.Docs.fsproj b/src/FSharpPlus.Docs/FSharpPlus.Docs.fsproj index f25f1af8f..69477d202 100644 --- a/src/FSharpPlus.Docs/FSharpPlus.Docs.fsproj +++ b/src/FSharpPlus.Docs/FSharpPlus.Docs.fsproj @@ -8,7 +8,7 @@ Exe Debug;Release;Fable AnyCPU - net7.0 + net8.0 diff --git a/src/FSharpPlus.Docs/Samples/Collections.fsx b/src/FSharpPlus.Docs/Samples/Collections.fsx index b4bc1cf49..2567acef2 100644 --- a/src/FSharpPlus.Docs/Samples/Collections.fsx +++ b/src/FSharpPlus.Docs/Samples/Collections.fsx @@ -1,5 +1,5 @@ #if INTERACTIVE -#r @"../../FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" #else module Samples.Collections #endif diff --git a/src/FSharpPlus.Docs/Samples/Conversions.fsx b/src/FSharpPlus.Docs/Samples/Conversions.fsx index c4940ca4b..012adf0b3 100644 --- a/src/FSharpPlus.Docs/Samples/Conversions.fsx +++ b/src/FSharpPlus.Docs/Samples/Conversions.fsx @@ -1,5 +1,5 @@ #if INTERACTIVE -#r @"../../FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" #else module Samples.Conversions #endif diff --git a/src/FSharpPlus.Docs/Samples/Learn You a Haskell.fsx b/src/FSharpPlus.Docs/Samples/Learn You a Haskell.fsx index a9f043aef..19f761a77 100644 --- a/src/FSharpPlus.Docs/Samples/Learn You a Haskell.fsx +++ b/src/FSharpPlus.Docs/Samples/Learn You a Haskell.fsx @@ -1,5 +1,5 @@ #if INTERACTIVE -#r @"../../FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" #else module Samples.Learn_You_a_Haskell #endif diff --git a/src/FSharpPlus.Docs/Samples/Split-Join.fsx b/src/FSharpPlus.Docs/Samples/Split-Join.fsx index b108a574f..be2e81808 100644 --- a/src/FSharpPlus.Docs/Samples/Split-Join.fsx +++ b/src/FSharpPlus.Docs/Samples/Split-Join.fsx @@ -1,5 +1,5 @@ #if INTERACTIVE -#r @"../../FSharpPlus/bin/Release/netstandard2.0/FSharpPlus.dll" +#r @"../../FSharpPlus/bin/Release/net8.0/FSharpPlus.dll" #else module Samples.SplitJoin #endif diff --git a/src/FSharpPlus.TypeLevel/FSharpPlus.TypeLevel.fsproj b/src/FSharpPlus.TypeLevel/FSharpPlus.TypeLevel.fsproj index b07be6811..3c2b3e602 100644 --- a/src/FSharpPlus.TypeLevel/FSharpPlus.TypeLevel.fsproj +++ b/src/FSharpPlus.TypeLevel/FSharpPlus.TypeLevel.fsproj @@ -1,7 +1,7 @@  Library - netstandard2.0 + net8.0 $(DefineConstants);TYPELEVEL_DEBUG Debug;Release;Fable AnyCPU diff --git a/src/FSharpPlus.TypeLevel/Providers/FSharpPlus.Providers.fsproj b/src/FSharpPlus.TypeLevel/Providers/FSharpPlus.Providers.fsproj index fbe207760..e750b118b 100644 --- a/src/FSharpPlus.TypeLevel/Providers/FSharpPlus.Providers.fsproj +++ b/src/FSharpPlus.TypeLevel/Providers/FSharpPlus.Providers.fsproj @@ -5,7 +5,7 @@ $(FSC_ExePathCompilerBuild) - netstandard2.0 + net8.0 FSharpPlus.Providers FSharpPlus.Providers $(VersionPrefix).0 @@ -20,6 +20,12 @@ false true + + false + ..\bin Debug;Release;Fable diff --git a/src/FSharpPlus/Builders.fs b/src/FSharpPlus/Builders.fs index c56fb222d..cfaf86ca4 100644 --- a/src/FSharpPlus/Builders.fs +++ b/src/FSharpPlus/Builders.fs @@ -11,7 +11,7 @@ namespace FSharpPlus #nowarn "40" -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Constructs to express generic computations [] diff --git a/src/FSharpPlus/Control/Alternative.fs b/src/FSharpPlus/Control/Alternative.fs index 9592be0d0..fac6b2d4f 100644 --- a/src/FSharpPlus/Control/Alternative.fs +++ b/src/FSharpPlus/Control/Alternative.fs @@ -6,7 +6,7 @@ namespace FSharpPlus.Control /// /// -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER && !FABLE_COMPILER_4 open System.Runtime.InteropServices open FSharpPlus @@ -85,7 +85,7 @@ type IsAltLeftZero = type Choice = inherit Default1 - #if !FABLE_COMPILER || FABLE_COMPILER_3 + #if !FABLE_COMPILER static member inline Choice (x: ref<'``Foldable<'Alternative<'T>>``>, _mthd: Default4) = use e = (ToSeq.Invoke x.Value).GetEnumerator () let mutable res = Empty.Invoke () diff --git a/src/FSharpPlus/Control/Applicative.fs b/src/FSharpPlus/Control/Applicative.fs index 98ce29f37..5124498b6 100644 --- a/src/FSharpPlus/Control/Applicative.fs +++ b/src/FSharpPlus/Control/Applicative.fs @@ -14,7 +14,7 @@ open FSharpPlus.Data type Apply = inherit Default1 -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER static member ``<*>`` (struct (f: Lazy<'T->'U> , x: Lazy<'T> ) , _output: Lazy<'U> , []_mthd: Apply) = Lazy.apply f x : Lazy<'U> static member ``<*>`` (struct (f: seq<_> , x: seq<'T> ) , _output: seq<'U> , []_mthd: Apply) = Seq.apply f x : seq<'U> @@ -28,7 +28,7 @@ type Apply = #if !FABLE_COMPILER static member ``<*>`` (struct (f: Task<_> , x: Task<'T> ), _output: Task<'U> , []_mthd: Apply) = Task.apply f x : Task<'U> #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member ``<*>`` (struct (f: ValueTask<_> , x: ValueTask<'T> ), _output: ValueTask<'U> , []_mthd: Apply) : ValueTask<'U> = ValueTask.apply f x static member ``<*>`` (struct (_: DmStruct1<_> , _: DmStruct1<'T> ), _output: DmStruct1<'U> , []_mthd: Apply) : DmStruct1<'U> = Unchecked.defaultof> #endif @@ -88,7 +88,7 @@ type Apply = static member inline InvokeOnInstance (f: '``Applicative<'T->'U>``) (x: '``Applicative<'T>``) : '``Applicative<'U>`` = ((^``Applicative<'T->'U>`` or ^``Applicative<'T>`` or ^``Applicative<'U>``) : (static member (<*>) : _*_ -> _) (f, x)) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Apply with static member inline ``<*>`` (struct (f: '``Monad<'T->'U>`` , x: '``Monad<'T>`` ) , _output: '``Monad<'U>`` , []_mthd:Default2) : '``Monad<'U>`` = Bind.InvokeOnInstance f (fun (x1: 'T->'U) -> Bind.InvokeOnInstance x (fun x2 -> Return.InvokeOnInstance (x1 x2))) @@ -112,7 +112,7 @@ type Lift2 = #if !FABLE_COMPILER static member Lift2 (f, (x: Task<'T> , y: Task<'U> ), _mthd: Lift2) = Task.lift2 f x y #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Lift2 (f, (x: ValueTask<'T> , y: ValueTask<'U> ), _mthd: Lift2) = ValueTask.lift2 f x y #endif static member Lift2 (f, (x , y ), _mthd: Lift2) = Async.lift2 f x y @@ -161,7 +161,7 @@ type Lift3 = #if !FABLE_COMPILER static member Lift3 (f, (x: Task<'T> , y: Task<'U> , z: Task<'V> ), _mthd: Lift3) = Task.lift3 f x y z #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Lift3 (f, (x: ValueTask<'T> , y: ValueTask<'U> , z: ValueTask<'V> ), _mthd: Lift3) = ValueTask.lift3 f x y z #endif static member Lift3 (f, (x , y , z ), _mthd: Lift3) = Async.lift3 f x y z diff --git a/src/FSharpPlus/Control/Arrow.fs b/src/FSharpPlus/Control/Arrow.fs index b3abe037b..81897589a 100644 --- a/src/FSharpPlus/Control/Arrow.fs +++ b/src/FSharpPlus/Control/Arrow.fs @@ -1,7 +1,7 @@ namespace FSharpPlus.Control #nowarn "0077" -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open System open System.Runtime.InteropServices diff --git a/src/FSharpPlus/Control/ArrowApply.fs b/src/FSharpPlus/Control/ArrowApply.fs index b5fd722fe..4699b57c2 100644 --- a/src/FSharpPlus/Control/ArrowApply.fs +++ b/src/FSharpPlus/Control/ArrowApply.fs @@ -4,7 +4,7 @@ open System open System.Runtime.InteropServices open FSharpPlus.Internals -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER // ArrowApply class ------------------------------------------------------- diff --git a/src/FSharpPlus/Control/ArrowChoice.fs b/src/FSharpPlus/Control/ArrowChoice.fs index a4da4bc43..04bd2faee 100644 --- a/src/FSharpPlus/Control/ArrowChoice.fs +++ b/src/FSharpPlus/Control/ArrowChoice.fs @@ -1,7 +1,7 @@ namespace FSharpPlus.Control #nowarn "0077" -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open System open System.Runtime.InteropServices diff --git a/src/FSharpPlus/Control/Bifoldable.fs b/src/FSharpPlus/Control/Bifoldable.fs index 384e535e7..4499f1db8 100644 --- a/src/FSharpPlus/Control/Bifoldable.fs +++ b/src/FSharpPlus/Control/Bifoldable.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open System.Runtime.InteropServices open FSharpPlus.Internals diff --git a/src/FSharpPlus/Control/Bitraversable.fs b/src/FSharpPlus/Control/Bitraversable.fs index 7c08aa72c..0d1aac050 100644 --- a/src/FSharpPlus/Control/Bitraversable.fs +++ b/src/FSharpPlus/Control/Bitraversable.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER // open System.Runtime.InteropServices open FSharpPlus.Internals diff --git a/src/FSharpPlus/Control/Category.fs b/src/FSharpPlus/Control/Category.fs index 9cfe4657d..117f4659d 100644 --- a/src/FSharpPlus/Control/Category.fs +++ b/src/FSharpPlus/Control/Category.fs @@ -1,7 +1,7 @@ namespace FSharpPlus.Control #nowarn "0077" -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open System open System.Runtime.InteropServices diff --git a/src/FSharpPlus/Control/Collection.fs b/src/FSharpPlus/Control/Collection.fs index 9a832ee7b..b541125b7 100644 --- a/src/FSharpPlus/Control/Collection.fs +++ b/src/FSharpPlus/Control/Collection.fs @@ -8,7 +8,7 @@ open System.Runtime.InteropServices open FSharpPlus open FSharpPlus.Internals -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type OfSeq = inherit Default1 diff --git a/src/FSharpPlus/Control/Comonad.fs b/src/FSharpPlus/Control/Comonad.fs index 8f6e76f78..e476c79f0 100644 --- a/src/FSharpPlus/Control/Comonad.fs +++ b/src/FSharpPlus/Control/Comonad.fs @@ -13,7 +13,7 @@ open FSharpPlus.Internals type Extract = static member Extract (x: Async<'T>) = - #if FABLE_COMPILER_3 || FABLE_COMPILER_4 + #if FABLE_COMPILER Async.RunSynchronously x #else Async.AsTask(x).Result @@ -22,7 +22,7 @@ type Extract = static member Extract ((_: 'W, a: 'T) ) = a static member Extract (struct (_: 'W, a: 'T)) = a static member Extract (f: 'T Id ) = f - #if !FABLE_COMPILER || FABLE_COMPILER_3 + #if !FABLE_COMPILER static member inline Extract (f: 'Monoid -> 'T) = f (Zero.Invoke ()) #else static member inline Extract (f: 'Monoid -> 'T) = f (LanguagePrimitives.GenericZero) @@ -30,7 +30,7 @@ type Extract = #if !FABLE_COMPILER static member Extract (f: Task<'T> ) = f.Result #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Extract (f: ValueTask<'T> ) = f.Result #endif static member inline Invoke (x: '``Comonad<'T>``) : 'T = @@ -45,7 +45,7 @@ type Extend = static member (=>>) ((w: 'W, a: 'T) , f: _ -> 'U ) = (w, f (w, a)) static member (=>>) (struct (w: 'W, a: 'T), f: _ -> 'U ) = struct (w, f (struct (w, a))) static member (=>>) (g: Id<'T> , f: Id<'T> -> 'U ) = f g - #if !FABLE_COMPILER || FABLE_COMPILER_3 + #if !FABLE_COMPILER static member inline (=>>) (g: 'Monoid -> 'T, f: _ -> 'U ) = fun a -> f (fun b -> g (Plus.Invoke a b)) #else static member inline (=>>) (g: 'Monoid -> 'T, f: _ -> 'U ) = fun a -> f (fun b -> g (a + b)) @@ -67,7 +67,7 @@ type Extend = tcs.Task #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member (=>>) (g: ValueTask<'T> , f: ValueTask<'T> -> 'U ) : ValueTask<'U> = if g.IsCompletedSuccessfully then try @@ -94,13 +94,13 @@ type Extend = static member (=>>) (s: 'T [] , g) = Array.map g (s |> Array.toList |> List.tails |> List.toArray |> Array.map List.toArray) : 'U [] static member (=>>) (s: seq<'T> , g) = Seq.map g (s |> Seq.toList |> List.tails |> List.toSeq |> Seq.map List.toSeq) : 'U seq -#if !FABLE_COMPILER || FABLE_COMPILER_3 +#if !FABLE_COMPILER static member inline Invoke (g: '``Comonad<'T>``->'U) (s: '``Comonad<'T>``) : '``Comonad<'U>`` = let inline call (_mthd: 'M, source: 'I, _output: 'R) = ((^M or ^I or ^R) : (static member (=>>) : _*_ -> _) source, g) call (Unchecked.defaultof, s, Unchecked.defaultof<'``Comonad<'U>``>) #endif -#if !FABLE_COMPILER || FABLE_COMPILER_3 +#if !FABLE_COMPILER type Duplicate = inherit Default1 diff --git a/src/FSharpPlus/Control/Converter.fs b/src/FSharpPlus/Control/Converter.fs index aff56e6f6..3299e64d5 100644 --- a/src/FSharpPlus/Control/Converter.fs +++ b/src/FSharpPlus/Control/Converter.fs @@ -10,7 +10,7 @@ open System.Text open FSharpPlus.Internals open FSharpPlus.Internals.Prelude -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Explicit = inherit Default1 @@ -26,10 +26,8 @@ type Explicit = static member inline Explicit (_: uint32 , _: Explicit) = fun x -> uint32 x static member inline Explicit (_: int64 , _: Explicit) = fun x -> int64 x static member inline Explicit (_: uint64 , _: Explicit) = fun x -> uint64 x -#if !FABLE_COMPILER_3 static member inline Explicit (_: nativeint , _: Explicit) = fun x -> nativeint (int x) static member inline Explicit (_: unativeint, _: Explicit) = fun x -> unativeint (uint32 x) -#endif static member inline Explicit (_: float , _: Explicit) = fun x -> float x static member inline Explicit (_: float32 , _: Explicit) = fun x -> float32 x static member inline Explicit (_: decimal , _: Explicit) = fun x -> decimal x @@ -38,7 +36,7 @@ type Explicit = let inline call_2 (a: ^a, b: ^r) = ((^a or ^r or ^t) : (static member Explicit : _*_ -> ('t -> ^r)) b, a) let inline call (a: 'a) = fun (x: 'x) -> call_2 (a, Unchecked.defaultof<'r>) x : 'r call Unchecked.defaultof value -#if !FABLE_COMPILER_3 + type OfBytes = static member OfBytes (_: bool , _: OfBytes) = fun (x, i, _) -> BitConverter.ToBoolean(x, i) @@ -81,12 +79,10 @@ type ToBytes = let inline call (a: 'a, b: 'b, e) = call_2 (a, b, e) call (Unchecked.defaultof, value, isLittleEndian) -#endif open System.Globalization type TryParse = inherit Default1 -#if !FABLE_COMPILER_3 static member TryParse (_: decimal , _: TryParse) = fun (x:string) -> Decimal.TryParse (x, NumberStyles.Any, CultureInfo.InvariantCulture) |> tupleToOption : option static member TryParse (_: float32 , _: TryParse) = fun (x:string) -> Single.TryParse (x, NumberStyles.Any, CultureInfo.InvariantCulture) |> tupleToOption : option static member TryParse (_: float , _: TryParse) = fun (x:string) -> Double.TryParse (x, NumberStyles.Any, CultureInfo.InvariantCulture) |> tupleToOption : option @@ -96,18 +92,6 @@ type TryParse = static member TryParse (_: int16 , _: TryParse) = fun (x:string) -> Int16.TryParse (x, NumberStyles.Any, CultureInfo.InvariantCulture) |> tupleToOption : option static member TryParse (_: int , _: TryParse) = fun (x:string) -> Int32.TryParse (x, NumberStyles.Any, CultureInfo.InvariantCulture) |> tupleToOption : option static member TryParse (_: int64 , _: TryParse) = fun (x:string) -> Int64.TryParse (x, NumberStyles.Any, CultureInfo.InvariantCulture) |> tupleToOption : option -#else - static member TryParse (_: decimal , _: TryParse) = fun (x:string) -> Decimal.TryParse (x) |> tupleToOption : option - static member TryParse (_: float32 , _: TryParse) = fun (x:string) -> Single.TryParse (x) |> tupleToOption : option - static member TryParse (_: float , _: TryParse) = fun (x:string) -> Double.TryParse (x) |> tupleToOption : option - static member TryParse (_: uint16 , _: TryParse) = fun (x:string) -> UInt16.TryParse (x) |> tupleToOption : option - static member TryParse (_: uint32 , _: TryParse) = fun (x:string) -> UInt32.TryParse (x) |> tupleToOption : option - static member TryParse (_: uint64 , _: TryParse) = fun (x:string) -> UInt64.TryParse (x) |> tupleToOption : option - static member TryParse (_: int16 , _: TryParse) = fun (x:string) -> Int16.TryParse (x) |> tupleToOption : option - static member TryParse (_: int , _: TryParse) = fun (x:string) -> Int32.TryParse (x) |> tupleToOption : option - static member TryParse (_: int64 , _: TryParse) = fun (x:string) -> Int64.TryParse (x) |> tupleToOption : option -#endif - static member TryParse (_: string , _: TryParse) = fun x -> Some x : option static member TryParse (_: StringBuilder , _: TryParse) = fun x -> Some (new StringBuilder (x: string)) : option #if !FABLE_COMPILER @@ -142,7 +126,7 @@ type TryParse = let mutable r = Unchecked.defaultof< ^R> if (^R: (static member TryParse : _ * _ -> _) (value, &r)) then Some r else None - #if NET7_0 + #if NET7_0_OR_GREATER /// IParsable<'T> static member InvokeOnInterface<'T when 'T :> IParsable<'T>> (value: string) = let mutable r = Unchecked.defaultof<'T> @@ -199,7 +183,7 @@ type Parse with static member inline Parse (_: ^R , _: Default2) : string -> ^R = Parse.InvokeOnInstance - #if NET7_0 + #if NET7_0_OR_GREATER static member Parse<'T when 'T :> IParsable<'T>> (_: 'T, _: Default1) = fun (x: string) -> 'T.Parse (x, CultureInfo.InvariantCulture) static member inline Parse (_: ^t when ^t: null and ^t: struct, _: Default1) = id #else @@ -217,7 +201,7 @@ type TryParse with static member inline TryParse (_: 'R, _: Default2) : string -> 'R option = TryParse.InvokeOnInstance - #if NET7_0 + #if NET7_0_OR_GREATER static member inline TryParse (_: 'R, _: Default1) : string -> 'R option = TryParse.InvokeOnInterface static member inline TryParse (_: ^t when ^t: null and ^t: struct, _: Default1) = id #else diff --git a/src/FSharpPlus/Control/Foldable.fs b/src/FSharpPlus/Control/Foldable.fs index 60f4dc1c2..02b0aa556 100644 --- a/src/FSharpPlus/Control/Foldable.fs +++ b/src/FSharpPlus/Control/Foldable.fs @@ -4,7 +4,7 @@ // Warn FS0077 -> Member constraints with the name 'get_Item' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. // Those .NET types are string and array. String is explicitely handled here and array through the seq overload. -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus.Control diff --git a/src/FSharpPlus/Control/Functor.fs b/src/FSharpPlus/Control/Functor.fs index e0f46a351..545a66b45 100644 --- a/src/FSharpPlus/Control/Functor.fs +++ b/src/FSharpPlus/Control/Functor.fs @@ -14,7 +14,7 @@ open FSharpPlus open FSharpPlus.Extensions open FSharpPlus.Data -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && ! FABLE_COMPILER_4 +#if !FABLE_COMPILER // Functor class ---------------------------------------------------------- @@ -62,13 +62,13 @@ type Iterate = type Map = inherit Default1 -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER static member Map ((x: Lazy<_> , f: 'T->'U), _mthd: Map) = Lazy.map f x #if !FABLE_COMPILER static member Map ((x: Task<'T> , f: 'T->'U), _mthd: Map) = Task.map f x : Task<'U> #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Map ((x: ValueTask<'T> , f: 'T->'U), _mthd: Map) = ValueTask.map f x : ValueTask<'U> #endif static member Map ((x: option<_> , f: 'T->'U), _mthd: Map) = Option.map f x @@ -115,7 +115,7 @@ type Map = static member inline InvokeOnInstance (mapping: 'T->'U) (source: '``Functor<'T>``) : '``Functor<'U>`` = (^``Functor<'T>`` : (static member Map : _ * _ -> _) source, mapping) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Map with @@ -141,7 +141,7 @@ type Map with static member inline Map ((_: ^t when ^t: null and ^t: struct, _ ), _mthd: Default1) = () #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Unzip = inherit Default1 @@ -154,7 +154,7 @@ type Unzip = #if !FABLE_COMPILER static member Unzip ((source: Task<'T * 'U> , _output: Task<'T> * Task<'U> ) , _mthd: Unzip ) = Map.Invoke fst source, Map.Invoke snd source #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Unzip ((source: ValueTask<'T * 'U> , _output: ValueTask<'T> * ValueTask<'U> ) , _mthd: Unzip ) = Map.Invoke fst source, Map.Invoke snd source #endif static member Unzip ((source: option<'T * 'U> , _output: option<'T> * option<'U> ) , _mthd: Unzip ) = Option.unzip source @@ -201,7 +201,7 @@ type Unzip = call (Unchecked.defaultof, source) : '``Functor<'T1>`` * '``Functor<'T2>`` #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Zip = inherit Default1 @@ -225,7 +225,7 @@ type Zip = #if !FABLE_COMPILER static member Zip ((x: Task<'T> , y: Task<'U> , _output: Task<'T*'U> ), _mthd: Zip) = Task.zip x y #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Zip ((x: ValueTask<'T> , y: ValueTask<'U> , _output: ValueTask<'T*'U> ), _mthd: Zip) = ValueTask.zip x y #endif @@ -242,7 +242,7 @@ type Zip with static member inline Zip ((x: '``ZipFunctor<'T1>`` , y: '``ZipFunctor<'T2>`` , _output: '``ZipFunctor<'T1 * 'T2>`` ), _mthd: Default1) = Zip.InvokeOnInstance x y : '``ZipFunctor<'T1 * 'T2>`` #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER // Bifunctor class -------------------------------------------------------- @@ -263,7 +263,7 @@ type Bimap = (^``Bifunctor<'T,'V>``: (static member Bimap : _*_*_ -> _) source, f, g) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type MapFirst = inherit Default1 @@ -315,7 +315,7 @@ type Dimap = (^``Profunctor<'B,'C>`` : (static member Dimap : _*_*_ -> _) source, ab, cd) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER // Contravariant class ---------------------------------------------------- @@ -341,7 +341,7 @@ type Contramap = #endif #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Contramap with static member inline Contramap (x: '``Profunctor<'B,'C>``, f: 'A->'B, []_mthd: Default2) = Dimap.InvokeOnInstance f id x : '``Profunctor<'A,'C>`` @@ -349,13 +349,13 @@ type Contramap with static member inline Contramap (_: ^t when ^t: null and ^t: struct , _: 'A->'B, _mthd: Default1) = () #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Map with static member inline Map ((x: '``Profunctor<'B,'C>``, cd: 'C->'D), []_mthd: Default5) = Dimap.InvokeOnInstance id cd x : '``Profunctor<'B,'D>`` #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Dimap with static member inline Dimap (x: '``Profunctor<'B,'C>``, ab: 'A->'B, cd: 'C->'D, []_mthd: Default2) = x |> Map.InvokeOnInstance cd |> Contramap.InvokeOnInstance ab : '``Profunctor<'A,'D>`` diff --git a/src/FSharpPlus/Control/Indexable.fs b/src/FSharpPlus/Control/Indexable.fs index cce35b4ba..d1ab2d4d0 100644 --- a/src/FSharpPlus/Control/Indexable.fs +++ b/src/FSharpPlus/Control/Indexable.fs @@ -4,7 +4,7 @@ // Warn FS0077 -> Member constraints with the name 'get_Item' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. // Those .NET types are string and array but they are explicitely handled here. -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open System open System.Runtime.InteropServices @@ -220,7 +220,7 @@ type TryFindIndex = type FindSliceIndex = inherit Default1 static member FindSliceIndex (x: string , e , []_impl: FindSliceIndex) = String.findSliceIndex e x - #if !FABLE_COMPILER || FABLE_COMPILER_3 + #if !FABLE_COMPILER static member FindSliceIndex (x: 'a ResizeArray , e: 'a ResizeArray , []_impl: FindSliceIndex) = Seq.findSliceIndex e x static member FindSliceIndex (x: 'a [] , e , []_impl: FindSliceIndex) = Array.findSliceIndex e x static member FindSliceIndex (x: list<'a> , e , []_impl: FindSliceIndex) = List.findSliceIndex e x @@ -260,7 +260,7 @@ type TryFindSliceIndex = type FindLastSliceIndex = inherit Default1 static member FindLastSliceIndex (x: string , e , []_impl: FindLastSliceIndex) = String.findLastSliceIndex e x - #if !FABLE_COMPILER || FABLE_COMPILER_3 + #if !FABLE_COMPILER static member FindLastSliceIndex (x: 'a ResizeArray , e: 'a ResizeArray , []_impl: FindLastSliceIndex) = Seq.findLastSliceIndex e x static member FindLastSliceIndex (x: 'a [] , e , []_impl: FindLastSliceIndex) = Array.findLastSliceIndex e x static member FindLastSliceIndex (x: list<'a> , e , []_impl: FindLastSliceIndex) = List.findLastSliceIndex e x diff --git a/src/FSharpPlus/Control/Invokable.fs b/src/FSharpPlus/Control/Invokable.fs index 0eba3b723..e452a635d 100644 --- a/src/FSharpPlus/Control/Invokable.fs +++ b/src/FSharpPlus/Control/Invokable.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open System open FSharpPlus.Internals diff --git a/src/FSharpPlus/Control/Monad.fs b/src/FSharpPlus/Control/Monad.fs index 757718be6..2260364ec 100644 --- a/src/FSharpPlus/Control/Monad.fs +++ b/src/FSharpPlus/Control/Monad.fs @@ -22,7 +22,7 @@ type Bind = static member (>>=) (source: Task<'T> , f: 'T -> Task<'U> ) = Task.bind f source : Task<'U> static member (>>=) (source , f: 'T -> _ ) = Nullable.bind f source : Nullable<'U> #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member (>>=) (source: ValueTask<'T> , f: 'T -> ValueTask<'U> ) = ValueTask.bind f source : ValueTask<'U> #endif @@ -62,7 +62,7 @@ type Bind = static member (>>=) (source: NonEmptySeq<'T>, f: 'T -> NonEmptySeq<'U>) = NonEmptySeq.collect f source : NonEmptySeq<'U> -#if !FABLE_COMPILER || FABLE_COMPILER_3 +#if !FABLE_COMPILER static member inline Invoke (source: '``Monad<'T>``) (binder: 'T -> '``Monad<'U>``) : '``Monad<'U>`` = let inline call (_mthd: 'M, input: 'I, _output: 'R, f) = ((^M or ^I or ^R) : (static member (>>=) : _*_ -> _) input, f) call (Unchecked.defaultof, source, Unchecked.defaultof<'``Monad<'U>``>, binder) @@ -71,7 +71,7 @@ type Bind = static member inline InvokeOnInstance (source: '``Monad<'T>``) (binder: 'T -> '``Monad<'U>``) : '``Monad<'U>`` = ((^``Monad<'T>`` or ^``Monad<'U>``) : (static member (>>=) : _*_ -> _) source, binder) -#if !FABLE_COMPILER || FABLE_COMPILER_3 +#if !FABLE_COMPILER type Join = inherit Default1 @@ -83,7 +83,7 @@ type Join = #if !FABLE_COMPILER static member Join (x: Task> , []_output: Task<'T> , []_mthd: Join ) = Task.join x : Task<'T> #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Join (x: ValueTask> , []_output: ValueTask<'T> , []_mthd: Join ) = ValueTask.join x : ValueTask<'T> #endif static member Join (x , []_output: option<'T> , []_mthd: Join ) = Option.flatten x : option<'T> @@ -128,7 +128,7 @@ type Return = inherit Default1 static member inline InvokeOnInstance (x: 'T) = (^``Applicative<'T>`` : (static member Return : ^T -> ^``Applicative<'T>``) x) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER static member inline Invoke (x: 'T) : '``Applicative<'T>`` = let inline call (mthd: ^M, output: ^R) = ((^M or ^R) : (static member Return : _*_ -> _) output, mthd) @@ -144,7 +144,7 @@ type Return = #if !FABLE_COMPILER static member Return (_: 'T Task , _: Return ) = fun x -> Task.FromResult x : 'T Task #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Return (_: 'T ValueTask , _: Return ) = fun (x: 'T) -> ValueTask<'T> x : 'T ValueTask static member Return (_: 'T DmStruct1 , _: Return ) = fun (_: 'T) -> Unchecked.defaultof<_> : 'T DmStruct1 #endif @@ -196,7 +196,7 @@ type Delay = #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Delay (_mthd: Delay , x: unit-> ValueTask<_> , _ ) = x () : ValueTask<'T> #endif diff --git a/src/FSharpPlus/Control/MonadOps.fs b/src/FSharpPlus/Control/MonadOps.fs index f7e1b7059..bfe83d277 100644 --- a/src/FSharpPlus/Control/MonadOps.fs +++ b/src/FSharpPlus/Control/MonadOps.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Internals -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER module internal MonadOps = open FSharpPlus.Control diff --git a/src/FSharpPlus/Control/MonadTrans.fs b/src/FSharpPlus/Control/MonadTrans.fs index 0f40ac319..d04ed5470 100644 --- a/src/FSharpPlus/Control/MonadTrans.fs +++ b/src/FSharpPlus/Control/MonadTrans.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus diff --git a/src/FSharpPlus/Control/Monoid.fs b/src/FSharpPlus/Control/Monoid.fs index 023b21f2f..69c0d4ec2 100644 --- a/src/FSharpPlus/Control/Monoid.fs +++ b/src/FSharpPlus/Control/Monoid.fs @@ -12,7 +12,7 @@ open FSharpPlus.Data open FSharpPlus.Internals open FSharpPlus.Internals.Prelude -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER [] type Plus = @@ -118,7 +118,7 @@ type Plus with static member inline ``+`` (x: 'a Task, y: 'a Task, []_mthd: Plus) = Task.lift2 Plus.Invoke x y #endif -#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER +#if !FABLE_COMPILER type Plus with static member inline ``+`` (x: 'a ValueTask, y: 'a ValueTask, []_mthd: Plus) = ValueTask.lift2 Plus.Invoke x y diff --git a/src/FSharpPlus/Control/Numeric.fs b/src/FSharpPlus/Control/Numeric.fs index 5761de756..ff300799f 100644 --- a/src/FSharpPlus/Control/Numeric.fs +++ b/src/FSharpPlus/Control/Numeric.fs @@ -42,7 +42,7 @@ type FromBigInt = call Unchecked.defaultof x #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type FromInt64 = inherit Default1 @@ -193,7 +193,7 @@ type Zero with s.SetResult v s.Task #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member inline Zero (_: ValueTask<'a>, _: Zero) : ValueTask<'a> = let (v: 'a) = Zero.Invoke () ValueTask<'a>(v) diff --git a/src/FSharpPlus/Control/Traversable.fs b/src/FSharpPlus/Control/Traversable.fs index be58003a9..2f9bdbfa6 100644 --- a/src/FSharpPlus/Control/Traversable.fs +++ b/src/FSharpPlus/Control/Traversable.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open System.Runtime.InteropServices open System.ComponentModel diff --git a/src/FSharpPlus/Control/Tuple.fs b/src/FSharpPlus/Control/Tuple.fs index 90e6398eb..6455725ae 100644 --- a/src/FSharpPlus/Control/Tuple.fs +++ b/src/FSharpPlus/Control/Tuple.fs @@ -161,7 +161,7 @@ type MapItem5 = call (Unchecked.defaultof, value) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Curry = static member inline Invoke f = diff --git a/src/FSharpPlus/Control/ZipApplicative.fs b/src/FSharpPlus/Control/ZipApplicative.fs index f3bbe4bd7..760b68151 100644 --- a/src/FSharpPlus/Control/ZipApplicative.fs +++ b/src/FSharpPlus/Control/ZipApplicative.fs @@ -24,7 +24,7 @@ type Pure = inherit Default1 static member inline InvokeOnInstance (x: 'T) = (^``ZipApplicative<'T>`` : (static member Pure : ^T -> ^``ZipApplicative<'T>``) x) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER static member inline Invoke (x: 'T) : '``ZipApplicative<'T>`` = let inline call (mthd: ^M, output: ^R) = ((^M or ^R) : (static member Pure : _*_ -> _) output, mthd) @@ -38,7 +38,7 @@ type Pure = #if !FABLE_COMPILER static member Pure (_: 'T Task , _: Pure) = fun x -> Task.FromResult x : 'T Task #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Pure (_: 'T ValueTask , _: Pure) = fun (x: 'T) -> ValueTask<'T> x : 'T ValueTask #endif static member Pure (x: option<'a> , _: Pure) = Return.Return (x, Unchecked.defaultof) @@ -75,7 +75,7 @@ type Pure = type ZipApply = inherit Default1 -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER static member ``<.>`` (struct (f: Lazy<'T->'U> , x: Lazy<'T> ), []_output: Lazy<'U> , []_mthd: ZipApply) = Apply.``<*>`` (struct (f, x), _output, Unchecked.defaultof) static member ``<.>`` (struct (f: seq<_> , x: seq<'T> ), []_output: seq<'U> , []_mthd: ZipApply) = Seq.map2 (<|) f x @@ -89,7 +89,7 @@ type ZipApply = #if !FABLE_COMPILER static member ``<.>`` (struct (f: Task<_> , x: Task<'T> ), []_output: Task<'U> , []_mthd: ZipApply) = Task.map2 (<|) f x #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member ``<.>`` (struct (f: ValueTask<_> , x: ValueTask<'T> ), []_output: ValueTask<'U> , []_mthd: ZipApply) = ValueTask.map2 (<|) f x #endif static member ``<.>`` (struct (f: Async<_> , x: Async<'T> ), []_output: Async<'U> , []_mthd: ZipApply) : Async<'U> = Async.map2 (<|) f x @@ -124,7 +124,7 @@ type ZipApply = static member inline InvokeOnInstance (f: '``ZipApplicative<'T->'U>``) (x: '``ZipApplicative<'T>``) : '``ZipApplicative<'U>`` = ((^``ZipApplicative<'T->'U>`` or ^``ZipApplicative<'T>`` or ^``ZipApplicative<'U>``) : (static member (<.>) : _*_ -> _) (f, x)) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type ZipApply with static member inline ``<.>`` (struct (_: ^t when ^t : null and ^t: struct, _: ^u when ^u : null and ^u: struct), _output: ^r when ^r : null and ^r: struct, _mthd: Default1) = id @@ -147,7 +147,7 @@ type Map2 = #if !FABLE_COMPILER static member Map2 (f, (x: Task<'T> , y: Task<'U> ), _mthd: Map2) = Task.map2 f x y #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Map2 (f, (x: ValueTask<'T> , y: ValueTask<'U> ), _mthd: Map2) = ValueTask.map2 f x y #endif static member Map2 (f, (x , y ), _mthd: Map2) = Async.map2 f x y @@ -194,7 +194,7 @@ type Map3 = #if !FABLE_COMPILER static member Map3 (f, (x: Task<'T> , y: Task<'U> , z: Task<'V> ), _mthd: Map3) = Task.map3 f x y z #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER static member Map3 (f, (x: ValueTask<'T> , y: ValueTask<'U> , z: ValueTask<'V> ), _mthd: Map3) = ValueTask.map3 f x y z #endif static member Map3 (f, (x , y , z ), _mthd: Map3) = Async.map3 f x y z diff --git a/src/FSharpPlus/Data/Compose.fs b/src/FSharpPlus/Data/Compose.fs index c60cff0b3..b05eb4f21 100644 --- a/src/FSharpPlus/Data/Compose.fs +++ b/src/FSharpPlus/Data/Compose.fs @@ -4,7 +4,7 @@ open FSharpPlus open FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad. [] diff --git a/src/FSharpPlus/Data/Const.fs b/src/FSharpPlus/Data/Const.fs index 7d0f39eca..49e2c8b30 100644 --- a/src/FSharpPlus/Data/Const.fs +++ b/src/FSharpPlus/Data/Const.fs @@ -3,7 +3,7 @@ open FSharpPlus open FSharpPlus.Internals.Prelude -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// The Const functor, defined as Const<'T, 'U> where 'U is a phantom type. Useful for: Lens getters Its applicative instance plays a fundamental role in Lens. /// Useful for: Lens getters. diff --git a/src/FSharpPlus/Data/Cont.fs b/src/FSharpPlus/Data/Cont.fs index 1b2296d75..8bbafc740 100644 --- a/src/FSharpPlus/Data/Cont.fs +++ b/src/FSharpPlus/Data/Cont.fs @@ -90,7 +90,7 @@ type Cont<'r,'t> with [] static member CallCC (f: ('T -> Cont<'R,'U>) -> _) = Cont.callCC f : Cont<'R,'T> -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER static member inline Lift (m: '``Monad<'T>``) = Cont ((>>=) m) : ContT<'``Monad<'R>``,'T> diff --git a/src/FSharpPlus/Data/Coproduct.fs b/src/FSharpPlus/Data/Coproduct.fs index 4385c44f9..883b2386d 100644 --- a/src/FSharpPlus/Data/Coproduct.fs +++ b/src/FSharpPlus/Data/Coproduct.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Data -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus open FSharpPlus.Control diff --git a/src/FSharpPlus/Data/Error.fs b/src/FSharpPlus/Data/Error.fs index 125fd1d83..35577e00b 100644 --- a/src/FSharpPlus/Data/Error.fs +++ b/src/FSharpPlus/Data/Error.fs @@ -7,7 +7,7 @@ open FSharpPlus.Internals.Prelude open FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Additional operations on Result [] module Result = @@ -30,7 +30,7 @@ module ResultOrException = let Exception : Result<_,exn> -> _ = function Error e -> e | _ -> exn () -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Monad Transformer for Result<'T, 'E> [] diff --git a/src/FSharpPlus/Data/Kleisli.fs b/src/FSharpPlus/Data/Kleisli.fs index 20f67275b..8b7d8ee0b 100644 --- a/src/FSharpPlus/Data/Kleisli.fs +++ b/src/FSharpPlus/Data/Kleisli.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Data -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus open FSharpPlus.Control diff --git a/src/FSharpPlus/Data/List.fs b/src/FSharpPlus/Data/List.fs index e75361ca6..066f83446 100644 --- a/src/FSharpPlus/Data/List.fs +++ b/src/FSharpPlus/Data/List.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Data -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus open System.ComponentModel diff --git a/src/FSharpPlus/Data/Monoids.fs b/src/FSharpPlus/Data/Monoids.fs index e85bf7818..c12251604 100644 --- a/src/FSharpPlus/Data/Monoids.fs +++ b/src/FSharpPlus/Data/Monoids.fs @@ -2,7 +2,7 @@ open FSharpPlus -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// The dual of a monoid, obtained by swapping the arguments of append. [] type Dual<'t> = Dual of 't with @@ -54,7 +54,7 @@ type Last<'t> = Last of Option<'t> with static member run (Last a) = a : 't option -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Numeric wrapper for multiplication monoid (*, 1) [] diff --git a/src/FSharpPlus/Data/NonEmptyList.fs b/src/FSharpPlus/Data/NonEmptyList.fs index a73c71c60..4747b6f66 100644 --- a/src/FSharpPlus/Data/NonEmptyList.fs +++ b/src/FSharpPlus/Data/NonEmptyList.fs @@ -128,7 +128,7 @@ module NonEmptyList = | [] -> {Head = s; Tail = []} | h::t -> cons s (tails {Head = h; Tail = t}) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// /// Maps each element of the list to an action, evaluates these actions from left to right and collect the results. @@ -218,7 +218,7 @@ module NonEmptyList = /// Equivalent to [start..stop] on regular lists. let inline range (start: 'T) stop = create start (List.drop 1 [start..stop]) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Reduces using alternative operator `<|>`. let inline choice (list: NonEmptyList<'``Alt<'T>``>) = reduce (<|>) list : '``Alt<'T>`` #endif @@ -271,7 +271,7 @@ type NonEmptyList<'t> with static member Extract {Head = h; Tail = _} = h : 't - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER static member Duplicate (s: NonEmptyList<'a>, []_impl: Duplicate) = NonEmptyList.tails s #endif @@ -284,7 +284,7 @@ type NonEmptyList<'t> with static member FoldBack ({Head = x; Tail = xs}, f, z) = List.foldBack f (x::xs) z static member Sum (source: seq>) = source |> Seq.map NonEmptyList.toList |> List.concat |> NonEmptyList.ofList - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER [] static member ToList (s: NonEmptyList<'a>, []_impl: ToList) = NonEmptyList.toList s diff --git a/src/FSharpPlus/Data/NonEmptyMap.fs b/src/FSharpPlus/Data/NonEmptyMap.fs index 406b98241..03bd75270 100644 --- a/src/FSharpPlus/Data/NonEmptyMap.fs +++ b/src/FSharpPlus/Data/NonEmptyMap.fs @@ -246,7 +246,7 @@ module NonEmptyMap = /// Returns the union of two maps, preferring values from the first in case of duplicate keys. let union (source: NonEmptyMap<'Key, 'T>) (altSource: NonEmptyMap<'Key, 'T>) = unionWith (fun x _ -> x) source altSource -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER let inline traverse (f: 'T->'``Functor<'U>``) (m: NonEmptyMap<'K, 'T>) : '``Functor>`` = let m' = traverse f (toMap m) : '``Functor>`` ofMap m' : '``Functor>`` @@ -266,7 +266,7 @@ type NonEmptyMap<[]'Key,[] static member Unzip (x: NonEmptyMap<'K, ('T * 'U)>) = NonEmptyMap.unzip x : NonEmptyMap<'K, 'T> * NonEmptyMap<'K, 'U> - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER [] static member inline Traverse (x: NonEmptyMap<'K, 'T>, f: 'T->'``Functor<'U>``) : '``Functor>`` = NonEmptyMap.traverse f x diff --git a/src/FSharpPlus/Data/NonEmptySet.fs b/src/FSharpPlus/Data/NonEmptySet.fs index c3b1f620b..b9512708d 100644 --- a/src/FSharpPlus/Data/NonEmptySet.fs +++ b/src/FSharpPlus/Data/NonEmptySet.fs @@ -235,7 +235,7 @@ type NonEmptySet<[]'a when 'a: comparison> with [] static member FoldBack (set: NonEmptySet<'a>, f, z) = Set.foldBack f set.Value z - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER [] static member ToList (s: NonEmptySet<'a>, []_impl: ToList) = NonEmptySet.toList s diff --git a/src/FSharpPlus/Data/Option.fs b/src/FSharpPlus/Data/Option.fs index aadb747b0..52aaa610c 100644 --- a/src/FSharpPlus/Data/Option.fs +++ b/src/FSharpPlus/Data/Option.fs @@ -6,7 +6,7 @@ open FSharpPlus.Internals.Prelude open FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Additional operations on Option [] diff --git a/src/FSharpPlus/Data/Reader.fs b/src/FSharpPlus/Data/Reader.fs index c14deaa4d..021abbb6e 100644 --- a/src/FSharpPlus/Data/Reader.fs +++ b/src/FSharpPlus/Data/Reader.fs @@ -76,7 +76,7 @@ type Reader<'r,'t> with [] static member Local (m, f: 'R1->'R2) = Reader.local f m : Reader<'R1,'T> - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER [] static member Zip (x, y) = Reader.zip x y @@ -91,7 +91,7 @@ type Reader<'r,'t> with static member Delay (body: unit->Reader<'R,'T>) = Reader (fun s -> Reader.run (body ()) s) : Reader<'R,'T> -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Monad Transformer for Reader<'R, 'T> [] diff --git a/src/FSharpPlus/Data/Seq.fs b/src/FSharpPlus/Data/Seq.fs index 05399e313..8ce9f3769 100644 --- a/src/FSharpPlus/Data/Seq.fs +++ b/src/FSharpPlus/Data/Seq.fs @@ -1,6 +1,6 @@ namespace FSharpPlus.Data -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open System.ComponentModel open FSharpPlus diff --git a/src/FSharpPlus/Data/State.fs b/src/FSharpPlus/Data/State.fs index ae09e37b6..47040203a 100644 --- a/src/FSharpPlus/Data/State.fs +++ b/src/FSharpPlus/Data/State.fs @@ -94,7 +94,7 @@ type State<'s,'t> with [] static member Put x = State.put x : State<'S,unit> - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER [] static member Zip (x, y) = State.zip x y #endif @@ -105,7 +105,7 @@ type State<'s,'t> with static member Delay (body: unit->State<'S,'T>) = State (fun s -> State.run (body ()) s) : State<'S,'T> -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus.Control open FSharpPlus.Internals.Prelude diff --git a/src/FSharpPlus/Data/Validation.fs b/src/FSharpPlus/Data/Validation.fs index b3afe3a17..845ee54f5 100644 --- a/src/FSharpPlus/Data/Validation.fs +++ b/src/FSharpPlus/Data/Validation.fs @@ -5,7 +5,7 @@ namespace FSharpPlus.Data open System.ComponentModel open FSharpPlus -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus.Lens #endif @@ -100,7 +100,7 @@ module Validation = | Success a -> folder a state | Failure _ -> state - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// Traverse the Success case with the supplied function. let inline traverse (f: 'T -> '``Functor<'U>``) (source: Validation<'Error, 'T>) : '``Functor>`` = @@ -204,7 +204,7 @@ module Validation = /// The result of applying either functions. let either (failureMapper: 'TError -> 'U) (successMapper: 'T -> 'U) source = match source with Success v -> successMapper v | Failure e -> failureMapper e - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// validationNel : Result<'a,'e> -> Validation (NonEmptyList<'e>) a /// This is 'liftError' specialized to 'NonEmptyList', since /// they are a common semigroup to use. @@ -221,7 +221,7 @@ module Validation = let inline _Success x = (prism Success <| either Ok (Error << Failure)) x let inline _Failure x = (prism Failure <| either (Error << Failure) Ok) x #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER let inline isoValidationResult x = x |> iso toResult ofResult #endif @@ -288,7 +288,7 @@ type Validation<'error, 't> with static member inline Map3 (f, x: Validation<'Error, 'T>, y: Validation<_, 'U>, z: Validation<_, 'V>) : Validation<_, 'W> = Validation.map3 f x y z // as Alternative (inherits from Applicative) - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER static member inline get_Empty () = Failure (getEmpty ()) static member inline (<|>) (x: Validation<'Error, 'T>, y: Validation<_,_>) = Validation.appValidation Control.Append.Invoke x y #endif @@ -307,7 +307,7 @@ type Validation<'error, 't> with [] static member Bimap (x: Validation<'T, 'V>, f: 'T -> 'U, g: 'V -> 'W) : Validation<'U, 'W> = Validation.bimap f g x - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER // as Traversable [] diff --git a/src/FSharpPlus/Data/ValueOption.fs b/src/FSharpPlus/Data/ValueOption.fs index 54af11c0d..e8b942b6a 100644 --- a/src/FSharpPlus/Data/ValueOption.fs +++ b/src/FSharpPlus/Data/ValueOption.fs @@ -6,7 +6,7 @@ open FSharpPlus.Internals.Prelude open FSharpPlus.Control -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Additional operations on ValueOption [] diff --git a/src/FSharpPlus/Data/Writer.fs b/src/FSharpPlus/Data/Writer.fs index 80748a958..0966e24d9 100644 --- a/src/FSharpPlus/Data/Writer.fs +++ b/src/FSharpPlus/Data/Writer.fs @@ -22,7 +22,7 @@ module Writer = let map f (Writer (a: 'T, w)) = Writer (f a, w) : Writer<'Monoid,'U> - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// Combines two Writers into one by applying a mapping function. let inline map2 f (Writer (a: 'T, w1)) (Writer (b: 'U, w2)) = Writer (f a b, w1 ++ w2) : Writer<'Monoid,'V> @@ -106,7 +106,7 @@ type Writer<'monoid,'t> with static member Extract (Writer (_: 'W, a: 'T)) = a static member (=>>) (Writer (w: 'W, _: 'T) as g, f : Writer<_,_> -> 'U) = Writer (w, f g) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Monad Transformer for Writer<'Monoid, 'T> diff --git a/src/FSharpPlus/Data/ZipList.fs b/src/FSharpPlus/Data/ZipList.fs index 72d5c5fb0..e06b02f2e 100644 --- a/src/FSharpPlus/Data/ZipList.fs +++ b/src/FSharpPlus/Data/ZipList.fs @@ -53,7 +53,7 @@ type ZipList<'s> with static member ToSeq (ZipList x) = x -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER static member inline get_Zero () = result (getZero ()) : ZipList<'a> static member inline (+) (x: ZipList<'a>, y: ZipList<'a>) = lift2 plus x y : ZipList<'a> diff --git a/src/FSharpPlus/Extensions/Array.fs b/src/FSharpPlus/Extensions/Array.fs index 234c2294e..5fea94a70 100644 --- a/src/FSharpPlus/Extensions/Array.fs +++ b/src/FSharpPlus/Extensions/Array.fs @@ -150,7 +150,7 @@ module Array = /// /// The index of the slice. /// - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// /// Returns the index of the first occurrence of the specified slice in the source. diff --git a/src/FSharpPlus/Extensions/AsyncEnumerable.fs b/src/FSharpPlus/Extensions/AsyncEnumerable.fs index 2c9b88b31..eea030e33 100644 --- a/src/FSharpPlus/Extensions/AsyncEnumerable.fs +++ b/src/FSharpPlus/Extensions/AsyncEnumerable.fs @@ -1,6 +1,6 @@ namespace FSharpPlus -#if !FABLE_COMPILER && (NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_0_OR_GREATER || NET5_0_OR_GREATER) +#if !FABLE_COMPILER open System open System.Threading diff --git a/src/FSharpPlus/Extensions/Enumerator.fs b/src/FSharpPlus/Extensions/Enumerator.fs index f681dfc44..6fd3c50bb 100644 --- a/src/FSharpPlus/Extensions/Enumerator.fs +++ b/src/FSharpPlus/Extensions/Enumerator.fs @@ -1,6 +1,6 @@ namespace FSharpPlus -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER /// Additional operations on IEnumerator [] diff --git a/src/FSharpPlus/Extensions/Extensions.fs b/src/FSharpPlus/Extensions/Extensions.fs index f7432d285..4bdfbb37f 100644 --- a/src/FSharpPlus/Extensions/Extensions.fs +++ b/src/FSharpPlus/Extensions/Extensions.fs @@ -70,7 +70,7 @@ module Extensions = #endif - #if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER + #if !FABLE_COMPILER type ValueTask<'t> with diff --git a/src/FSharpPlus/Extensions/List.fs b/src/FSharpPlus/Extensions/List.fs index 756361714..316c24725 100644 --- a/src/FSharpPlus/Extensions/List.fs +++ b/src/FSharpPlus/Extensions/List.fs @@ -243,7 +243,7 @@ module List = member _.GetEnumerator () = (source :> _ seq).GetEnumerator () member _.GetEnumerator () = (source :> System.Collections.IEnumerable).GetEnumerator () } - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// /// Gets the index of the first occurrence of the specified slice in the source. diff --git a/src/FSharpPlus/Extensions/Seq.fs b/src/FSharpPlus/Extensions/Seq.fs index 5bf44f94f..438b1ec40 100644 --- a/src/FSharpPlus/Extensions/Seq.fs +++ b/src/FSharpPlus/Extensions/Seq.fs @@ -203,7 +203,7 @@ module Seq = /// The seq converted to a System.Collections.Generic.IReadOnlyList let toIReadOnlyList (source: seq<_>) = source |> ResizeArray |> ReadOnlyCollection :> IReadOnlyList<_> #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// /// Gets the index of the first occurrence of the specified slice in the source. /// diff --git a/src/FSharpPlus/Extensions/ValueTask.fs b/src/FSharpPlus/Extensions/ValueTask.fs index 0d55c1471..cc0152070 100644 --- a/src/FSharpPlus/Extensions/ValueTask.fs +++ b/src/FSharpPlus/Extensions/ValueTask.fs @@ -1,6 +1,6 @@ namespace FSharpPlus -#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER +#if !FABLE_COMPILER /// Additional operations on ValueTask<'T> [] diff --git a/src/FSharpPlus/FSharpPlus.fsproj b/src/FSharpPlus/FSharpPlus.fsproj index a5982de6b..b4b8374b4 100644 --- a/src/FSharpPlus/FSharpPlus.fsproj +++ b/src/FSharpPlus/FSharpPlus.fsproj @@ -19,16 +19,15 @@ false false true - Debug;Release;Fable;Fable3;Test + Debug;Release;Fable;Test AnyCPU 8.0 - 6.0 + 6.0 $(DefineConstants);TEST_TRACE $(DefineConstants);FABLE_COMPILER - $(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_3 $(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_4 - netstandard2.0;netstandard2.1;net8.0 + net8.0 diff --git a/src/FSharpPlus/Internals.fs b/src/FSharpPlus/Internals.fs index 7dd71f7d8..37ca1448a 100644 --- a/src/FSharpPlus/Internals.fs +++ b/src/FSharpPlus/Internals.fs @@ -327,7 +327,7 @@ type BitConverter = if isNull value then nullArg "value" BitConverter.ToString (value, startIndex, value.Length - startIndex) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER // findSliceIndex module FindSliceIndex = open System.Collections.Generic diff --git a/src/FSharpPlus/Lens.fs b/src/FSharpPlus/Lens.fs index b4e992a00..c1a0ad37a 100644 --- a/src/FSharpPlus/Lens.fs +++ b/src/FSharpPlus/Lens.fs @@ -1,6 +1,6 @@ namespace FSharpPlus -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus.Operators open FSharpPlus.Data diff --git a/src/FSharpPlus/Operators.fs b/src/FSharpPlus/Operators.fs index 7e3e131f3..1a7f4e3bb 100644 --- a/src/FSharpPlus/Operators.fs +++ b/src/FSharpPlus/Operators.fs @@ -29,7 +29,7 @@ module Operators = /// Common Combinators let inline uncurry f (x: 'T1, y: 'T2) : 'Result = f x y - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// /// Takes a function expecting a tuple of any N number of elements and returns a function expecting N curried arguments. /// @@ -122,7 +122,7 @@ module Operators = /// Common Combinators let inline tuple8<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8> (t1: 'T1) (t2: 'T2) (t3: 'T3) (t4: 'T4) (t5: 'T5) (t6: 'T6) (t7: 'T7) (t8: 'T8) = t1, t2, t3, t4, t5, t6, t7, t8 - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER // Functor ---------------------------------------------------------------- @@ -422,7 +422,7 @@ module Operators = let inline invmap (f: 'T -> 'U) (g: 'U -> 'T) (source: '``InvariantFunctor<'T>``) = Invmap.Invoke f g source : '``InvariantFunctor<'U>`` - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER // Category --------------------------------------------------------------- @@ -1390,7 +1390,7 @@ module Operators = let inline mapItem5 (mapping: 'T -> 'U) (tuple: '``('A * 'B * 'C * 'D * 'T * ..)``) = MapItem5.Invoke mapping tuple : '``('A * 'B * 'C * 'D * 'U * ..)`` - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER // Converter @@ -1436,7 +1436,7 @@ module Operators = #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// /// Converts to a value from its string representation. @@ -1585,7 +1585,7 @@ module Operators = #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER // Additional functions @@ -1630,7 +1630,7 @@ module Operators = let dispose (resource: System.IDisposable) = match resource with null -> () | x -> x.Dispose () - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER /// Additional operators for Arrows related functions which shadows some F# operators for bitwise functions. module Arrows = diff --git a/src/FSharpPlus/Parsing.fs b/src/FSharpPlus/Parsing.fs index 7a28c4749..fab78fc1a 100644 --- a/src/FSharpPlus/Parsing.fs +++ b/src/FSharpPlus/Parsing.fs @@ -1,6 +1,6 @@ namespace FSharpPlus -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER [] module Parsing = diff --git a/tests/CSharpLib/CSharpLib.csproj b/tests/CSharpLib/CSharpLib.csproj index 980c2d9e1..34b56a5dd 100644 --- a/tests/CSharpLib/CSharpLib.csproj +++ b/tests/CSharpLib/CSharpLib.csproj @@ -3,8 +3,7 @@ Debug;Release;Fable AnyCPU - netstandard2.1 - 8.0 + net8.0 diff --git a/tests/CSharpLib/CustomerId.cs b/tests/CSharpLib/CustomerId.cs index a32590dec..a0a1a1e3e 100644 --- a/tests/CSharpLib/CustomerId.cs +++ b/tests/CSharpLib/CustomerId.cs @@ -2,10 +2,7 @@ namespace CSharpLib { - public struct CustomerId : IEquatable -#if NETSTANDARD2_1 - ,ICustomerId -#endif + public struct CustomerId : IEquatable, ICustomerId { public long Value { get; } public CustomerId(long value) => this.Value = value; @@ -26,7 +23,6 @@ public static bool TryParse(string value,out CustomerId id) return false; } } -#if NETSTANDARD2_1 public interface ICustomerId { long Value { get; } @@ -41,5 +37,4 @@ public static bool TryParse(string value, out ICustomerId id) return false; } } -#endif } diff --git a/tests/FSharpPlus.Tests/Asyncs.fs b/tests/FSharpPlus.Tests/Asyncs.fs index ec9cabe20..653c01056 100644 --- a/tests/FSharpPlus.Tests/Asyncs.fs +++ b/tests/FSharpPlus.Tests/Asyncs.fs @@ -1,7 +1,5 @@ namespace FSharpPlus.Tests -#if !NET462 && !NETSTANDARD2_0 - module Async = open System @@ -109,4 +107,3 @@ module Async = CollectionAssert.AreEquivalent ((Async.AsTaskAndWait t123).Exception.InnerExceptions, (Async.AsTaskAndWait t123').Exception.InnerExceptions, "Async.map3 (fun x y z -> [x; y; z]) t1 t2 t3 is the same as transpose [t1; t2; t3]") CollectionAssert.AreNotEquivalent ((Async.AsTaskAndWait t123).Exception.InnerExceptions, (Async.AsTaskAndWait t123'').Exception.InnerExceptions, "Async.map3 (fun x y z -> [x; y; z]) t1 t2 t3 is not the same as sequence [t1; t2; t3]") -#endif diff --git a/tests/FSharpPlus.Tests/FSharpPlus.Tests.fsproj b/tests/FSharpPlus.Tests/FSharpPlus.Tests.fsproj index f0be1415b..4a8e29469 100644 --- a/tests/FSharpPlus.Tests/FSharpPlus.Tests.fsproj +++ b/tests/FSharpPlus.Tests/FSharpPlus.Tests.fsproj @@ -6,13 +6,13 @@ true - 6.0 + 6.0 false Debug;Release;Fable;Test AnyCPU $(DefineConstants);TEST_TRACE $(DefineConstants);FABLE_COMPILER - net7.0;net8.0 + net8.0 diff --git a/tests/FSharpPlus.Tests/Parsing.fs b/tests/FSharpPlus.Tests/Parsing.fs index 45a26aead..37f0029e2 100644 --- a/tests/FSharpPlus.Tests/Parsing.fs +++ b/tests/FSharpPlus.Tests/Parsing.fs @@ -77,12 +77,10 @@ module Parsing = Assert.IsTrue((v3.Value.Value = 1)) let v4 : ProductId option = tryParse "P_X" Assert.IsTrue(Option.isNone v4) -#if NETSTANDARD3_0 let v5 : ICustomerId option = tryParse "C_1" Assert.IsTrue((v5.Value.Value = 1L)) let v6 : ICustomerId option = tryParse "C_X" Assert.IsTrue(Option.isNone v6) -#endif [] let scanfParsing () = diff --git a/tests/FSharpPlus.Tests/ValueTask.fs b/tests/FSharpPlus.Tests/ValueTask.fs index 8f71b38e6..e9a63f237 100644 --- a/tests/FSharpPlus.Tests/ValueTask.fs +++ b/tests/FSharpPlus.Tests/ValueTask.fs @@ -1,7 +1,5 @@ namespace FSharpPlus.Tests -#if !NET462 && !NETSTANDARD2_0 - module ValueTask = open System @@ -199,4 +197,3 @@ module ValueTask = let t123'' = sequence [t1; t2; t3] CollectionAssert.AreEquivalent (t123.AsTask().Exception.InnerExceptions, t123'.AsTask().Exception.InnerExceptions, "ValueTask.map3 (fun x y z -> [x; y; z]) t1 t2 t3 is the same as transpose [t1; t2; t3]") CollectionAssert.AreNotEquivalent (t123.AsTask().Exception.InnerExceptions, t123''.AsTask().Exception.InnerExceptions, "ValueTask.map3 (fun x y z -> [x; y; z]) t1 t2 t3 is not the same as sequence [t1; t2; t3]") -#endif diff --git a/tests/FSharpPlusFable.Tests/FSharpPlusFable.Tests.fsproj b/tests/FSharpPlusFable.Tests/FSharpPlusFable.Tests.fsproj index 5e3daf83c..ad1165474 100644 --- a/tests/FSharpPlusFable.Tests/FSharpPlusFable.Tests.fsproj +++ b/tests/FSharpPlusFable.Tests/FSharpPlusFable.Tests.fsproj @@ -2,13 +2,11 @@ Exe - Debug;Release;Fable;Fable3 + Debug;Release;Fable AnyCPU - 6.0 $(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_FAKE - $(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_3;FABLE_COMPILER_FAKE $(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_4;FABLE_COMPILER_FAKE - net6.0 + net8.0 diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/Extensions.fs b/tests/FSharpPlusFable.Tests/FSharpTests/Extensions.fs index bc824536d..c63fea4fd 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/Extensions.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/Extensions.fs @@ -46,7 +46,7 @@ let ExtensionsTest = let r2 = m1 |> Map.unionWith konst m2 equalMap r1 r2) -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "Bind" (fun () -> let x = [1;2] >>= fun x -> [string x ; string (x + 1000) ] let y = { Head = 1; Tail = [2] } >>= fun x -> { Head = string x ; Tail = [string (x + 1000)] } diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General.fs index 991281911..8d46bec5e 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General.fs @@ -122,7 +122,7 @@ let monadTransformers = testList "MonadTransformers" [ let _ = put initialState : ChoiceT>> ()) - #if !NETSTANDARD3_0 + testCase "testStateT" (fun () -> let lst1: StateT = StateT.lift [1;2] let lst2: StateT = StateT.lift [4;5] @@ -155,10 +155,9 @@ let monadTransformers = testList "MonadTransformers" [ let y = (fn |> ResultT.run |> Reader.run) -1 equal (Error NegativeValue) y) #endif - #endif ] -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER module ProfunctorDefaults = type Fun<'T,'U> = Fun of ('T -> 'U) with static member Dimap ((Fun f): Fun<'B,'C>, g: 'A->'B, h:'C->'D) = Fun (g >> f >> h) @@ -169,7 +168,7 @@ module ProfunctorDefaults = () #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER module BifunctorDefaults = type Tup<'a,'b> = Tup of ('a * 'b) with static member Bimap (Tup (a, b), f, g) = Tup (f a, g b) @@ -180,7 +179,7 @@ module BifunctorDefaults = () #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type StringCodec<'t> = StringCodec of ReaderT> * ('t -> Const) with static member Invmap (StringCodec (d, e), f: 'T -> 'U, g: 'U -> 'T) = StringCodec (map f d, contramap g e) module StringCodec = @@ -189,7 +188,7 @@ module StringCodec = #endif let invariant = testList "Invariant" [ -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "testStringToIntDerivedFromFloat" (fun () -> let floatCodec = StringCodec (ReaderT (tryParse >> Option.toResultWith "Parse error"), string >> Const) let floatParsed = StringCodec.decode floatCodec "1.8" @@ -234,7 +233,7 @@ let bitConverter = testList "BitConverter" [ let curry = testList "Curry" [ -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "curryTest" (fun () -> #if !FABLE_COMPILER @@ -270,7 +269,7 @@ let curry = testList "Curry" [ ()) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "uncurryTest" (fun () -> let g2 x y = [x + y] let g3 x y z = [x + y + z] diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Alternative.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Alternative.fs index 81d689941..8356b8b77 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Alternative.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Alternative.fs @@ -8,7 +8,7 @@ open FSharpPlus.Data -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER let testEmpty () = let _: WrappedListE = empty let _: list = empty @@ -21,7 +21,7 @@ let testEmpty () = () #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER let testAppend () = let _ = WrappedListE [1;2] <|> WrappedListE [3;4] let _ = [1;2] <|> [3;4] @@ -35,7 +35,7 @@ let testAppend () = () #endif let alternative = testList "Alternative" [ -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "testEmptyAndAppendForCustomType" (fun () -> let u = WrappedListE [1;2] let v = WrappedListG [1;2] @@ -61,7 +61,7 @@ let alternative = testList "Alternative" [ Assert.AreEqual (Some 1, z)) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "testChoice" (fun () -> let s = seq { yield (SideEffects.add "a"; None) diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Applicative.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Applicative.fs index ee25b0fb9..4de5309f8 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Applicative.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Applicative.fs @@ -70,7 +70,7 @@ let applicative = testList "Applicative" [ Assert.IsInstanceOf> testGTE4) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "applicatives" (fun () -> let run (ZipList x) = x diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Collections.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Collections.fs index 1a3a8f9fa..e2d695ec1 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Collections.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Collections.fs @@ -14,7 +14,7 @@ module Collections = open System.Collections.Concurrent - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER let testCollections = let bigSeq = seq {1..10000000} let bigLst = [ 1..10000000 ] @@ -39,7 +39,7 @@ module Collections = () #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER let testSeqConversions = #if !FABLE_COMPILER let sk: Generic.Stack<_> = ofSeq { 1 .. 3 } @@ -125,7 +125,7 @@ module Collections = () #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER let testListConversions = // From sequence diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Foldable.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Foldable.fs index b52a3c293..f68487a88 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Foldable.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Foldable.fs @@ -9,7 +9,7 @@ open FSharpPlus.Data open System open System.Collections.ObjectModel -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER let foldables = let _10 = foldBack (+) (seq [1;2;3;4]) 0 let _323 = toList (seq [3;2;3]) @@ -34,7 +34,7 @@ let foldable = testList "Foldable" [ SideEffects.are []) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testList "filterDefaultCustom" [ #if !FABLE_COMPILER testCase "WrappedListA" (fun () -> @@ -57,7 +57,7 @@ let foldable = testList "Foldable" [ ] #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testList "foldAternatives" [ testCase "Option list" (fun () -> let x = choice [None; Some 3; Some 4; None] @@ -70,7 +70,7 @@ let foldable = testList "Foldable" [ ] #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testList "fromToSeq" [ #if !FABLE_COMPILER testCase "dictionary" (fun () -> @@ -120,13 +120,13 @@ let foldable = testList "Foldable" [ Assert.IsInstanceOf>> (Some sortedSeq)) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "intersperse" (fun () -> equal "a,b,c,d,e" (intersperse ',' "abcde") equal ["a";",";"b";",";"c";",";"d";",";"e"] (intersperse "," ["a";"b";"c";"d";"e"])) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "intercalate" (fun () -> equal "Lorem, ipsum, dolor" (intercalate ", " ["Lorem"; "ipsum"; "dolor"])) #endif @@ -163,7 +163,7 @@ let foldable = testList "Foldable" [ equal 50 (foldMap ((+) 10) iReadOnlyList)) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "exists" (fun () -> SideEffects.reset () let _ = exists ((=) 2) [1..3] @@ -175,7 +175,7 @@ let foldable = testList "Foldable" [ ()) #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testList "pick" [ #if !FABLE_COMPILER testCase "StringBuilder" (fun () -> @@ -201,7 +201,7 @@ let foldable = testList "Foldable" [ ] #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testList "minimum" [ testCase "list" (fun () -> let _ = minimum [1..3] @@ -225,7 +225,7 @@ let foldable = testList "Foldable" [ ] #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testList "maxBy" [ testCase "list" (fun () -> let _ = maxBy id [1..3] @@ -249,7 +249,7 @@ let foldable = testList "Foldable" [ ] #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testList "length" [ testCase "list" (fun () -> let _ = length [1..3] @@ -273,7 +273,7 @@ let foldable = testList "Foldable" [ ] #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testList "tryHead" [ testCase "seq" (fun () -> let s = tryHead <| seq [1;2] @@ -306,7 +306,7 @@ let foldable = testList "Foldable" [ ] #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "tryLast" (fun () -> let s = tryLast <| seq [1;2] let s': int option = tryLast <| seq [] diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Functor.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Functor.fs index 60d20a4fd..15611a6c1 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Functor.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Functor.fs @@ -34,7 +34,7 @@ let functor = testList "Functor" [ let tenEncoded = StringCodec.encode intCodec 10 equal oneParsed (Result.Ok 1) equal tenEncoded "10" ) - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testList "mapDefaultCustom" [ testCase "nelist" (fun () -> @@ -140,7 +140,7 @@ let functor = testList "Functor" [ ] #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "unzip" (fun () -> let testVal = unzip {Head = (1, 'a'); Tail = [(2, 'b');(3, 'b')]} #if !FABLE_COMPILER @@ -154,7 +154,7 @@ let functor = testList "Functor" [ Assert.AreEqual((NonEmptyMap.Create((1,(true)), (2, (false))),NonEmptyMap.Create((1,('a')), (2, ( 'b')))),testVal2)) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "zipTest" (fun () -> SideEffects.reset () @@ -239,7 +239,7 @@ let functor = testList "Functor" [ ()) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "genericZipShortest" (fun () -> let a = zip [|1; 2; 3|] [|"a"; "b"|] equalSeq [|1,"a"; 2,"b"|] a diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Indexable.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Indexable.fs index 1a6d92fbe..e8835a9b1 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Indexable.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Indexable.fs @@ -11,7 +11,7 @@ open System.Collections.ObjectModel open FSharpPlus.Control let indexable = testList "Indexable" [ - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testList "testCompileAndExecuteItem" [ testCase "map" (fun () -> let a = Map.ofSeq [1, "one"; 2, "two"] @@ -68,7 +68,7 @@ let indexable = testList "Indexable" [ ] #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testList "testCompileAndExecuteTryItem" [ testCase "map" (fun () -> let a = Map.ofSeq [1, "one"; 2, "two"] @@ -228,7 +228,7 @@ let indexable = testList "Indexable" [ equalSeq ["Using WrappedMapA's TraverseIndexed"] (SideEffects.get ())) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "findIndexUsage" (fun () -> let m1 = WrappedListD [0..4] SideEffects.reset () @@ -237,7 +237,7 @@ let indexable = testList "Indexable" [ equal i1 2) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "findSliceIndexUsage" (fun () -> let m1 = WrappedListD [0..4] let m2 = WrappedListD [1..3] diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Lensing.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Lensing.fs index 2f035d353..afbd2a10a 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Lensing.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Lensing.fs @@ -5,7 +5,7 @@ open Testing open FSharpPlus open FSharpPlus.Data open System -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER open FSharpPlus.Lens type Person = { Name: string; DateOfBirth: DateTime } module Person = @@ -20,7 +20,7 @@ let rayuela = DateOfBirth = DateTime (1914, 8, 26) } } #endif let lensing = testList "Lensing" [ -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER testCase "Lens" (fun () -> equal (view Book._authorName rayuela) "Julio Cortázar") testCase "Lens view 1, 2" (fun () -> diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Monad.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Monad.fs index fdb05e2c6..39baf7256 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Monad.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Monad.fs @@ -5,13 +5,13 @@ open FSharpPlus open FSharpPlus.Data #nowarn "686" -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER let option<'t> = monad> let list<'t> = monad'> #endif let monad = testList "Monad" [ - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "joinDefaultCustom" (fun () -> let x = join [[1];[2]] equal [1;2] x @@ -23,7 +23,7 @@ let monad = testList "Monad" [ equal ["Join"] (SideEffects.get ())) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "workFlow" (fun () -> let testVal = monad { diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Monoid.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Monoid.fs index b55907029..a40659189 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Monoid.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Monoid.fs @@ -10,7 +10,7 @@ open FSharpPlus.Data open System.Threading.Tasks #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type ZipList<'s> = ZipList of 's seq with static member Return (x:'a) = ZipList (Seq.initInfinite (konst x)) static member Map (ZipList x, f: 'a->'b) = ZipList (Seq.map f x) @@ -44,7 +44,7 @@ let monoid = testList "Monoid" [ #if !FABLE_COMPILER let (WrappedListB x) = Seq.sum [WrappedListB [10]; WrappedListB [15]] #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER //equalSeq [10;15] x // fails to infer type? let (WrappedListC y) = Seq.sum [WrappedListC [10]; WrappedListC [15]] equalSeq [10] y @@ -71,7 +71,7 @@ let monoid = testList "Monoid" [ equal ["Using optimized Sum"] (SideEffects.get ()) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER let _wl = WrappedListB [2..10] let _arrayGroup = groupBy ((%)/> 2) [|11;2;3;9;5;6;7;8;9;10|] diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/MonoidCompile.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/MonoidCompile.fs index 424b3c35e..8f80fa5f2 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/MonoidCompile.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/MonoidCompile.fs @@ -10,7 +10,7 @@ open FSharpPlus.Data open System.Threading.Tasks #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type ZipList<'s> = ZipList of 's seq with static member Return (x:'a) = ZipList (Seq.initInfinite (konst x)) static member Map (ZipList x, f: 'a->'b) = ZipList (Seq.map f x) @@ -49,13 +49,13 @@ let testCompile = let _quot23 = plus (zero) <@ ResizeArray ([2;3]) @> let _quot13 = plus (zero) <@ ("1","3") @> #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER let lzy1 = plus (lazy [1]) (lazy [2;3]) #endif #if !FABLE_COMPILER let _lzy = plus (zero) lzy1 #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER let asy1 = plus (async.Return [1]) (async.Return [2;3]) #endif #if !FABLE_COMPILER @@ -64,7 +64,7 @@ let testCompile = let _bigNestedTuple2 = (1, System.Tuple (8, "ff",3,4,5,6,7,8,9,10,11,12,(),14,15,16,17,18,19,20)) ++ (zero, System.Tuple (8, "ff",3,4,5,6,7,8,9,10,11,12,(),14,15,16,17,18,19,20)) ++ zero #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER let _nes : NonEmptySeq<_> = plus (NonEmptySeq.singleton 1) (NonEmptySeq.singleton 2) #endif diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Numeric.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Numeric.fs index 1f7fad674..09f685c27 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Numeric.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Numeric.fs @@ -7,7 +7,7 @@ open System.Collections.Generic open FSharpPlus.Data let numeric = testList "Numeric" [ - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "Zero First" (fun () -> let z : First = getZero() in equal None (First.run z)) #endif ] \ No newline at end of file diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Parsing.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Parsing.fs index f9d545c73..5f1951e98 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Parsing.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Parsing.fs @@ -6,7 +6,7 @@ open FSharpPlus.Data #nowarn "686" open System -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER let (|Int32|_|) : _-> Int32 option = tryParse type ProductId = { Value:int } with @@ -17,7 +17,7 @@ with #endif let parsing = testList "Parsing" [ - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "parse" (fun () -> let v2 : DateTimeOffset = parse "2011-03-04T15:42:19+03:00" diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Splits.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Splits.fs index fcddd4064..c06356333 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Splits.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Splits.fs @@ -17,7 +17,7 @@ type Sum<'a> = Sum of 'a with let splits = testList "Splits" [ - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testCase "splitArraysAndStrings" (fun () -> let a1 = "this.isABa.tABCest" |> split [|"AT" ; "ABC" |] let a2 = "this.isABa.tABCest"B |> split [|"AT"B; "ABC"B|] diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Traversable.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Traversable.fs index 63a240d0d..846dd05c8 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Traversable.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Traversable.fs @@ -7,7 +7,7 @@ open FSharpPlus.Data open System.Threading.Tasks -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type Either<'l,'r> = Left of 'l | Right of 'r with static member Return x = Right x static member inline get_Empty () = Left empty @@ -26,7 +26,7 @@ let traverseTest = let toOptions x = if x <> 4 then Some x else None let toChoices x = if x <> 4 then Choice1Of2 x else Choice2Of2 "This is a failure" let toLists x = if x <> 4 then [x; x] else [] -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER let toEithers x = if x <> 4 then Right x else Left ["This is a failure"] #endif @@ -85,7 +85,7 @@ let traversable = testList "Traversable" [ ()) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testList "traverse_Order" [ testCase "nelist" (fun () -> SideEffects.reset() @@ -191,7 +191,7 @@ let traversable = testList "Traversable" [ Assert.AreEqual (Either>.Left ["This is a failure"], e)) #endif - #if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 + #if !FABLE_COMPILER testList "traverseFiniteApplicatives" [ // TODO -> implement short-circuit without breaking anything else #if !FABLE_COMPILER diff --git a/tests/FSharpPlusFable.Tests/FSharpTests/General/Util.fs b/tests/FSharpPlusFable.Tests/FSharpTests/General/Util.fs index 711a12071..107e64798 100644 --- a/tests/FSharpPlusFable.Tests/FSharpTests/General/Util.fs +++ b/tests/FSharpPlusFable.Tests/FSharpTests/General/Util.fs @@ -4,7 +4,7 @@ open FSharpPlus open FSharpPlus.Data open FSharpPlus.Control open Testing -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type WrappedMapA<'K,'V when 'K : comparison> = WrappedMapA of Map<'K,'V> with static member ToMap (WrappedMapA m) = m static member inline TraverseIndexed (WrappedMapA m, f) = @@ -42,7 +42,7 @@ type WrappedListA<'s> = WrappedListA of 's list with List.length lst #endif -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type WrappedListB<'s> = WrappedListB of 's list with static member Return x = WrappedListB [x] static member (+) (WrappedListB l, WrappedListB x) = WrappedListB (l @ x) @@ -63,7 +63,7 @@ type WrappedListC<'s> = WrappedListC of 's list with static member Zero = WrappedListC List.empty static member Sum (lst: seq>) = Seq.head lst -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type WrappedListD<'s> = WrappedListD of 's list with interface Collections.Generic.IEnumerable<'s> with member x.GetEnumerator () = (let (WrappedListD x) = x in x :> _ seq).GetEnumerator () interface Collections.IEnumerable with member x.GetEnumerator () = (let (WrappedListD x) = x in x :> _ seq).GetEnumerator () :> Collections.IEnumerator @@ -140,7 +140,7 @@ type WrappedListG<'s> = WrappedListG of 's list with static member Delay (f: unit -> WrappedListG<_>) = SideEffects.add "Using WrappedListG's Delay"; f () static member Using (resource, body) = SideEffects.add "Using WrappedListG's Using"; using resource body -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type WrappedListH<'s> = WrappedListH of 's list with static member Map (WrappedListH lst, f) = WrappedListH (List.map f lst) static member inline Sequence (x: WrappedListH<'``Functor<'T>``>) = @@ -201,7 +201,7 @@ type WrappedSeqC<'s> = WrappedSeqC of 's seq with SideEffects.add "Using WrappedSeqC's TryFinally" try computation finally compensation () -#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4 +#if !FABLE_COMPILER type WrappedSeqD<'s> = WrappedSeqD of 's seq with static member Return x = SideEffects.add "Using WrappedSeqD's Return"; WrappedSeqD (Seq.singleton x) static member (<*>) (WrappedSeqD f, WrappedSeqD x) = SideEffects.add "Using WrappedSeqD's Apply"; WrappedSeqD (f <*> x) diff --git a/tests/FSharpPlusFable.Tests/fable3-global.json b/tests/FSharpPlusFable.Tests/fable3-global.json deleted file mode 100644 index bf30cc3cb..000000000 --- a/tests/FSharpPlusFable.Tests/fable3-global.json +++ /dev/null @@ -1 +0,0 @@ -{ "sdk": { "version": "6.0.201", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/tests/benchmarks/Benchmarks.fsproj b/tests/benchmarks/Benchmarks.fsproj index 584d25237..6d66ea647 100644 --- a/tests/benchmarks/Benchmarks.fsproj +++ b/tests/benchmarks/Benchmarks.fsproj @@ -1,6 +1,6 @@  - net7.0 + net8.0 Exe AnyCPU true