Skip to content
Draft
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
13 changes: 13 additions & 0 deletions FSharpPlus.sln
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEM
.github\ISSUE_TEMPLATE\03_general_feature.yml = .github\ISSUE_TEMPLATE\03_general_feature.yml
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpPlus.Core", "src\FSharpPlus.Core\FSharpPlus.Core.fsproj", "{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -229,6 +231,16 @@ Global
{ACBBD11E-0746-4B9D-9CED-A90FE5824CE2}.Release|Any CPU.Build.0 = Release|Any CPU
{ACBBD11E-0746-4B9D-9CED-A90FE5824CE2}.Test|Any CPU.ActiveCfg = Release|Any CPU
{ACBBD11E-0746-4B9D-9CED-A90FE5824CE2}.Test|Any CPU.Build.0 = Release|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Fable|Any CPU.ActiveCfg = Fable|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Fable|Any CPU.Build.0 = Fable|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Fable3|Any CPU.ActiveCfg = Debug|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Fable3|Any CPU.Build.0 = Debug|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Release|Any CPU.Build.0 = Release|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Test|Any CPU.ActiveCfg = Test|Any CPU
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2}.Test|Any CPU.Build.0 = Test|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -246,6 +258,7 @@ Global
{F4D5D32F-D47A-4727-8965-80A4BB7A29DD} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
{877F7C02-2F44-4314-AA00-3F5C4FFEC187} = {153F4C68-EF70-4CF2-AA64-73482955999F}
{B9238B1E-C83C-4196-8C86-DA3E2CCDA309} = {153F4C68-EF70-4CF2-AA64-73482955999F}
{B6170B72-3F6E-485C-8B65-1320DDCBB3F2} = {81F5F559-FD23-4E90-9EE6-3E2A2C1A7F96}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {789B5FFA-7891-4F60-831E-42C3C5ED2C51}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ module ValueTask =
open System.Threading
open System.Threading.Tasks

let inline internal (|Succeeded|Canceled|Faulted|) (t: ValueTask<'T>) =
let inline (|Succeeded|Canceled|Faulted|) (t: ValueTask<'T>) =
if t.IsCompletedSuccessfully then Succeeded t.Result
elif t.IsCanceled then Canceled
else Faulted (t.AsTask().Exception)
else Faulted (t.AsTask().Exception)

let inline internal continueTask (tcs: TaskCompletionSource<'Result>) (x: ValueTask<'t>) (k: 't -> unit) =
let inline continueTask (tcs: TaskCompletionSource<'Result>) (x: ValueTask<'t>) (k: 't -> unit) =
let f = function
| Succeeded r -> k r
| Canceled -> tcs.SetCanceled ()
| Faulted e -> tcs.SetException e.InnerExceptions
if x.IsCompleted then f x
else x.ConfigureAwait(false).GetAwaiter().UnsafeOnCompleted (fun () -> f x)

let inline internal continueWith (x: ValueTask<'t>) f =
let inline continueWith (x: ValueTask<'t>) f =
if x.IsCompleted then f x
else x.ConfigureAwait(false).GetAwaiter().UnsafeOnCompleted (fun () -> f x)

Expand Down
74 changes: 74 additions & 0 deletions src/FSharpPlus.Core/FSharpPlus.Core.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition="'$(CompilerTest)' == 'true'">
<FscToolPath>$(FSC_ToolPathCompilerBuild)</FscToolPath>
<FscToolExe>$(FSC_ExePathCompilerBuild)</FscToolExe>
</PropertyGroup>
<PropertyGroup>
<Title>FSharpPlus.Core</Title>
<AssemblyName>FSharpPlus.Core</AssemblyName>
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
<FileVersion>$(VersionPrefix).0</FileVersion>
<ProjectGuid>b6170b72-3f6e-485c-8b65-1320ddcbb3f2</ProjectGuid>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<OtherFlags>--warnon:1182 $(OtherFlags)</OtherFlags>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Configurations>Debug;Release;Fable;Test</Configurations>
<Platforms>AnyCPU</Platforms>
<LangVersion>8.0</LangVersion>
<LangVersion Condition=" '$(Configuration)' == 'Fable' ">6.0</LangVersion>

<DefineConstants Condition=" '$(Configuration)' == 'Test'">$(DefineConstants);TEST_TRACE</DefineConstants>
<DefineConstants Condition=" '$(Configuration)' == 'Fable'">$(DefineConstants);FABLE_COMPILER</DefineConstants>
<DefineConstants Condition=" '$(Configuration)' == 'Fable4'">$(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_4</DefineConstants>
<TargetFramework>net8.0</TargetFramework>
<!--<OutputPath>..\..\bin</OutputPath>-->
</PropertyGroup>
<ItemGroup>
<InternalsVisibleTo Include="FSharpPlus" />
<Compile Include="Internals.fs" />
<Compile Include="Extensions/Option.fs" />
<Compile Include="Extensions/ValueOption.fs" />
<Compile Include="Extensions/Nullable.fs" />
<Compile Include="Extensions/Result.fs" />
<Compile Include="Extensions/Choice.fs" />
<Compile Include="Extensions/Exception.fs" />
<Compile Include="Extensions/Seq.fs" />
<Compile Include="Extensions/IList.fs" />
<Compile Include="Extensions/List.fs" />
<Compile Include="Extensions/Array.fs" />
<Compile Include="Extensions/ResizeArray.fs" />
<Compile Include="Extensions/String.fs" />
<Compile Include="Extensions/IReadOnlyCollection.fs" />
<Compile Include="Extensions/IReadOnlyList.fs" />
<Compile Include="Extensions/Lazy.fs" />
<Compile Include="Extensions/Map.fs" />
<Compile Include="Extensions/Dictionary.fs" />
<Compile Include="Extensions/Dict.fs" />
<Compile Include="Extensions/HashSet.fs" />
<Compile Include="Extensions/IReadOnlyDictionary.fs" />
<Compile Include="Extensions/Enumerator.fs" />
<Compile Include="Extensions/Task.fs" />
<Compile Include="Extensions/ValueTask.fs" />
<Compile Include="Extensions/Extensions.fs" />
<Compile Include="Extensions/Async.fs" />
<Compile Include="Extensions/Tuple.fs" />
<Compile Include="Extensions/ValueTuple.fs" />
</ItemGroup>

<!-- Add source files to "fable" folder in Nuget package - required for the library to be consumable by Fable -->
<ItemGroup>
<Content Include="*.fsproj; *.fs" PackagePath="fable/" />
<Content Include="Extensions/*.fs" PackagePath="fable/Extensions" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="6.0.6" />
</ItemGroup>
</Project>
Loading
Loading