Skip to content

Commit e7d25f2

Browse files
committed
Update to LTS 11 and fix build errors
1 parent a78111c commit e7d25f2

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

Diff for: Main.hs

+5-5
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ computeDiffParseHaskell ComputeParams { .. } = do
546546
-- Find .cabal file
547547
dotCabal <- (liftIO . findPackageDesc $ pkgPath) >>= either throwError return
548548
-- Parse .cabal file, extract exported modules
549-
exports <- condLibrary <$> (liftIO $ readPackageDescription normal dotCabal) >>= \case
549+
exports <- condLibrary <$> (liftIO $ readGenericPackageDescription normal dotCabal) >>= \case
550550
Nothing -> throwError $ pkgPath ++ " is not a library"
551551
Just node -> return $ exposedModules . condTreeData $ node
552552
-- Build module name / module source file list
@@ -569,7 +569,7 @@ computeDiffParseHaskell ComputeParams { .. } = do
569569
return $ comparePackageModules mListA mListB
570570

571571
-- Parse a Haskell module interface using haskell-src-exts and cpphs
572-
parseModule :: FilePath -> IO (Either String Module)
572+
parseModule :: FilePath -> IO (Either String (Module SrcSpanInfo))
573573
parseModule modPath = runExceptT $ do
574574
(liftIO $ doesFileExist modPath) >>= flip unless
575575
(throwError $ "Can't open source file '" ++ modPath ++ "'")
@@ -590,7 +590,7 @@ parseModule modPath = runExceptT $ do
590590
Right (E.ParseOk parsedModule) ->
591591
return parsedModule
592592

593-
type PackageModuleList = [(String, Maybe Module)]
593+
type PackageModuleList = [(String, Maybe (Module SrcSpanInfo))]
594594

595595
-- Compare two packages made up of readily parsed Haskell modules
596596
comparePackageModules :: PackageModuleList -> PackageModuleList -> Diff
@@ -633,8 +633,8 @@ comparePackageModules verA verB = do
633633
expUnmodified = intersectBy (==) (moduleExports modA)
634634
(moduleExports modB)
635635
-- TODO: If the module does not have an export spec, we assume it exports nothing
636-
moduleExports (Module _ _ _ _ (Just exportSpec) _ _) = exportSpec
637-
moduleExports _ = []
636+
moduleExports (Module _ (Just (ModuleHead _ _ _ (Just (ExportSpecList _ exportSpec)))) _ _ _ ) = exportSpec
637+
moduleExports _ = []
638638
findModule mlist mname = maybe Nothing snd $ find ((== mname) . fst) mlist
639639
in resAdded ++ resRemoved ++ resKept
640640

Diff for: hackage-diff.cabal

+13-13
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,19 @@ executable hackage-diff
8282
main-is: Main.hs
8383
-- other-modules:
8484
-- other-extensions:
85-
build-depends: base >=4.8 && <5.0,
86-
Cabal >=1.20.0 && < 2.0,
87-
haskell-src-exts >=1.15.0 && < 1.18,
88-
ansi-terminal >=0.6.1 && < 0.7,
89-
directory >=1.2.0 && < 1.4,
90-
filepath >=1.3.0 && < 1.5,
91-
process >=1.2.0 && < 1.5,
92-
attoparsec >=0.12.1 && < 0.13,
93-
cpphs >=1.18.5 && < 1.19,
94-
mtl >=2.2.1 && < 2.3,
95-
text >=1.1.1 && < 1.3,
96-
HTTP >=4000.2.17 && < 4000.4,
97-
async >=2.0.1 && < 2.2
85+
build-depends: base,
86+
Cabal,
87+
haskell-src-exts,
88+
ansi-terminal,
89+
directory,
90+
filepath,
91+
process,
92+
attoparsec,
93+
cpphs,
94+
mtl,
95+
text,
96+
HTTP,
97+
async
9898
-- hs-source-dirs:
9999
default-language: Haskell2010
100100
ghc-options: -Wall -O2 -rtsopts

Diff for: stack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
22

33
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
4-
resolver: lts-4.0
4+
resolver: lts-11.7
55

66
# Local packages, usually specified by relative directory name
77
packages:

0 commit comments

Comments
 (0)