-
Notifications
You must be signed in to change notification settings - Fork 325
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
Introduce VerificationCodeSubsystem #4121
Conversation
a2fab76
to
287a89e
Compare
287a89e
to
bb775f6
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
defaulGen :: StdGen | ||
defaulGen = mkStdGen 0xBAD | ||
|
||
withStatefulGen :: (Member (State StdGen) r) => (StdGen -> (a, StdGen)) -> Sem r a |
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.
This could be generalised to any type s
instead of StdGen
.
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.
I was wondering why there is no modify
, but thought probably because of lack of atomicity guarantees. So I decided to write a specific one. So I didn't bother generalizing it in this module.
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.
What do you mean? There is a modify
, but this one is an analogue of the StateT
constructor. As a rule of thumb, I think it's good to turn types like StdGen
above into type variables, because that limits the ways they could be used incorrectly in the implementation. Not a huge concern here though, obviously.
https://wearezeta.atlassian.net/browse/WPB-8891
Checklist
changelog.d