Repository navigation
Support module thinning and renaming Cabal-side. - #2038
Conversation
|
@ezyang |
|
Oops, looks like I forgot to update the tests. |
There was a problem hiding this comment.
Can you add a comment saying what this Bool stands for? If it controls whether this module renaming is enabled, why not use Maybe ModRenaming instead?
There was a problem hiding this comment.
Comment will do. It actually indicates whether or not to dump all of the exported modules into scope, independent of renaming. So ModRenaming False [] means nothing is visible and ModRenaming True [] means everything is visible. The renamings then just add on to this.
|
Looks good in general modulo some comments. Would be also nice to have a test case. |
bd0a963 to
79026b6
Compare
|
OK, updated with updates for comments. |
|
Oh, re tests, does it make you feel any better if the GHC testsuite has the relevant tests? :) |
If that includes tests for Cabal support, then yes. |
|
So, Travis is failing because the install test for cabal-install is not using the right version of Cabal. Uh, I think this is not my fault? |
|
Build failure on GHC 7.4 is because of haskell/random#10. |
|
Travis issue is now fixed. |
|
/cc @dcoutts |
There was a problem hiding this comment.
Bikeshedding: we tend to use full names, so should be ModuleRenaming.
There was a problem hiding this comment.
Given the comments, this might be clearer as a record with descriptive names for the two fields. Something like moduleRenamingIncludeOriginals and moduleRenamings?
|
So my main concern is that pairing the renaming with the dependency is quite invasive. Do we really need them together or could this be simpler with the renaming being separate? I was going to say that I can see that they need to be together while we resolve flags etc in the GenericPackageDescription -> PackageDescription conversion, but actually I don't think that's true. So suppose we just had them together in the external syntax, but we had them as two seprate fields in the |
|
OK, I think we can separate them. |
5929518 to
28eca74
Compare
|
Seperated. Duncan wanted one more change which was to store the renamings as a list so that original order is preserved, but we already preserve this order from targetBuildDepends, so I think we can just use a map. So it would be good if we can land this. |
28eca74 to
4b9e234
Compare
|
Hey guys, I'd like to get this merged. I'll merge it this weekend if there are no further comments. |
|
No objections from me. Thank you for your contributions! |
819513e to
30553ab
Compare
Unlike GHC, Cabal will still try to find a globally consistent choice for all package names, i.e. this does *not* implement private dependencies. Signed-off-by: Edward Z. Yang <[email protected]>
30553ab to
31719ae
Compare
NB: unlike GHC, Cabal will still try to find a globally consistent choice for
all package names, i.e. this does not implement private dependencies.
Signed-off-by: Edward Z. Yang [email protected]