From 1366883c2891d1bec411aef4616cfc7d177478a4 Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Tue, 28 Sep 2021 01:57:34 +0200 Subject: [PATCH] Remove some compatibility code (#2314) All the dependency versions in question were released more than one year ago. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- dhall-lsp-server/dhall-lsp-server.cabal | 2 +- dhall-lsp-server/src/Dhall/LSP/Handlers.hs | 2 -- dhall/dhall.cabal | 4 ++-- dhall/src/Dhall/Parser/Combinators.hs | 6 ------ dhall/tests/Dhall/Test/QuickCheck.hs | 7 +------ 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/dhall-lsp-server/dhall-lsp-server.cabal b/dhall-lsp-server/dhall-lsp-server.cabal index 0eb6faf97..0b2c676de 100644 --- a/dhall-lsp-server/dhall-lsp-server.cabal +++ b/dhall-lsp-server/dhall-lsp-server.cabal @@ -52,7 +52,7 @@ library , dhall >= 1.38.0 && < 1.41 , dhall-json >= 1.4 && < 1.8 , filepath >= 1.4.2 && < 1.5 - , haskell-lsp >= 0.19.0.0 && < 0.25 + , haskell-lsp >= 0.21.0.0 && < 0.25 , rope-utf16-splay >= 0.3.1.0 && < 0.4 , hslogger >= 1.2.10 && < 1.4 , lens >= 4.16.1 && < 5.1 diff --git a/dhall-lsp-server/src/Dhall/LSP/Handlers.hs b/dhall-lsp-server/src/Dhall/LSP/Handlers.hs index d75fc3a25..120cbfdce 100644 --- a/dhall-lsp-server/src/Dhall/LSP/Handlers.hs +++ b/dhall-lsp-server/src/Dhall/LSP/Handlers.hs @@ -557,9 +557,7 @@ completionHandler request = do where _label = completeText _kind = Nothing -#if MIN_VERSION_haskell_lsp(0,21,0) _tags = mempty -#endif _detail = fmap pretty completeType _documentation = Nothing _deprecated = Nothing diff --git a/dhall/dhall.cabal b/dhall/dhall.cabal index 1d7d32118..952d31726 100644 --- a/dhall/dhall.cabal +++ b/dhall/dhall.cabal @@ -496,7 +496,7 @@ Library hashable >= 1.2 && < 1.4 , lens-family-core >= 1.0.0 && < 2.2 , -- megaparsec follows SemVer: https://github.com/mrkkrp/megaparsec/issues/469#issuecomment-927918469 - megaparsec >= 7 && < 10 , + megaparsec >= 8 && < 10 , memory >= 0.14 && < 0.17, mmorph < 1.3 , mtl >= 2.2.1 && < 2.3 , @@ -678,7 +678,7 @@ Test-Suite tasty lens-family-core , megaparsec , prettyprinter , - QuickCheck >= 2.10 && < 2.15, + QuickCheck >= 2.14 && < 2.15, quickcheck-instances >= 0.3.12 && < 0.4 , scientific , serialise , diff --git a/dhall/src/Dhall/Parser/Combinators.hs b/dhall/src/Dhall/Parser/Combinators.hs index 00813c31c..c8a035cfb 100644 --- a/dhall/src/Dhall/Parser/Combinators.hs +++ b/dhall/src/Dhall/Parser/Combinators.hs @@ -136,13 +136,7 @@ instance MonadPlus Parser where -- {-# INLINE mplus #-} instance Text.Megaparsec.MonadParsec Void Text Parser where -#if MIN_VERSION_megaparsec(8, 0, 0) parseError e = Parser (Text.Megaparsec.parseError e) -#else - failure u e = Parser (Text.Megaparsec.failure u e) - - fancyFailure e = Parser (Text.Megaparsec.fancyFailure e) -#endif label l (Parser p) = Parser (Text.Megaparsec.label l p) diff --git a/dhall/tests/Dhall/Test/QuickCheck.hs b/dhall/tests/Dhall/Test/QuickCheck.hs index 5636f403b..a3e0b4ccb 100644 --- a/dhall/tests/Dhall/Test/QuickCheck.hs +++ b/dhall/tests/Dhall/Test/QuickCheck.hs @@ -453,12 +453,7 @@ standardizedExpression _ = True chooseCharacter :: (Char, Char) -> Gen Char -chooseCharacter = -#if MIN_VERSION_QuickCheck(2,14,0) - Test.QuickCheck.chooseEnum -#else - Test.QuickCheck.choose -#endif +chooseCharacter = Test.QuickCheck.chooseEnum instance Arbitrary File where arbitrary = lift2 File