Commits (80)
......@@ -5,6 +5,11 @@
# Should be empty list: 'git shortlog -se | cut -f2 | cut -d'<' -f1 | uniq -d'.
Adam Langley <agl@imperialviolet.org>
Alex Biehl <alexbiehl@gmail.com>
Alex Biehl <alexbiehl@gmail.com> Alexander Biehl <abiehl@novomind.com>
Alex Biehl <alexbiehl@gmail.com> alexbiehl <alex.biehl@gmail.com>
Alex Washburn <github@recursion.ninja>
Alex Washburn <github@recursion.ninja> recursion-ninja <github@recursion.ninja>
Alistair Bailey <alistair@abayley.org> alistair <alistair@abayley.org>
Alson Kemp <alson@alsonkemp.com> alson <alson@alsonkemp.com>
Andres Löh <andres.loeh@gmail.com>
......@@ -44,6 +49,7 @@ Duncan Coutts <duncan@community.haskell.org> <duncan@haske
Duncan Coutts <duncan@community.haskell.org> <duncan@well-typed.com>
Duncan Coutts <duncan@community.haskell.org> unknown <unknown> # 04e9fcc80bc68b72126e33b20f08050df28e727d
Edward Z. Yang <ezyang@cs.stanford.edu> <ezyang@mit.edu>
Edward Z. Yang <ezyang@cs.stanford.edu> <ezyang@fb.com>
Einar Karttunen <ekarttun@cs.helsinki.fi>
Federico Mastellone <fmaste@users.noreply.github.com>
Francesco Gazzetta <francygazz@gmail.com> <fgaz@users.noreply.github.com>
......@@ -55,6 +61,8 @@ Gershom Bazerman <gershomb@gmail.com> U-CIQDEV\gbaz
Gershom Bazerman <gershomb@gmail.com> gbaz <gershomb@gmail.com>
Gleb Alexeev <gleb.alexeev@gmail.com>
Gleb Alexeev <gleb.alexeev@gmail.com> gleb.alexeev <gleb.alexeev@gmail.com>
Gleb Popov <6yearold@gmail.com>
Gleb Popov <6yearold@gmail.com> arrowd <6yearold@gmail.com>
Gwern Branwen <gwern0@gmail.com> gwern0 <gwern0@gmail.com>
Heather <heather@live.ru> <Heather@cynede.net>
Heather <heather@live.ru> <Heather@users.noreply.github.com>
......@@ -80,8 +88,10 @@ Joel Stanley <intractable@gmail.com>
Joeri van Eekelen <tchakkazulu@gmail.com>
John D. Ramsdell <ramsdell@mitre.org>
John Dias <dias@eecs.harvard.edu> dias <dias@eecs.harvard.edu>
John Ericson <Ericson2314@yahoo.com> <Ericson2314@Yahoo.con>
John Ericson <Ericson2314@yahoo.com>
John Ericson <Ericson2314@yahoo.com> John Ericson <Ericson2314@Yahoo.com>
John Ericson <Ericson2314@yahoo.com> <jericson@galois.com>
John Ericson <Ericson2314@yahoo.com> <John.Ericson@Obsidian.Systems>
Josh Hoyt <josh.hoyt@galois.com>
Judah Jacobson <judah.jacobson@gmail.com>
Jürgen Nicklisch-Franken <jnf@arcor.de>
......@@ -93,13 +103,15 @@ Krasimir Angelov <kr.angelov@gmail.com> ka2_mail <ka2
Lennart Kolmodin <kolmodin@gmail.com> <kolmodin@dtek.chalmers.se>
Lennart Kolmodin <kolmodin@gmail.com> <kolmodin@gentoo.org>
Lennart Kolmodin <kolmodin@gmail.com> <kolmodin@google.com>
Lennart Spitzner <lsp@informatik.uni-kiel.de>
Lennart Spitzner <hexagoxel@hexagoxel.de>
Lennart Spitzner <hexagoxel@hexagoxel.de> <lsp@informatik.uni-kiel.de>
Malcolm Wallace <Malcolm.Wallace@me.com> Malcolm.Wallace <Malcolm.Wallace@cs.york.ac.uk>
Mark Weber <marco-oweber@gmx.de> marco-oweber <marco-oweber@gmx.de>
Martin Sjögren <msjogren@gmail.com> md9ms <md9ms@mdstud.chalmers.se>
Mikhail Glushenkov <mikhail.glushenkov@gmail.com> <c05mgv@cs.umu.se>
Mikhail Glushenkov <mikhail.glushenkov@gmail.com> <mikhail@scrive.com>
Mikhail Glushenkov <mikhail.glushenkov@gmail.com> <the.dead.shall.rise@gmail.com>
Nathan Conroy <nathanconroydev@gmail.com>
Neil Mitchell <ndmitchell@gmail.com> Neil Mitchell <unknown>
Niklas Broberg <niklas.broberg@gmail.com> <d00nibro@chalmers.se>
Niklas Broberg <niklas.broberg@gmail.com> <git@nand.wakku.to>
......@@ -122,7 +134,15 @@ Simon Peyton Jones <simonpj@microsoft.com> simonpj <simo
Stephen Blackheath <stephen.blackheath@ipwnstudios.com> <grossly.sensitive.stephen@blacksapphire.com>
Stephen Blackheath <stephen.blackheath@ipwnstudios.com> <oversensitive.pastors.stephen@blacksapphire.com>
Stephen Blackheath <stephen.blackheath@ipwnstudios.com> rubbernecking.trumpet.stephen <rubbernecking.trumpet.stephen@blacksapphire.com>
Suzumiya <suzumiyasmith@gmail.com> # Goes by that name online
Sven Panne <sven.panne@aedion.de>
Tamar Christina <tamar@zhox.com>
Tamar Christina <tamar@zhox.com> <Mistuke@users.noreply.github.com>
Thomas M. DuBuisson <thomas.dubuisson@gmail.com>
Thomas M. DuBuisson <thomas.dubuisson@gmail.com> Thomas M. DuBuisson <tommd@galois.com>
Thomas Schilling <nominolo@gmail.com> <nominolo@googlemail.com>
Thomas Tuegel <ttuegel@gmail.com>
Thomas Tuegel <ttuegel@gmail.com> <ttuegel@mailbox.org>
Thomas Tuegel <ttuegel@gmail.com> <ttuegel@secure.mailbox.org>
capsjac <capsjac@gmail.com> # Goes by that name online
vedksah <31156362+vedksah@users.noreply.github.com> # Goes by that name online
......@@ -11,6 +11,7 @@ sudo: false
branches:
only:
- master
- "2.2"
- "2.0"
- "1.24"
- "1.22"
......
......@@ -6,7 +6,11 @@ Adam Langley <agl@imperialviolet.org>
Adam Sandberg Eriksson <adam@sandbergericsson.se>
Alan Zimmerman <alan.zimm@gmail.com>
Albert Krewinkel <tarleb@moltkeplatz.de>
Alec Theriault <alec.theriault@gmail.com>
Alex Biehl <alexbiehl@gmail.com>
Alex Hirsch <w4rh4wk@bluephoenix.at>
Alex Lang <me@alang.ca>
Alex Washburn <github@recursion.ninja>
Alexander Kjeldaas <alexander.kjeldaas@gmail.com>
Alexander Vershilov <alexander.vershilov@gmail.com>
Alexei Pastuchov <alexei.pastuchov@telecolumbus.de>
......@@ -50,6 +54,7 @@ Brian Smith <brianlsmith@gmail.com>
Bryan O'Sullivan <bos@serpentine.com>
Bryan Richter <bryan.richter@gmail.com>
Carter Tazio Schonwald <carter.schonwald@gmail.com>
Chang Yang Jiao <jiaochangyang@gmail.com>
Chris Allen <cma@bitemyapp.com>
Chris Wong <lambda.fairy@gmail.com>
Christiaan Baaij <christiaan.baaij@gmail.com>
......@@ -65,6 +70,7 @@ Daniel Trstenjak <daniel.trstenjak@gmail.com>
Daniel Velkov <norcobg@gmail.com>
Daniel Wagner <daniel@wagner-home.com>
Danny Navarro <j@dannynavarro.net>
Dave Laing <dave.laing.80@gmail.com>
David Feuer <David.Feuer@gmail.com>
David Fox <dsf@seereason.com>
David Himmelstrup <lemmih@gmail.com>
......@@ -96,6 +102,7 @@ Eyal Lotem <eyal.lotem@gmail.com>
Fabián Orccón <fabian.orccon@pucp.pe>
Federico Mastellone <fmaste@users.noreply.github.com>
Florian Hartwig <florian.j.hartwig@gmail.com>
Francesco Ariis <fa-ml@ariis.it>
Francesco Gazzetta <francygazz@gmail.com>
Franz Thoma <franz.thoma@tngtech.com>
Fujimura Daisuke <me@fujimuradaisuke.com>
......@@ -103,9 +110,11 @@ Gabor Greif <ggreif@gmail.com>
Gabor Pali <pali.gabor@gmail.com>
Ganesh Sittampalam <ganesh.sittampalam@credit-suisse.com>
Geoff Nixon <geoff-codes@users.noreply.github.com>
George Wilson <george@wils.online>
Gershom Bazerman <gershomb@gmail.com>
Getty Ritter <gdritter@galois.com>
Gleb Alexeev <gleb.alexeev@gmail.com>
Gleb Popov <6yearold@gmail.com>
Gregory Collins <greg@gregorycollins.net>
Gwern Branwen <gwern0@gmail.com>
Haisheng.Wu <freizl@gmail.com>
......@@ -143,7 +152,6 @@ Johan Tibell <johan.tibell@gmail.com>
John Chee <cheecheeo@gmail.com>
John D. Ramsdell <ramsdell@mitre.org>
John Dias <dias@eecs.harvard.edu>
John Ericson <Ericson2314@Yahoo.com>
John Ericson <Ericson2314@yahoo.com>
John Lato <jwlato@tsurucapital.com>
John Wiegley <johnw@fpcomplete.com>
......@@ -156,12 +164,14 @@ Jürgen Nicklisch-Franken <jnf@arcor.de>
Karel Gardas <karel.gardas@centrum.cz>
Keegan McAllister <mcallister.keegan@gmail.com>
Ken Bateman <novadenizen@gmail.com>
Ken Micklas <kmicklas@gmail.com>
Keshav Kini <kkini@galois.com>
Kido Takahiro <shelarcy@gmail.com>
Krasimir Angelov <kr.angelov@gmail.com>
Kristen Kozak <grayjay@wordroute.com>
Lennart Kolmodin <kolmodin@gmail.com>
Lennart Spitzner <lsp@informatik.uni-kiel.de>
Lennart Spitzner <hexagoxel@hexagoxel.de>
Leon Isenberg <ljli@users.noreply.github.com>
Leonid Onokhov <sopvop@gmail.com>
Liyang HU <git@liyang.hu>
Luite Stegeman <stegeman@gmail.com>
......@@ -196,7 +206,9 @@ Misty De Meo <mistydemeo@gmail.com>
Miëtek Bak <mietek@bak.io>
Mohit Agarwal <mohit@sdf.org>
Moritz Angermann <moritz.angermann@gmail.com>
Moritz Drexl <mdrexl@fastmail.fm>
Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Nathan Conroy <nathanconroydev@gmail.com>
Nathan Howell <nhowell@alphaheavy.com>
Neil Mitchell <ndmitchell@gmail.com>
Neil Vice <sardonicpresence@gmail.com>
......@@ -221,6 +233,7 @@ Peter Higley <phigley@gmail.com>
Peter Robinson <thaldyron@gmail.com>
Peter Selinger <selinger@mathstat.dal.ca>
Peter Simons <simons@cryp.to>
Peter Siska <siska.pe@gmail.com>
Peter Trško <peter.trsko@gmail.com>
Phil Ruffwind <rf@rufflewind.com>
Philipp Schumann <philipp.schumann@gmail.com>
......@@ -258,10 +271,14 @@ Simon Peyton Jones <simonpj@microsoft.com>
Spencer Janssen <sjanssen@cse.unl.edu>
Stephen Blackheath <stephen.blackheath@ipwnstudios.com>
Stuart Popejoy <spopejoy@panix.com>
Suzumiya <suzumiyasmith@gmail.com>
Sven Panne <sven.panne@aedion.de>
Sönke Hahn <shahn@joyridelabs.de>
Takano Akio <tak@anoak.io>
Takenobu Tani <takenobu.hs@gmail.com>
Tamar Christina <tamar@zhox.com>
Taru Karttunen <taruti@taruti.net>
Taylor Fausak <taylor.fausak@verizonwireless.com>
Thomas Dziedzic <gostrc@gmail.com>
Thomas M. DuBuisson <thomas.dubuisson@gmail.com>
Thomas Miedema <thomasmiedema@gmail.com>
......@@ -274,10 +291,13 @@ Tomas Vestelind <tomas.vestelind@gmail.com>
Toshio Ito <debug.ito@gmail.com>
Travis Cardwell <travis.cardwell@extellisys.com>
Tuncer Ayaz <tuncer.ayaz@gmail.com>
Vaibhav Sagar <vaibhavsagar@gmail.com>
Vincent Hanquez <vincent@snarc.org>
Vo Minh Thu <noteed@gmail.com>
Wojciech Danilo <wojtek.danilo@gmail.com>
Yitzchak Gale <gale@sefer.org>
Yuras Shumovich <shumovichy@gmail.com>
Yuriy Syrovetskiy <cblp@cblp.su>
capsjac <capsjac@gmail.com>
vedksah <31156362+vedksah@users.noreply.github.com>
Łukasz Dąbek <sznurek@gmail.com>
name: Cabal
version: 2.1.0.0
copyright: 2003-2017, Cabal Development Team (see AUTHORS file)
version: 2.3.0.0
copyright: 2003-2018, Cabal Development Team (see AUTHORS file)
license: BSD3
license-file: LICENSE
author: Cabal Development Team <cabal-devel@haskell.org>
......@@ -22,7 +22,7 @@ build-type: Simple
-- we can bootstrap.
extra-source-files:
README.md tests/README.md changelog
README.md tests/README.md ChangeLog.md
doc/bugs-and-stability.rst doc/concepts-and-development.rst
doc/conf.py doc/config-and-install.rst doc/developing-packages.rst
doc/images/Cabal-dark.png doc/index.rst doc/installing-packages.rst
......@@ -50,6 +50,10 @@ extra-source-files:
tests/ParserTests/errors/issue-5055.errors
tests/ParserTests/errors/leading-comma.cabal
tests/ParserTests/errors/leading-comma.errors
tests/ParserTests/errors/noVersion.cabal
tests/ParserTests/errors/noVersion.errors
tests/ParserTests/errors/noVersion2.cabal
tests/ParserTests/errors/noVersion2.errors
tests/ParserTests/errors/range-ge-wild.cabal
tests/ParserTests/errors/range-ge-wild.errors
tests/ParserTests/ipi/Includes2.cabal
......@@ -101,6 +105,9 @@ extra-source-files:
tests/ParserTests/regressions/leading-comma.cabal
tests/ParserTests/regressions/leading-comma.expr
tests/ParserTests/regressions/leading-comma.format
tests/ParserTests/regressions/noVersion.cabal
tests/ParserTests/regressions/noVersion.expr
tests/ParserTests/regressions/noVersion.format
tests/ParserTests/regressions/nothing-unicode.cabal
tests/ParserTests/regressions/nothing-unicode.check
tests/ParserTests/regressions/nothing-unicode.expr
......@@ -151,25 +158,26 @@ flag old-directory
library
build-depends:
array >= 0.1 && < 0.6,
base >= 4.5 && < 5,
bytestring >= 0.9 && < 1,
containers >= 0.4 && < 0.6,
deepseq >= 1.3 && < 1.5,
filepath >= 1.3 && < 1.5,
pretty >= 1.1 && < 1.2,
array >= 0.4 && < 0.6,
base >= 4.5 && < 5,
bytestring >= 0.9.2.1 && < 0.11,
containers >= 0.4.2.1 && < 0.6,
deepseq >= 1.3 && < 1.5,
filepath >= 1.3 && < 1.5,
pretty >= 1.1.1 && < 1.2,
process >= 1.1.0.1 && < 1.7,
time >= 1.4 && < 1.9
time >= 1.4 && < 1.9
if flag(old-directory)
build-depends: directory >= 1.1 && < 1.2, old-time >= 1 && < 1.2,
process >= 1.0.1.1 && < 1.1.0.2
build-depends: directory >= 1.1.0.2 && < 1.2,
process >= 1.0.1.1 && < 1.1.0.2,
old-time >= 1.1 && < 1.2
else
build-depends: directory >= 1.2 && < 1.4,
build-depends: directory >= 1.2 && < 1.4,
process >= 1.1.0.2 && < 1.7
if flag(bundled-binary-generic)
build-depends: binary >= 0.5 && < 0.7
build-depends: binary >= 0.5.1 && < 0.7
else
build-depends: binary >= 0.7 && < 0.9
......@@ -177,13 +185,10 @@ library
if impl(ghc < 7.6)
build-depends: ghc-prim >= 0.2 && < 0.3
if !os(windows)
build-depends:
unix >= 2.5 && < 2.8
if os(windows)
build-depends:
Win32 >= 2.2 && < 2.7
build-depends: Win32 >= 2.2.2 && < 2.7
else
build-depends: unix >= 2.5.1 && < 2.8
ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs
if impl(ghc >= 8.0)
......@@ -360,10 +365,10 @@ library
-- Parsec parser-related modules
build-depends:
transformers,
mtl >= 2.1 && <2.3,
text >= 1.2.2.2 && <1.3,
parsec >= 3.1.9 && <3.2
transformers >= 0.3 && < 0.6,
mtl >= 2.1 && < 2.3,
text >= 1.2.3.0 && < 1.3,
parsec >= 3.1.13.0 && < 3.2
exposed-modules:
Distribution.Compat.Parsing
Distribution.Compat.CharParsing
......@@ -491,7 +496,7 @@ test-suite unit-tests
directory,
filepath,
integer-logarithms >= 1.0.2 && <1.1,
tasty,
tasty >= 1.0 && < 1.1,
tasty-hunit,
tasty-quickcheck,
tagged,
......@@ -511,7 +516,7 @@ test-suite parser-tests
base-compat >=0.9.3 && <0.10,
bytestring,
filepath,
tasty,
tasty >= 1.0 && < 1.1,
tasty-hunit,
tasty-quickcheck,
tasty-golden >=2.3.1.1 && <2.4,
......@@ -537,7 +542,7 @@ test-suite check-tests
base,
bytestring,
filepath,
tasty,
tasty >= 1.0 && < 1.1,
tasty-golden >=2.3.1.1 && <2.4,
Diff >=0.3.4 && <0.4,
Cabal
......
This diff is collapsed.
......@@ -12,6 +12,7 @@ import qualified Data.Set as Set
--
data CabalSpecVersion
= CabalSpecOld
| CabalSpecV1_22
| CabalSpecV1_24
| CabalSpecV2_0
| CabalSpecV2_2
......@@ -22,6 +23,7 @@ cabalSpecLatest = CabalSpecV2_2
cabalSpecFeatures :: CabalSpecVersion -> Set.Set CabalFeature
cabalSpecFeatures CabalSpecOld = Set.empty
cabalSpecFeatures CabalSpecV1_22 = Set.empty
cabalSpecFeatures CabalSpecV1_24 = Set.empty
cabalSpecFeatures CabalSpecV2_0 = Set.empty
cabalSpecFeatures CabalSpecV2_2 = Set.fromList
......@@ -30,7 +32,8 @@ cabalSpecFeatures CabalSpecV2_2 = Set.fromList
]
cabalSpecSupports :: CabalSpecVersion -> [Int] -> Bool
cabalSpecSupports CabalSpecOld v = v < [1,23]
cabalSpecSupports CabalSpecOld v = v < [1,21]
cabalSpecSupports CabalSpecV1_22 v = v < [1,23]
cabalSpecSupports CabalSpecV1_24 v = v < [1,25]
cabalSpecSupports CabalSpecV2_0 v = v < [2,1]
cabalSpecSupports CabalSpecV2_2 _ = True
......
......@@ -11,7 +11,7 @@ import System.FilePath as Path
listDirectory :: FilePath -> IO [FilePath]
listDirectory path =
filter f <$> Dir.getDirectoryContents path
filter f `fmap` Dir.getDirectoryContents path
where f filename = filename /= "." && filename /= ".."
#endif
......
......@@ -31,6 +31,9 @@ import Distribution.Compat.Stack
#ifdef mingw32_HOST_OS
import Foreign.C
#if __GLASGOW_HASKELL__ < 708
import Foreign.Ptr (nullPtr)
#endif
import GHC.Windows
#else
import Foreign.C.Types
......@@ -123,6 +126,12 @@ unsetEnv key = withCWString key $ \k -> do
err <- c_GetLastError
unless (err == eRROR_ENVVAR_NOT_FOUND) $ do
throwGetLastError "unsetEnv"
eRROR_ENVVAR_NOT_FOUND :: DWORD
eRROR_ENVVAR_NOT_FOUND = 203
foreign import WINDOWS_CCONV unsafe "windows.h GetLastError"
c_GetLastError:: IO DWORD
#else
unsetEnv key = withFilePath key (throwErrnoIf_ (/= 0) "unsetEnv" . c_unsetenv)
#if __GLASGOW_HASKELL__ > 706
......
......@@ -59,7 +59,7 @@ import qualified Distribution.Compat.CharParsing as P
import qualified Text.PrettyPrint as Disp
data CompilerFlavor =
GHC | GHCJS | NHC | YHC | Hugs | HBC | Helium | JHC | LHC | UHC
GHC | GHCJS | NHC | YHC | Hugs | HBC | Helium | JHC | LHC | UHC | Eta
| HaskellSuite String -- string is the id of the actual compiler
| OtherCompiler String
deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
......@@ -69,7 +69,8 @@ instance Binary CompilerFlavor
instance NFData CompilerFlavor where rnf = genericRnf
knownCompilerFlavors :: [CompilerFlavor]
knownCompilerFlavors = [GHC, GHCJS, NHC, YHC, Hugs, HBC, Helium, JHC, LHC, UHC]
knownCompilerFlavors =
[GHC, GHCJS, NHC, YHC, Hugs, HBC, Helium, JHC, LHC, UHC, Eta]
instance Pretty CompilerFlavor where
pretty (OtherCompiler name) = Disp.text name
......
......@@ -152,11 +152,11 @@ knownLicenses = [ GPL unversioned, GPL (version [2]), GPL (version [3])
-- @since 2.2.0.0
licenseToSPDX :: License -> SPDX.License
licenseToSPDX l = case l of
GPL v | v == version [2] -> spdx SPDX.GPL_2_0
GPL v | v == version [3] -> spdx SPDX.GPL_3_0
LGPL v | v == version [2,1] -> spdx SPDX.LGPL_2_1
LGPL v | v == version [3] -> spdx SPDX.LGPL_3_0
AGPL v | v == version [3] -> spdx SPDX.AGPL_3_0
GPL v | v == version [2] -> spdx SPDX.GPL_2_0_only
GPL v | v == version [3] -> spdx SPDX.GPL_3_0_only
LGPL v | v == version [2,1] -> spdx SPDX.LGPL_2_1_only
LGPL v | v == version [3] -> spdx SPDX.LGPL_3_0_only
AGPL v | v == version [3] -> spdx SPDX.AGPL_3_0_only
BSD2 -> spdx SPDX.BSD_2_Clause
BSD3 -> spdx SPDX.BSD_3_Clause
BSD4 -> spdx SPDX.BSD_4_Clause
......@@ -194,8 +194,8 @@ licenseToSPDX l = case l of
-- >>> licenseFromSPDX . licenseToSPDX $ AllRightsReserved
-- AllRightsReserved
--
-- >>> licenseFromSPDX <$> simpleParsec "BSD-3-Clause OR GPL-3.0"
-- Just (UnknownLicense "BSD3ClauseORGPL30")
-- >>> licenseFromSPDX <$> simpleParsec "BSD-3-Clause OR GPL-3.0-only"
-- Just (UnknownLicense "BSD3ClauseORGPL30only")
--
-- @since 2.2.0.0
licenseFromSPDX :: SPDX.License -> License
......
......@@ -261,7 +261,7 @@ checkLibrary pkg lib =
, checkVersion [1,25] (not (null (signatures lib))) $
PackageDistInexcusable $
"To use the 'signatures' field the package needs to specify "
++ "at least 'cabal-version: >= 1.25'."
++ "at least 'cabal-version: 2.0'."
-- check that all autogen-modules appear on other-modules or exposed-modules
, check
......@@ -1157,27 +1157,27 @@ checkCabalVersion pkg =
(not (null (subLibraries pkg))) $
PackageDistInexcusable $
"To use multiple 'library' sections or a named library section "
++ "the package needs to specify at least 'cabal-version >= 1.23'."
++ "the package needs to specify at least 'cabal-version: 2.0'."
-- check use of reexported-modules sections
, checkVersion [1,21]
(any (not.null.reexportedModules) (allLibraries pkg)) $
PackageDistInexcusable $
"To use the 'reexported-module' field the package needs to specify "
++ "at least 'cabal-version: >= 1.21'."
++ "at least 'cabal-version: >= 1.22'."
-- check use of thinning and renaming
, checkVersion [1,25] usesBackpackIncludes $
PackageDistInexcusable $
"To use the 'mixins' field the package needs to specify "
++ "at least 'cabal-version: >= 1.25'."
++ "at least 'cabal-version: 2.0'."
-- check use of 'extra-framework-dirs' field
, checkVersion [1,23] (any (not . null) (buildInfoField extraFrameworkDirs)) $
-- Just a warning, because this won't break on old Cabal versions.
PackageDistSuspiciousWarn $
"To use the 'extra-framework-dirs' field the package needs to specify"
++ " at least 'cabal-version: >= 1.23'."
++ " at least 'cabal-version: >= 1.24'."
-- check use of default-extensions field
-- don't need to do the equivalent check for other-extensions
......@@ -1225,7 +1225,7 @@ checkCabalVersion pkg =
++ "'build-depends' field: "
++ commaSep (map display depsUsingMajorBoundSyntax)
++ ". To use this new syntax the package need to specify at least "
++ "'cabal-version: >= 2.0'. Alternatively, if broader compatibility "
++ "'cabal-version: 2.0'. Alternatively, if broader compatibility "
++ "is important then use: " ++ commaSep
[ display (Dependency name (eliminateMajorBoundSyntax versionRange))
| Dependency name versionRange <- depsUsingMajorBoundSyntax ]
......@@ -1316,7 +1316,7 @@ checkCabalVersion pkg =
&& isNothing (setupBuildInfo pkg)
&& buildType pkg == Custom) $
PackageBuildWarning $
"Packages using 'cabal-version: >= 1.23' with 'build-type: Custom' "
"Packages using 'cabal-version: >= 1.24' with 'build-type: Custom' "
++ "must use a 'custom-setup' section with a 'setup-depends' field "
++ "that specifies the dependencies of the Setup.hs script itself. "
++ "The 'setup-depends' field uses the same syntax as 'build-depends', "
......@@ -1326,8 +1326,8 @@ checkCabalVersion pkg =
&& isNothing (setupBuildInfo pkg)
&& buildType pkg == Custom) $
PackageDistSuspiciousWarn $
"From version 1.23 cabal supports specifiying explicit dependencies "
++ "for Custom setup scripts. Consider using cabal-version >= 1.23 and "
"From version 1.24 cabal supports specifiying explicit dependencies "
++ "for Custom setup scripts. Consider using cabal-version >= 1.24 and "
++ "adding a 'custom-setup' section with a 'setup-depends' field "
++ "that specifies the dependencies of the Setup.hs script itself. "
++ "The 'setup-depends' field uses the same syntax as 'build-depends', "
......@@ -1337,7 +1337,7 @@ checkCabalVersion pkg =
&& elem (autogenPathsModuleName pkg) allModuleNames
&& not (elem (autogenPathsModuleName pkg) allModuleNamesAutogen) ) $
PackageDistInexcusable $
"Packages using 'cabal-version: >= 1.25' and the autogenerated "
"Packages using 'cabal-version: 2.0' and the autogenerated "
++ "module Paths_* must include it also on the 'autogen-modules' field "
++ "besides 'exposed-modules' and 'other-modules'. This specifies that "
++ "the module does not come with the package and is generated on "
......@@ -1655,7 +1655,7 @@ checkUnicodeXFields gpd
xfields :: [(String,String)]
xfields = DList.runDList $ mconcat
[ toDListOf (L.packageDescription . L.customFieldsPD . traverse) gpd
, toDListOf (L.buildInfos . L.customFieldsBI . traverse) gpd
, toDListOf (L.traverseBuildInfos . L.customFieldsBI . traverse) gpd
]
-- | cabal-version <2.2 + Paths_module + default-extensions: doesn't build.
......
......@@ -37,6 +37,12 @@ module Distribution.PackageDescription.Configuration (
import Prelude ()
import Distribution.Compat.Prelude
-- lens
import qualified Distribution.Types.BuildInfo.Lens as L
import qualified Distribution.Types.GenericPackageDescription.Lens as L
import qualified Distribution.Types.PackageDescription.Lens as L
import qualified Distribution.Types.SetupBuildInfo.Lens as L
import Distribution.PackageDescription
import Distribution.PackageDescription.Utils
import Distribution.Version
......@@ -47,7 +53,6 @@ import Distribution.Text
import Distribution.Compat.Lens
import Distribution.Compat.ReadP as ReadP hiding ( char )
import qualified Distribution.Compat.ReadP as ReadP ( char )
import qualified Distribution.Types.BuildInfo.Lens as L
import Distribution.Types.ComponentRequestedSpec
import Distribution.Types.ForeignLib
import Distribution.Types.Component
......@@ -577,77 +582,17 @@ transformAllBuildInfos :: (BuildInfo -> BuildInfo)
-> (SetupBuildInfo -> SetupBuildInfo)
-> GenericPackageDescription
-> GenericPackageDescription
transformAllBuildInfos onBuildInfo onSetupBuildInfo gpd = gpd'
where
onLibrary lib = lib { libBuildInfo = onBuildInfo $ libBuildInfo lib }
onExecutable exe = exe { buildInfo = onBuildInfo $ buildInfo exe }
onTestSuite tst = tst { testBuildInfo = onBuildInfo $ testBuildInfo tst }
onBenchmark bmk = bmk { benchmarkBuildInfo =
onBuildInfo $ benchmarkBuildInfo bmk }
pd = packageDescription gpd
pd' = pd {
library = fmap onLibrary (library pd),
subLibraries = map onLibrary (subLibraries pd),
executables = map onExecutable (executables pd),
testSuites = map onTestSuite (testSuites pd),
benchmarks = map onBenchmark (benchmarks pd),
setupBuildInfo = fmap onSetupBuildInfo (setupBuildInfo pd)
}
gpd' = transformAllCondTrees onLibrary onExecutable
onTestSuite onBenchmark id
$ gpd { packageDescription = pd' }
transformAllBuildInfos onBuildInfo onSetupBuildInfo =
over L.traverseBuildInfos onBuildInfo
. over (L.packageDescription . L.setupBuildInfo . traverse) onSetupBuildInfo
-- | Walk a 'GenericPackageDescription' and apply @f@ to all nested
-- @build-depends@ fields.
transformAllBuildDepends :: (Dependency -> Dependency)
-> GenericPackageDescription
-> GenericPackageDescription
transformAllBuildDepends f gpd = gpd'
where
onBI bi = bi { targetBuildDepends = map f $ targetBuildDepends bi }
onSBI stp = stp { setupDepends = map f $ setupDepends stp }
gpd' = transformAllCondTrees id id id id (map f)
. transformAllBuildInfos onBI onSBI
$ gpd
-- | Walk all 'CondTree's inside a 'GenericPackageDescription' and apply
-- appropriate transformations to all nodes. Helper function used by
-- 'transformAllBuildDepends' and 'transformAllBuildInfos'.
transformAllCondTrees :: (Library -> Library)
-> (Executable -> Executable)
-> (TestSuite -> TestSuite)
-> (Benchmark -> Benchmark)
-> ([Dependency] -> [Dependency])
-> GenericPackageDescription -> GenericPackageDescription
transformAllCondTrees onLibrary onExecutable
onTestSuite onBenchmark onDepends gpd = gpd'
where
gpd' = gpd {
condLibrary = condLib',
condSubLibraries = condSubLibs',
condExecutables = condExes',
condTestSuites = condTests',
condBenchmarks = condBenchs'
}
condLib = condLibrary gpd
condSubLibs = condSubLibraries gpd
condExes = condExecutables gpd
condTests = condTestSuites gpd
condBenchs = condBenchmarks gpd
condLib' = fmap (onCondTree onLibrary) condLib
condSubLibs' = map (mapSnd $ onCondTree onLibrary) condSubLibs
condExes' = map (mapSnd $ onCondTree onExecutable) condExes
condTests' = map (mapSnd $ onCondTree onTestSuite) condTests
condBenchs' = map (mapSnd $ onCondTree onBenchmark) condBenchs
mapSnd :: (a -> b) -> (c,a) -> (c,b)
mapSnd = fmap
onCondTree :: (a -> b) -> CondTree v [Dependency] a
-> CondTree v [Dependency] b
onCondTree g = mapCondTree g onDepends id
transformAllBuildDepends f =
over (L.traverseBuildInfos . L.targetBuildDepends . traverse) f
. over (L.packageDescription . L.setupBuildInfo . traverse . L.setupDepends . traverse) f
-- cannot be point-free as normal because of higher rank
. over (\f' -> L.allCondTrees $ traverseCondTreeC f') (map f)
......@@ -203,6 +203,7 @@ parseGenericPackageDescription' cabalVerM lexWarnings utf8WarnPos fs = do
| cabalVer >= mkVersion [2,1] = CabalSpecV2_2
| cabalVer >= mkVersion [1,25] = CabalSpecV2_0
| cabalVer >= mkVersion [1,23] = CabalSpecV1_24
| cabalVer >= mkVersion [1,21] = CabalSpecV1_22
| otherwise = CabalSpecOld
-- reset cabal version
......
......@@ -29,11 +29,12 @@ data LicenseExceptionId
| Autoconf_exception_2_0 -- ^ @Autoconf-exception-2.0@, Autoconf exception 2.0
| Autoconf_exception_3_0 -- ^ @Autoconf-exception-3.0@, Autoconf exception 3.0
| Bison_exception_2_2 -- ^ @Bison-exception-2.2@, Bison exception 2.2
| Bootloader_exception -- ^ @Bootloader-exception@, Bootloader Distribution Exception
| Classpath_exception_2_0 -- ^ @Classpath-exception-2.0@, Classpath exception 2.0
| CLISP_exception_2_0 -- ^ @CLISP-exception-2.0@, CLISP exception 2.0
| CLISP_exception_2_0 -- ^ @CLISP-exception-2.0@, CLISP exception 2.0
| DigiRule_FOSS_exception -- ^ @DigiRule-FOSS-exception@, DigiRule FOSS License Exception
| ECos_exception_2_0 -- ^ @eCos-exception-2.0@, eCos exception 2.0
| Fawkes_Runtime_exception -- ^ @Fawkes-Runtime-exception@, Fawkes Runtime Exception
| Fawkes_Runtime_exception -- ^ @Fawkes-Runtime-exception@, Fawkes Runtime Exception
| FLTK_exception -- ^ @FLTK-exception@, FLTK exception
| Font_exception_2_0 -- ^ @Font-exception-2.0@, Font exception 2.0
| Freertos_exception_2_0 -- ^ @freertos-exception-2.0@, FreeRTOS Exception 2.0
......@@ -42,6 +43,7 @@ data LicenseExceptionId
| Gnu_javamail_exception -- ^ @gnu-javamail-exception@, GNU JavaMail exception
| I2p_gpl_java_exception -- ^ @i2p-gpl-java-exception@, i2p GPL+Java Exception
| Libtool_exception -- ^ @Libtool-exception@, Libtool Exception
| Linux_syscall_note -- ^ @Linux-syscall-note@, Linux Syscall Note
| LZMA_exception -- ^ @LZMA-exception@, LZMA exception
| Mif_exception -- ^ @mif-exception@, Macros and Inline Functions Exception
| Nokia_Qt_exception_1_1 -- ^ @Nokia-Qt-exception-1.1@, Nokia Qt LGPL exception 1.1
......@@ -75,6 +77,7 @@ licenseExceptionId DS389_exception = "389-exception"
licenseExceptionId Autoconf_exception_2_0 = "Autoconf-exception-2.0"
licenseExceptionId Autoconf_exception_3_0 = "Autoconf-exception-3.0"
licenseExceptionId Bison_exception_2_2 = "Bison-exception-2.2"
licenseExceptionId Bootloader_exception = "Bootloader-exception"
licenseExceptionId Classpath_exception_2_0 = "Classpath-exception-2.0"
licenseExceptionId CLISP_exception_2_0 = "CLISP-exception-2.0"
licenseExceptionId DigiRule_FOSS_exception = "DigiRule-FOSS-exception"
......@@ -88,6 +91,7 @@ licenseExceptionId GCC_exception_3_1 = "GCC-exception-3.1"
licenseExceptionId Gnu_javamail_exception = "gnu-javamail-exception"
licenseExceptionId I2p_gpl_java_exception = "i2p-gpl-java-exception"
licenseExceptionId Libtool_exception = "Libtool-exception"
licenseExceptionId Linux_syscall_note = "Linux-syscall-note"
licenseExceptionId LZMA_exception = "LZMA-exception"
licenseExceptionId Mif_exception = "mif-exception"
licenseExceptionId Nokia_Qt_exception_1_1 = "Nokia-Qt-exception-1.1"
......@@ -103,11 +107,12 @@ licenseExceptionName DS389_exception = "389 Directory Server Exception"
licenseExceptionName Autoconf_exception_2_0 = "Autoconf exception 2.0"
licenseExceptionName Autoconf_exception_3_0 = "Autoconf exception 3.0"
licenseExceptionName Bison_exception_2_2 = "Bison exception 2.2"
licenseExceptionName Bootloader_exception = "Bootloader Distribution Exception"
licenseExceptionName Classpath_exception_2_0 = "Classpath exception 2.0"
licenseExceptionName CLISP_exception_2_0 = "CLISP exception 2.0 "
licenseExceptionName CLISP_exception_2_0 = "CLISP exception 2.0"
licenseExceptionName DigiRule_FOSS_exception = "DigiRule FOSS License Exception"
licenseExceptionName ECos_exception_2_0 = "eCos exception 2.0"
licenseExceptionName Fawkes_Runtime_exception = "Fawkes Runtime Exception "
licenseExceptionName Fawkes_Runtime_exception = "Fawkes Runtime Exception"
licenseExceptionName FLTK_exception = "FLTK exception"
licenseExceptionName Font_exception_2_0 = "Font exception 2.0"
licenseExceptionName Freertos_exception_2_0 = "FreeRTOS Exception 2.0"
......@@ -116,6 +121,7 @@ licenseExceptionName GCC_exception_3_1 = "GCC Runtime Library exception 3.1"
licenseExceptionName Gnu_javamail_exception = "GNU JavaMail exception"
licenseExceptionName I2p_gpl_java_exception = "i2p GPL+Java Exception"
licenseExceptionName Libtool_exception = "Libtool Exception"
licenseExceptionName Linux_syscall_note = "Linux Syscall Note"
licenseExceptionName LZMA_exception = "LZMA exception"
licenseExceptionName Mif_exception = "Macros and Inline Functions Exception"
licenseExceptionName Nokia_Qt_exception_1_1 = "Nokia Qt LGPL exception 1.1"
......
......@@ -47,7 +47,7 @@ data LicenseExpression
-- | Simple License Expressions.
data SimpleLicenseExpression
= ELicenseId LicenseId
-- ^ An SPDX License List Short Form Identifier. For example: @GPL-2.0@
-- ^ An SPDX License List Short Form Identifier. For example: @GPL-2.0-only@
| ELicenseIdPlus LicenseId
-- ^ An SPDX License List Short Form Identifier with a unary"+" operator suffix to represent the current version of the license or any later version. For example: @GPL-2.0+@
| ELicenseRef LicenseRef
......
This diff is collapsed.
......@@ -53,7 +53,7 @@ bench args pkg_descr lbi flags = do
doBench bm =
case PD.benchmarkInterface bm of
PD.BenchmarkExeV10 _ _ -> do
let cmd = LBI.buildDir lbi </> name </> name <.> exeExtension
let cmd = LBI.buildDir lbi </> name </> name <.> exeExtension (LBI.hostPlatform lbi)
options = map (benchOption pkg_descr lbi bm) $
benchmarkOptions flags
-- Check that the benchmark executable exists.
......
......@@ -568,7 +568,7 @@ addInternalBuildTools pkg lbi bi progs =
[ simpleConfiguredProgram toolName' (FoundOnSystem toolLocation)
| toolName <- getAllInternalToolDependencies pkg bi
, let toolName' = unUnqualComponentName toolName
, let toolLocation = buildDir lbi </> toolName' </> toolName' <.> exeExtension ]
, let toolLocation = buildDir lbi </> toolName' </> toolName' <.> exeExtension (hostPlatform lbi) ]
-- TODO: build separate libs in separate dirs so that we can build
......
......@@ -199,23 +199,23 @@ mkProfLibName lib = mkGenericStaticLibName (getHSLibraryName lib ++ "_p")
-- | Create a library name for a shared lirbary from a given name.
-- Prepends 'lib' and appends the '-<compilerFlavour><compilerVersion>'
-- as well as the shared library extension.
mkGenericSharedLibName :: CompilerId -> String -> String
mkGenericSharedLibName (CompilerId compilerFlavor compilerVersion) lib
= mconcat [ "lib", lib, "-", comp <.> dllExtension ]
mkGenericSharedLibName :: Platform -> CompilerId -> String -> String
mkGenericSharedLibName platform (CompilerId compilerFlavor compilerVersion) lib
= mconcat [ "lib", lib, "-", comp <.> dllExtension platform ]
where comp = display compilerFlavor ++ display compilerVersion
-- Implement proper name mangling for dynamical shared objects
-- libHS<packagename>-<compilerFlavour><compilerVersion>
-- e.g. libHSbase-2.1-ghc6.6.1.so
mkSharedLibName :: CompilerId -> UnitId -> String
mkSharedLibName comp lib
= mkGenericSharedLibName comp (getHSLibraryName lib)
mkSharedLibName :: Platform -> CompilerId -> UnitId -> String
mkSharedLibName platform comp lib
= mkGenericSharedLibName platform comp (getHSLibraryName lib)
-- Static libs are named the same as shared libraries, only with
-- a different extension.
mkStaticLibName :: CompilerId -> UnitId -> String
mkStaticLibName (CompilerId compilerFlavor compilerVersion) lib
= "lib" ++ getHSLibraryName lib ++ "-" ++ comp <.> staticLibExtension
mkStaticLibName :: Platform -> CompilerId -> UnitId -> String
mkStaticLibName platform (CompilerId compilerFlavor compilerVersion) lib
= "lib" ++ getHSLibraryName lib ++ "-" ++ comp <.> staticLibExtension platform
where comp = display compilerFlavor ++ display compilerVersion
-- ------------------------------------------------------------
......@@ -224,8 +224,8 @@ mkStaticLibName (CompilerId compilerFlavor compilerVersion) lib
-- | Default extension for executable files on the current platform.
-- (typically @\"\"@ on Unix and @\"exe\"@ on Windows or OS\/2)
exeExtension :: String
exeExtension = case buildOS of
exeExtension :: Platform -> String
exeExtension (Platform _arch os) = case os of
Windows -> "exe"
_ -> ""
......@@ -235,8 +235,8 @@ objExtension = "o"
-- | Extension for dynamically linked (or shared) libraries
-- (typically @\"so\"@ on Unix and @\"dll\"@ on Windows)
dllExtension :: String
dllExtension = case buildOS of
dllExtension :: Platform -> String
dllExtension (Platform _arch os)= case os of
Windows -> "dll"
OSX -> "dylib"
_ -> "so"
......@@ -245,7 +245,7 @@ dllExtension = case buildOS of
--
-- TODO: Here, as well as in dllExtension, it's really the target OS that we're
-- interested in, not the build OS.
staticLibExtension :: String
staticLibExtension = case buildOS of
staticLibExtension :: Platform -> String
staticLibExtension (Platform _arch os) = case os of
Windows -> "lib"
_ -> "a"
......@@ -131,6 +131,13 @@ configure verbosity hcPath hcPkgPath conf0 = do
(userMaybeSpecifyPath "ghc" hcPath conf0)
let implInfo = ghcVersionImplInfo ghcVersion
-- Cabal currently supports ghc >= 6.11 && < 8.7
unless (ghcVersion < mkVersion [8,7]) $
warn verbosity $
"Unknown/unsupported 'ghc' version detected "
++ "(Cabal " ++ display cabalVersion ++ " supports 'ghc' version < 8.7): "
++ programPath ghcProg ++ " is version " ++ display ghcVersion
-- This is slightly tricky, we have to configure ghc first, then we use the
-- location of ghc to help find ghc-pkg in the case that the user did not
-- specify the location of ghc-pkg directly:
......@@ -217,11 +224,11 @@ guessToolFromGhcPath tool ghcProg verbosity searchpath
versionSuffix path = takeVersionSuffix (dropExeExtension path)
given_suf = versionSuffix given_path
real_suf = versionSuffix real_path
guessNormal dir = dir </> toolname <.> exeExtension
guessNormal dir = dir </> toolname <.> exeExtension buildPlatform
guessGhcVersioned dir suf = dir </> (toolname ++ "-ghc" ++ suf)
<.> exeExtension
<.> exeExtension buildPlatform
guessVersioned dir suf = dir </> (toolname ++ suf)
<.> exeExtension
<.> exeExtension buildPlatform
mkGuesses dir suf | null suf = [guessNormal dir]
| otherwise = [guessGhcVersioned dir suf,
guessVersioned dir suf,
......@@ -724,11 +731,11 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
compiler_id = compilerId (compiler lbi)
vanillaLibFilePath = libTargetDir </> mkLibName uid
profileLibFilePath = libTargetDir </> mkProfLibName uid
sharedLibFilePath = libTargetDir </> mkSharedLibName compiler_id uid
staticLibFilePath = libTargetDir </> mkStaticLibName compiler_id uid
sharedLibFilePath = libTargetDir </> mkSharedLibName (hostPlatform lbi) compiler_id uid
staticLibFilePath = libTargetDir </> mkStaticLibName (hostPlatform lbi) compiler_id uid
ghciLibFilePath = libTargetDir </> Internal.mkGHCiLibName uid
libInstallPath = libdir $ absoluteComponentInstallDirs pkg_descr lbi uid NoCopyDest
sharedLibInstallPath = libInstallPath </> mkSharedLibName compiler_id uid
sharedLibInstallPath = libInstallPath </> mkSharedLibName (hostPlatform lbi) compiler_id uid
stubObjs <- catMaybes <$> sequenceA
[ findFileWithExtension [objExtension] [libTargetDir]
......@@ -925,13 +932,13 @@ gbuildName (GBuildFLib flib) = unUnqualComponentName $ foreignLibName flib
gbuildName (GReplFLib flib) = unUnqualComponentName $ foreignLibName flib
gbuildTargetName :: LocalBuildInfo -> GBuildMode -> String
gbuildTargetName _lbi (GBuildExe exe) = exeTargetName exe
gbuildTargetName _lbi (GReplExe exe) = exeTargetName exe
gbuildTargetName lbi (GBuildFLib flib) = flibTargetName lbi flib
gbuildTargetName lbi (GReplFLib flib) = flibTargetName lbi flib
gbuildTargetName lbi (GBuildExe exe) = exeTargetName (hostPlatform lbi) exe
gbuildTargetName lbi (GReplExe exe) = exeTargetName (hostPlatform lbi) exe
gbuildTargetName lbi (GBuildFLib flib) = flibTargetName lbi flib
gbuildTargetName lbi (GReplFLib flib) = flibTargetName lbi flib
exeTargetName :: Executable -> String
exeTargetName exe = unUnqualComponentName (exeName exe) `withExt` exeExtension
exeTargetName :: Platform -> Executable -> String
exeTargetName platform exe = unUnqualComponentName (exeName exe) `withExt` exeExtension platform
-- | Target name for a foreign library (the actual file name)
--
......@@ -948,8 +955,8 @@ flibTargetName lbi flib =
(Windows, ForeignLibNativeShared) -> nm <.> "dll"
(Windows, ForeignLibNativeStatic) -> nm <.> "lib"
(Linux, ForeignLibNativeShared) -> "lib" ++ nm <.> versionedExt
(_other, ForeignLibNativeShared) -> "lib" ++ nm <.> dllExtension
(_other, ForeignLibNativeStatic) -> "lib" ++ nm <.> staticLibExtension
(_other, ForeignLibNativeShared) -> "lib" ++ nm <.> dllExtension (hostPlatform lbi)
(_other, ForeignLibNativeStatic) -> "lib" ++ nm <.> staticLibExtension (hostPlatform lbi)
(_any, ForeignLibTypeUnknown) -> cabalBug "unknown foreign lib type"
where
nm :: String
......@@ -1632,15 +1639,15 @@ installExe verbosity lbi binDir buildPref
(progprefix, progsuffix) _pkg exe = do
createDirectoryIfMissingVerbose verbosity True binDir
let exeName' = unUnqualComponentName $ exeName exe
exeFileName = exeTargetName exe
exeFileName = exeTargetName (hostPlatform lbi) exe
fixedExeBaseName = progprefix ++ exeName' ++ progsuffix
installBinary dest = do
installExecutableFile verbosity
(buildPref </> exeName' </> exeFileName)
(dest <.> exeExtension)
(dest <.> exeExtension (hostPlatform lbi))
when (stripExes lbi) $
Strip.stripExe verbosity (hostPlatform lbi) (withPrograms lbi)
(dest <.> exeExtension)
(dest <.> exeExtension (hostPlatform lbi))
installBinary (binDir </> fixedExeBaseName)
-- |Install foreign library for GHC.
......@@ -1746,7 +1753,7 @@ installLib verbosity lbi targetDir dynlibTargetDir _builtDir _pkg lib clbi = do
uid = componentUnitId clbi
profileLibName = mkProfLibName uid
ghciLibName = Internal.mkGHCiLibName uid
sharedLibName = (mkSharedLibName compiler_id) uid
sharedLibName = (mkSharedLibName (hostPlatform lbi) compiler_id) uid
hasLib = not $ null (allLibModules lib clbi)
&& null (cSources (libBuildInfo lib))
......