Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Ply and update to FSharp 6 #248

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Build master

on: [push, pull_request]
on:
# Runs only on pushes to the default branch or pull requests to the default branch
push:
branches:
- master
pull_request:
branches:
- master

jobs:

Expand Down
34 changes: 5 additions & 29 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,16 @@ source https://api.nuget.org/v3/index.json


storage: none

nuget Microsoft.SourceLink.GitHub prerelease copy_local: true




group NetStandard2
source https://api.nuget.org/v3/index.json
lowest_matching: true
strategy: min
nuget FSharp.Core >= 4.7.2
nuget Ply
nuget Hopac
nuget FSharp.Control.AsyncSeq
nuget FSharp.Core >= 6.0.1
nuget Hopac >= 0.5.1
nuget FSharp.Control.AsyncSeq >= 3.2.1
nuget Fable.Core >= 4.2.0
framework: netstandard2.0, net6.0
storage: none
condition: netstandard2_0


nuget IcedTasks >= 0.10.2
nuget Microsoft.SourceLink.GitHub prerelease copy_local: true


group NetStandard2_1
source https://api.nuget.org/v3/index.json
lowest_matching: true
strategy: min
nuget FSharp.Core >= 7.0.0
nuget Hopac
nuget FSharp.Control.AsyncSeq
nuget IcedTasks >= 0.7.0
framework: netstandard2.1, net7.0
storage: none
condition: netstandard2_1

group Test
source https://api.nuget.org/v3/index.json
Expand All @@ -50,7 +27,6 @@ nuget Fable.Core
nuget Fable.Mocha
nuget Fable.Python
nuget Fable.Pyxpecto
nuget Ply

group Benchmarks
source https://api.nuget.org/v3/index.json
Expand Down
65 changes: 17 additions & 48 deletions paket.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
STORAGE: NONE
STRATEGY: MIN
LOWEST_MATCHING: TRUE
NUGET
remote: https://api.nuget.org/v3/index.json
Fable.Core (4.2)
FSharp.Control.AsyncSeq (3.2.1)
FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0
Microsoft.Bcl.AsyncInterfaces (>= 5.0) - restriction: >= netstandard2.0
FSharp.Core (6.0.1)
Hopac (0.5.1)
FSharp.Core (>= 4.5.2) - restriction: >= netstandard2.0
IcedTasks (0.10.2)
FSharp.Core (>= 6.0.1) - restriction: >= netstandard2.0
Microsoft.Bcl.AsyncInterfaces (5.0) - restriction: >= netstandard2.0
System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1))
Microsoft.Build.Tasks.Git (8.0) - copy_local: true
Microsoft.SourceLink.Common (8.0) - copy_local: true
Microsoft.SourceLink.GitHub (8.0) - copy_local: true
Microsoft.Build.Tasks.Git (>= 8.0)
Microsoft.SourceLink.Common (>= 8.0)
System.Runtime.CompilerServices.Unsafe (4.5.3) - restriction: || (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= wp8))
System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net461) (>= netstandard2.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1))
System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8)

GROUP Benchmarks
STORAGE: NONE
Expand Down Expand Up @@ -851,48 +867,6 @@ NUGET
System.Windows.Extensions (6.0) - restriction: >= netcoreapp3.1
System.Drawing.Common (>= 6.0) - restriction: >= netcoreapp3.1

GROUP NetStandard2
STORAGE: NONE
STRATEGY: MIN
LOWEST_MATCHING: TRUE
CONDITION: NETSTANDARD2_0
RESTRICTION: || (== net6.0) (== netstandard2.0)
NUGET
remote: https://api.nuget.org/v3/index.json
Fable.Core (4.2)
FSharp.Control.AsyncSeq (3.2.1)
FSharp.Core (>= 4.7.2)
Microsoft.Bcl.AsyncInterfaces (>= 5.0)
FSharp.Core (4.7.2)
Hopac (0.5.1)
FSharp.Core (>= 4.5.2)
Microsoft.Bcl.AsyncInterfaces (6.0)
System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netstandard2.1)) (== netstandard2.0)
Ply (0.3.1)
FSharp.Core (>= 4.6.2)
System.Threading.Tasks.Extensions (>= 4.5.4)
System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.0)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= wp8)) (== netstandard2.0)
System.Threading.Tasks.Extensions (4.5.4)
System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.0)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= wp8)) (== netstandard2.0)

GROUP NetStandard2_1
STORAGE: NONE
STRATEGY: MIN
LOWEST_MATCHING: TRUE
CONDITION: NETSTANDARD2_1
RESTRICTION: || (== net7.0) (== netstandard2.1)
NUGET
remote: https://api.nuget.org/v3/index.json
FSharp.Control.AsyncSeq (3.2.1)
FSharp.Core (>= 4.7.2)
Microsoft.Bcl.AsyncInterfaces (>= 5.0)
FSharp.Core (7.0.300)
Hopac (0.5.1)
FSharp.Core (>= 4.5.2)
IcedTasks (0.7)
FSharp.Core (>= 7.0)
Microsoft.Bcl.AsyncInterfaces (6.0)

GROUP Test
STORAGE: NONE
STRATEGY: MIN
Expand Down Expand Up @@ -932,9 +906,6 @@ NUGET
Mono.Cecil (0.11.5) - restriction: >= net6.0
Newtonsoft.Json (13.0.3) - restriction: >= netcoreapp3.1
NuGet.Frameworks (6.8) - restriction: >= netcoreapp3.1
Ply (0.3.1)
FSharp.Core (>= 4.6.2) - restriction: >= netstandard2.0
System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: >= netstandard2.0
System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (>= netcoreapp3.1) (< netstandard1.1)) (&& (< monoandroid) (>= netcoreapp3.1) (< netstandard1.1)) (&& (< monoandroid) (>= netcoreapp3.1) (< netstandard2.0)) (&& (>= monotouch) (>= netcoreapp3.1)) (&& (>= net45) (>= netcoreapp3.1) (< netstandard2.0)) (&& (>= net461) (>= netcoreapp3.1)) (&& (>= net462) (>= netcoreapp3.1)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinios)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinmac)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarintvos)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinwatchos)) (&& (< netcoreapp2.0) (>= netcoreapp3.1)) (&& (>= netcoreapp3.1) (< netstandard1.1) (>= win8)) (&& (>= netcoreapp3.1) (< netstandard2.0) (>= wpa81))
System.Collections.Immutable (8.0) - restriction: >= netcoreapp3.1
System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0))
Expand All @@ -944,9 +915,7 @@ NUGET
System.Reflection.Metadata (8.0) - restriction: >= netcoreapp3.1
System.Collections.Immutable (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0)
System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0))
System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp3.1) (< netstandard1.1)) (&& (< monoandroid) (< netcoreapp2.1) (>= netcoreapp3.1)) (&& (< monoandroid) (>= netcoreapp3.1) (< netstandard1.1)) (&& (< monoandroid) (>= netcoreapp3.1) (< netstandard2.0)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netcoreapp3.1)) (&& (>= net45) (>= netcoreapp3.1) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp3.1)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= net6.0)) (&& (>= net462) (>= netcoreapp3.1)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinios)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinmac)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarintvos)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinwatchos)) (&& (< netcoreapp2.0) (>= netcoreapp3.1)) (&& (>= netcoreapp3.1) (< netstandard1.1) (>= win8)) (&& (>= netcoreapp3.1) (< netstandard2.0) (>= wpa81)) (&& (>= netcoreapp3.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= wp8))
System.Threading.Tasks.Extensions (4.5.4) - restriction: >= netstandard2.0
System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8)
System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp3.1) (< netstandard1.1)) (&& (< monoandroid) (< netcoreapp2.1) (>= netcoreapp3.1)) (&& (< monoandroid) (>= netcoreapp3.1) (< netstandard1.1)) (&& (< monoandroid) (>= netcoreapp3.1) (< netstandard2.0)) (&& (>= monotouch) (>= netcoreapp3.1)) (&& (>= net45) (>= netcoreapp3.1) (< netstandard2.0)) (&& (>= net461) (>= netcoreapp3.1)) (&& (>= net462) (>= net6.0)) (&& (>= net462) (>= netcoreapp3.1)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinios)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinmac)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarintvos)) (&& (< net6.0) (>= netcoreapp3.1) (>= xamarinwatchos)) (&& (< netcoreapp2.0) (>= netcoreapp3.1)) (&& (>= netcoreapp3.1) (< netstandard1.1) (>= win8)) (&& (>= netcoreapp3.1) (< netstandard2.0) (>= wpa81)) (&& (>= netcoreapp3.1) (>= uap10.1))
YoloDev.Expecto.TestSdk (0.14.3)
Expecto (>= 10.0 < 11.0) - restriction: >= net6.0
FSharp.Core (>= 7.0.200) - restriction: >= net6.0
Expand Down
7 changes: 2 additions & 5 deletions src/FsToolkit.ErrorHandling.AsyncSeq/paket.references
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Microsoft.SourceLink.GitHub

group NetStandard2
FSharp.Control.AsyncSeq
group NetStandard2_1
FSharp.Control.AsyncSeq
FSharp.Core
FSharp.Control.AsyncSeq
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ module CancellableTaskResultCE =
)
)

#if NETSTANDARD2_1 || NET6_0_OR_GREATER
member inline internal this.TryFinallyAsync
(
body: CancellableTaskResultCode<'TOverall, 'Error, 'T>,
Expand Down Expand Up @@ -238,7 +239,7 @@ module CancellableTaskResultCE =
ValueTask()
)
)

#endif
member inline this.Source
(ctr: CancellableTaskResult<'T, 'Error>)
: CancellableTaskResult<'T, 'Error> =
Expand All @@ -257,9 +258,10 @@ module CancellableTaskResultCE =
|> Async.map Result.ofChoice
|> this.Source

#if NETSTANDARD2_1 || NET6_0_OR_GREATER
member inline _.Source(t: ValueTask<Result<_, _>>) : CancellableTaskResult<'T, 'Error> =
cancellableTask { return! t }

#endif
member inline _.Source(result: Result<_, _>) : CancellableTaskResult<_, _> =
CancellableTask.singleton result

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ module CancellableTaskValidationCE =
)
)
)

#if NETSTANDARD2_1 || NET6_0_OR_GREATER
member inline internal this.TryFinallyAsync
(
[<InlineIfLambda>] body: CancellableTaskValidationCode<'TOverall, 'Error, 'T>,
Expand Down Expand Up @@ -238,7 +238,7 @@ module CancellableTaskValidationCE =
ValueTask()
)
)

#endif

[<NoEagerConstraintApplication>]
static member inline BindDynamic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<LangVersion>preview</LangVersion>
<DebugType>portable</DebugType>
<NoWarn>FS3511;FS3513</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="CancellableTaskResultCE.fs" />
<None Include="paket.references" />
<Compile Include="CancellableTaskValidationCE.fs" />
<Compile Include="CancellableTaskValidationOp.fs" />
<Watch Include="@(None)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FsToolkit.ErrorHandling.TaskResult\FsToolkit.ErrorHandling.TaskResult.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>preview</LangVersion>
<DebugType>portable</DebugType>
<NoWarn>FS3511;FS3513</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="CancellableTaskResultCE.fs" />
<None Include="paket.references" />
<Compile Include="CancellableTaskValidationCE.fs" />
<Compile Include="CancellableTaskValidationOp.fs" />
<Watch Include="@(None)" />
</ItemGroup>
<ItemGroup>
<ProjectReference
Include="..\FsToolkit.ErrorHandling.TaskResult\FsToolkit.ErrorHandling.TaskResult.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
6 changes: 2 additions & 4 deletions src/FsToolkit.ErrorHandling.IcedTasks/paket.references
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

Microsoft.SourceLink.GitHub

group NetStandard2_1
FSharp.Core
IcedTasks
FSharp.Core
IcedTasks
7 changes: 2 additions & 5 deletions src/FsToolkit.ErrorHandling.JobResult/paket.references
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Microsoft.SourceLink.GitHub

group NetStandard2
Hopac
group NetStandard2_1
Hopac
FSharp.Core
Hopac
3 changes: 0 additions & 3 deletions src/FsToolkit.ErrorHandling.TaskResult/List.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ namespace FsToolkit.ErrorHandling

open System.Threading.Tasks
open FsToolkit.ErrorHandling
#if NETSTANDARD2_0
open FSharp.Control.Tasks.Affine
#endif

[<RequireQualifiedAccess>]
module List =
Expand Down
3 changes: 0 additions & 3 deletions src/FsToolkit.ErrorHandling.TaskResult/Result.fs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
namespace FsToolkit.ErrorHandling

open System.Threading.Tasks
#if NETSTANDARD2_0
open FSharp.Control.Tasks.Affine
#endif

module Result =

Expand Down
8 changes: 4 additions & 4 deletions src/FsToolkit.ErrorHandling.TaskResult/Task.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ namespace FsToolkit.ErrorHandling

open System.Threading.Tasks

#if NETSTANDARD2_0
open FSharp.Control.Tasks.Affine
#endif

[<RequireQualifiedAccess>]
module Task =
Expand All @@ -18,12 +15,13 @@ module Task =
return! f x
}

#if NETSTANDARD2_1 || NET6_0_OR_GREATER
let inline bindV ([<InlineIfLambda>] f: 'a -> Task<'b>) (x: ValueTask<'a>) =
task {
let! x = x
return! f x
}

#endif
let inline apply f x =
bind (fun f' -> bind (fun x' -> singleton (f' x')) x) f

Expand All @@ -34,12 +32,14 @@ module Task =
>> singleton
)

#if NETSTANDARD2_1 || NET6_0_OR_GREATER
let inline mapV ([<InlineIfLambda>] f) x =
x
|> bindV (
f
>> singleton
)
#endif

let inline map2 ([<InlineIfLambda>] f) x y = (apply (apply (singleton f) x) y)

Expand Down
4 changes: 1 addition & 3 deletions src/FsToolkit.ErrorHandling.TaskResult/TaskOption.fs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
namespace FsToolkit.ErrorHandling

open System.Threading.Tasks
#if NETSTANDARD2_0
open FSharp.Control.Tasks.Affine
#endif


[<RequireQualifiedAccess>]
module TaskOption =
Expand Down
Loading
Loading