Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make --generated-module also apply to modules listed in exposed-modules

  • Loading branch information...
commit 3e4888ed5a959742f056910a858cad7bb04ea7b0 1 parent 42ec65e
@lpotmann authored
View
13 Cabal/Distribution/Simple/SrcDist.hs
@@ -278,10 +278,17 @@ prepareTreeWithoutGeneratedModules verbosity pkg_descr0 mb_lbi distPref targetDi
installOrdinaryFile verbosity descFile (targetDir </> descFile)
where
- pkg_descr = mapAllBuildInfo filterGeneratedModules pkg_descr0
- filterGeneratedModules bi = bi {
- otherModules = filter (flip notElem generatedModules) (otherModules bi)
+ pkg_descr1 = mapAllBuildInfo filterGeneratedOtherModules pkg_descr0
+ pkg_descr = pkg_descr1 {
+ library = fmap filterGeneratedExposedModules (library pkg_descr1)
}
+ filterGeneratedOtherModules bi = bi {
+ otherModules = filterGeneratedModules (otherModules bi)
+ }
+ filterGeneratedExposedModules libr = libr {
+ exposedModules = filterGeneratedModules (exposedModules libr)
+ }
+ filterGeneratedModules = filter (flip notElem generatedModules)
-- Paths_<pkg>.hs, as well as the modules specified by the caller.
generatedModules = autogenModuleName pkg_descr0 : generatedModules0
View
2  Cabal/doc/installing-packages.markdown
@@ -788,6 +788,8 @@ description file, and files named in the `license-file`, `main-is`,
If the package includes generated Haskell source files, they can be
excluded from the distribution on the command line. `Paths_`_pkgname_
does not need to be so specified; Cabal automatically knows to exclude it.
+All the necessary scripts and data to re-generate the modules should be listed
+in the `extra-source-files` field of the `.cabal` file.
This command takes the following option:
Please sign in to comment.
Something went wrong with that request. Please try again.