-
Notifications
You must be signed in to change notification settings - Fork 23
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
Future result #147
base: master
Are you sure you want to change the base?
Future result #147
Conversation
Wow, this is amazing. Thank you!
💯
Did Michael implement one on his branch that you/we can use?
I've been very slack thus far. But it's certainly something I'd like to start taking more seriously if people are actually using the library. As you're the biggest actual user of the library (that I know of) I'm happy to defer to you on how much you personally think it's a problem.
I'm not against that, although I do flinch every time I see
Yeah I hadn't considered that part. Good pick up. Just on Dumb question, is it hard to add stack-safe instances for the current set of Monads? Slightly related and dumb question, can While I'm afraid, as usual, I'm not able to help on the coding side of things, but is there anything that I can do to help here otherwise? Thanks again!!! |
Yep he did. Regarding binary compatibility I don't think we should worry about it right now. There is already the comment that the API is unstable. I hope to pickup the CI task soon so that we can make the version number explicit in the 0.x range. There are quite a few things I think we should at the very least make private.
Haha same here. I took another look and I don't think that the map/cast is necessary if the type is given explicitly.
I haven't taken a look too closely although when I first saw it there was already a
Not dumb at all. I actually don't know. I only just came across this stack safety stuff now. I was using the naive implementation that just used
They do seem similar although I can't work out how you would do it. What I came to is that
Your feedback is great, I really appreciate it. Don't hesitate to tell me if you dislike my approach or if you think there is a better way of doing things. |
Yeah if you could that would be great. I have a bad feeling it made an improvement on large tests, and I'm sorry I didn't capture it. I was testing on the SBT project but you might already have something that stresses hedgehog enough to notice.
Yeah I only noticed it a few weeks ago not that I'm using cats in anger.
I was thinking about it and I wonder if you could just make it work for
Anyway, not strictly required for this PR, but it'd be great if it just fell out of using that approach. |
@steinybot Can I help to get this one over the finish line? |
@mpilquist You are more than welcome to address any of the items in the list above. I'll pick this back up again tomorrow. |
@steinybot Thanks - I sent a PR to your fork but it’s major wip and I need a break from stack safety issues. :) Feel free to take as little or as much as is helpful. BTW, I tried removing Identity but the laziness it provides is important so I backed that out. I also tried porting to cats to see if things like Eval, map2Eval, and stack safe traverse would help but still ran in to issues with ap on Applicative[Gen]. Makes me think we need to change the formulation of Gen to include a Gosub/Bind node. |
Thanks so much guys, I'm sorry you're having to deep-dive so much to make this change possible. I was going to suggest inlining a version Eval but sounds like it's not enough? :( |
I did manage to get rid of I tried removing the laziness from It may still be the case that we need |
Yeah I found the LazyList in its current form was critical to avoiding a memory leak (when shrinking kicks in). I'm sure there's probably other ways of achieving the same thing. The only small suggestion I have is to see what the F# version does which is quite mature. As always sorry I can't actually do anything useful :( |
An implementation of
hedgehog.core.PropertyTReporting#reportF
to support properties of typePropertyT[F[Result]]
.This requires the
Monad
s to implement a stack safe implementation oftailRecM
which I copied from cats. It is based on Stack Safety for Free.Most of the current
Monad
s implement this usingbind
which is not stack safe. I'm not too sure what to do about these.Remaining things to do are:
Monad[Future]
instance.Do we need to provide a default implementation oftailRecM
to maintain binary compatibility? What is the current approach to changes like these?Consider casting theId
typesCloses #146