Skip to content

Commit

Permalink
-net45
Browse files Browse the repository at this point in the history
  • Loading branch information
wallymathieu committed Jun 23, 2024
1 parent 3b0dc3d commit 7f9d772
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docsrc/tools/doclib.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion docsrc/tools/docsTool.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/FSharpPlus.Docs/FSharpPlus.Docs.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<Configurations>Debug;Release;Fable</Configurations>
<Platforms>AnyCPU</Platforms>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/FSharpPlus/Control/Applicative.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Apply =
#if !FABLE_COMPILER
static member ``<*>`` (struct (f: Task<_> , x: Task<'T> ), _output: Task<'U> , [<Optional>]_mthd: Apply) = Task.apply f x : Task<'U>
#endif
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER
static member ``<*>`` (struct (f: ValueTask<_> , x: ValueTask<'T> ), _output: ValueTask<'U> , [<Optional>]_mthd: Apply) : ValueTask<'U> = ValueTask.apply f x
static member ``<*>`` (struct (_: DmStruct1<_> , _: DmStruct1<'T> ), _output: DmStruct1<'U> , [<Optional>]_mthd: Apply) : DmStruct1<'U> = Unchecked.defaultof<DmStruct1<'U>>
#endif
Expand Down Expand Up @@ -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 !NETSTANDARD2_0 && !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
Expand Down Expand Up @@ -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 !NETSTANDARD2_0 && !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
Expand Down
4 changes: 2 additions & 2 deletions src/FSharpPlus/Control/Comonad.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 !NETSTANDARD2_0 && !FABLE_COMPILER
static member Extract (f: ValueTask<'T> ) = f.Result
#endif
static member inline Invoke (x: '``Comonad<'T>``) : 'T =
Expand Down Expand Up @@ -67,7 +67,7 @@ type Extend =
tcs.Task
#endif

#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER
static member (=>>) (g: ValueTask<'T> , f: ValueTask<'T> -> 'U ) : ValueTask<'U> =
if g.IsCompletedSuccessfully then
try
Expand Down
6 changes: 3 additions & 3 deletions src/FSharpPlus/Control/Converter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,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>
Expand Down Expand Up @@ -199,7 +199,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
Expand All @@ -217,7 +217,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
Expand Down
6 changes: 3 additions & 3 deletions src/FSharpPlus/Control/Functor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type Map =
#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 !NETSTANDARD2_0 && !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
Expand Down Expand Up @@ -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 !NETSTANDARD2_0 && !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
Expand Down Expand Up @@ -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 !NETSTANDARD2_0 && !FABLE_COMPILER
static member Zip ((x: ValueTask<'T> , y: ValueTask<'U> , _output: ValueTask<'T*'U> ), _mthd: Zip) = ValueTask.zip x y
#endif

Expand Down
8 changes: 4 additions & 4 deletions src/FSharpPlus/Control/Monad.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 !NETSTANDARD2_0 && !FABLE_COMPILER
static member (>>=) (source: ValueTask<'T> , f: 'T -> ValueTask<'U> ) = ValueTask.bind f source : ValueTask<'U>
#endif

Expand Down Expand Up @@ -83,7 +83,7 @@ type Join =
#if !FABLE_COMPILER
static member Join (x: Task<Task<_>> , [<Optional>]_output: Task<'T> , [<Optional>]_mthd: Join ) = Task.join x : Task<'T>
#endif
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER
static member Join (x: ValueTask<ValueTask<_>> , [<Optional>]_output: ValueTask<'T> , [<Optional>]_mthd: Join ) = ValueTask.join x : ValueTask<'T>
#endif
static member Join (x , [<Optional>]_output: option<'T> , [<Optional>]_mthd: Join ) = Option.flatten x : option<'T>
Expand Down Expand Up @@ -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 !NETSTANDARD2_0 && !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
Expand Down Expand Up @@ -196,7 +196,7 @@ type Delay =

#endif

#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER
static member Delay (_mthd: Delay , x: unit-> ValueTask<_> , _ ) = x () : ValueTask<'T>
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/FSharpPlus/Control/Monoid.fs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ type Plus with
static member inline ``+`` (x: 'a Task, y: 'a Task, [<Optional>]_mthd: Plus) = Task.lift2 Plus.Invoke x y
#endif

#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER
type Plus with

static member inline ``+`` (x: 'a ValueTask, y: 'a ValueTask, [<Optional>]_mthd: Plus) = ValueTask.lift2 Plus.Invoke x y
Expand Down
2 changes: 1 addition & 1 deletion src/FSharpPlus/Control/Numeric.fs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ type Zero with
s.SetResult v
s.Task
#endif
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER
static member inline Zero (_: ValueTask<'a>, _: Zero) : ValueTask<'a> =
let (v: 'a) = Zero.Invoke ()
ValueTask<'a>(v)
Expand Down
8 changes: 4 additions & 4 deletions src/FSharpPlus/Control/ZipApplicative.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 !NETSTANDARD2_0 && !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<Return>)
Expand Down Expand Up @@ -89,7 +89,7 @@ type ZipApply =
#if !FABLE_COMPILER
static member ``<.>`` (struct (f: Task<_> , x: Task<'T> ), [<Optional>]_output: Task<'U> , [<Optional>]_mthd: ZipApply) = Task.map2 (<|) f x
#endif
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER
static member ``<.>`` (struct (f: ValueTask<_> , x: ValueTask<'T> ), [<Optional>]_output: ValueTask<'U> , [<Optional>]_mthd: ZipApply) = ValueTask.map2 (<|) f x
#endif
static member ``<.>`` (struct (f: Async<_> , x: Async<'T> ), [<Optional>]_output: Async<'U> , [<Optional>]_mthd: ZipApply) : Async<'U> = Async.map2 (<|) f x
Expand Down Expand Up @@ -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 !NETSTANDARD2_0 && !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
Expand Down Expand Up @@ -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 !NETSTANDARD2_0 && !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
Expand Down
2 changes: 1 addition & 1 deletion src/FSharpPlus/Extensions/Extensions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module Extensions =

#endif

#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER

type ValueTask<'t> with

Expand Down
2 changes: 1 addition & 1 deletion src/FSharpPlus/Extensions/ValueTask.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace FSharpPlus

#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
#if !NETSTANDARD2_0 && !FABLE_COMPILER

/// Additional operations on ValueTask<'T>
[<RequireQualifiedAccess>]
Expand Down
2 changes: 1 addition & 1 deletion tests/FSharpPlus.Tests/FSharpPlus.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Platforms>AnyCPU</Platforms>
<DefineConstants Condition=" '$(Configuration)' == 'Test'">$(DefineConstants);TEST_TRACE</DefineConstants>
<DefineConstants Condition=" '$(Configuration)' == 'Fable'">$(DefineConstants);FABLE_COMPILER</DefineConstants>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Helpers.fs" />
Expand Down
2 changes: 1 addition & 1 deletion tests/benchmarks/Benchmarks.fsproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<PlatformTarget>AnyCPU</PlatformTarget>
<Optimize>true</Optimize>
Expand Down

0 comments on commit 7f9d772

Please sign in to comment.