-
Notifications
You must be signed in to change notification settings - Fork 48
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
Split into core and generics packages #75
Comments
@kosmikus A chat would definitely be good -I will email you about this. |
I think "sop-core" is pretty good. It leaves the generic part to the generics-sop part. |
I think prefer |
Another name that has been suggested for the base package is simply |
I was thinking about |
On a related note, what would you like the module names to be? If we call it |
While I'm somewhat guilty in advocating to steal the unofficial top-level identifier I see the following options:
|
Data.SOP is the best compromise IMO
…Sent from my iPhone
On 24 Aug 2018, at 17.05, Andres Löh ***@***.***> wrote:
While I'm somewhat guilty in advocating to steal the unofficial top-level identifier Generics for various generic programming packages I co-authored, I don't think that SOP is a good top-level choice.
I see the following options:
keep Generics.SOP.NP which preserves compatibility and denotes the primary motivation, but might otherwise be a misnomer; I think if we do not go with this, we at least have to mirror the modules under these names, either from sop(-base) or generics-sop, possibly with a deprecation warning;
use Data.SOP.NP which correctly places the sop library under the Data hierarchy, which I think is adequate. Products and sums are data structures. Having the SOP component in there still allows us to keep all the package modules in a similar place.
use Data.NP, but this has a larger possibility of conflicts and also makes it unclear what to do with modules such as Generics.SOP.Classes.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Another vote for |
I'm happy with |
Outstanding questions:
|
Thanks a lot.
|
Great, I agree with all of this. I'll go ahead with this in mind and create a PR - we can always change things if others have objections. |
is in |
|
So specifically, running the |
It will be easier to discuss over the concrete code. Make a PR. It's ok, even it's not perfect yet.
…Sent from my iPhone
On 10 Sep 2018, at 20.40, matchwood ***@***.***> wrote:
So specifically, running the doctest.sh script with the addition of -i../sop/src in the generics-sop directory also seems to try to run the tests in the sop src, and fails with Could not find module [..] when it runs into import Data.SOP.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sure thing, see above (not sure if you were notified of the PR or not). |
Ok. Let's not worry about About versions. If I think that that re-exporting explicit member lists is better (though tedious):
An alternative is not to re-export So in summary, three alternatives
says; if not GHC-8.0 or later depend also on transformers. i.e.
|
I think in the longer term there is no need for Yeah I get the logic of the conditional |
The PR looks good. Some questions I still haven't quite decided on:
|
|
|
I would probably want to re-export |
Ha true - I've been bitten by that sort of idiosyncrasy before. I don't feel strongly about this, happy to go with whatever you decide. |
Ok, in the interest of making progress, I'm going to decide here:
|
Great, I've updated the PR. There is now some obsolete CPP code (in Data.SOP.BasicFunctors) for example. Would you like me to go through removing this? |
@matchwood Thank you! Yes, I think we can and should remove CPP fragments that are no longer needed. Keeping them around serves no purpose and will just be dead code and noise. |
CPP cleanup done. |
Many thanks - apologies for not getting around to doing the CPP cleanup. Had a busy few days, and it was next on my list for this week! |
@matchwood No worries. Thanks a lot for your help. |
See #70 and #61 .
The goal would be to provide two packages:
sop-core
(or a better name) - definition of data structures and classes for working with them:NP
,HTraverse
etcgenerics-sop
- depends onsop-core
and re-exports everything so the API remains the same. Any generics specific code will live here.Question: What should the core package be called?
I am keen on providing specialisations for heterogenous lists and extensible records in the core package, as well as curry/uncurry functionality. The core package will then be in the same category as packages like
HList
andVinyl
. My reasoning for this is that the sop approach ingenerics-sop
is great, but at the moment it is not immediately obvious that it can or should be used for general purpose programming with heterogenous data structures. The name should ideally be something that reflects its general purpose possibilities, rather than something specifically related to generics.The text was updated successfully, but these errors were encountered: