-
Notifications
You must be signed in to change notification settings - Fork 86
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
Check for unexpected thunks in TxSubmission.Inbound state #1708
Conversation
a09ffb7
to
b0b72ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. One thing I noticed: you can easily forget to use continueWithState
somewhere where you should have, the types won't help you. In the ChainSyncClient we added Stateful
to the type signatures (where possible) for that reason. Can you do the same here?
Also, be sure to run the testsuite with thunk checking enabled, i.e., enable the checktvarinvariant
flag in the io-sim-classes
. E.g.,
stack test --flag io-sim-classes:checktvarinvariant <testsuite(s)> --ta '--quickcheck-tests=20' |& grep -v closurePtr
I'm hoping you'll some failures, as there are no bangs on the fields of ServerState
🙂
6feb137
to
3b9633a
Compare
3b9633a
to
7e1926d
Compare
998d85b
to
ec241cb
Compare
64abb79
to
457afc8
Compare
5c260b1
to
8e396d4
Compare
8e396d4
to
1215fe9
Compare
652d721
to
84098c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
84098c6
to
dbf123e
Compare
Apparently, the `Semigroup` operation for `Map` is `union`, which is actually not implemented in such a way that values of the resulting `Map` are forced to WHNF. An odd thing that I noticed is that the `union` function that is exposed from the `Data.Map.Strict` module is the same as that exposed from the `Data.Map.Lazy` module. Internally, this function uses lazy `insert`s and therefore provides no guarantee that the values of the resulting `Map` will be in WHNF. It seems misleading to me that this function would be exposed from `Data.Map.Strict` without providing that guarantee which is promised by the module (see its documentation).
dbf123e
to
39f1619
Compare
bors merge |
Closes #1645