Skip to content

Commit 3beef13

Browse files
authored
Prepare for the release 0.3.1.0 (#15)
* Prepare for the release 0.3.1.0 * Use newer ghc on ci for mac and windows
1 parent 9edcb75 commit 3beef13

File tree

8 files changed

+31
-22
lines changed

8 files changed

+31
-22
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
- "9.0.2"
2828
- "9.2.1"
2929
exclude:
30-
- os: macOS-latest
31-
ghc: 9.2.1
3230
- os: macOS-latest
3331
ghc: 9.0.2
32+
- os: macOS-latest
33+
ghc: 8.10.7
3434
- os: macOS-latest
3535
ghc: 8.8.4
3636
- os: macOS-latest
@@ -40,10 +40,10 @@ jobs:
4040
- os: macOS-latest
4141
ghc: 8.2.2
4242

43-
- os: windows-latest
44-
ghc: 9.2.1
4543
- os: windows-latest
4644
ghc: 9.0.2
45+
- os: windows-latest
46+
ghc: 8.10.7
4747
- os: windows-latest
4848
ghc: 8.8.4
4949
- os: windows-latest

CHANGELOG.md

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

6-
## Unreleased
6+
## 0.3.1.0 — Feb 15, 2022
77

8-
* Added `WithSeverity` and `mapSeverity` to `Colog.Severity`.
8+
* [#7](https://github.com/co-log/co-log-core/issues/7):
9+
Support GHC-9.2.
10+
* [#13](https://github.com/co-log/co-log-core/issues/13):
11+
Add `WithSeverity` and `mapSeverity` to `Colog.Severity`.
912

1013
## 🎃 0.3.0.0 — Oct 29, 2021
1114

co-log-core.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.4
22
name: co-log-core
3-
version: 0.3.0.0
3+
version: 0.3.1.0
44
synopsis: Composable Contravariant Comonadic Logging Library
55
description:
66
This package provides core types and functions to work with the @LogAction@ data type which is both simple and powerful.
@@ -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 Co-Log
30+
copyright: 2018-2020 Kowainik, 2021-2022 Co-Log
3131
category: Logging, Contravariant, Comonad
3232
build-type: Simple
3333
stability: stable
@@ -38,7 +38,7 @@ tested-with: GHC == 8.2.2
3838
GHC == 8.6.5
3939
GHC == 8.8.4
4040
GHC == 8.10.7
41-
GHC == 9.0.1
41+
GHC == 9.0.2
4242
GHC == 9.2.1
4343

4444
source-repository head

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 Co-Log
3+
Copyright : (c) 2018-2020 Kowainik, 2021-2022 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: 1 addition & 1 deletion
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 Co-Log
10+
Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log
1111
SPDX-License-Identifier : MPL-2.0
1212
Maintainer : Co-Log <[email protected]>
1313
Stability : Stable

src/Colog/Core/Class.hs

Lines changed: 1 addition & 1 deletion
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 Co-Log
7+
Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log
88
SPDX-License-Identifier : MPL-2.0
99
Maintainer : Co-Log <[email protected]>
1010
Stability : Stable

src/Colog/Core/IO.hs

Lines changed: 1 addition & 1 deletion
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
5+
Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log
66
SPDX-License-Identifier : MPL-2.0
77
Maintainer : Co-Log <[email protected]>
88
Stability : Stable

src/Colog/Core/Severity.hs

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

33
{- |
44
Module : Colog.Core.Severity
5-
Copyright : (c) 2018-2020 Kowainik, 2021 Co-Log
5+
Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log
66
SPDX-License-Identifier : MPL-2.0
77
Maintainer : Co-Log <[email protected]>
88
Stability : Stable
@@ -114,26 +114,32 @@ It is common to want to log various types of messages tagged with a severity.
114114
It is easy to 'cmap' over a 'LogAction m (WithSeverity a)', or to filter based on the severity.
115115
116116
@
117-
logSomething :: LogAction m (WithSeverity String) -> m ()
118-
logSomething logger = logger <& "hello" `WithSeverity` Info
117+
logSomething :: 'LogAction' m ('WithSeverity' 'String') -> m ()
118+
logSomething logger = logger <& "hello" \`WithSeverity\` 'Info'
119119
120-
cmap' :: (b -> a) -> LogAction m (WithSeverity a) -> LogAction m (WithSeverity b)
121-
cmap' f action = cmap (fmap f) action
120+
cmap' :: (b -> a) -> 'LogAction' m ('WithSeverity' a) -> 'LogAction' m ('WithSeverity' b)
121+
cmap' f action = 'cmap' ('fmap' f) action
122122
123-
filterBySeverity' :: (Applicative m) => Severity -> LogAction m (WithSeverity a) -> LogAction m (WithSeverity a)
124-
filterBySeverity' threshold action = filterBySeverity threshold getSeverity action
123+
filterBySeverity' :: ('Applicative' m) => 'Severity' -> 'LogAction' m ('WithSeverity' a) -> 'LogAction' m ('WithSeverity' a)
124+
filterBySeverity' threshold action = 'filterBySeverity' threshold 'getSeverity' action
125125
@
126+
127+
@since 0.3.1.0
126128
-}
127129
data WithSeverity msg = WithSeverity { getMsg :: msg , getSeverity :: Severity }
128130
deriving stock (Show, Eq, Ord, Functor, Foldable, Traversable)
129131

130132
{- | Map the given function over the severity of a 'WithSeverity'.
131133
132134
This can be useful to operate generically over the severity, for example:
135+
133136
@
134-
suppressErrors :: LogAction m (WithSeverity msg) -> LogAction m (WithSeverity msg)
135-
suppressErrors = cmap (mapSeverity (\s -> if s == Error then Warning else s))
137+
suppressErrors :: 'LogAction' m ('WithSeverity' msg) -> 'LogAction' m ('WithSeverity' msg)
138+
suppressErrors = 'cmap' ('mapSeverity' (\s -> if s == 'Error' then 'Warning' else s))
136139
@
140+
141+
@since 0.3.1.0
137142
-}
138143
mapSeverity :: (Severity -> Severity) -> WithSeverity msg -> WithSeverity msg
139144
mapSeverity f (WithSeverity msg sev) = WithSeverity msg (f sev)
145+
{-# INLINE mapSeverity #-}

0 commit comments

Comments
 (0)