Commit fe19be2d authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Cabal submodule update.



There's a substantial bump to the haddock.Cabal allocation
stats, because we added 50% more modules, so of course allocations
are going to increase 50%. (But perhaps this is indicative of
some bad constant factor in Haddock related to modules.)
Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>

Test Plan: validate

Reviewers: ggreif, austin, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2442
parent 4d9c22d0
......@@ -139,9 +139,9 @@ import ByteCodeTypes
import InteractiveEvalTypes ( Resume )
import GHCi.Message ( Pipe )
import GHCi.RemoteTypes
import UniqFM
#endif
import UniqFM
import HsSyn
import RdrName
import Avail
......
Subproject commit 40d6f0afd5b86d698abb876d4f5ed0bb452b0c4b
Subproject commit f8d6f17a09d14e3f1851190f18fefa23be2ae02f
Building b-1.0...
Preprocessing executable 'test' for b-1.0...
[1 of 2] Compiling B ( B.hs, dist/build/test/test-tmp/B.o ) [A changed]
[2 of 2] Compiling Main ( Main.hs, dist/build/test/test-tmp/Main.o ) [B changed]
......
......@@ -83,6 +83,11 @@ test('haddock.Cabal',
# 2016-05-22: 11805238152 (amd64/Linux) - Make Generic1 poly-kinded
# 2016-06-05: 10997887320 (amd64/Linux) - Refactor derived Generic instances to reduce allocations
# 2016-06-21: 10070330520 (amd64/Linux) - D2350: Make checkFamInstConsistency less expensive
# 2016-08-07: 16001233464 (amd64/Linux) - Cabal update
# It's worth noting that allocations scale up with the number
# of modules in Cabal. This Cabal update added a large number
# of new modules; if you exclude them from the haddock run
# the stats are comparable.
,(platform('i386-unknown-mingw32'), 3293415576, 5)
# 2012-10-30: 1733638168 (x86/Windows)
......
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
module Main (main) where
......@@ -150,16 +151,14 @@ doCopy directory distDir
noGhcPrimHook f pd lbi us flags
= let pd'
| packageName pd == PackageName "ghc-prim" =
case libraries pd of
[lib] ->
case library pd of
Just lib ->
let ghcPrim = fromJust (simpleParse "GHC.Prim")
ems = filter (ghcPrim /=) (exposedModules lib)
lib' = lib { exposedModules = ems }
in pd { libraries = [lib'] }
[] ->
in pd { library = Just lib' }
Nothing ->
error "Expected a library, but none found"
_ ->
error "Expected a single library, but multiple found"
| otherwise = pd
in f pd' lbi us flags
modHook relocatableBuild f pd lbi us flags
......@@ -326,7 +325,7 @@ generate directory distdir dll0Modules config_args
comp = compiler lbi
libBiModules lib = (libBuildInfo lib, libModules lib)
exeBiModules exe = (buildInfo exe, ModuleName.main : exeModules exe)
biModuless = (map libBiModules $ libraries pd)
biModuless = (map libBiModules . maybeToList $ library pd)
++ (map exeBiModules $ executables pd)
buildableBiModuless = filter isBuildable biModuless
where isBuildable (bi', _) = buildable bi'
......
......@@ -1079,7 +1079,7 @@ type PackageCacheFormat = GhcPkg.InstalledPackageInfo
PackageName
UnitId
ModuleName
OriginalModule
Module
convertPackageInfoToCacheFormat :: InstalledPackageInfo -> PackageCacheFormat
convertPackageInfoToCacheFormat pkg =
......@@ -1132,9 +1132,9 @@ instance GhcPkg.BinaryStringRep String where
fromStringRep = fromUTF8 . BS.unpack
toStringRep = BS.pack . toUTF8
instance GhcPkg.DbModuleRep UnitId ModuleName OriginalModule where
fromDbModule (GhcPkg.DbModule uid mod_name) = OriginalModule uid mod_name
toDbModule (OriginalModule uid mod_name) = GhcPkg.DbModule uid mod_name
instance GhcPkg.DbModuleRep UnitId ModuleName Module where
fromDbModule (GhcPkg.DbModule uid mod_name) = Module uid mod_name
toDbModule (Module uid mod_name) = GhcPkg.DbModule uid mod_name
-- -----------------------------------------------------------------------------
-- Exposing, Hiding, Trusting, Distrusting, Unregistering are all similar
......@@ -1741,7 +1741,7 @@ checkExposedModules db_stack pkg =
where
checkExposedModule (ExposedModule modl reexport) = do
let checkOriginal = checkModuleFile pkg modl
checkReexport = checkOriginalModule "module reexport" db_stack pkg
checkReexport = checkModule "module reexport" db_stack pkg
maybe checkOriginal checkReexport reexport
-- | Validates the existence of an appropriate @hi@ file associated with
......@@ -1779,13 +1779,13 @@ checkDuplicateModules pkg
-- implementation, then we should also check that the original module in
-- question is NOT a signature (however, if it is a reexport, then it's fine
-- for the original module to be a signature.)
checkOriginalModule :: String
checkModule :: String
-> PackageDBStack
-> InstalledPackageInfo
-> OriginalModule
-> Module
-> Validate ()
checkOriginalModule field_name db_stack pkg
(OriginalModule definingPkgId definingModule) =
checkModule field_name db_stack pkg
(Module definingPkgId definingModule) =
let mpkg = if definingPkgId == installedUnitId pkg
then Just pkg
else PackageIndex.lookupUnitId ipix definingPkgId
......
......@@ -23,6 +23,8 @@ import Distribution.Simple.Configure ( getPersistBuildConfig )
import Distribution.Simple.Program.GHC ( renderGhcOptions )
import Distribution.PackageDescription ( libBuildInfo )
import Distribution.Simple.LocalBuildInfo
import Distribution.Types.LocalBuildInfo ( componentNameTargets' )
import Distribution.Types.TargetInfo
import qualified Distribution.Verbosity as V
import Control.Monad hiding (mapM)
......@@ -179,14 +181,16 @@ flagsFromCabal :: FilePath -> IO [String]
flagsFromCabal distPref = do
lbi <- getPersistBuildConfig distPref
let pd = localPkgDescr lbi
case maybeGetDefaultLibraryLocalBuildInfo lbi of
Just clbi ->
let CLib lib = getComponent pd (componentLocalName clbi)
case componentNameTargets' pd lbi CLibName of
[target] ->
let clbi = targetCLBI target
CLib lib = getComponent pd (componentLocalName clbi)
bi = libBuildInfo lib
odir = buildDir lbi
opts = componentGhcOptions V.normal lbi bi clbi odir
in return $ renderGhcOptions (compiler lbi) (hostPlatform lbi) opts
_ -> error "no library"
[] -> error "no library"
_ -> error "more libraries than we know how to handle"
----------------------------------------------------------------
--- LOADING HASKELL SOURCE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment