[commit: ghc] master: Module reexports, fixing #8407. (7f5c1086)

Simon Peyton Jones simonpj at microsoft.com
Mon Jul 28 06:45:23 UTC 2014


Edward

Great stuff.  Is this documented somewhere, notably in 
	http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html
for GHC, and somewhere in Cabal?

And perhaps somewhere on the wiki
https://ghc.haskell.org/trac/ghc/wiki/Commentary/Packages


Thanks

Simon

| -----Original Message-----
| From: ghc-commits [mailto:ghc-commits-bounces at haskell.org] On Behalf Of
| git at git.haskell.org
| Sent: 26 July 2014 02:08
| To: ghc-commits at haskell.org
| Subject: [commit: ghc] master: Module reexports, fixing #8407.
| (7f5c1086)
| 
| Repository : ssh://git@git.haskell.org/ghc
| 
| On branch  : master
| Link       :
| http://ghc.haskell.org/trac/ghc/changeset/7f5c10864e7c26b90c7ff4ed09d00
| c8a09aa4349/ghc
| 
| >---------------------------------------------------------------
| 
| commit 7f5c10864e7c26b90c7ff4ed09d00c8a09aa4349
| Author: Edward Z. Yang <ezyang at cs.stanford.edu>
| Date:   Fri Jul 4 17:01:08 2014 +0100
| 
|     Module reexports, fixing #8407.
| 
|     The general approach is to add a new field to the package database,
|     reexported-modules, which considered by the module finder as
| possible
|     module declarations.  Unlike declaring stub module files, multiple
|     reexports of the same physical package at the same name do not
|     result in an ambiguous import.
| 
|     Has submodule updates for Cabal and haddock.
| 
|     NB: When a reexport renames a module, that renaming is *not*
| accessible
|     from inside the package.  This is not so much a deliberate design
| choice
|     as for implementation expediency (reexport resolution happens only
| when
|     a package is in the package database.)
| 
|     TODO: Error handling when there are duplicate reexports/etc is not
| very
|     well tested.
| 
|     Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
| 
|     Conflicts:
|     	compiler/main/HscTypes.lhs
|     	testsuite/.gitignore
|     	utils/haddock
| 
| 
| >---------------------------------------------------------------
| 
| 7f5c10864e7c26b90c7ff4ed09d00c8a09aa4349
|  compiler/main/DynFlags.hs                          |   1 +
|  compiler/main/Finder.lhs                           |  25 +++--
|  compiler/main/GHC.hs                               |  12 ++-
|  compiler/main/HscTypes.lhs                         |   6 +-
|  compiler/main/PackageConfig.hs                     |   4 +
|  compiler/main/Packages.lhs                         | 109
| ++++++++++++++++-----
|  ghc/InteractiveUI.hs                               |   8 +-
|  libraries/Cabal                                    |   2 +-
|  .../Distribution/InstalledPackageInfo/Binary.hs    |   8 ++
|  testsuite/.gitignore                               |   8 ++
|  testsuite/tests/cabal/Makefile                     |  15 +++
|  testsuite/tests/cabal/all.T                        |   6 ++
|  testsuite/tests/cabal/cabal05/Makefile             |  69 +++++++++++++
|  .../{driver/T3007/A => cabal/cabal05}/Setup.hs     |   0
|  testsuite/tests/cabal/{cabal03 => cabal05}/all.T   |   4 +-
|  .../tests/cabal/cabal05/p/LICENSE                  |   0
|  testsuite/tests/cabal/cabal05/p/P.hs               |   3 +
|  testsuite/tests/cabal/cabal05/p/P2.hs              |   1 +
|  .../{driver/T3007/A => cabal/cabal05/p}/Setup.hs   |   0
|  testsuite/tests/cabal/cabal05/p/p.cabal            |  11 +++
|  .../tests/cabal/cabal05/q/LICENSE                  |   0
|  testsuite/tests/cabal/cabal05/q/Q.hs               |   4 +
|  .../{driver/T3007/A => cabal/cabal05/q}/Setup.hs   |   0
|  testsuite/tests/cabal/cabal05/q/q.cabal            |  29 ++++++
|  .../tests/cabal/cabal05/r/LICENSE                  |   0
|  testsuite/tests/cabal/cabal05/r/R.hs               |  11 +++
|  .../{driver/T3007/A => cabal/cabal05/r}/Setup.hs   |   0
|  testsuite/tests/cabal/cabal05/r/r.cabal            |  32 ++++++
|  .../tests/cabal/cabal05/s/LICENSE                  |   0
|  testsuite/tests/cabal/cabal05/s/S.hs               |  18 ++++
|  .../{driver/T3007/A => cabal/cabal05/s}/Setup.hs   |   0
|  testsuite/tests/cabal/cabal05/s/s.cabal            |  11 +++
|  testsuite/tests/cabal/ghcpkg07.stdout              |  11 +++
|  .../{test4.pkg => recache_reexport_db/a.conf}      |  20 ++--
|  testsuite/tests/cabal/{test4.pkg => test7a.pkg}    |  20 ++--
|  testsuite/tests/cabal/test7b.pkg                   |  17 ++++
|  utils/ghc-cabal/ghc-cabal.cabal                    |   3 +-
|  utils/ghc-pkg/Main.hs                              |  55 ++++++++++-
|  utils/ghc-pkg/ghc-pkg.cabal                        |   4 +-
|  utils/ghctags/ghctags.cabal                        |   3 +-
|  utils/haddock                                      |   2 +-
|  41 files changed, 453 insertions(+), 79 deletions(-)
| 
| Diff suppressed because of size. To see it, use:
| 
|     git diff-tree --root --patch-with-stat --no-color --find-copies-
| harder --ignore-space-at-eol --cc
| 7f5c10864e7c26b90c7ff4ed09d00c8a09aa4349
| _______________________________________________
| ghc-commits mailing list
| ghc-commits at haskell.org
| http://www.haskell.org/mailman/listinfo/ghc-commits


More information about the ghc-devs mailing list