Skip to content

Commit c3f6c40

Browse files
authored
Drop support for GHC 8.2 (#1949)
…and do some general cleanup of compatibility code. Closes #1947. * Remove Nix config for GHC 8.2 * Remove redundant imports of Data.Monoid * Clean up imports of Data.Semigroup * Canonicalize mappend definitions * Move MonadFail import behind CPP * Remove compat code for directory < 1.2.3 * Remove compat code for containers < 0.5.8 * Remove compat code for template-haskell < 2.12 * Revert "Canonicalize mappend definitions" This reverts commit fce85a3. * Remove mappend definitions * Update version constraints * Remove compat code for http-client < 0.5 * Dhall.LSP.Backend.Parsing: Remove redundant import * Clean up conditional dependencies in cabal files * Fix more lower bounds on base * Dhall.Map.withoutKeys: Rely on Data.Map.withoutKeys * Remove redundant LANGUAGE CPP pragmas
1 parent 7ceb258 commit c3f6c40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+80
-308
lines changed

dhall-bash/dhall-bash.cabal

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name: dhall-bash
22
Version: 1.0.31
33
Cabal-Version: >=1.10
44
Build-Type: Simple
5-
Tested-With: GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.1
5+
Tested-With: GHC == 8.4.3, GHC == 8.6.1
66
License: BSD3
77
License-File: LICENSE
88
Copyright: 2017 Gabriel Gonzalez
@@ -28,13 +28,13 @@ Source-Repository head
2828
Library
2929
Hs-Source-Dirs: src
3030
Build-Depends:
31-
base >= 4.8.0.0 && < 5 ,
32-
bytestring < 0.11,
33-
containers < 0.7 ,
34-
dhall >= 1.33.0 && < 1.34,
35-
neat-interpolation < 0.6 ,
36-
shell-escape < 0.3 ,
37-
text >= 0.2 && < 1.3
31+
base >= 4.11.0.0 && < 5 ,
32+
bytestring < 0.11,
33+
containers < 0.7 ,
34+
dhall >= 1.33.0 && < 1.34,
35+
neat-interpolation < 0.6 ,
36+
shell-escape < 0.3 ,
37+
text >= 0.2 && < 1.3
3838
Exposed-Modules: Dhall.Bash
3939
GHC-Options: -Wall
4040
Default-Language: Haskell2010

dhall-bash/src/Dhall/Bash.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ module Dhall.Bash (
103103
import Control.Exception (Exception)
104104
import Data.Bifunctor (first)
105105
import Data.ByteString
106-
import Data.Monoid ((<>))
107106
import Data.Typeable (Typeable)
108107
import Data.Void (Void, absurd)
109108
import Dhall.Core (Chunks (..), Expr (..))

dhall-docs/dhall-docs.cabal

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@ Flag ghci-data-files
5959
Library
6060
Hs-Source-Dirs: src
6161
Build-Depends:
62-
base >= 4.9.1.0 && < 5 ,
63-
bytestring < 0.11,
64-
containers ,
65-
directory >= 1.3.0.0 && < 1.4 ,
66-
dhall >= 1.32.0 ,
67-
file-embed >= 0.0.10.0 ,
68-
filepath >= 1.4 && < 1.5 ,
69-
lucid >= 2.9.12 && < 2.10,
70-
mmark >= 0.0.7.0 && < 0.8 ,
71-
megaparsec >= 7 && < 8.1 ,
72-
path >= 0.7.0 && < 0.8 ,
73-
path-io >= 1.6.0 && < 1.7 ,
74-
prettyprinter >= 1.5.1 && < 1.7 ,
75-
tar >= 0.5.1.0 && < 0.6 ,
76-
text >= 0.11.1.0 && < 1.3 ,
77-
mtl >= 2.2.1 && < 2.3 ,
78-
optparse-applicative >= 0.14.0.0 && < 0.16
62+
base >= 4.11.0.0 && < 5 ,
63+
bytestring < 0.11,
64+
containers ,
65+
directory >= 1.3.0.0 && < 1.4 ,
66+
dhall >= 1.32.0 ,
67+
file-embed >= 0.0.10.0 ,
68+
filepath >= 1.4 && < 1.5 ,
69+
lucid >= 2.9.12 && < 2.10,
70+
mmark >= 0.0.7.0 && < 0.8 ,
71+
megaparsec >= 7 && < 8.1 ,
72+
path >= 0.7.0 && < 0.8 ,
73+
path-io >= 1.6.0 && < 1.7 ,
74+
prettyprinter >= 1.5.1 && < 1.7 ,
75+
tar >= 0.5.1.0 && < 0.6 ,
76+
text >= 0.11.1.0 && < 1.3 ,
77+
mtl >= 2.2.1 && < 2.3 ,
78+
optparse-applicative >= 0.14.0.0 && < 0.16
7979
Exposed-Modules:
8080
Dhall.Docs
8181
Dhall.Docs.Core

dhall-docs/src/Dhall/Docs.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module Dhall.Docs
1717
) where
1818

1919
import Control.Applicative ((<|>))
20-
import Data.Monoid ((<>))
2120
import Data.Text (Text)
2221
import Data.Version (showVersion)
2322
import Dhall.Pretty (CharacterSet(..))

dhall-docs/src/Dhall/Docs/Core.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
To do so, just wrap your function in `IO` if you need to do I/O operations,
55
and make pure functions receive that IO result as an input
66
-}
7-
{-# LANGUAGE CPP #-}
87
{-# LANGUAGE FlexibleInstances #-}
98
{-# LANGUAGE MultiParamTypeClasses #-}
109
{-# LANGUAGE NamedFieldPuns #-}
@@ -30,7 +29,6 @@ import Control.Monad.Writer.Class (MonadWriter)
3029
import Data.ByteString (ByteString)
3130
import Data.Function (on)
3231
import Data.Map.Strict (Map)
33-
import Data.Monoid ((<>))
3432
import Data.Text (Text)
3533
import Data.Void (Void)
3634
import Dhall.Core

dhall-docs/src/Dhall/Docs/Html.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module Dhall.Docs.Html
1717
, DocParams(..)
1818
) where
1919

20-
import Data.Monoid ((<>))
2120
import Data.Text (Text)
2221
import Data.Void (Void)
2322
import Dhall.Core (Expr, Import, denote)

dhall-json/dhall-json.cabal

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name: dhall-json
22
Version: 1.7.0
33
Cabal-Version: >=1.10
44
Build-Type: Simple
5-
Tested-With: GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.1
5+
Tested-With: GHC == 8.4.3, GHC == 8.6.1
66
License: BSD3
77
License-File: LICENSE
88
Copyright: 2017 Gabriel Gonzalez
@@ -38,21 +38,21 @@ Source-Repository head
3838
Library
3939
Hs-Source-Dirs: src
4040
Build-Depends:
41-
base >= 4.8.0.0 && < 5 ,
42-
aeson >= 1.0.0.0 && < 1.6 ,
43-
aeson-pretty < 0.9 ,
44-
aeson-yaml >= 1.1.0 && < 1.2 ,
45-
bytestring < 0.11,
46-
containers >= 0.5.9 && < 0.7 ,
47-
dhall >= 1.33.0 && < 1.34,
48-
exceptions >= 0.8.3 && < 0.11,
49-
filepath < 1.5 ,
50-
lens-family-core >= 1.0.0 && < 2.2 ,
51-
optparse-applicative >= 0.14.0.0 && < 0.16,
52-
prettyprinter >= 1.5.1 && < 1.7 ,
53-
scientific >= 0.3.0.0 && < 0.4 ,
54-
text >= 0.11.1.0 && < 1.3 ,
55-
unordered-containers < 0.3 ,
41+
base >= 4.11.0.0 && < 5 ,
42+
aeson >= 1.0.0.0 && < 1.6 ,
43+
aeson-pretty < 0.9 ,
44+
aeson-yaml >= 1.1.0 && < 1.2 ,
45+
bytestring < 0.11,
46+
containers >= 0.5.9 && < 0.7 ,
47+
dhall >= 1.33.0 && < 1.34,
48+
exceptions >= 0.8.3 && < 0.11,
49+
filepath < 1.5 ,
50+
lens-family-core >= 1.0.0 && < 2.2 ,
51+
optparse-applicative >= 0.14.0.0 && < 0.16,
52+
prettyprinter >= 1.5.1 && < 1.7 ,
53+
scientific >= 0.3.0.0 && < 0.4 ,
54+
text >= 0.11.1.0 && < 1.3 ,
55+
unordered-containers < 0.3 ,
5656
vector
5757
Exposed-Modules:
5858
Dhall.JSON
@@ -107,8 +107,6 @@ Executable json-to-dhall
107107
prettyprinter ,
108108
prettyprinter-ansi-terminal >= 1.1.1 && < 1.2 ,
109109
text < 1.3
110-
if !impl(ghc >= 8.0) && !impl(eta >= 0.8.4)
111-
Build-Depends: semigroups == 0.18.*
112110
Other-Modules:
113111
Paths_dhall_json
114112
GHC-Options: -Wall

dhall-json/dhall-to-json/Main.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module Main where
66
import Control.Applicative (optional, (<|>))
77
import Control.Exception (SomeException)
88
import Data.Aeson (Value)
9-
import Data.Monoid ((<>))
109
import Data.Version (showVersion)
1110
import Dhall.JSON (Conversion, SpecialDoubleMode (..))
1211
import Options.Applicative (Parser, ParserInfo)

dhall-json/json-to-dhall/Main.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module Main where
88

99
import Control.Applicative (optional, (<|>))
1010
import Control.Exception (SomeException, throwIO)
11-
import Data.Monoid ((<>))
1211
import Data.Text (Text)
1312
import Data.Version (showVersion)
1413
import Dhall.JSONToDhall

dhall-json/src/Dhall/DhallToYaml/Main.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module Dhall.DhallToYaml.Main (main) where
88
import Control.Applicative (optional, (<|>))
99
import Control.Exception (SomeException)
1010
import Data.ByteString (ByteString)
11-
import Data.Monoid ((<>))
1211
import Data.Text (Text)
1312
import Dhall.JSON (parseConversion, parsePreservationAndOmission)
1413
import Dhall.JSON.Yaml (Options (..), parseDocuments, parseQuoted)

dhall-json/src/Dhall/JSON.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ import Control.Exception (Exception, throwIO)
218218
import Control.Monad (guard)
219219
import Data.Aeson (ToJSON (..), Value (..))
220220
import Data.Maybe (fromMaybe)
221-
import Data.Monoid (mempty, (<>))
222221
import Data.Text (Text)
223222
import Data.Text.Prettyprint.Doc (Pretty)
224223
import Data.Void (Void)

dhall-json/src/Dhall/JSON/Yaml.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module Dhall.JSON.Yaml
1717
) where
1818

1919
import Data.ByteString (ByteString)
20-
import Data.Monoid ((<>))
2120
import Data.Text (Text)
2221
import Dhall.JSON (Conversion (..), SpecialDoubleMode (..))
2322
import Options.Applicative (Parser)

dhall-json/src/Dhall/JSONToDhall.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ import Data.Foldable (toList)
370370
import Data.List ((\\))
371371
import Data.Monoid (Any (..))
372372
import Data.Scientific (floatingOrInteger, toRealFloat)
373-
import Data.Semigroup (Semigroup (..))
374373
import Data.Text (Text)
375374
import Data.Void (Void)
376375
import Dhall.Core (Chunks (..), DhallDouble (..), Expr (App))
@@ -598,8 +597,6 @@ instance Semigroup UnionNumber where
598597
instance Monoid UnionNumber where
599598
mempty = minBound
600599

601-
mappend = (<>)
602-
603600
unionNumberToAlternatives :: UnionNumber -> [ (Text, Maybe (Expr s a)) ]
604601
unionNumberToAlternatives UnionAbsent = []
605602
unionNumberToAlternatives UnionNatural = [ ("Natural", Just D.Natural) ]
@@ -659,8 +656,6 @@ instance Monoid UnionSchema where
659656

660657
text = mempty
661658

662-
mappend = (<>)
663-
664659
{-| A `Schema` is a subset of the `Expr` type representing all possible
665660
Dhall types that `inferSchema` could potentially return
666661
-}
@@ -761,8 +756,6 @@ instance Semigroup Schema where
761756
instance Monoid Schema where
762757
mempty = Union mempty
763758

764-
mappend = (<>)
765-
766759
-- | Convert a `Schema` to the corresponding Dhall type
767760
schemaToDhallType :: Schema -> Expr s a
768761
schemaToDhallType Bool = D.Bool

dhall-json/tasty/Main.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
module Main where
55

6-
import Data.Monoid ((<>))
76
import Data.Void (Void)
87
import Test.Tasty (TestTree)
98

dhall-lsp-server/app/Main.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module Main
99
where
1010

1111
import Control.Applicative ((<|>))
12-
import Data.Monoid ((<>))
1312
import Options.Applicative (Parser, ParserInfo)
1413

1514
import qualified Data.Version

dhall-lsp-server/dhall-lsp-server.cabal

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ library
6868
, uri-encode >= 1.5.0.5 && < 1.6
6969
default-language: Haskell2010
7070
GHC-Options: -Wall -fwarn-incomplete-uni-patterns
71-
if impl(eta)
72-
buildable: False
73-
7471

7572
executable dhall-lsp-server
7673
main-is: Main.hs
@@ -81,13 +78,11 @@ executable dhall-lsp-server
8178
default-extensions: RecordWildCards OverloadedStrings
8279
ghc-options: -rtsopts
8380
build-depends:
84-
base >=4.7 && <5
81+
base
8582
, dhall-lsp-server
8683
, optparse-applicative
8784
default-language: Haskell2010
8885
GHC-Options: -Wall -fwarn-incomplete-uni-patterns
89-
if impl(eta)
90-
buildable: False
9186

9287
Test-Suite doctest
9388
Type: exitcode-stdio-1.0

dhall-lsp-server/doctest/Main.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module Main where
22

3-
import Data.Monoid ((<>))
43
import System.FilePath ((</>))
54

65
import qualified GHC.IO.Encoding

dhall-lsp-server/src/Dhall/LSP/Backend/Diagnostics.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import Dhall.LSP.Util
3030

3131
import Control.Lens (toListOf)
3232
import Control.Monad.Trans.Writer (Writer, execWriter, tell)
33-
import Data.Monoid ((<>))
3433
import Data.Text (Text)
3534

3635
import qualified Data.List.NonEmpty as NonEmpty

dhall-lsp-server/src/Dhall/LSP/Backend/Formatting.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module Dhall.LSP.Backend.Formatting (formatExpr, formatExprWithHeader) where
22

3-
import Data.Monoid ((<>))
43
import Data.Text (Text)
54
import Dhall.Core (Expr)
65
import Dhall.Parser (Header (..))

dhall-lsp-server/src/Dhall/LSP/Backend/Linting.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ where
99

1010
import Control.Lens (universeOf)
1111
import Data.Maybe (maybeToList)
12-
import Data.Monoid ((<>))
1312
import Data.Text (Text)
1413
import Dhall.Core
1514
( Binding (..)

dhall-lsp-server/src/Dhall/LSP/Backend/Parsing.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import Dhall.Parser.Expression
2222
, localOnly
2323
)
2424
import Dhall.Parser.Token hiding (text)
25-
import Dhall.Src (Src (..))
2625
import Text.Megaparsec
2726
( anySingle
2827
, eof

dhall-nix/dhall-nix.cabal

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ Source-Repository head
2727
Library
2828
Hs-Source-Dirs: src
2929
Build-Depends:
30-
base >= 4.8.0.0 && < 5 ,
31-
containers < 0.7 ,
32-
data-fix < 0.4 ,
33-
dhall >= 1.31 && < 1.34,
34-
hnix >= 0.7 && < 0.10,
35-
lens-family-core >= 1.0.0 && < 2.2 ,
36-
neat-interpolation < 0.6 ,
37-
text >= 0.8.0.0 && < 1.3
30+
base >= 4.11.0.0 && < 5 ,
31+
containers < 0.7 ,
32+
data-fix < 0.4 ,
33+
dhall >= 1.31 && < 1.34,
34+
hnix >= 0.7 && < 0.10,
35+
lens-family-core >= 1.0.0 && < 2.2 ,
36+
neat-interpolation < 0.6 ,
37+
text >= 0.8.0.0 && < 1.3
3838
Exposed-Modules:
3939
Dhall.Nix
4040
GHC-Options: -Wall
4141
Default-Language: Haskell2010
42-
if os(windows) || impl(eta)
42+
if os(windows)
4343
Buildable: False
4444

4545
Executable dhall-to-nix
46-
if os(windows) || impl(eta)
46+
if os(windows)
4747
Buildable: False
4848
Hs-Source-Dirs: exec
4949
Main-Is: Main.hs

dhall-nixpkgs/dhall-nixpkgs.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Build-Type: Simple
1616

1717
Executable dhall-to-nixpkgs
1818
Main-Is: Main.hs
19-
Build-Depends: base >= 4.10 && < 5
19+
Build-Depends: base >= 4.11 && < 5
2020
, aeson >= 1.0.0.0 && < 1.5
2121
, data-fix
2222
, dhall >= 1.32.0 && < 1.34

0 commit comments

Comments
 (0)