-
Notifications
You must be signed in to change notification settings - Fork 3
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
Stream Category laws #17
Comments
Asked question on quickcheck-laws here: purescript-contrib/purescript-quickcheck-laws#44 |
Sodium is synchronous. At the end of a transaction all listener callbacks that are required to be invoked are invoked. You could use https://pursuit.purescript.org/packages/purescript-refs/4.1.0/docs/Effect.Ref#t:Ref |
Right on - Ref's are used in various tests, e.g. here: https://github.com/SodiumFRP/purescript-sodium/blob/master/test/Stream.test.purs#L69 Still not sure how to wrap around this in an |
Yep. No nice way to do this. You'll have to play dirty with unsafePerformEffect or design something similar to quickcheck that is more suitable for sodium. Maybe turning streams into cells holding a list of tuples of the current transaction count along with the value at that moment could work. |
Should follow just like the Cell tests, but we need to define an Eq that works through Aff, since the only way of getting a value out of Stream is via
listen
The text was updated successfully, but these errors were encountered: