Skip to content

Support async operations in properties#464

Merged
AlexeyRaga merged 20 commits into
masterfrom
aupport-async
Dec 2, 2025
Merged

Support async operations in properties#464
AlexeyRaga merged 20 commits into
masterfrom
aupport-async

Conversation

@AlexeyRaga
Copy link
Copy Markdown
Contributor

@AlexeyRaga AlexeyRaga commented Nov 28, 2025

Async support with ergonomics like:

property {
    let! x = Gen.int32 (Range.constant 0 100)
    let! y = async { return x + 1 }  // ensures we can call Async<T> function
    let! z = task { return y + 1 }   // ensures that we can call Task<T> function
    return z = x + 2
 }
var property =
    from x in Gen.Int32(Range.Constant(0, 100)).ForAll()
    from y in Task.FromResult(x + 1) // ensures that we can call Task<T> function
    from z in Task.FromResult(y + 1)
    select z == x + 2;

@AlexeyRaga AlexeyRaga marked this pull request as ready for review November 28, 2025 04:42
@AlexeyRaga AlexeyRaga marked this pull request as draft November 28, 2025 09:32
@AlexeyRaga AlexeyRaga marked this pull request as ready for review November 28, 2025 13:06
Comment thread docs/articles/async-properties.md Outdated
Comment thread src/Hedgehog/Property.fs Outdated
Comment thread src/Hedgehog/PropertyResult.fs
Comment thread docs/articles/async-properties.md
Comment thread docs/articles/getting-started.md Outdated
Comment thread src/Hedgehog/PropertyResult.fs
Comment thread src/Hedgehog/Linq/Property.fs
Comment thread src/Hedgehog/Property.fs
Comment thread src/Hedgehog/Gen.fs Outdated
Comment thread src/Hedgehog/PropertyResult.fs Outdated
Comment thread src/Hedgehog/Linq/Property.fs
Comment thread src/Hedgehog.Xunit/InternalLogic.fs Outdated
Comment thread src/Hedgehog.Xunit/GenAttribute.Prelude.fs Outdated
@AlexeyRaga AlexeyRaga merged commit 065dbd2 into master Dec 2, 2025
2 checks passed
@AlexeyRaga AlexeyRaga deleted the aupport-async branch December 2, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants