-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clarify nested <~ use with join (#101)
When I reused the pattern of nested `<~` in #100, I got surprised that the types seemed off. Indeed, I ended up with a `State StdGen (State StdGen Situation)` instead of just a `State StdGen Situation`, but hadn't noticed because `wrap` takes the quickcheck-like approach of recursing on the inner types. This PR at least clarifies things, so the types are what I'm used to. Should I go further and remove the recursion from `wrap`? I considered it (I even have the change stashed right now), but ultimately think that having the extra flexibility might be a good thing in case it's needed for something weird in the future. It's not even the end of the world if everything works with weird types and I don't notice the weirdness until much later, as previously demonstrated. but when I do notice the weirdness, I should get rid of it so the code is easier to understand, hence this PR.
- Loading branch information
1 parent
f3e7c2b
commit d211502
Showing
2 changed files
with
67 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters