-
Notifications
You must be signed in to change notification settings - Fork 7
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
Defined instances #1
Comments
I see |
Hm, I figured having control depend on data made more sense as data is "simpler" and also I would expect there to be fewer data structures than control structures. I don't know, it just seems to me more like Either way you're going to end up depending on stuff you don't care about, but it seems that data dragging control with it will pull more stuff than the reverse, as dependencies for control modules tend to be more complex than dependencies for data. Thinking about it, it's not really even control vs data, more a case of modules for data declarations vs modules defining typeclasses, as I'm thinking of |
Another thing is, control stuff sometimes depends on data (like |
Although it would be weird if |
:) Yeah it's a bit of a pain. I guess I was thinking that the number of data structures for a given control type is pretty much unbounded, whereas the number of new control structures tends to grow quite slowly. I was thinking it would be unfortunate to pull in
|
Hmm, where is the main pain here? Is it with bower? Is it with If it's bower, we can use something else. From the outside looking in, it seems a bit off that mutually recursive modules cause an issue in a language like haskell or this, though you have a |
It's not a problem yet, was just thinking about how best to deal with the tangle of relationships we currently have and if there's a better way to deal with it in the future, and yes to minimise the effect of some modules importing the whole world. Bower is actually fine with circular dependencies, but it does cause some problems for |
I see. So, it has more to do with the fact we're all using file globs than anything else? I mean, if we go out and list all the dependencies to |
It seems there's no compelling reason to choose either strategy, so I would prefer to define the instances alongside the datatypes themselves. That way, for example, everything related to |
On the module level, there is no unsoundness, but I don't like having package-level cycles anyway. It just demonstrates that we don't understand the relationships between the various packages. |
I think one thing that might be conflating the issue is this idea of I think I'm in agreement with @michaelficarra. but it still seems like it's possible to get in a cycle even with this convention (unless we break it). Take A simple example, sure, but Should there be some |
Do we think the instances for
Monoid
andContravariant
should be defined in here, or would it be better to requireConst
in those packages and provide instances there instead?I'm asking as if we move
Identity
out into its own package we'll have the same quandary there too. It seems to me like we'll end up having less problems later ifConst
andIdentity
have no dependencies but rather are required in a lot of places. It might end up similar to the situation withpurecript-control
where almost everything will end up requiring them transitively, but they're fairly fundamental things anyway - in fact they should never need to change again unless we alter the classes in Prelude.Thoughts? (@paf31, @joneshf)
The text was updated successfully, but these errors were encountered: