Generalize generators from NonEmpty to Foldable1#8
Conversation
e1c3cd4 to
d5b4e06
Compare
|
rebased |
| FreqSemigroup \pos -> | ||
| case f pos of | ||
| Tuple (Just pos') _ -> g pos' | ||
| result -> result |
There was a problem hiding this comment.
Nitpick: we prefer not to align code with whitespace (also even nittier: too much indentation for the cases 😉)
| ], | ||
| "dependencies": { | ||
| "purescript-nonempty": "^4.0.0", | ||
| "purescript-nonempty": "matthewleon/purescript-nonempty#Foldable1", |
There was a problem hiding this comment.
Does this dependency need changing at all? Seems like we could remove it even, after this (although, that would make it breaking).
There was a problem hiding this comment.
Ah, I guess the tests might need it?
There was a problem hiding this comment.
Yes, though perhaps there is a way to change that. I'll look into it. It would be a pity to make the change breaking just for tests.
There was a problem hiding this comment.
ah, I guess we are breaking anyway due to the foldable-traversable bound change. That said, this dep could probably at least be moved to dev-deps.
There was a problem hiding this comment.
Actually the dep is also still used in Control.Monad.Gen.Common for genNonEmpty. Now, given that NonEmpty is made an instance of Foldable1 with purescript/purescript-nonempty#27 it maybe makes sense to kill that function. What do you think?
There was a problem hiding this comment.
It's not a breaking change to update bounds, unless the bound change is also breaking, so I think it's fine.
Maybe we can move genNonEmpty to NonEmpty when we next break it - we don't want to delete it, the changes here don't give us a way of generating Foldable1 :)
There was a problem hiding this comment.
I merged/released -nonempty with the Foldable1 instance now too, so we can use the real dependency here too!
646ac0f to
4aa1741
Compare
4aa1741 to
e4ad3e8
Compare
|
I've rebased on |
|
Thanks! |
|
It makes me wish we had no limit in stack size 😝 |
|
@safareli Thanks! Regarding stack size: as long as your |
This depends on merging of this PR purescript/purescript-nonempty#27
It is technically breaking, as it adds a higher bound for
purescript-foldable-traversable.