Skip to content

Commit 304f587

Browse files
vrom911alaendle
andauthored
[#29] Support GHC 9.6 (#33)
* [#29] Support GHC 9.6 Resolves #29 * Enable CI * Use unreleased in the CHANGELOG * No version bump yet. --------- Co-authored-by: Andreas Ländle <[email protected]>
1 parent d5f665f commit 304f587

File tree

7 files changed

+111
-96
lines changed

7 files changed

+111
-96
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,22 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [ubuntu-latest, macOS-latest, windows-latest]
20-
cabal: ["3.8"]
20+
cabal: ['latest']
2121
ghc:
22-
- "8.2.2"
23-
- "8.4.4"
24-
- "8.6.5"
25-
- "8.8.4"
26-
- "8.10.7"
27-
- "9.0.2"
28-
- "9.2.4"
29-
- "9.4.2"
22+
- '8.2.2'
23+
- '8.4.4'
24+
- '8.6.5'
25+
- '8.8.4'
26+
- '8.10.7'
27+
- '9.0.2'
28+
- '9.2.8'
29+
- '9.4.7'
30+
- '9.6.2'
3031
exclude:
3132
- os: macOS-latest
32-
ghc: 9.2.4
33+
ghc: 9.4.7
34+
- os: macOS-latest
35+
ghc: 9.2.8
3336
- os: macOS-latest
3437
ghc: 9.0.2
3538
- os: macOS-latest
@@ -44,7 +47,9 @@ jobs:
4447
ghc: 8.2.2
4548

4649
- os: windows-latest
47-
ghc: 9.2.4
50+
ghc: 9.4.7
51+
- os: windows-latest
52+
ghc: 9.2.8
4853
- os: windows-latest
4954
ghc: 9.0.2
5055
- os: windows-latest
@@ -59,41 +64,41 @@ jobs:
5964
ghc: 8.2.2
6065

6166
steps:
62-
- uses: actions/checkout@v4
67+
- uses: actions/checkout@v4
6368

64-
- uses: haskell/actions/setup@v2
65-
id: setup-haskell-cabal
66-
name: Setup Haskell
67-
with:
68-
ghc-version: ${{ matrix.ghc }}
69-
cabal-version: ${{ matrix.cabal }}
69+
- uses: haskell/actions/setup@v2
70+
id: setup-haskell-cabal
71+
name: Setup Haskell
72+
with:
73+
ghc-version: ${{ matrix.ghc }}
74+
cabal-version: ${{ matrix.cabal }}
7075

71-
- name: Configure
72-
run: |
73-
cabal configure --enable-tests --enable-benchmarks --enable-documentation --test-show-details=direct --write-ghc-environment-files=always
76+
- name: Configure
77+
run: |
78+
cabal configure --enable-tests --enable-benchmarks --enable-documentation --test-show-details=direct --write-ghc-environment-files=always
7479
75-
- name: Freeze
76-
run: |
77-
cabal freeze
80+
- name: Freeze
81+
run: |
82+
cabal freeze
7883
79-
- uses: actions/cache@v3
80-
name: Cache ~/.cabal/store
81-
with:
82-
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
83-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
84+
- uses: actions/cache@v3
85+
name: Cache ~/.cabal/store
86+
with:
87+
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
88+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
8489

85-
- name: Install dependencies
86-
run: |
87-
cabal build all --only-dependencies
90+
- name: Install dependencies
91+
run: |
92+
cabal build all --only-dependencies
8893
89-
- name: Build
90-
run: |
91-
cabal build all
94+
- name: Build
95+
run: |
96+
cabal build all
9297
93-
- name: Test
94-
run: |
95-
cabal test all
98+
- name: Test
99+
run: |
100+
cabal test all
96101
97-
- name: Documentation
98-
run: |
99-
cabal haddock
102+
- name: Documentation
103+
run: |
104+
cabal haddock

CHANGELOG.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,102 +3,107 @@
33
`co-log-core` uses [PVP Versioning][1].
44
The change log is available [on GitHub][2].
55

6+
## 0.x.y.z — Unreleased
7+
8+
- [#29](https://github.com/co-log/co-log-core/issues/29):
9+
Support GHC-9.6.
10+
611
## 0.3.2.0 — Nov 2, 2022
712

8-
* [#25](https://github.com/co-log/co-log-core/issues/25):
13+
- [#25](https://github.com/co-log/co-log-core/issues/25):
914
Support GHC-9.4.
1015

1116
## 0.3.1.0 — Feb 15, 2022
1217

13-
* [#7](https://github.com/co-log/co-log-core/issues/7):
18+
- [#7](https://github.com/co-log/co-log-core/issues/7):
1419
Support GHC-9.2.
15-
* [#13](https://github.com/co-log/co-log-core/issues/13):
20+
- [#13](https://github.com/co-log/co-log-core/issues/13):
1621
Add `WithSeverity` and `mapSeverity` to `Colog.Severity`.
1722

1823
## 🎃 0.3.0.0 — Oct 29, 2021
1924

20-
* [#223](https://github.com/co-log/co-log/pull/223):
25+
- [#223](https://github.com/co-log/co-log/pull/223):
2126
Support GHC-9.0.1.
22-
* [#176](https://github.com/co-log/co-log/issues/176):
27+
- [#176](https://github.com/co-log/co-log/issues/176):
2328
Add `logFlush` action to flush the given `Handle`.
2429

25-
__Breaking change:__ All `withLog*File` functions how flush handle
30+
**Breaking change:** All `withLog*File` functions how flush handle
2631
after logging each message. Now you'll see logs in the file
2732
immediately.
2833

29-
__Migration guide:__ If you rely on the previous behaviour, then
34+
**Migration guide:** If you rely on the previous behaviour, then
3035
copy-paste corresponding functions and remove flushing.
3136

32-
* Update maintainers information to the new
37+
- Update maintainers information to the new
3338
[Co-Log](https://github.com/co-log) organization.
3439

3540
## 0.2.1.1 — Apr 18, 2020
3641

37-
* [#186](https://github.com/kowainik/co-log/issues/186):
42+
- [#186](https://github.com/kowainik/co-log/issues/186):
3843
Support GHC-8.10.1.
3944

4045
## 0.2.1.0 — Jan 19, 2020
4146

42-
* [#139](https://github.com/kowainik/co-log/issues/139):
47+
- [#139](https://github.com/kowainik/co-log/issues/139):
4348
Add (unrepresentable) `Functor` instance for `LogAction` with the
4449
custom type-error.
4550
(by [@vrom911](https://github.com/vrom911))
46-
* [#148](https://github.com/kowainik/co-log/issues/148):
51+
- [#148](https://github.com/kowainik/co-log/issues/148):
4752
Support GHC-8.8.2.
4853
(by [@chshersh](https://github.com/chshersh))
49-
* [#122](https://github.com/kowainik/co-log/issues/122):
54+
- [#122](https://github.com/kowainik/co-log/issues/122):
5055
Add the `separate` combinator.
5156
(by [@vrom911](https://github.com/vrom911))
52-
* [#125](https://github.com/kowainik/co-log/issues/125):
57+
- [#125](https://github.com/kowainik/co-log/issues/125):
5358
Add monadic versions of contravariant functions.
5459
(by [@piq9117](https://github.com/piq9117))
55-
* [#138](https://github.com/kowainik/co-log/issues/138):
60+
- [#138](https://github.com/kowainik/co-log/issues/138):
5661
Add `hoistLogAction` — higher-order transformation function.
5762
(by [@jiribenes](https://github.com/jiribenes))
58-
* [#123](https://github.com/kowainik/co-log/issues/123):
63+
- [#123](https://github.com/kowainik/co-log/issues/123):
5964
Write default implementation to `getLogAction` via `logActionL`.
6065
(by [@SanchayanMaity](https://github.com/SanchayanMaity))
6166

6267
## 0.2.0.0 — May 5, 2019
6368

64-
* [#85](https://github.com/kowainik/co-log/issues/85):
69+
- [#85](https://github.com/kowainik/co-log/issues/85):
6570
Move `overLogAction` to `HasLog` typeclass
66-
* [#101](https://github.com/kowainik/co-log/issues/101):
71+
- [#101](https://github.com/kowainik/co-log/issues/101):
6772
Add `logActionL` lens with default implementation to `HasLog` type class.
68-
* [#99](https://github.com/kowainik/co-log/issues/99):
73+
- [#99](https://github.com/kowainik/co-log/issues/99):
6974
Add comonadic combinators: `duplicate` and `multiplicate`.
70-
* [#78](https://github.com/kowainik/co-log/issues/78):
75+
- [#78](https://github.com/kowainik/co-log/issues/78):
7176
Improve documentation significantly.
7277

7378
## 0.1.1 — Nov 15, 2018
7479

75-
* [#63](https://github.com/kowainik/co-log/issues/63):
80+
- [#63](https://github.com/kowainik/co-log/issues/63):
7681
Add `logPrint`, `logPrintStderr`, `logPrintHandle` and `withLogPrintFile` to `Colog.Core.IO`.
77-
* [#46](https://github.com/kowainik/co-log/issues/46):
82+
- [#46](https://github.com/kowainik/co-log/issues/46):
7883
Moves `logStringStdout`, `logStringStderr`, `logStringHandle`,
7984
`withLogStringFile` from `Colog.Actions` to `Colog.Core.IO`.
80-
* [#48](https://github.com/kowainik/co-log/issues/48):
85+
- [#48](https://github.com/kowainik/co-log/issues/48):
8186
Adds `liftLogIO` function.
82-
* [#49](https://github.com/kowainik/co-log/issues/49):
87+
- [#49](https://github.com/kowainik/co-log/issues/49):
8388
Add `<&` and `&>`operators for `unLogAction`.
84-
* [#47](https://github.com/kowainik/co-log/issues/47):
89+
- [#47](https://github.com/kowainik/co-log/issues/47):
8590
Add `doctest` tests.
86-
* [#13](https://github.com/kowainik/co-log/issues/13):
91+
- [#13](https://github.com/kowainik/co-log/issues/13):
8792
Add `.cabal` file description and improve documentation.
88-
* [#39](https://github.com/kowainik/co-log/issues/39):
93+
- [#39](https://github.com/kowainik/co-log/issues/39):
8994
Support GHC-8.2.2 and GHC-8.6.2.
9095

9196
## 0.1.0
9297

93-
* [#38](https://github.com/kowainik/co-log/issues/38):
98+
- [#38](https://github.com/kowainik/co-log/issues/38):
9499
Rename `cbind` to `cmapM`.
95100

96-
* [#37](https://github.com/kowainik/co-log/issues/37):
101+
- [#37](https://github.com/kowainik/co-log/issues/37):
97102
Add `base` bounds.
98103

99104
## 0.0.0
100105

101-
* Initially created.
106+
- Initially created.
102107

103108
[1]: https://pvp.haskell.org
104109
[2]: https://github.com/kowainik/co-log/releases

co-log-core.cabal

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ license: MPL-2.0
2727
license-file: LICENSE
2828
author: Dmitrii Kovanikov
2929
maintainer: Kowainik <[email protected]>
30-
copyright: 2018-2020 Kowainik, 2021-2022 Co-Log
30+
copyright: 2018-2020 Kowainik, 2021-2023 Co-Log
3131
category: Logging, Contravariant, Comonad
3232
build-type: Simple
3333
stability: stable
@@ -39,15 +39,16 @@ tested-with: GHC == 8.2.2
3939
GHC == 8.8.4
4040
GHC == 8.10.7
4141
GHC == 9.0.2
42-
GHC == 9.2.4
43-
GHC == 9.4.2
42+
GHC == 9.2.8
43+
GHC == 9.4.7
44+
GHC == 9.6.2
4445

4546
source-repository head
4647
type: git
4748
location: https://github.com/co-log/co-log-core.git
4849

4950
common common-options
50-
build-depends: base >= 4.10.1.0 && < 4.18
51+
build-depends: base >= 4.10.1.0 && < 4.19
5152

5253
ghc-options: -Wall
5354
-Wcompat
@@ -69,6 +70,9 @@ common common-options
6970
if impl(ghc >= 9.2)
7071
ghc-options: -Wredundant-bang-patterns
7172
-Woperator-whitespace
73+
if impl(ghc >= 9.4)
74+
ghc-options: -Wredundant-strictness-flags
75+
-Wforall-identifier
7276

7377
default-language: Haskell2010
7478
default-extensions: ConstraintKinds

src/Colog/Core.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{- |
22
Module : Colog.Core
3-
Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log
3+
Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log
44
SPDX-License-Identifier : MPL-2.0
55
Maintainer : Co-Log <[email protected]>
66
Stability : Stable

src/Colog/Core/Action.hs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
{- |
99
Module : Colog.Core.Action
10-
Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log
10+
Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log
1111
SPDX-License-Identifier : MPL-2.0
1212
Maintainer : Co-Log <[email protected]>
1313
Stability : Stable
@@ -66,15 +66,15 @@ module Colog.Core.Action
6666
, hoistLogAction
6767
) where
6868

69-
import Control.Monad (when, (<=<), (>=>))
70-
import Data.Coerce (coerce)
71-
import Data.Foldable (fold, for_, traverse_)
72-
import Data.Kind (Constraint)
73-
import Data.List.NonEmpty (NonEmpty (..))
74-
import Data.Monoid (Monoid (..))
75-
import Data.Semigroup (Semigroup (..), stimesMonoid)
76-
import Data.Void (Void, absurd)
77-
import GHC.TypeLits (ErrorMessage (..), TypeError)
69+
import Control.Monad (when, (<=<), (>=>))
70+
import Data.Coerce (coerce)
71+
import Data.Foldable (fold, for_, traverse_)
72+
import Data.Kind (Constraint)
73+
import Data.List.NonEmpty (NonEmpty (..))
74+
import Data.Monoid (Monoid (..))
75+
import Data.Semigroup (Semigroup (..), stimesMonoid)
76+
import Data.Void (Void, absurd)
77+
import GHC.TypeLits (ErrorMessage (..), TypeError)
7878

7979
#if MIN_VERSION_base(4,12,0)
8080
import qualified Data.Functor.Contravariant as Contravariant
@@ -167,12 +167,12 @@ type family UnrepresentableClass :: Constraint
167167
where
168168
UnrepresentableClass = TypeError
169169
( 'Text "'LogAction' cannot have a 'Functor' instance by design."
170-
':$$: 'Text "However, you've attempted to use this instance."
170+
' :$$: 'Text "However, you've attempted to use this instance."
171171
#if MIN_VERSION_base(4,12,0)
172-
':$$: 'Text ""
173-
':$$: 'Text "Probably you meant 'Contravariant' class instance with the following methods:"
174-
':$$: 'Text " * contramap :: (a -> b) -> LogAction m b -> LogAction m a"
175-
':$$: 'Text " * (>$) :: b -> LogAction m b -> LogAction m a"
172+
' :$$: 'Text ""
173+
' :$$: 'Text "Probably you meant 'Contravariant' class instance with the following methods:"
174+
' :$$: 'Text " * contramap :: (a -> b) -> LogAction m b -> LogAction m a"
175+
' :$$: 'Text " * (>$) :: b -> LogAction m b -> LogAction m a"
176176
#endif
177177
)
178178

src/Colog/Core/Class.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{- |
66
Module : Colog.Core.Class
7-
Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log
7+
Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log
88
SPDX-License-Identifier : MPL-2.0
99
Maintainer : Co-Log <[email protected]>
1010
Stability : Stable
@@ -21,7 +21,7 @@ module Colog.Core.Class
2121
, Lens'
2222
) where
2323

24-
import Colog.Core.Action (LogAction)
24+
import Colog.Core.Action (LogAction)
2525
import Data.Functor.Const (Const (..))
2626

2727

src/Colog/Core/IO.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{- |
44
Module : Colog.Core.IO
5-
Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log
5+
Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log
66
SPDX-License-Identifier : MPL-2.0
77
Maintainer : Co-Log <[email protected]>
88
Stability : Stable
@@ -33,10 +33,11 @@ module Colog.Core.IO
3333
, logFlush
3434
) where
3535

36-
import Colog.Core.Action (LogAction (..))
36+
import Colog.Core.Action (LogAction (..))
3737
import Control.Monad.IO.Class (MonadIO, liftIO)
38-
import Data.Semigroup ((<>))
39-
import System.IO (Handle, IOMode (AppendMode), hFlush, hPrint, hPutStrLn, stderr, withFile)
38+
import Data.Semigroup ((<>))
39+
import System.IO (Handle, IOMode (AppendMode), hFlush, hPrint,
40+
hPutStrLn, stderr, withFile)
4041

4142

4243
{- $setup

0 commit comments

Comments
 (0)