Skip to content

Commit 7842790

Browse files
committed
Merge branch 'master' into 'v5-2-seq-fixes'
1 parent 4fd19e4 commit 7842790

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+620
-1193
lines changed

.config/dotnet-tools.json

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
11
{
2-
"version": 1,
3-
"isRoot": true,
4-
"tools": {
5-
"paket": {
6-
"version": "8.0.3",
7-
"commands": [
8-
"paket"
9-
]
10-
},
11-
"fable": {
12-
"version": "4.4.0",
13-
"commands": [
14-
"fable"
15-
]
16-
},
17-
"fantomas": {
18-
"version": "6.0.0-alpha-010",
19-
"commands": [
20-
"fantomas"
21-
]
22-
},
23-
"femto": {
24-
"version": "0.19.0",
25-
"commands": [
26-
"femto"
27-
]
28-
}
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"paket": {
6+
"version": "8.0.3",
7+
"commands": [
8+
"paket"
9+
],
10+
"rollForward": false
11+
},
12+
"fable": {
13+
"version": "4.4.0",
14+
"commands": [
15+
"fable"
16+
],
17+
"rollForward": false
18+
},
19+
"fantomas": {
20+
"version": "6.3.16",
21+
"commands": [
22+
"fantomas"
23+
],
24+
"rollForward": false
25+
},
26+
"femto": {
27+
"version": "0.19.0",
28+
"commands": [
29+
"femto"
30+
],
31+
"rollForward": false
2932
}
33+
}
3034
}

.fantomasignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
AssemblyInfo.fs
2+
tests/FsToolkit.ErrorHandling.AsyncSeq.Tests/Main.fs
3+
tests/FsToolkit.ErrorHandling.Tests/Main.fs

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"name": "benchmarks",
66
"type": "coreclr",
77
"request": "launch",
8-
"program": "${workspaceFolder}/benchmarks/bin/Release/net7.0/benchmarks.exe",
9-
"args": [],
8+
"program": "${workspaceFolder}/benchmarks/bin/Release/net8.0/benchmarks.exe",
9+
"args": ["-m", "--runtimes", "net8.0", "--filter", "*"],
1010
"env": {
1111
"ASPNETCORE_ENVIRONMENT": "Development"
1212
},
1313
"console": "integratedTerminal",
1414
"preLaunchTask": "build release",
15-
"cwd": "${workspaceFolder}/benchmarks/bin/Release/net7.0/"
15+
"cwd": "${workspaceFolder}/benchmarks/bin/Release/net8.0/"
1616
}
1717
]
1818
}

benchmarks/Benchmarks.fs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,8 @@ type ResultBuilder() =
304304
member this.Zero() : Result<unit, 'TError> = this.Return()
305305

306306
member _.Bind
307-
(
308-
result: Result<'T, 'TError>,
309-
binder: 'T -> Result<'U, 'TError>
310-
) : Result<'U, 'TError> =
307+
(result: Result<'T, 'TError>, binder: 'T -> Result<'U, 'TError>)
308+
: Result<'U, 'TError> =
311309
Result.bind binder result
312310

313311

@@ -319,10 +317,8 @@ type ResultBuilderInlined() =
319317
member inline this.Zero() : Result<unit, 'TError> = this.Return()
320318

321319
member inline _.Bind
322-
(
323-
result: Result<'T, 'TError>,
324-
binder: 'T -> Result<'U, 'TError>
325-
) : Result<'U, 'TError> =
320+
(result: Result<'T, 'TError>, binder: 'T -> Result<'U, 'TError>)
321+
: Result<'U, 'TError> =
326322
Result.Inlined.bind binder result
327323

328324
type ResultBuilderInlinedLambda() =
@@ -331,10 +327,8 @@ type ResultBuilderInlinedLambda() =
331327
member inline this.Zero() : Result<unit, 'TError> = this.Return()
332328

333329
member inline _.Bind
334-
(
335-
result: Result<'T, 'TError>,
336-
[<InlineIfLambda>] binder: 'T -> Result<'U, 'TError>
337-
) : Result<'U, 'TError> =
330+
(result: Result<'T, 'TError>, [<InlineIfLambda>] binder: 'T -> Result<'U, 'TError>)
331+
: Result<'U, 'TError> =
338332
Result.Alt.InlinedLambda.bind binder result
339333

340334

benchmarks/Program.fs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
1-
open System
2-
open BenchmarkDotNet.Running
3-
open benchmarks
1+
open BenchmarkDotNet.Running
42
open BenchmarkDotNet.Configs
5-
open BenchmarkDotNet.Jobs
63
open BenchmarkDotNet.Columns
7-
open BenchmarkDotNet.Environments
84
open BenchmarkDotNet.Reports
9-
open FsToolkit.ErrorHandling.Benchmarks
10-
open ApplicativeTests
5+
open System.Reflection
6+
117

128
[<EntryPoint>]
139
let main argv =
1410

1511
let cfg =
1612
DefaultConfig.Instance
17-
// .AddJob(Job.Default.WithRuntime(CoreRuntime.Core50))
18-
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core70))
1913
.AddColumn(StatisticColumn.P80, StatisticColumn.P95)
2014
.WithSummaryStyle(SummaryStyle.Default.WithRatioStyle(RatioStyle.Trend))
21-
// BenchmarkRunner.Run<EitherMapBenchmarks>() |> ignore
22-
// BenchmarkRunner.Run<TaskResult_BindCEBenchmarks>(cfg) |> ignore
23-
// BenchmarkRunner.Run<BindSameBenchmarks>() |> ignore
2415

25-
BenchmarkRunner.Run<SeqTests.SeqBenchmarks>(cfg, argv)
16+
// see here for console args: https://benchmarkdotnet.org/articles/guides/console-args.html
17+
BenchmarkRunner.Run(assembly = Assembly.GetExecutingAssembly(), config = cfg, args = argv)
2618
|> ignore
2719

2820
0 // return an integer exit code

build/build.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ let checkFormatCode _ =
152152
elif result.ExitCode = 99 then
153153
failwith "Some files need formatting, check output for more info"
154154
else
155-
Trace.logf "Errors while formatting: %A" result.Errors
155+
let msg = sprintf "Errors while formatting: %A" result.Errors
156+
Trace.log msg
157+
failwith msg
156158

157159

158160
let clean _ =

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)