on master help sign in
Since we have GHC>=8 (base >=4.9), we can simplify package.yaml

- remove conditional semigroups dependency - add -Wall and -Wcompat (GHC 8) to all goals

commite0f3d3522f42b18362a751ae859f637f07ef29f6 authorAndreas Abel <andreas.abel@ifi.lmu.de> dateTue 14 Sep 2021, 15:20 (5 years ago) parentf168cd1
2 files changed+17−35
yaml/package.yaml+4−8 yaml/yaml.cabal+13−27
yaml/package.yaml+4−8
@@ -34,7 +34,7 @@ flags:
3434 default: true
3535
3636dependencies:
37−- base >=4.9.1 && <5 # GHC 8.0.2 and later
37+- base >=4.9.1 && <5 # GHC 8.0.2 and later, meaning that Data.Semigroup is in base
3838- bytestring >=0.9.1.4
3939- transformers >=0.1
4040- mtl
@@ -51,15 +51,12 @@ dependencies:
5151- directory
5252- template-haskell
5353- libyaml >=0.1 && <0.2
54−when:
55− condition: "!impl(ghc >= 8.0)"
56− dependencies:
57− - semigroups
54+
55+ghc-options: -Wall -Wcompat
5856
5957library:
6058 other-extensions:
6159 - LambdaCase
62− ghc-options: -Wall
6360 source-dirs: src
6461
6562executables:
@@ -82,7 +79,6 @@ executables:
8279 examples:
8380 main: Main.hs
8481 source-dirs: examples
85− ghc-options: -Wall
8682 when:
8783 - condition: flag(no-examples)
8884 then:
@@ -96,7 +92,7 @@ tests:
9692 spec:
9793 main: Spec.hs
9894 source-dirs: test
99− ghc-options: -Wall "-with-rtsopts=-K1K"
95+ ghc-options: "-with-rtsopts=-K1K"
10096 cpp-options: -DTEST
10197 dependencies:
10298 - hspec >=1.3
yaml/yaml.cabal+13−27
@@ -1,10 +1,8 @@
11cabal-version: 1.12
22
3−-- This file has been generated from package.yaml by hpack version 0.33.0.
3+-- This file has been generated from package.yaml by hpack version 0.34.4.
44--
55-- see: https://github.com/sol/hpack
6−--
7−-- hash: 55c85c8d4d3074a558a82e30a2592ecff9db2e6f1571547c73d26ba44bfc1c20
86
97name: yaml
108version: 0.11.5.0
@@ -62,8 +60,9 @@ library
6260 Paths_yaml
6361 hs-source-dirs:
6462 src
65− other-extensions: LambdaCase
66− ghc-options: -Wall
63+ other-extensions:
64+ LambdaCase
65+ ghc-options: -Wall -Wcompat
6766 build-depends:
6867 aeson >=0.11
6968 , attoparsec >=0.11.3.0
@@ -73,7 +72,7 @@ library
7372 , containers
7473 , directory
7574 , filepath
76− , libyaml >=0.1 && <0.2
75+ , libyaml ==0.1.*
7776 , mtl
7877 , resourcet >=0.3 && <1.3
7978 , scientific >=0.3
@@ -82,9 +81,6 @@ library
8281 , transformers >=0.1
8382 , unordered-containers
8483 , vector
85− if !impl(ghc >= 8.0)
86− build-depends:
87− semigroups
8884 default-language: Haskell2010
8985
9086executable examples
@@ -95,7 +91,7 @@ executable examples
9591 Paths_yaml
9692 hs-source-dirs:
9793 examples
98− ghc-options: -Wall
94+ ghc-options: -Wall -Wcompat
9995 build-depends:
10096 aeson >=0.11
10197 , attoparsec >=0.11.3.0
@@ -105,7 +101,7 @@ executable examples
105101 , containers
106102 , directory
107103 , filepath
108− , libyaml >=0.1 && <0.2
104+ , libyaml ==0.1.*
109105 , mtl
110106 , resourcet >=0.3 && <1.3
111107 , scientific >=0.3
@@ -114,9 +110,6 @@ executable examples
114110 , transformers >=0.1
115111 , unordered-containers
116112 , vector
117− if !impl(ghc >= 8.0)
118− build-depends:
119− semigroups
120113 if flag(no-examples)
121114 buildable: False
122115 else
@@ -131,6 +124,7 @@ executable json2yaml
131124 Paths_yaml
132125 hs-source-dirs:
133126 exe
127+ ghc-options: -Wall -Wcompat
134128 build-depends:
135129 aeson >=0.11
136130 , attoparsec >=0.11.3.0
@@ -140,7 +134,7 @@ executable json2yaml
140134 , containers
141135 , directory
142136 , filepath
143− , libyaml >=0.1 && <0.2
137+ , libyaml ==0.1.*
144138 , mtl
145139 , resourcet >=0.3 && <1.3
146140 , scientific >=0.3
@@ -150,9 +144,6 @@ executable json2yaml
150144 , unordered-containers
151145 , vector
152146 , yaml
153− if !impl(ghc >= 8.0)
154− build-depends:
155− semigroups
156147 if flag(no-exe)
157148 buildable: False
158149 default-language: Haskell2010
@@ -163,6 +154,7 @@ executable yaml2json
163154 Paths_yaml
164155 hs-source-dirs:
165156 exe
157+ ghc-options: -Wall -Wcompat
166158 build-depends:
167159 aeson >=0.11
168160 , attoparsec >=0.11.3.0
@@ -172,7 +164,7 @@ executable yaml2json
172164 , containers
173165 , directory
174166 , filepath
175− , libyaml >=0.1 && <0.2
167+ , libyaml ==0.1.*
176168 , mtl
177169 , resourcet >=0.3 && <1.3
178170 , scientific >=0.3
@@ -182,9 +174,6 @@ executable yaml2json
182174 , unordered-containers
183175 , vector
184176 , yaml
185− if !impl(ghc >= 8.0)
186− build-depends:
187− semigroups
188177 if flag(no-exe)
189178 buildable: False
190179 default-language: Haskell2010
@@ -199,7 +188,7 @@ test-suite spec
199188 Paths_yaml
200189 hs-source-dirs:
201190 test
202− ghc-options: -Wall "-with-rtsopts=-K1K"
191+ ghc-options: -Wall -Wcompat -with-rtsopts=-K1K
203192 cpp-options: -DTEST
204193 build-depends:
205194 HUnit
@@ -213,7 +202,7 @@ test-suite spec
213202 , directory
214203 , filepath
215204 , hspec >=1.3
216− , libyaml >=0.1 && <0.2
205+ , libyaml ==0.1.*
217206 , mockery
218207 , mtl
219208 , raw-strings-qq
@@ -226,7 +215,4 @@ test-suite spec
226215 , unordered-containers
227216 , vector
228217 , yaml
229− if !impl(ghc >= 8.0)
230− build-depends:
231− semigroups
232218 default-language: Haskell2010