Skip to content

Commit

Permalink
Remove some compatibility code (dhall-lang#2314)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sjakobi and mergify[bot] authored Sep 27, 2021
1 parent 9f0dd67 commit 1366883
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dhall-lsp-server/dhall-lsp-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions dhall-lsp-server/src/Dhall/LSP/Handlers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dhall/dhall.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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 ,
Expand Down Expand Up @@ -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 ,
Expand Down
6 changes: 0 additions & 6 deletions dhall/src/Dhall/Parser/Combinators.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 1 addition & 6 deletions dhall/tests/Dhall/Test/QuickCheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1366883

Please sign in to comment.