Skip to content

Commit 31aff31

Browse files
committed
Fix compile for cabal 2 and ghc 8.2.2
1 parent 22dabdd commit 31aff31

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ matrix:
5252
- env: CABALVER=1.24 GHCVER=8.0.1 HAPPYVER=1.19.5
5353
compiler: ": #GHC 8.0.1"
5454
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,happy-1.19.5], sources: [hvr-ghc]}}
55+
- env: CABALVER=2.0 GHCVER=8.2.2 HAPPYVER=1.19.5
56+
compiler: ": #GHC 8.2.2"
57+
addons: {apt: {packages: [cabal-install-2,ghc-8.2.2,happy-1.19.5], sources: [hvr-ghc]}}
5558

5659
before_install:
5760
- unset CC

src/System/Eval/Haskell.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import Data.Dynamic ( Dynamic )
5252
import Data.Typeable ( Typeable )
5353

5454
import Data.Either ( )
55-
import Data.Map as Map
55+
import Data.Map as Map hiding ( take )
5656
import Data.Char
5757

5858
import System.IO ( )

src/System/Plugins/Env.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import System.IO.Error ( catch, ioError, isDoesNotExistError )
6969

7070
import Control.Concurrent.MVar ( MVar(), newMVar, withMVar )
7171

72-
import Distribution.Package hiding (depends, packageName, PackageName(..)
72+
import Distribution.Package hiding (Module, depends, packageName, PackageName(..)
7373
#if MIN_VERSION_ghc(7,10,0)
7474
, installedPackageId
7575
#endif

src/System/Plugins/Load.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ import BinIface
7474
import HscTypes
7575

7676
import Module (moduleName, moduleNameString)
77-
#if MIN_VERSION_ghc(8,0,0)
77+
#if MIN_VERSION_ghc(8,2,0)
78+
import Module (installedUnitIdString)
79+
#elif MIN_VERSION_ghc(8,0,0)
7880
import Module (unitIdString)
7981
#elif MIN_VERSION_ghc(7,10,0)
8082
import Module (packageKeyString)
@@ -710,7 +712,9 @@ loadDepends obj incpaths = do
710712

711713
-- and find some packages to load, as well.
712714
let ps = dep_pkgs ds
713-
#if MIN_VERSION_ghc(8,0,0)
715+
#if MIN_VERSION_ghc(8,2,0)
716+
ps' <- filterM loaded . map installedUnitIdString . nub $ map fst ps
717+
#elif MIN_VERSION_ghc(8,0,0)
714718
ps' <- filterM loaded . map unitIdString . nub $ map fst ps
715719
#elif MIN_VERSION_ghc(7,10,0)
716720
ps' <- filterM loaded . map packageKeyString . nub $ map fst ps

0 commit comments

Comments
 (0)