Skip to content

Commit 24b55f6

Browse files
committed
Extend GHCs tested on CI
This required some hackery in package.yaml to configure warnings and dependencies across versions, but not much in the actual code (e.g. CPP), so that's good.
1 parent 0a174cb commit 24b55f6

21 files changed

+161
-56
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,43 @@ on:
88
jobs:
99
test:
1010
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
stack-yaml:
15+
- stack.yaml # ghc-9.0
16+
- stack-lts-18.28.yaml # ghc-8.10
17+
- stack-lts-16.31.yaml # ghc-8.8
18+
- stack-lts-14.27.yaml # ghc-8.6
19+
- stack-lts-12.26.yaml # ghc-8.4
20+
fail-fast: false
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: freckle/stack-cache-action@v2
25+
with:
26+
stack-yaml: ${{ matrix.stack-yaml }}
27+
- uses: freckle/stack-action@v3
28+
with:
29+
stack-yaml: ${{ matrix.stack-yaml }}
30+
31+
lint:
32+
runs-on: ubuntu-latest
1133
steps:
1234
- uses: actions/checkout@v2
13-
- uses: freckle/stack-cache-action@v1
14-
- uses: freckle/stack-action@main
35+
- uses: rwe/actions-hlint-setup@v1
36+
- uses: rwe/actions-hlint-run@v2
37+
with:
38+
fail-on: warning
39+
40+
nightly:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: freckle/stack-cache-action@v2
45+
with:
46+
stack-yaml: stack-nightly.yaml
47+
- uses: freckle/stack-action@v3
1548
with:
16-
weeder: false
49+
stack-yaml: stack-nightly.yaml
50+
stack-arguments: --resolver nightly

graphula.cabal

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ cabal-version: 1.12
44
--
55
-- see: https://github.com/sol/hpack
66
--
7-
-- hash: fbf7a7a0f44dad0ea63d4f70b57442153982e960d839d2ab2c38d9ad0d40114e
7+
-- hash: f07abca9cc4e0e29ae8560a745c8b2cc86944deeb041585db5d70a2aa3fea027
88

99
name: graphula
1010
version: 2.0.1.0
@@ -25,6 +25,11 @@ source-repository head
2525
type: git
2626
location: https://github.com/freckle/graphula
2727

28+
flag persistent-template
29+
description: Include dependency on persistent-template
30+
manual: False
31+
default: False
32+
2833
library
2934
exposed-modules:
3035
Graphula
@@ -41,7 +46,7 @@ library
4146
Paths_graphula
4247
hs-source-dirs:
4348
src
44-
ghc-options: -Weverything -Wno-unsafe -Wno-safe -Wno-missing-import-lists -Wno-implicit-prelude
49+
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe
4550
build-depends:
4651
HUnit
4752
, QuickCheck
@@ -55,11 +60,12 @@ library
5560
, semigroups
5661
, temporary
5762
, text
58-
, transformers
5963
, unliftio
6064
, unliftio-core
6165
if impl(ghc >= 8.10)
6266
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
67+
if impl(ghc < 8.6)
68+
ghc-options: -Wno-redundant-constraints
6369
default-language: Haskell2010
6470

6571
test-suite readme
@@ -69,27 +75,27 @@ test-suite readme
6975
Paths_graphula
7076
hs-source-dirs:
7177
test
72-
ghc-options: -Weverything -Wno-unsafe -Wno-safe -Wno-missing-import-lists -Wno-implicit-prelude -pgmL markdown-unlit
78+
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe -pgmL markdown-unlit
7379
build-depends:
7480
QuickCheck
75-
, aeson
7681
, base <5
77-
, bytestring
78-
, containers
7982
, generic-arbitrary
8083
, graphula
8184
, hspec
82-
, http-api-data
8385
, markdown-unlit
8486
, monad-logger
85-
, path-pieces
8687
, persistent
8788
, persistent-sqlite
88-
, persistent-template
8989
, resourcet
90-
, text
9190
, transformers
9291
, unliftio-core
9392
if impl(ghc >= 8.10)
9493
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
94+
if impl(ghc < 8.6)
95+
ghc-options: -Wno-redundant-constraints
96+
if impl(ghc >= 8.8)
97+
ghc-options: -Wno-missing-deriving-strategies
98+
if flag(persistent-template)
99+
build-depends:
100+
persistent-template
95101
default-language: Haskell2010

package.yaml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,21 @@ extra-source-files:
1212
- CHANGELOG.md
1313

1414
ghc-options:
15-
-Weverything
16-
-Wno-unsafe
17-
-Wno-safe
18-
-Wno-missing-import-lists
19-
-Wno-implicit-prelude
15+
- -Weverything
16+
- -Wno-all-missed-specialisations
17+
- -Wno-implicit-prelude
18+
- -Wno-missing-import-lists
19+
- -Wno-safe
20+
- -Wno-unsafe
2021

2122
when:
22-
condition: impl(ghc >= 8.10)
23-
ghc-options:
24-
-Wno-missing-safe-haskell-mode
25-
-Wno-prepositive-qualified-module
23+
- condition: impl(ghc >= 8.10)
24+
ghc-options:
25+
- -Wno-missing-safe-haskell-mode
26+
- -Wno-prepositive-qualified-module
27+
- condition: impl(ghc < 8.6)
28+
ghc-options:
29+
- -Wno-redundant-constraints
2630

2731
dependencies:
2832
- base < 5
@@ -42,7 +46,6 @@ library:
4246
- semigroups
4347
- temporary
4448
- text
45-
- transformers
4649
- unliftio
4750
- unliftio-core
4851

@@ -52,22 +55,30 @@ tests:
5255
ghc-options: -pgmL markdown-unlit
5356
source-dirs:
5457
- test
58+
5559
dependencies:
5660
- QuickCheck
57-
- aeson
58-
- bytestring
59-
- containers
6061
- generic-arbitrary
6162
- graphula
6263
- hspec
63-
- http-api-data
6464
- markdown-unlit
6565
- monad-logger
66-
- path-pieces
6766
- persistent
6867
- persistent-sqlite
69-
- persistent-template
7068
- resourcet
71-
- text
7269
- transformers
7370
- unliftio-core
71+
72+
when:
73+
- condition: impl(ghc >= 8.8)
74+
ghc-options:
75+
- -Wno-missing-deriving-strategies
76+
- condition: "flag(persistent-template)"
77+
dependencies:
78+
- persistent-template
79+
80+
flags:
81+
persistent-template:
82+
description: Include dependency on persistent-template
83+
manual: false
84+
default: false

src/Graphula.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
{-# LANGUAGE InstanceSigs #-}
1010
{-# LANGUAGE LambdaCase #-}
1111
{-# LANGUAGE MultiParamTypeClasses #-}
12-
{-# LANGUAGE NoStarIsType #-}
1312
{-# LANGUAGE OverloadedStrings #-}
1413
{-# LANGUAGE PolyKinds #-}
1514
{-# LANGUAGE RankNTypes #-}

src/Graphula/Class.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
{-# LANGUAGE FlexibleContexts #-}
55
{-# LANGUAGE FlexibleInstances #-}
66
{-# LANGUAGE MultiParamTypeClasses #-}
7-
{-# LANGUAGE NoStarIsType #-}
87
{-# LANGUAGE ScopedTypeVariables #-}
98
{-# LANGUAGE TypeFamilies #-}
109
{-# LANGUAGE TypeOperators #-}

src/Graphula/Dependencies.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
{-# LANGUAGE FlexibleInstances #-}
1010
{-# LANGUAGE GADTs #-}
1111
{-# LANGUAGE MultiParamTypeClasses #-}
12-
{-# LANGUAGE NoStarIsType #-}
1312
{-# LANGUAGE PolyKinds #-}
1413
{-# LANGUAGE RankNTypes #-}
1514
{-# LANGUAGE ScopedTypeVariables #-}

src/Graphula/Dependencies/Generic.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
{-# LANGUAGE FlexibleContexts #-}
55
{-# LANGUAGE FlexibleInstances #-}
66
{-# LANGUAGE MultiParamTypeClasses #-}
7-
{-# LANGUAGE NoStarIsType #-}
87
{-# LANGUAGE ScopedTypeVariables #-}
98
{-# LANGUAGE TypeFamilies #-}
109
{-# LANGUAGE TypeOperators #-}

src/Graphula/Idempotent.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
99
{-# LANGUAGE InstanceSigs #-}
1010
{-# LANGUAGE MultiParamTypeClasses #-}
11-
{-# LANGUAGE NoStarIsType #-}
12-
{-# LANGUAGE OverloadedStrings #-}
1311
{-# LANGUAGE PolyKinds #-}
1412
{-# LANGUAGE RankNTypes #-}
1513
{-# LANGUAGE ScopedTypeVariables #-}

src/Graphula/Logged.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
{-# LANGUAGE GADTs #-}
88
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
99
{-# LANGUAGE MultiParamTypeClasses #-}
10-
{-# LANGUAGE NoStarIsType #-}
1110
{-# LANGUAGE OverloadedStrings #-}
1211
{-# LANGUAGE PolyKinds #-}
1312
{-# LANGUAGE RankNTypes #-}

src/Graphula/Node.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
{-# LANGUAGE InstanceSigs #-}
1010
{-# LANGUAGE LambdaCase #-}
1111
{-# LANGUAGE MultiParamTypeClasses #-}
12-
{-# LANGUAGE NoStarIsType #-}
1312
{-# LANGUAGE PolyKinds #-}
1413
{-# LANGUAGE RankNTypes #-}
1514
{-# LANGUAGE RecordWildCards #-}

0 commit comments

Comments
 (0)