-
Notifications
You must be signed in to change notification settings - Fork 121
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
Need better containers instances #354
Comments
There's now a blog post: https://www.314pool.com/post/cardano-post-mortem-1 |
I don't know what to think. I hope that we agree that for external usage of Folks tinkering with |
@phadej I agree the situation is a bit tricky. Your approach is certainly reasonable, and may be the best one. The main downside is that it relies on users who dig into internals to use special generators. That's slightly inconvenient, and I imagine it would be easy to forget to do, but it's probably not a terribly high hurdle. The other theoretical challenge is that the auxiliary package ( Tentative conclusion: let's go with @phadej's idea, but let's document the availability of the extras package(s) in the relevant |
You could use it in |
There was a fairly prominent incident a few months ago where a package that uses
containers
dug into the internals ... and messed up. My conclusion is that we needQuickCheck
to be able to generate multiple data structure "shapes" that represent the same abstract object. There are two basic options:containers
internals intoQuickCheck
. This is the easiest way to start, and in practice I suspect the maintenance burden won't be too bad, but it's not very clean.containers
export functionsQuickCheck
can pass things to. This seems cleaner, but it requires more work up front and I'd want buy-in fromQuickCheck
before writing and releasing support incontainers
.I'm leaning towards option 2. The idea would be for
containers
to export a modified and stripped down version ofMonadGen
(as inQuickCheck-GenT
).QuickCheck
would instantiate this class forGen
. The purpose of using a class would be to make things easier ifcontainers
discovers it needs more methods later.The above mentioned incident involved
Map
and/orSet
. I believe those are the structures the most people have dug under the hoods of, so they should be the priority.Seq
is the other redundant representation in the package, so it would be good to do that too, but I don't know if anyone is doing anything weird and mission critical with it.The text was updated successfully, but these errors were encountered: