uh maybe fix api incompatibility for stackage lts-14.27

This commit is contained in:
Maciej Bonin 2020-09-13 14:48:12 +02:00
parent f2e74a48c5
commit 9b4d13546f
4 changed files with 18 additions and 5 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/testsuite/makewith/io/TestIO.conf
/testsuite/makewith/unsafeio/Unsafe.conf
/.stack-work/
/dist-newstyle/

View File

@ -331,14 +331,14 @@ union ls ps' =
in foldr addOnePkg fm ps' : ls
where
-- we add each package with and without it's version number and with the full installedPackageId
addOnePkg p fm' = addToPkgEnvs (addToPkgEnvs (addToPkgEnvs fm' (display $ sourcePackageId p) p) (display $ installedPackageId p) p)
addOnePkg p fm' = addToPkgEnvs (addToPkgEnvs (addToPkgEnvs fm' (display $ sourcePackageId p) p) (display $ packageId p) p)
(packageName p) p
-- if no version number specified, pick the higher version
addToPkgEnvs = addWithFM higherVersion
higherVersion pkgconf1 pkgconf2
| installedPackageId pkgconf1 >= installedPackageId pkgconf2 = pkgconf1
| packageId pkgconf1 >= packageId pkgconf2 = pkgconf1
| otherwise = pkgconf2
--
@ -350,7 +350,7 @@ union ls ps' =
grabDefaultPkgConf :: IO PkgEnvs
grabDefaultPkgConf = do
pc <- configureAllKnownPrograms silent defaultProgramConfiguration
pc <- configureAllKnownPrograms silent defaultProgramDb
#if MIN_VERSION_Cabal(1,24,0)
(compiler, _platform, _programConfiguration)
<- configure silent Nothing Nothing pc
@ -366,7 +366,7 @@ grabDefaultPkgConf = do
--
readPackageConf :: FilePath -> IO [PackageConfig]
readPackageConf f = do
pc <- configureAllKnownPrograms silent defaultProgramConfiguration
pc <- configureAllKnownPrograms silent defaultProgramDb
#if MIN_VERSION_Cabal(1,24,0)
(compiler, _platform, _programConfiguration)
<- configure silent Nothing Nothing pc

View File

@ -1,7 +1,7 @@
# For more information, see: https://github.com/commercialhaskell/stack/blob/master/doc/yaml_configuration.md
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: lts-8.0
resolver: lts-14.27
# Local packages, usually specified by relative directory name
packages:

12
stack.yaml.lock Normal file
View File

@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files
packages: []
snapshots:
- completed:
size: 524996
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/27.yaml
sha256: 7ea31a280c56bf36ff591a7397cc384d0dff622e7f9e4225b47d8980f019a0f0
original: lts-14.27