...
 
Commits (76)
......@@ -31,6 +31,7 @@ script:
- /opt/ghc/$GHCVER/bin/ghc --make -odir ./dist/setup -hidir ./dist/setup -i -i. ./dist/setup/setup.hs -o ./dist/setup/setup -threaded # the command cabal-install would use to build setup
- ./dist/setup/setup configure --user --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
- ./dist/setup/setup build # this builds all libraries and executables (including tests/benchmarks)
- ./dist/setup/setup haddock # see #2198
- ./dist/setup/setup test --show-details=streaming
- cabal check
- cabal sdist # tests that a source-distribution can be generated
......
......@@ -183,13 +183,11 @@ library
Distribution.Simple.Haddock
Distribution.Simple.HaskellSuite
Distribution.Simple.Hpc
Distribution.Simple.Hugs
Distribution.Simple.Install
Distribution.Simple.InstallDirs
Distribution.Simple.JHC
Distribution.Simple.LHC
Distribution.Simple.LocalBuildInfo
Distribution.Simple.NHC
Distribution.Simple.PackageIndex
Distribution.Simple.PreProcess
Distribution.Simple.PreProcess.Unlit
......@@ -219,6 +217,7 @@ library
Distribution.System
Distribution.TestSuite
Distribution.Text
Distribution.Utils.NubList
Distribution.Verbosity
Distribution.Version
Language.Haskell.Extension
......@@ -241,6 +240,7 @@ test-suite unit-tests
other-modules:
UnitTests.Distribution.Compat.CreatePipe
UnitTests.Distribution.Compat.ReadP
UnitTests.Distribution.Utils.NubList
main-is: UnitTests.hs
build-depends:
base,
......
......@@ -38,6 +38,7 @@ import qualified System.Posix
-- This is here for Haskell implementations that do not come with
-- System.IO.openTempFile. This includes nhc-1.20, hugs-2006.9.
-- TODO: Not sure about JHC
-- TODO: This file should probably be removed.
-- This is a copy/paste of the openBinaryTempFile definition, but
-- if uses 666 rather than 600 for the permissions. The base library
......
......@@ -24,41 +24,11 @@
-- textual format is rather simpler than the @.cabal@ format: there are no
-- sections, for example.
{- All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the University nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -}
-- This module is meant to be local-only to Distribution...
module Distribution.InstalledPackageInfo (
InstalledPackageInfo_(..), InstalledPackageInfo,
ModuleReexport(..),
OriginalModule(..), ExposedModule(..),
ParseResult(..), PError(..), PWarning,
emptyInstalledPackageInfo,
parseInstalledPackageInfo,
......@@ -75,7 +45,7 @@ import Distribution.ParseUtils
, parseFieldsFlat
, parseFilePathQ, parseTokenQ, parseModuleNameQ, parsePackageNameQ
, showFilePath, showToken, boolField, parseOptVersion
, parseFreeText, showFreeText )
, parseFreeText, showFreeText, parseOptCommaList )
import Distribution.License ( License(..) )
import Distribution.Package
( PackageName(..), PackageIdentifier(..)
......@@ -116,11 +86,10 @@ data InstalledPackageInfo_ m
category :: String,
-- these parts are required by an installed package only:
exposed :: Bool,
exposedModules :: [m],
reexportedModules :: [ModuleReexport],
exposedModules :: [ExposedModule],
hiddenModules :: [m],
trusted :: Bool,
importDirs :: [FilePath], -- contain sources in case of Hugs
importDirs :: [FilePath],
libraryDirs :: [FilePath],
hsLibraries :: [String],
extraLibraries :: [String],
......@@ -128,7 +97,6 @@ data InstalledPackageInfo_ m
includeDirs :: [FilePath],
includes :: [String],
depends :: [InstalledPackageId],
hugsOptions :: [String],
ccOptions :: [String],
ldOptions :: [String],
frameworkDirs :: [FilePath],
......@@ -156,7 +124,7 @@ emptyInstalledPackageInfo
sourcePackageId = PackageIdentifier (PackageName "") noVersion,
packageKey = OldPackageKey (PackageIdentifier
(PackageName "") noVersion),
license = AllRightsReserved,
license = UnspecifiedLicense,
copyright = "",
maintainer = "",
author = "",
......@@ -168,7 +136,6 @@ emptyInstalledPackageInfo
category = "",
exposed = False,
exposedModules = [],
reexportedModules = [],
hiddenModules = [],
trusted = False,
importDirs = [],
......@@ -179,7 +146,6 @@ emptyInstalledPackageInfo
includeDirs = [],
includes = [],
depends = [],
hugsOptions = [],
ccOptions = [],
ldOptions = [],
frameworkDirs = [],
......@@ -189,41 +155,86 @@ emptyInstalledPackageInfo
}
noVersion :: Version
noVersion = Version{ versionBranch=[], versionTags=[] }
noVersion = Version [] []
-- -----------------------------------------------------------------------------
-- Module re-exports
data ModuleReexport = ModuleReexport {
moduleReexportDefiningPackage :: InstalledPackageId,
moduleReexportDefiningName :: ModuleName,
moduleReexportName :: ModuleName
}
deriving (Generic, Read, Show)
instance Binary ModuleReexport
instance Text ModuleReexport where
disp (ModuleReexport pkgid origname newname) =
disp pkgid <> Disp.char ':' <> disp origname
<+> Disp.text "as" <+> disp newname
-- Exposed modules
data OriginalModule
= OriginalModule {
originalPackageId :: InstalledPackageId,
originalModuleName :: ModuleName
}
deriving (Generic, Eq, Read, Show)
data ExposedModule
= ExposedModule {
exposedName :: ModuleName,
exposedReexport :: Maybe OriginalModule,
exposedSignature :: Maybe OriginalModule
}
deriving (Generic, Read, Show)
instance Text OriginalModule where
disp (OriginalModule ipi m) =
disp ipi <> Disp.char ':' <> disp m
parse = do
pkgid <- parse
_ <- Parse.char ':'
origname <- parse
Parse.skipSpaces
_ <- Parse.string "as"
Parse.skipSpaces
newname <- parse
return (ModuleReexport pkgid origname newname)
ipi <- parse
_ <- Parse.char ':'
m <- parse
return (OriginalModule ipi m)
instance Text ExposedModule where
disp (ExposedModule m reexport signature) =
Disp.sep [ disp m
, case reexport of
Just m' -> Disp.sep [Disp.text "from", disp m']
Nothing -> Disp.empty
, case signature of
Just m' -> Disp.sep [Disp.text "is", disp m']
Nothing -> Disp.empty
]
parse = do
m <- parseModuleNameQ
Parse.skipSpaces
reexport <- Parse.option Nothing $ do
_ <- Parse.string "from"
Parse.skipSpaces
fmap Just parse
Parse.skipSpaces
signature <- Parse.option Nothing $ do
_ <- Parse.string "is"
Parse.skipSpaces
fmap Just parse
return (ExposedModule m reexport signature)
instance Binary OriginalModule
instance Binary ExposedModule
-- To maintain backwards-compatibility, we accept both comma/non-comma
-- separated variants of this field. You SHOULD use the comma syntax if you
-- use any new functions, although actually it's unambiguous due to a quirk
-- of the fact that modules must start with capital letters.
showExposedModules :: [ExposedModule] -> Disp.Doc
showExposedModules xs
| all isExposedModule xs = fsep (map disp xs)
| otherwise = fsep (Disp.punctuate comma (map disp xs))
where isExposedModule (ExposedModule _ Nothing Nothing) = True
isExposedModule _ = False
parseExposedModules :: Parse.ReadP r [ExposedModule]
parseExposedModules = parseOptCommaList parse
-- -----------------------------------------------------------------------------
-- Parsing
parseInstalledPackageInfo :: String -> ParseResult InstalledPackageInfo
parseInstalledPackageInfo =
parseFieldsFlat fieldsInstalledPackageInfo emptyInstalledPackageInfo
parseFieldsFlat (fieldsInstalledPackageInfo ++ deprecatedFieldDescrs)
emptyInstalledPackageInfo
-- -----------------------------------------------------------------------------
-- Pretty-printing
......@@ -293,12 +304,9 @@ installedFieldDescrs :: [FieldDescr InstalledPackageInfo]
installedFieldDescrs = [
boolField "exposed"
exposed (\val pkg -> pkg{exposed=val})
, listField "exposed-modules"
disp parseModuleNameQ
, simpleField "exposed-modules"
showExposedModules parseExposedModules
exposedModules (\xs pkg -> pkg{exposedModules=xs})
, listField "reexported-modules"
disp parse
reexportedModules (\xs pkg -> pkg{reexportedModules=xs})
, listField "hidden-modules"
disp parseModuleNameQ
hiddenModules (\xs pkg -> pkg{hiddenModules=xs})
......@@ -328,9 +336,6 @@ installedFieldDescrs = [
, listField "depends"
disp parse
depends (\xs pkg -> pkg{depends=xs})
, listField "hugs-options"
showToken parseTokenQ
hugsOptions (\path pkg -> pkg{hugsOptions=path})
, listField "cc-options"
showToken parseTokenQ
ccOptions (\path pkg -> pkg{ccOptions=path})
......@@ -350,3 +355,10 @@ installedFieldDescrs = [
showFilePath parseFilePathQ
haddockHTMLs (\xs pkg -> pkg{haddockHTMLs=xs})
]
deprecatedFieldDescrs :: [FieldDescr InstalledPackageInfo]
deprecatedFieldDescrs = [
listField "hugs-options"
showToken parseTokenQ
(const []) (const id)
]
......@@ -105,10 +105,16 @@ data License =
-- jurisdiction necessarily in the public domain elsewhere.
| PublicDomain
-- | No license. The package may not be legally modified or redistributed by
-- anyone but the rightsholder.
-- | Explicitly 'All Rights Reserved', eg for proprietary software. The
-- package may not be legally modified or redistributed by anyone but the
-- rightsholder.
| AllRightsReserved
-- | No license specified which legally defaults to 'All Rights Reserved'.
-- The package may not be legally modified or redistributed by anyone but
-- the rightsholder.
| UnspecifiedLicense
-- | Any other software license.
| OtherLicense
......
......@@ -125,7 +125,7 @@ import Distribution.ModuleName ( ModuleName )
import Distribution.Version
( Version(Version), VersionRange, anyVersion, orLaterVersion
, asVersionIntervals, LowerBound(..) )
import Distribution.License (License(AllRightsReserved))
import Distribution.License (License(UnspecifiedLicense))
import Distribution.Compiler (CompilerFlavor)
import Distribution.System (OS, Arch)
import Distribution.Text
......@@ -230,7 +230,7 @@ emptyPackageDescription
= PackageDescription {
package = PackageIdentifier (PackageName "")
(Version [] []),
license = AllRightsReserved,
license = UnspecifiedLicense,
licenseFiles = [],
specVersionRaw = Right anyVersion,
buildType = Nothing,
......@@ -302,7 +302,7 @@ instance Text BuildType where
-- is, "expose all modules, but also expose @Data.Bool@ as @Bool@".
--
data ModuleRenaming = ModuleRenaming Bool [(ModuleName, ModuleName)]
deriving (Show, Read, Eq, Typeable, Data, Generic)
deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
defaultRenaming :: ModuleRenaming
defaultRenaming = ModuleRenaming True []
......@@ -767,6 +767,7 @@ data BuildInfo = BuildInfo {
oldExtensions :: [Extension], -- ^ the old extensions field, treated same as 'defaultExtensions'
extraLibs :: [String], -- ^ what libraries to link with when compiling a program that uses your package
extraGHCiLibs :: [String], -- ^ if present, overrides extraLibs when package is loaded with GHCi.
extraLibDirs :: [String],
includeDirs :: [FilePath], -- ^directories to find .h files
includes :: [FilePath], -- ^ The .h files to be found in includeDirs
......@@ -802,6 +803,7 @@ instance Monoid BuildInfo where
otherExtensions = [],
oldExtensions = [],
extraLibs = [],
extraGHCiLibs = [],
extraLibDirs = [],
includeDirs = [],
includes = [],
......@@ -830,6 +832,7 @@ instance Monoid BuildInfo where
otherExtensions = combineNub otherExtensions,
oldExtensions = combineNub oldExtensions,
extraLibs = combine extraLibs,
extraGHCiLibs = combine extraGHCiLibs,
extraLibDirs = combineNub extraLibDirs,
includeDirs = combineNub includeDirs,
includes = combineNub includes,
......
......@@ -74,7 +74,8 @@ import Text.PrettyPrint ((<>), (<+>))
import qualified Language.Haskell.Extension as Extension (deprecatedExtensions)
import Language.Haskell.Extension
( Language(UnknownLanguage), knownLanguages, Extension(..), KnownExtension(..) )
( Language(UnknownLanguage), knownLanguages
, Extension(..), KnownExtension(..) )
import System.FilePath
( (</>), takeExtension, isRelative, isAbsolute
, splitDirectories, splitPath )
......@@ -120,7 +121,8 @@ check :: Bool -> PackageCheck -> Maybe PackageCheck
check False _ = Nothing
check True pc = Just pc
checkSpecVersion :: PackageDescription -> [Int] -> Bool -> PackageCheck -> Maybe PackageCheck
checkSpecVersion :: PackageDescription -> [Int] -> Bool -> PackageCheck
-> Maybe PackageCheck
checkSpecVersion pkg specver cond pc
| specVersion pkg >= Version specver [] = Nothing
| otherwise = check cond pc
......@@ -190,7 +192,8 @@ checkSanity pkg =
++ ". The name of every executable, test suite, and benchmark section in"
++ " the package must be unique."
]
--TODO: check for name clashes case insensitively: windows file systems cannot cope.
--TODO: check for name clashes case insensitively: windows file systems cannot
--cope.
++ maybe [] (checkLibrary pkg) (library pkg)
++ concatMap (checkExecutable pkg) (executables pkg)
......@@ -475,10 +478,13 @@ checkLicense :: PackageDescription -> [PackageCheck]
checkLicense pkg =
catMaybes [
check (license pkg == AllRightsReserved) $
check (license pkg == UnspecifiedLicense) $
PackageDistInexcusable
"The 'license' field is missing or specified as AllRightsReserved."
"The 'license' field is missing."
, check (license pkg == AllRightsReserved) $
PackageDistSuspicious
"The 'license' is AllRightsReserved. Is that really what you want?"
, case license pkg of
UnknownLicense l -> Just $
PackageBuildWarning $
......@@ -503,7 +509,8 @@ checkLicense pkg =
++ "version then please file a ticket."
_ -> Nothing
, check (license pkg `notElem` [AllRightsReserved, PublicDomain]
, check (license pkg `notElem` [ AllRightsReserved
, UnspecifiedLicense, PublicDomain]
-- AllRightsReserved and PublicDomain are not strictly
-- licenses so don't need license files.
&& null (licenseFiles pkg)) $
......@@ -596,11 +603,13 @@ checkGhcOptions pkg =
, checkFlags ["-fhpc"] $
PackageDistInexcusable $
"'ghc-options: -fhpc' is not appropriate for a distributed package."
-- -dynamic is not a debug flag
, check (any (\opt -> "-d" `isPrefixOf` opt && opt /= "-dynamic") all_ghc_options) $
, check (any (\opt -> "-d" `isPrefixOf` opt && opt /= "-dynamic")
all_ghc_options) $
PackageDistInexcusable $
"'ghc-options: -d*' debug flags are not appropriate for a distributed package."
"'ghc-options: -d*' debug flags are not appropriate "
++ "for a distributed package."
, checkFlags ["-prof"] $
PackageBuildWarning $
......@@ -610,37 +619,43 @@ checkGhcOptions pkg =
, checkFlags ["-o"] $
PackageBuildWarning $
"'ghc-options: -o' is not needed. The output files are named automatically."
"'ghc-options: -o' is not needed. "
++ "The output files are named automatically."
, checkFlags ["-hide-package"] $
PackageBuildWarning $
"'ghc-options: -hide-package' is never needed. Cabal hides all packages."
"'ghc-options: -hide-package' is never needed. "
++ "Cabal hides all packages."
, checkFlags ["--make"] $
PackageBuildWarning $
"'ghc-options: --make' is never needed. Cabal uses this automatically."
"'ghc-options: --make' is never needed. Cabal uses this automatically."
, checkFlags ["-main-is"] $
PackageDistSuspicious $
"'ghc-options: -main-is' is not portable."
"'ghc-options: -main-is' is not portable."
, checkFlags ["-O0", "-Onot"] $
PackageDistSuspicious $
"'ghc-options: -O0' is not needed. Use the --disable-optimization configure flag."
"'ghc-options: -O0' is not needed. "
++ "Use the --disable-optimization configure flag."
, checkFlags [ "-O", "-O1"] $
PackageDistInexcusable $
"'ghc-options: -O' is not needed. Cabal automatically adds the '-O' flag. "
++ "Setting it yourself interferes with the --disable-optimization flag."
"'ghc-options: -O' is not needed. "
++ "Cabal automatically adds the '-O' flag. "
++ "Setting it yourself interferes with the --disable-optimization flag."
, checkFlags ["-O2"] $
PackageDistSuspicious $
"'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit "
++ "and not just imposing longer compile times on your users."
"'ghc-options: -O2' is rarely needed. "
++ "Check that it is giving a real benefit "
++ "and not just imposing longer compile times on your users."
, checkFlags ["-split-objs"] $
PackageBuildWarning $
"'ghc-options: -split-objs' is not needed. Use the --enable-split-objs configure flag."
"'ghc-options: -split-objs' is not needed. "
++ "Use the --enable-split-objs configure flag."
, checkFlags ["-optl-Wl,-s", "-optl-s"] $
PackageDistInexcusable $
......@@ -652,7 +667,13 @@ checkGhcOptions pkg =
, checkFlags ["-fglasgow-exts"] $
PackageDistSuspicious $
"Instead of 'ghc-options: -fglasgow-exts' it is preferable to use the 'extensions' field."
"Instead of 'ghc-options: -fglasgow-exts' it is preferable to use "
++ "the 'extensions' field."
, checkProfFlags ["-auto-all"] $
PackageDistSuspicious $
"'ghc-prof-options: -auto-all' is fine during development, but "
++ "not recommended in a distributed package. "
, check ("-threaded" `elem` lib_ghc_options) $
PackageDistSuspicious $
......@@ -686,49 +707,57 @@ checkGhcOptions pkg =
&& ("-Wall" `elem` opts || "-W" `elem` opts)
has_Werror = any (\opts -> "-Werror" `elem` opts) ghc_options
ghc_options = [ strs | bi <- allBuildInfo pkg
, (GHC, strs) <- options bi ]
all_ghc_options = concat ghc_options
(ghc_options, ghc_prof_options) =
unzip . map (\bi -> (hcOptions GHC bi, ghcProfOptions bi))
$ (allBuildInfo pkg)
all_ghc_options = concat ghc_options
all_ghc_prof_options = concat ghc_prof_options
lib_ghc_options = maybe [] (hcOptions GHC . libBuildInfo) (library pkg)
checkFlags :: [String] -> PackageCheck -> Maybe PackageCheck
checkFlags flags = check (any (`elem` flags) all_ghc_options)
checkFlags,checkProfFlags :: [String] -> PackageCheck -> Maybe PackageCheck
checkFlags flags = doCheckFlags flags all_ghc_options
checkProfFlags flags = doCheckFlags flags all_ghc_prof_options
doCheckFlags flags opts = check (any (`elem` flags) opts)
ghcExtension ('-':'f':name) = case name of
"allow-overlapping-instances" -> Just (EnableExtension OverlappingInstances)
"no-allow-overlapping-instances" -> Just (DisableExtension OverlappingInstances)
"th" -> Just (EnableExtension TemplateHaskell)
"no-th" -> Just (DisableExtension TemplateHaskell)
"ffi" -> Just (EnableExtension ForeignFunctionInterface)
"no-ffi" -> Just (DisableExtension ForeignFunctionInterface)
"fi" -> Just (EnableExtension ForeignFunctionInterface)
"no-fi" -> Just (DisableExtension ForeignFunctionInterface)
"monomorphism-restriction" -> Just (EnableExtension MonomorphismRestriction)
"no-monomorphism-restriction" -> Just (DisableExtension MonomorphismRestriction)
"mono-pat-binds" -> Just (EnableExtension MonoPatBinds)
"no-mono-pat-binds" -> Just (DisableExtension MonoPatBinds)
"allow-undecidable-instances" -> Just (EnableExtension UndecidableInstances)
"no-allow-undecidable-instances" -> Just (DisableExtension UndecidableInstances)
"allow-incoherent-instances" -> Just (EnableExtension IncoherentInstances)
"no-allow-incoherent-instances" -> Just (DisableExtension IncoherentInstances)
"arrows" -> Just (EnableExtension Arrows)
"no-arrows" -> Just (DisableExtension Arrows)
"generics" -> Just (EnableExtension Generics)
"no-generics" -> Just (DisableExtension Generics)
"implicit-prelude" -> Just (EnableExtension ImplicitPrelude)
"no-implicit-prelude" -> Just (DisableExtension ImplicitPrelude)
"implicit-params" -> Just (EnableExtension ImplicitParams)
"no-implicit-params" -> Just (DisableExtension ImplicitParams)
"bang-patterns" -> Just (EnableExtension BangPatterns)
"no-bang-patterns" -> Just (DisableExtension BangPatterns)
"scoped-type-variables" -> Just (EnableExtension ScopedTypeVariables)
"no-scoped-type-variables" -> Just (DisableExtension ScopedTypeVariables)
"extended-default-rules" -> Just (EnableExtension ExtendedDefaultRules)
"no-extended-default-rules" -> Just (DisableExtension ExtendedDefaultRules)
"allow-overlapping-instances" -> enable OverlappingInstances
"no-allow-overlapping-instances" -> disable OverlappingInstances
"th" -> enable TemplateHaskell
"no-th" -> disable TemplateHaskell
"ffi" -> enable ForeignFunctionInterface
"no-ffi" -> disable ForeignFunctionInterface
"fi" -> enable ForeignFunctionInterface
"no-fi" -> disable ForeignFunctionInterface
"monomorphism-restriction" -> enable MonomorphismRestriction
"no-monomorphism-restriction" -> disable MonomorphismRestriction
"mono-pat-binds" -> enable MonoPatBinds
"no-mono-pat-binds" -> disable MonoPatBinds
"allow-undecidable-instances" -> enable UndecidableInstances
"no-allow-undecidable-instances" -> disable UndecidableInstances
"allow-incoherent-instances" -> enable IncoherentInstances
"no-allow-incoherent-instances" -> disable IncoherentInstances
"arrows" -> enable Arrows
"no-arrows" -> disable Arrows
"generics" -> enable Generics
"no-generics" -> disable Generics
"implicit-prelude" -> enable ImplicitPrelude
"no-implicit-prelude" -> disable ImplicitPrelude
"implicit-params" -> enable ImplicitParams
"no-implicit-params" -> disable ImplicitParams
"bang-patterns" -> enable BangPatterns
"no-bang-patterns" -> disable BangPatterns
"scoped-type-variables" -> enable ScopedTypeVariables
"no-scoped-type-variables" -> disable ScopedTypeVariables
"extended-default-rules" -> enable ExtendedDefaultRules
"no-extended-default-rules" -> disable ExtendedDefaultRules
_ -> Nothing
ghcExtension "-cpp" = Just (EnableExtension CPP)
ghcExtension "-cpp" = enable CPP
ghcExtension _ = Nothing
enable e = Just (EnableExtension e)
disable e = Just (DisableExtension e)
checkCCOptions :: PackageDescription -> [PackageCheck]
checkCCOptions pkg =
catMaybes [
......@@ -906,7 +935,8 @@ checkCabalVersion pkg =
++ "'other-languages' field."
-- check use of reexported-modules sections
, checkVersion [1,21] (maybe False (not.null.reexportedModules) (library pkg)) $
, checkVersion [1,21]
(maybe False (not.null.reexportedModules) (library pkg)) $
PackageDistInexcusable $
"To use the 'reexported-module' field the package needs to specify "
++ "at least 'cabal-version: >= 1.21'."
......@@ -914,7 +944,8 @@ checkCabalVersion pkg =
-- check use of thinning and renaming
, checkVersion [1,21] (not (null depsUsingThinningRenamingSyntax)) $
PackageDistInexcusable $
"The package uses thinning and renaming in the 'build-depends' field: "
"The package uses "
++ "thinning and renaming in the 'build-depends' field: "
++ commaSep (map display depsUsingThinningRenamingSyntax)
++ ". To use this new syntax, the package needs to specify at least"
++ "'cabal-version: >= 1.21'."
......@@ -1092,14 +1123,16 @@ checkCabalVersion pkg =
-- XXX: If the user writes build-depends: foo with (), this is
-- indistinguishable from build-depends: foo, so there won't be an
-- error even though there should be
depsUsingThinningRenamingSyntax = [ name
| bi <- allBuildInfo pkg
, (name, rns) <- Map.toList (targetBuildRenaming bi)
, rns /= ModuleRenaming True [] ]
depsUsingThinningRenamingSyntax =
[ name
| bi <- allBuildInfo pkg
, (name, rns) <- Map.toList (targetBuildRenaming bi)
, rns /= ModuleRenaming True [] ]
testedWithUsingWildcardSyntax = [ Dependency (PackageName (display compiler)) vr
| (compiler, vr) <- testedWith pkg
, usesWildcardSyntax vr ]
testedWithUsingWildcardSyntax =
[ Dependency (PackageName (display compiler)) vr
| (compiler, vr) <- testedWith pkg
, usesWildcardSyntax vr ]
usesWildcardSyntax :: VersionRange -> Bool
usesWildcardSyntax =
......@@ -1119,7 +1152,8 @@ checkCabalVersion pkg =
intersectVersionRanges unionVersionRanges id
compatLicenses = [ GPL Nothing, LGPL Nothing, AGPL Nothing, BSD3, BSD4
, PublicDomain, AllRightsReserved, OtherLicense ]
, PublicDomain, AllRightsReserved
, UnspecifiedLicense, OtherLicense ]
mentionedExtensions = [ ext | bi <- allBuildInfo pkg
, ext <- allExtensions bi ]
......@@ -1179,8 +1213,10 @@ displayRawVersionRange =
(\v -> (Disp.text ">=" <> disp v , 0))
(\v -> (Disp.text "<=" <> disp v , 0))
(\v _ -> (Disp.text "==" <> dispWild v , 0))
(\(r1, p1) (r2, p2) -> (punct 2 p1 r1 <+> Disp.text "||" <+> punct 2 p2 r2 , 2))
(\(r1, p1) (r2, p2) -> (punct 1 p1 r1 <+> Disp.text "&&" <+> punct 1 p2 r2 , 1))
(\(r1, p1) (r2, p2) ->
(punct 2 p1 r1 <+> Disp.text "||" <+> punct 2 p2 r2 , 2))
(\(r1, p1) (r2, p2) ->
(punct 1 p1 r1 <+> Disp.text "&&" <+> punct 1 p2 r2 , 1))
(\(r, _ ) -> (Disp.parens r, 0)) -- parens
where
......@@ -1366,7 +1402,8 @@ checkConfigureExists ops PackageDescription { buildType = Just Configure } = do
exists <- doesFileExist ops "configure"
return $ check (not exists) $
PackageBuildWarning $
"The 'build-type' is 'Configure' but there is no 'configure' script."
"The 'build-type' is 'Configure' but there is no 'configure' script. "
++ "You probably need to run 'autoreconf -i' to generate it."
checkConfigureExists _ _ = return Nothing
checkLocalPathsExist :: Monad m => CheckPackageContentOps m
......
......@@ -123,9 +123,6 @@ pkgDescrFieldDescrs =
, simpleField "maintainer"
showFreeText parseFreeText
maintainer (\val pkg -> pkg{maintainer=val})
, commaListFieldWithSep vcat "build-depends"
disp parse
buildDepends (\xs pkg -> pkg{buildDepends=xs})
, simpleField "stability"
showFreeText parseFreeText
stability (\val pkg -> pkg{stability=val})
......@@ -435,6 +432,9 @@ binfoFieldDescrs =
, listFieldWithSep vcat "extra-libraries"
showToken parseTokenQ
extraLibs (\xs binfo -> binfo{extraLibs=xs})
, listFieldWithSep vcat "extra-ghci-libraries"
showToken parseTokenQ
extraGHCiLibs (\xs binfo -> binfo{extraGHCiLibs=xs})
, listField "extra-lib-dirs"
showFilePath parseFilePathQ
extraLibDirs (\xs binfo -> binfo{extraLibDirs=xs})
......@@ -461,12 +461,15 @@ binfoFieldDescrs =
ghcSharedOptions (\val binfo -> binfo{ghcSharedOptions=val})
, optsField "ghc-options" GHC
options (\path binfo -> binfo{options=path})
, optsField "hugs-options" Hugs
options (\path binfo -> binfo{options=path})
, optsField "nhc98-options" NHC
options (\path binfo -> binfo{options=path})
, optsField "jhc-options" JHC
options (\path binfo -> binfo{options=path})
-- NOTE: Hugs and NHC are not supported anymore, but these fields are kept
-- around for backwards compatibility.
, optsField "hugs-options" Hugs
options (const id)
, optsField "nhc98-options" NHC
options (const id)
]
storeXFieldsBI :: UnrecFieldParser BuildInfo
......
......@@ -199,7 +199,7 @@ commaListFieldWithSep separator name showF readF get set =
where
set' xs b = set (get b ++ xs) b
showF' = separator . punctuate comma . map showF
commaListField :: String -> (a -> Doc) -> ReadP [a] a
-> (b -> [a]) -> ([a] -> b -> b) -> FieldDescr b
commaListField = commaListFieldWithSep fsep
......@@ -657,7 +657,7 @@ parseOptVersion :: ReadP r Version
parseOptVersion = parseQuoted ver <++ ver
where ver :: ReadP r Version
ver = parse <++ return noVersion
noVersion = Version{ versionBranch=[], versionTags=[] }
noVersion = Version [] []
parseTestedWithQ :: ReadP r (CompilerFlavor,VersionRange)
parseTestedWithQ = parseQuoted tw <++ tw
......
......@@ -26,8 +26,6 @@ module Distribution.Simple.Build (
import qualified Distribution.Simple.GHC as GHC
import qualified Distribution.Simple.JHC as JHC
import qualified Distribution.Simple.LHC as LHC
import qualified Distribution.Simple.NHC as NHC
import qualified Distribution.Simple.Hugs as Hugs
import qualified Distribution.Simple.UHC as UHC
import qualified Distribution.Simple.HaskellSuite as HaskellSuite
......@@ -369,7 +367,7 @@ testSuiteLibV09AsLibAndExe pkg_descr
{ componentPackageDeps = componentPackageDeps clbi
, componentPackageRenaming = componentPackageRenaming clbi
, componentLibraries = [LibraryName (testName test)]
, componentModuleReexports = []
, componentExposedModules = [IPI.ExposedModule m Nothing Nothing]
}
pkg = pkg_descr {
package = (package pkg_descr) {
......@@ -475,8 +473,6 @@ buildLib verbosity numJobs pkg_descr lbi lib clbi =
GHC -> GHC.buildLib verbosity numJobs pkg_descr lbi lib clbi
JHC -> JHC.buildLib verbosity pkg_descr lbi lib clbi
LHC -> LHC.buildLib verbosity pkg_descr lbi lib clbi
Hugs -> Hugs.buildLib verbosity pkg_descr lbi lib clbi
NHC -> NHC.buildLib verbosity pkg_descr lbi lib clbi
UHC -> UHC.buildLib verbosity pkg_descr lbi lib clbi
HaskellSuite {} -> HaskellSuite.buildLib verbosity pkg_descr lbi lib clbi
_ -> die "Building is not supported with this compiler."
......@@ -489,8 +485,6 @@ buildExe verbosity numJobs pkg_descr lbi exe clbi =
GHC -> GHC.buildExe verbosity numJobs pkg_descr lbi exe clbi
JHC -> JHC.buildExe verbosity pkg_descr lbi exe clbi
LHC -> LHC.buildExe verbosity pkg_descr lbi exe clbi
Hugs -> Hugs.buildExe verbosity pkg_descr lbi exe clbi
NHC -> NHC.buildExe verbosity pkg_descr lbi exe clbi
UHC -> UHC.buildExe verbosity pkg_descr lbi exe clbi
_ -> die "Building is not supported with this compiler."
......
......@@ -49,7 +49,7 @@ import Data.Maybe
generate :: PackageDescription -> LocalBuildInfo -> String
generate pkg_descr lbi =
let pragmas
| absolute || isHugs = ""
| absolute = ""
| supports_language_pragma =
"{-# LANGUAGE ForeignFunctionInterface #-}\n"
| otherwise =
......@@ -58,7 +58,6 @@ generate pkg_descr lbi =
foreign_imports
| absolute = ""
| isHugs = "import System.Environment\n"
| otherwise =
"import Foreign\n"++
"import Foreign.C\n"
......@@ -81,7 +80,8 @@ generate pkg_descr lbi =
"catchIO = Exception.catch\n" ++
"\n"++
"\nversion :: Version"++
"\nversion = " ++ show (packageVersion pkg_descr)
"\nversion = Version " ++ show branch ++ " " ++ show tags
where Version branch tags = packageVersion pkg_descr
body
| absolute =
......@@ -143,8 +143,7 @@ generate pkg_descr lbi =
libdir = flat_libdirrel,
datadir = flat_datadirrel,
libexecdir = flat_libexecdirrel,
sysconfdir = flat_sysconfdirrel,
progdir = flat_progdirrel
sysconfdir = flat_sysconfdirrel
} = prefixRelativeInstallDirs (packageId pkg_descr) lbi
mkGetDir _ (Just dirrel) = "getPrefixDirRel " ++ show dirrel
......@@ -158,10 +157,8 @@ generate pkg_descr lbi =
absolute =
hasLibs pkg_descr -- we can only make progs relocatable
|| isNothing flat_bindirrel -- if the bin dir is an absolute path
|| (isHugs && isNothing flat_progdirrel)
|| not (supportsRelocatableProgs (compilerFlavor (compiler lbi)))
supportsRelocatableProgs Hugs = True
supportsRelocatableProgs GHC = case buildOS of
Windows -> True
_ -> False
......@@ -169,12 +166,7 @@ generate pkg_descr lbi =
paths_modulename = autogenModuleName pkg_descr
isHugs = compilerFlavor (compiler lbi) == Hugs
get_prefix_stuff
| isHugs = "progdirrel :: String\n"++
"progdirrel = "++show (fromJust flat_progdirrel)++"\n\n"++
get_prefix_hugs
| otherwise = get_prefix_win32 buildArch
get_prefix_stuff = get_prefix_win32 buildArch
path_sep = show [pathSeparator]
......@@ -218,15 +210,6 @@ get_prefix_win32 arch =
X86_64 -> "ccall"
_ -> error "win32 supported only with I386, X86_64"
get_prefix_hugs :: String
get_prefix_hugs =
"getPrefixDirRel :: FilePath -> IO FilePath\n"++
"getPrefixDirRel dirRel = do\n"++
" mainPath <- getProgName\n"++
" let (progPath,_) = splitFileName mainPath\n"++
" let (progdir,_) = splitFileName progPath\n"++
" return ((progdir `minusFileName` progdirrel) `joinFileName` dirRel)\n"
filename_stuff :: String
filename_stuff =
"minusFileName :: FilePath -> String -> FilePath\n"++
......
......@@ -107,9 +107,8 @@ exeExtension = case buildOS of
Windows -> "exe"
_ -> ""
-- ToDo: This should be determined via autoconf (AC_OBJEXT)
-- | Extension for object files. For GHC and NHC the extension is @\"o\"@.
-- Hugs uses either @\"o\"@ or @\"obj\"@ depending on the used C compiler.
-- TODO: This should be determined via autoconf (AC_OBJEXT)
-- | Extension for object files. For GHC the extension is @\"o\"@.
objExtension :: String
objExtension = "o"
......
......@@ -44,6 +44,7 @@ module Distribution.Simple.Configure (configure,
import Distribution.Compiler
( CompilerId(..) )
import Distribution.Utils.NubList
import Distribution.Simple.Compiler
( CompilerFlavor(..), Compiler(..), compilerFlavor, compilerVersion
, showCompilerId, unsupportedLanguages, unsupportedExtensions
......@@ -60,7 +61,6 @@ import Distribution.InstalledPackageInfo as Installed
( InstalledPackageInfo, InstalledPackageInfo_(..)
, emptyInstalledPackageInfo )
import qualified Distribution.InstalledPackageInfo as Installed
( ModuleReexport(..) )
import qualified Distribution.Simple.PackageIndex as PackageIndex
import Distribution.Simple.PackageIndex (InstalledPackageIndex)
import Distribution.PackageDescription as PD
......@@ -112,8 +112,6 @@ import Distribution.Verbosity
import qualified Distribution.Simple.GHC as GHC
import qualified Distribution.Simple.JHC as JHC
import qualified Distribution.Simple.LHC as LHC
import qualified Distribution.Simple.NHC as NHC
import qualified Distribution.Simple.Hugs as Hugs
import qualified Distribution.Simple.UHC as UHC
import qualified Distribution.Simple.HaskellSuite as HaskellSuite
......@@ -577,7 +575,7 @@ configure (pkg_descr0, pbi) cfg
CompilerId GHC _ ->
-- If ghc is non-dynamic, then ghci needs object files,
-- so we build one by default.
--
--
-- Technically, archive files should be sufficient for ghci,
-- but because of GHC bug #8942, it has never been safe to
-- rely on them. By the time that bug was fixed, ghci had
......@@ -603,9 +601,6 @@ configure (pkg_descr0, pbi) cfg
compiler = comp,
hostPlatform = compPlatform,
buildDir = buildDir',
scratchDir = fromFlagOrDefault
(distPref </> "scratch")
(configScratchDir cfg),
componentsConfigs = buildComponents,
installedPkgs = packageDependsIndex,
pkgDescrFile = Nothing,
......@@ -680,7 +675,7 @@ mkProgramsConfig cfg initialProgramsConfig = programsConfig
. setProgramSearchPath searchpath
$ initialProgramsConfig
searchpath = getProgramSearchPath (initialProgramsConfig)
++ map ProgramSearchPathDir (configProgramPathExtra cfg)
++ map ProgramSearchPathDir (fromNubList $ configProgramPathExtra cfg)
-- -----------------------------------------------------------------------------
-- Configuring package dependencies
......@@ -781,10 +776,8 @@ getInstalledPackages verbosity comp packageDBs progconf = do
info verbosity "Reading installed packages..."
case compilerFlavor comp of
GHC -> GHC.getInstalledPackages verbosity packageDBs progconf
Hugs->Hugs.getInstalledPackages verbosity packageDBs progconf
JHC -> JHC.getInstalledPackages verbosity packageDBs progconf
LHC -> LHC.getInstalledPackages verbosity packageDBs progconf
NHC -> NHC.getInstalledPackages verbosity packageDBs progconf
UHC -> UHC.getInstalledPackages verbosity comp packageDBs progconf
HaskellSuite {} ->
HaskellSuite.getInstalledPackages verbosity packageDBs progconf
......@@ -821,8 +814,7 @@ interpretPackageDbFlags userInstall specificDBs =
extra dbs' (Just db:dbs) = extra (dbs' ++ [db]) dbs
newPackageDepsBehaviourMinVersion :: Version
newPackageDepsBehaviourMinVersion = Version { versionBranch = [1,7,1],
versionTags = [] }
newPackageDepsBehaviourMinVersion = Version [1,7,1] []
-- In older cabal versions, there was only one set of package dependencies for
-- the whole package. In this version, we can have separate dependencies per
......@@ -1055,8 +1047,6 @@ configCompilerEx (Just hcFlavor) hcPath hcPkg conf verbosity = do
JHC -> JHC.configure verbosity hcPath hcPkg conf
LHC -> do (_, _, ghcConf) <- GHC.configure verbosity Nothing hcPkg conf
LHC.configure verbosity hcPath Nothing ghcConf
Hugs -> Hugs.configure verbosity hcPath hcPkg conf
NHC -> NHC.configure verbosity hcPath hcPkg conf
UHC -> UHC.configure verbosity hcPath hcPkg conf
HaskellSuite {} -> HaskellSuite.configure verbosity hcPath hcPkg conf
_ -> die "Unknown compiler"
......@@ -1138,6 +1128,7 @@ mkComponentsLocalBuildInfo installedPackages pkg_descr
componentLocalBuildInfo component =
case component of
CLib lib -> do
let exports = map (\n -> Installed.ExposedModule n Nothing Nothing) (PD.exposedModules lib)
reexports <- resolveModuleReexports installedPackages
(packageId pkg_descr)
externalPkgDeps lib
......@@ -1145,7 +1136,7 @@ mkComponentsLocalBuildInfo installedPackages pkg_descr
componentPackageDeps = cpds,
componentLibraries = [LibraryName ("HS" ++ display pkg_key)],
componentPackageRenaming = cprns,
componentModuleReexports = reexports
componentExposedModules = exports ++ reexports
}
CExe _ ->
return ExeComponentLocalBuildInfo {
......@@ -1199,32 +1190,30 @@ resolveModuleReexports :: InstalledPackageIndex
-> [InstalledPackageInfo]
-> Library
-> Either [(ModuleReexport, String)] -- errors
[Installed.ModuleReexport] -- ok
[Installed.ExposedModule] -- ok
resolveModuleReexports installedPackages srcpkgid externalPkgDeps lib =
case partitionEithers (map resolveModuleReexport (PD.reexportedModules lib)) of
([], ok) -> Right ok
(errs, _) -> Left errs
where
-- A mapping from visible module names to their original defining
-- module name and package.
visibleModules :: Map ModuleName [(PackageName, ModuleName, InstalledPackageId)]
-- module name. We also record the package name of the package which
-- *immediately* provided the module (not the original) to handle if the
-- user explicitly says which build-depends they want to reexport from.
visibleModules :: Map ModuleName [(PackageName, Installed.ExposedModule)]
visibleModules =
Map.fromListWith (++) $
[ (visibleModuleName, [(exportingPackageName,
definingModuleName,
definingPackageId)])
[ (Installed.exposedName exposedModule, [(exportingPackageName,
exposedModule)])
-- The package index here contains all the indirect deps of the
-- package we're configuring, but we want just the direct deps
| let directDeps = Set.fromList (map installedPackageId externalPkgDeps)
, pkg <- PackageIndex.allPackages installedPackages
, installedPackageId pkg `Set.member` directDeps
, let exportingPackageName = packageName pkg
, (visibleModuleName, definingModuleName, definingPackageId)
<- visibleModuleDetails pkg
, exposedModule <- visibleModuleDetails pkg
]
++ [ (visibleModuleName, [(exportingPackageName,
definingModuleName,
definingPackageId)])
++ [ (visibleModuleName, [(exportingPackageName, exposedModule)])
| visibleModuleName <- PD.exposedModules lib
++ otherModules (libBuildInfo lib)
, let exportingPackageName = packageName srcpkgid
......@@ -1232,33 +1221,31 @@ resolveModuleReexports installedPackages srcpkgid externalPkgDeps lib =
-- we don't know the InstalledPackageId of this package yet
-- we will fill it in later, before registration.
definingPackageId = InstalledPackageId ""
originalModule = Installed.OriginalModule definingPackageId
definingModuleName
exposedModule = Installed.ExposedModule visibleModuleName
(Just originalModule)
Nothing
]
-- All the modules exported from this package and their defining name and
-- package (either defined here in this package or re-exported from some
-- other package)
visibleModuleDetails :: InstalledPackageInfo
-> [(ModuleName, ModuleName, InstalledPackageId)]
visibleModuleDetails pkg =
-- other package). Return an ExposedModule because we want to hold onto
-- signature information.
visibleModuleDetails :: InstalledPackageInfo -> [Installed.ExposedModule]
visibleModuleDetails pkg = do
exposedModule <- Installed.exposedModules pkg
case Installed.exposedReexport exposedModule of
-- The first case is the modules actually defined in this package.
-- In this case the visible and original names are the same, and the
-- defining package is this one.
[ (visibleModuleName, definingModuleName, definingPackageId)
| visibleModuleName <- Installed.exposedModules pkg
, let definingModuleName = visibleModuleName
definingPackageId = installedPackageId pkg
]
-- In this case the reexport will point to this package.
Nothing -> return exposedModule { Installed.exposedReexport =
Just (Installed.OriginalModule (installedPackageId pkg)
(Installed.exposedName exposedModule)) }
-- On the other hand, a visible module might actually be itself
-- a re-export! In this case, the re-export info for the package
-- doing the re-export will point us to the original defining
-- module name and package.
++ [ (visibleModuleName, definingModuleName, definingPackageId)
| Installed.ModuleReexport {
Installed.moduleReexportName = visibleModuleName,
Installed.moduleReexportDefiningName = definingModuleName,
Installed.moduleReexportDefiningPackage = definingPackageId
} <- Installed.reexportedModules pkg
]
-- module name and package, so we can reuse the entry.
Just _ -> return exposedModule
resolveModuleReexport reexport@ModuleReexport {
moduleReexportOriginalPackage = moriginalPackageName,
......@@ -1269,20 +1256,18 @@ resolveModuleReexports installedPackages srcpkgid externalPkgDeps lib =
let filterForSpecificPackage =
case moriginalPackageName of
Nothing -> id
Just originalPackageName ->
filter (\(pkgname, _, _) -> pkgname == originalPackageName)
Just originalPackageName ->
filter (\(pkgname, _) -> pkgname == originalPackageName)
matches = filterForSpecificPackage
(Map.findWithDefault [] originalName visibleModules)
in
case (matches, moriginalPackageName) of
((_, definingModuleName, definingPackageId):rest, _)
| all (\(_, n, p) -> n == definingModuleName && p == definingPackageId) rest
-> Right Installed.ModuleReexport {
Installed.moduleReexportDefiningName = definingModuleName,
Installed.moduleReexportDefiningPackage = definingPackageId,
Installed.moduleReexportName = newName
}
((_, exposedModule):rest, _)
-- TODO: Refine this check for signatures
| all (\(_, exposedModule') -> Installed.exposedReexport exposedModule
== Installed.exposedReexport exposedModule') rest
-> Right exposedModule { Installed.exposedName = newName }
([], Just originalPackageName)
-> Left $ (,) reexport
......@@ -1299,7 +1284,7 @@ resolveModuleReexports installedPackages srcpkgid externalPkgDeps lib =
-> Left $ (,) reexport
$ "The module " ++ display originalName ++ " is exported "
++ "by more than one package ("
++ intercalate ", " [ display pkgname | (pkgname,_,_) <- ms ]
++ intercalate ", " [ display pkgname | (pkgname,_) <- ms ]
++ ") and so the re-export is ambiguous. The ambiguity can "
++ "be resolved by qualifying by the package name. The "
++ "syntax is 'packagename:moduleName [as newname]'."
......
......@@ -100,6 +100,8 @@ import Distribution.System
import Distribution.Verbosity
import Distribution.Text
( display, simpleParse )
import Distribution.Utils.NubList
( overNubListR, toNubListR )
import Language.Haskell.Extension (Language(..), Extension(..)
,KnownExtension(..))
......@@ -730,14 +732,14 @@ buildOrReplLib forRepl verbosity numJobsFlag pkg_descr lbi lib clbi = do
ghcOptMode = toFlag GhcModeMake,
ghcOptNumJobs = toFlag numJobs,
ghcOptPackageKey = toFlag (pkgKey lbi),
ghcOptInputModules = libModules lib
ghcOptInputModules = toNubListR $ libModules lib
}
profOpts = vanillaOpts `mappend` mempty {
ghcOptProfilingMode = toFlag True,
ghcOptHiSuffix = toFlag "p_hi",
ghcOptObjSuffix = toFlag "p_o",
ghcOptExtra = ghcProfOptions libBi
ghcOptExtra = toNubListR $ ghcProfOptions libBi
}
sharedOpts = vanillaOpts `mappend` mempty {
......@@ -745,17 +747,18 @@ buildOrReplLib forRepl verbosity numJobsFlag pkg_descr lbi lib clbi = do
ghcOptFPic =