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 #-}

stack-lts-12.26.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resolver: lts-12.26
2+
3+
flags:
4+
graphula:
5+
persistent-template: true

stack-lts-12.26.yaml.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was autogenerated by Stack.
2+
# You should not edit this file by hand.
3+
# For more information, please see the documentation at:
4+
# https://docs.haskellstack.org/en/stable/lock_files
5+
6+
packages: []
7+
snapshots:
8+
- completed:
9+
size: 509471
10+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/12/26.yaml
11+
sha256: 95f014df58d0679b1c4a2b7bf2b652b61da8d30de5f571abb0d59015ef678646
12+
original: lts-12.26

stack-lts-14.27.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resolver: lts-14.27
2+
3+
flags:
4+
graphula:
5+
persistent-template: true

stack-lts-14.27.yaml.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was autogenerated by Stack.
2+
# You should not edit this file by hand.
3+
# For more information, please see the documentation at:
4+
# https://docs.haskellstack.org/en/stable/lock_files
5+
6+
packages: []
7+
snapshots:
8+
- completed:
9+
size: 524996
10+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/27.yaml
11+
sha256: 7ea31a280c56bf36ff591a7397cc384d0dff622e7f9e4225b47d8980f019a0f0
12+
original: lts-14.27

stack-lts-16.31.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
resolver: lts-16.31
2+
extra-deps:
3+
- generics-eot-0.4.0.1
4+
5+
flags:
6+
graphula:
7+
persistent-template: true

stack-lts-16.31.yaml.lock

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This file was autogenerated by Stack.
2+
# You should not edit this file by hand.
3+
# For more information, please see the documentation at:
4+
# https://docs.haskellstack.org/en/stable/lock_files
5+
6+
packages:
7+
- completed:
8+
hackage: generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312
9+
pantry-tree:
10+
size: 1384
11+
sha256: 0895826ac5485a85e6fa37ae2b76195872fa2d92e901478c42d0690fc206a5ab
12+
original:
13+
hackage: generics-eot-0.4.0.1
14+
snapshots:
15+
- completed:
16+
size: 534126
17+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/31.yaml
18+
sha256: 637fb77049b25560622a224845b7acfe81a09fdb6a96a3c75997a10b651667f6
19+
original: lts-16.31

stack-lts-18.28.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
resolver: lts-18.28

stack-lts-18.28.yaml.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was autogenerated by Stack.
2+
# You should not edit this file by hand.
3+
# For more information, please see the documentation at:
4+
# https://docs.haskellstack.org/en/stable/lock_files
5+
6+
packages: []
7+
snapshots:
8+
- completed:
9+
size: 590100
10+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml
11+
sha256: 428ec8d5ce932190d3cbe266b9eb3c175cd81e984babf876b64019e2cbe4ea68
12+
original: lts-18.28

stack.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
resolver: lts-17.8
2-
3-
extra-deps:
4-
- generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312
1+
resolver: lts-19.1
52

63
ghc-options:
74
"$locals": -fwrite-ide-info

stack.yaml.lock

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@
33
# For more information, please see the documentation at:
44
# https://docs.haskellstack.org/en/stable/lock_files
55

6-
packages:
7-
- completed:
8-
hackage: generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312
9-
pantry-tree:
10-
size: 1384
11-
sha256: 0895826ac5485a85e6fa37ae2b76195872fa2d92e901478c42d0690fc206a5ab
12-
original:
13-
hackage: generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312
6+
packages: []
147
snapshots:
158
- completed:
16-
size: 565720
17-
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/8.yaml
18-
sha256: 76bf8992ff8dfe6eda9c02f81866138c2369344d5011ab39ae403457c4448b03
19-
original: lts-17.8
9+
size: 617355
10+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/1.yaml
11+
sha256: cbd5e8593869445794924668479b5bd9f1738d075898623dceacc13b2576b6e3
12+
original: lts-19.1

test/README.lhs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ dependencies. We use this interface to generate fixtures for automated testing.
2020
{-# LANGUAGE StandaloneDeriving #-}
2121
{-# LANGUAGE FlexibleInstances #-}
2222
{-# LANGUAGE UndecidableInstances #-}
23-
{-# OPTIONS_GHC -fno-warn-missing-deriving-strategies #-}
2423
{-# OPTIONS_GHC -fno-warn-orphans #-}
2524
2625
module Main (module Main) where

0 commit comments

Comments
 (0)