-
Notifications
You must be signed in to change notification settings - Fork 30
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
Unifying Property<unit>
and Property<bool>
#365
Comments
Possible solution for #128. |
I previously expressed some push back to this issue (in #310 (comment) and especially #336 (comment)). I no longer hold either of those positions. In particular, F#'s CE builder is expressive enough to do what we want (c.f. PR #364). I now agree with this change in principle. However, I would like PR #336 merged before this issue is addressed (to avoid conflicts). |
@TysonMN I think Haskell Hedgehog "has its cake and eats it too" on this front. The publicly exposed -- | A property test, along with some configurable limits like how many times
-- to run the test.
--
data Property =
Property {
propertyConfig :: !PropertyConfig
, propertyTest :: PropertyT IO ()
}
-- | The property monad transformer allows both the generation of test inputs
-- and the assertion of expectations.
--
newtype PropertyT m a =
PropertyT {
unPropertyT :: TestT (GenT m) a
} deriving (
-- ...
) I think this |
My ability to read Haskell is not as good as I want, so I will take your word it. |
I've been looking through Haskell Hedgehog recently, and I noticed that their
Property
type is not polymorphic. I'd like to get the F# version in line with this, and I have some ideas on how this might be done, though I'm very open to ideas/suggestions here.This API would be used like so:
I'm still unsure how we would support
counterexample
and maybe another function or two with this, mostly because I haven't dug into them yet.The text was updated successfully, but these errors were encountered: