Skip to content
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

Merge packages data-default-class and data-default-instances-base #7

Open
sol opened this issue Aug 27, 2014 · 5 comments
Open

Merge packages data-default-class and data-default-instances-base #7

sol opened this issue Aug 27, 2014 · 5 comments

Comments

@sol
Copy link
Contributor

sol commented Aug 27, 2014

I may be missing something, but as I see it the reason to split the original data-default into separate packages is to minimize dependencies.

As both data-default-class and data-default-instances-base only introduce the base dependency, we could merge the packages.

Keeping the separate packages has the downside that the instances in data-default-instances-base are orphan (which I generally considered undesirable). Are there any upsides?

@lambda-fairy
Copy link

+1

I'll add data-default-instances-containers and data-default-instances-old-locale as well, as the corresponding packages come bundled with GHC anyway.

Given that dlist is the only dependency which isn't pre-installed, I'm starting to question the reasoning behind splitting data-default in the first place.

@ndmitchell
Copy link

I agree with @sol. I have always avoided the Default class in this package entirely because of the dlist dependency, which seemed totally gratuitous. But nowadays both old-locale and containers are both weird dependencies to have, and not required by many packages (the fact they are shipped with GHC is mostly historical). Merging data-default-class and data-default-instances-base keeps the dependencies light (which is what you expect for a package that defines only one trivial class).

As concrete examples, I'd love to use the union of data-default-class and data-default-instances-base in both CmdArgs and Shake, but would only do so if there was one package, that required only base, and that defined both the class and instances for the base types.

@sol
Copy link
Contributor Author

sol commented Sep 24, 2014

@lfairy I think it is preferable to only have base as a dependency for data-default and keep the other instances (containers, dlist, old-locale) orphan. Every dependency adds a cost, so minimizing dependencies for data-default makes it ultimately more useful.

BTW, similar to @ndmitchell I would love to use data-default for hspec if we resolve this issue.

@mauke
Copy link
Owner

mauke commented Apr 17, 2016

What would be the best way to merge them? Move all the code from ...-instances-base into ...-class and have ...-instances-base depend on ...-class (reexporting the instances)?

@lambda-fairy
Copy link

@mauke That seems reasonable to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants