-
Notifications
You must be signed in to change notification settings - Fork 17
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
Added package flags for optional instances #111
base: master
Are you sure you want to change the base?
Conversation
…cting versions on hackage). Consider fixing via bjornbm#127.
OK, this is now merge worthy. The build with all flags enabled is currently allowed to fail in the travis file. This is because of version conflicts on hackage. Addressing #127 would probably be the best way to avoid problems of this kind for the long term. The only remaining question I have on whether to merge this is whether it is a good idea or not. |
This is up for review until 8 January 2016. |
See this cabal issue for some discussion of why this may not be the way to go: haskell/cabal#2821 |
It's a hairy problem, these orphan instances. Does merging this remove any current functionality/instances, or only allow bringing in additional functionality via flags? (Sorry for not reviewing in detail.) |
I'm not a huge fan of the |
You are absolutely right about that. It was for use with I'm going to amend this by getting rid of the functor and linear bits. The others only add functionality. Still not sure if they are a good idea, monitoring a discussion here about this: haskell/cabal#2821. |
I have found myself implementing an I suppose merging this should cause no problem except adding complexity (which certainly can be a concern in and of itself) if the flags are off by default. Or should they be on by default on the assumption that stack will magically make the dependencies "just work" for the majority of use(r)s, and the flags are there as a fallback if needed to resolve pathological dependency graphs? |
There's a comment on that thread by Edward suggesting (I think, I'm a little confused by it frankly) that he prefers the on-by-default approach. The on-by-default approach is more stack-friendly, and still would allow power users to make a minimal build for some kind of embedded use. The |
Ah, yes, definitely And I also use |
Perhaps instead some kind of wrapper library around chart, to force you to pick units and then help you tack their names on to the end of your axis labels. Direct support for charting quantities seems like it might be problematic because it implicitly uses |
Yes, I realised/remembered shortly after my reply that it's not so simple in general. Although SI unit is a reasonable choice for the quick and dirty stuff, we probably need a newtype wrapper or something to allow picking a unit. |
And thus it can go in another package without causing orphans. On Fri, Jan 22, 2016 at 11:01 AM, Douglas McClean
|
Chiming in here to say that I would love for this feature to land, especially the As a motivation, the Cloud Haskell implementation Is there anything I can help with here? |
Good question. As you can tell this stalled and frankly I'm not sure why. Do you recall, @dmcclean? @LaurentRDC you are welcome to try to sort it out, do a manual merge, and test it. I will admit I haven't followed how/if these packages and their APIs have evolved in the past 8 years (and I guess we don't want to be stuck at LTS-5 dependencies 😆). |
May revert to wording from #111 if we feel it is more relevant if/when more flags added.
|
As the next step in the tentative plan at #95 on how to deal with various desirable instances which aren't worth the dependencies they would incur to all users, I've prepared this sketch of how it will work.
Comments are welcome on whether this is the right road or not.
It's not ready yet for a few reasons:
Documentation in the readmeInstances for thelinear
packageInstances for theaeson
packageInstances for the serialization classes for various ancillary typesWith no flagsWith each flag aloneWith all flags