co-log-core 0.3.2.0 → 0.3.2.1
raw patch · 8 files changed
+80/−60 lines, 8 filesdep ~basenew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- CHANGELOG.md +44/−30
- README.md +1/−1
- co-log-core.cabal +11/−6
- src/Colog/Core.hs +1/−1
- src/Colog/Core/Action.hs +15/−15
- src/Colog/Core/Class.hs +2/−2
- src/Colog/Core/IO.hs +5/−4
- src/Colog/Core/Severity.hs +1/−1
CHANGELOG.md view
@@ -3,102 +3,116 @@ `co-log-core` uses [PVP Versioning][1]. The change log is available [on GitHub][2]. +## 0.3.2.1 — Oct 20, 2023++## What's Changed+* Relax doctest boundaries. by @alaendle in [#32](https://github.com/co-log/co-log-core/pull/32)+* GA(deps): Bump actions/checkout from 3 to 4 by @dependabot in [#35](https://github.com/co-log/co-log-core/pull/35)+* Allow doctest-0.22 by @Vekhir in [#36](https://github.com/co-log/co-log-core/pull/36)+* [#29] Support GHC 9.6 by @vrom911 in [#33](https://github.com/co-log/co-log-core/pull/33)+* Support ghc-9.8 by @alaendle in [#37](https://github.com/co-log/co-log-core/pull/37)+* Publish to hackage directly from GitHub by @alaendle in [#38](https://github.com/co-log/co-log-core/pull/38)++## New Contributors+* @Vekhir made their first contribution in https://github.com/co-log/co-log-core/pull/36++**Full Changelog**: https://github.com/co-log/co-log-core/compare/v0.3.2.0...v0.3.2.1 ## 0.3.2.0 — Nov 2, 2022 -* [#25](https://github.com/co-log/co-log-core/issues/25):+- [#25](https://github.com/co-log/co-log-core/issues/25): Support GHC-9.4. ## 0.3.1.0 — Feb 15, 2022 -* [#7](https://github.com/co-log/co-log-core/issues/7):+- [#7](https://github.com/co-log/co-log-core/issues/7): Support GHC-9.2.-* [#13](https://github.com/co-log/co-log-core/issues/13):+- [#13](https://github.com/co-log/co-log-core/issues/13): Add `WithSeverity` and `mapSeverity` to `Colog.Severity`. ## 🎃 0.3.0.0 — Oct 29, 2021 -* [#223](https://github.com/co-log/co-log/pull/223):+- [#223](https://github.com/co-log/co-log/pull/223): Support GHC-9.0.1.-* [#176](https://github.com/co-log/co-log/issues/176):+- [#176](https://github.com/co-log/co-log/issues/176): Add `logFlush` action to flush the given `Handle`. - __Breaking change:__ All `withLog*File` functions how flush handle+ **Breaking change:** All `withLog*File` functions how flush handle after logging each message. Now you'll see logs in the file immediately. - __Migration guide:__ If you rely on the previous behaviour, then+ **Migration guide:** If you rely on the previous behaviour, then copy-paste corresponding functions and remove flushing. -* Update maintainers information to the new+- Update maintainers information to the new [Co-Log](https://github.com/co-log) organization. ## 0.2.1.1 — Apr 18, 2020 -* [#186](https://github.com/kowainik/co-log/issues/186):+- [#186](https://github.com/co-log/co-log/issues/186): Support GHC-8.10.1. ## 0.2.1.0 — Jan 19, 2020 -* [#139](https://github.com/kowainik/co-log/issues/139):+- [#139](https://github.com/co-log/co-log/issues/139): Add (unrepresentable) `Functor` instance for `LogAction` with the custom type-error. (by [@vrom911](https://github.com/vrom911))-* [#148](https://github.com/kowainik/co-log/issues/148):+- [#148](https://github.com/co-log/co-log/issues/148): Support GHC-8.8.2. (by [@chshersh](https://github.com/chshersh))-* [#122](https://github.com/kowainik/co-log/issues/122):+- [#122](https://github.com/co-log/co-log/issues/122): Add the `separate` combinator. (by [@vrom911](https://github.com/vrom911))-* [#125](https://github.com/kowainik/co-log/issues/125):+- [#125](https://github.com/co-log/co-log/issues/125): Add monadic versions of contravariant functions. (by [@piq9117](https://github.com/piq9117))-* [#138](https://github.com/kowainik/co-log/issues/138):+- [#138](https://github.com/co-log/co-log/issues/138): Add `hoistLogAction` — higher-order transformation function. (by [@jiribenes](https://github.com/jiribenes))-* [#123](https://github.com/kowainik/co-log/issues/123):+- [#123](https://github.com/co-log/co-log/issues/123): Write default implementation to `getLogAction` via `logActionL`. (by [@SanchayanMaity](https://github.com/SanchayanMaity)) ## 0.2.0.0 — May 5, 2019 -* [#85](https://github.com/kowainik/co-log/issues/85):+- [#85](https://github.com/co-log/co-log/issues/85): Move `overLogAction` to `HasLog` typeclass-* [#101](https://github.com/kowainik/co-log/issues/101):+- [#101](https://github.com/co-log/co-log/issues/101): Add `logActionL` lens with default implementation to `HasLog` type class.-* [#99](https://github.com/kowainik/co-log/issues/99):+- [#99](https://github.com/co-log/co-log/issues/99): Add comonadic combinators: `duplicate` and `multiplicate`.-* [#78](https://github.com/kowainik/co-log/issues/78):+- [#78](https://github.com/co-log/co-log/issues/78): Improve documentation significantly. ## 0.1.1 — Nov 15, 2018 -* [#63](https://github.com/kowainik/co-log/issues/63):+- [#63](https://github.com/co-log/co-log/issues/63): Add `logPrint`, `logPrintStderr`, `logPrintHandle` and `withLogPrintFile` to `Colog.Core.IO`.-* [#46](https://github.com/kowainik/co-log/issues/46):+- [#46](https://github.com/co-log/co-log/issues/46): Moves `logStringStdout`, `logStringStderr`, `logStringHandle`, `withLogStringFile` from `Colog.Actions` to `Colog.Core.IO`.-* [#48](https://github.com/kowainik/co-log/issues/48):+- [#48](https://github.com/co-log/co-log/issues/48): Adds `liftLogIO` function.-* [#49](https://github.com/kowainik/co-log/issues/49):+- [#49](https://github.com/co-log/co-log/issues/49): Add `<&` and `&>`operators for `unLogAction`.-* [#47](https://github.com/kowainik/co-log/issues/47):+- [#47](https://github.com/co-log/co-log/issues/47): Add `doctest` tests.-* [#13](https://github.com/kowainik/co-log/issues/13):+- [#13](https://github.com/co-log/co-log/issues/13): Add `.cabal` file description and improve documentation.-* [#39](https://github.com/kowainik/co-log/issues/39):+- [#39](https://github.com/co-log/co-log/issues/39): Support GHC-8.2.2 and GHC-8.6.2. ## 0.1.0 -* [#38](https://github.com/kowainik/co-log/issues/38):+- [#38](https://github.com/co-log/co-log/issues/38): Rename `cbind` to `cmapM`. -* [#37](https://github.com/kowainik/co-log/issues/37):+- [#37](https://github.com/co-log/co-log/issues/37): Add `base` bounds. ## 0.0.0 -* Initially created.+- Initially created. [1]: https://pvp.haskell.org-[2]: https://github.com/kowainik/co-log/releases+[2]: https://github.com/co-log/co-log-core/releases
README.md view
@@ -4,7 +4,7 @@ [](https://github.com/co-log/co-log-core/actions) [![Hackage][hk-img-core]][hk-core]-[](https://github.com/kowainik/co-log/blob/main/LICENSE)+[](https://github.com/co-log/co-log/blob/main/LICENSE) `co-log-core` is a lightweight package that provides core types and functions to work with the @LogAction@ data type which is both simple and powerful.
co-log-core.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: co-log-core-version: 0.3.2.0+version: 0.3.2.1 synopsis: Composable Contravariant Comonadic Logging Library description: 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-file: LICENSE author: Dmitrii Kovanikov maintainer: Kowainik <xrom.xkov@gmail.com>-copyright: 2018-2020 Kowainik, 2021-2022 Co-Log+copyright: 2018-2020 Kowainik, 2021-2023 Co-Log category: Logging, Contravariant, Comonad build-type: Simple stability: stable@@ -39,15 +39,17 @@ GHC == 8.8.4 GHC == 8.10.7 GHC == 9.0.2- GHC == 9.2.4- GHC == 9.4.2+ GHC == 9.2.8+ GHC == 9.4.7+ GHC == 9.6.3+ GHC == 9.8.1 source-repository head type: git location: https://github.com/co-log/co-log-core.git common common-options- build-depends: base >= 4.10.1.0 && < 4.18+ build-depends: base >= 4.10.1.0 && < 4.20 ghc-options: -Wall -Wcompat@@ -69,6 +71,9 @@ if impl(ghc >= 9.2) ghc-options: -Wredundant-bang-patterns -Woperator-whitespace+ if impl(ghc >= 9.4)+ ghc-options: -Wredundant-strictness-flags+ -Wforall-identifier default-language: Haskell2010 default-extensions: ConstraintKinds@@ -101,5 +106,5 @@ type: exitcode-stdio-1.0 hs-source-dirs: test main-is: Doctests.hs- build-depends: doctest >= 0.16.0 && < 0.21+ build-depends: doctest >= 0.16.0 && < 0.23 , Glob ^>= 0.10.0
src/Colog/Core.hs view
@@ -1,6 +1,6 @@ {- | Module : Colog.Core-Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log+Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log SPDX-License-Identifier : MPL-2.0 Maintainer : Co-Log <xrom.xkov@gmail.com> Stability : Stable
src/Colog/Core/Action.hs view
@@ -7,7 +7,7 @@ {- | Module : Colog.Core.Action-Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log+Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log SPDX-License-Identifier : MPL-2.0 Maintainer : Co-Log <xrom.xkov@gmail.com> Stability : Stable@@ -66,15 +66,15 @@ , hoistLogAction ) where -import Control.Monad (when, (<=<), (>=>))-import Data.Coerce (coerce)-import Data.Foldable (fold, for_, traverse_)-import Data.Kind (Constraint)-import Data.List.NonEmpty (NonEmpty (..))-import Data.Monoid (Monoid (..))-import Data.Semigroup (Semigroup (..), stimesMonoid)-import Data.Void (Void, absurd)-import GHC.TypeLits (ErrorMessage (..), TypeError)+import Control.Monad (when, (<=<), (>=>))+import Data.Coerce (coerce)+import Data.Foldable (fold, for_, traverse_)+import Data.Kind (Constraint)+import Data.List.NonEmpty (NonEmpty (..))+import Data.Monoid (Monoid (..))+import Data.Semigroup (Semigroup (..), stimesMonoid)+import Data.Void (Void, absurd)+import GHC.TypeLits (ErrorMessage (..), TypeError) #if MIN_VERSION_base(4,12,0) import qualified Data.Functor.Contravariant as Contravariant@@ -167,12 +167,12 @@ where UnrepresentableClass = TypeError ( 'Text "'LogAction' cannot have a 'Functor' instance by design."- ':$$: 'Text "However, you've attempted to use this instance."+ ' :$$: 'Text "However, you've attempted to use this instance." #if MIN_VERSION_base(4,12,0)- ':$$: 'Text ""- ':$$: 'Text "Probably you meant 'Contravariant' class instance with the following methods:"- ':$$: 'Text " * contramap :: (a -> b) -> LogAction m b -> LogAction m a"- ':$$: 'Text " * (>$) :: b -> LogAction m b -> LogAction m a"+ ' :$$: 'Text ""+ ' :$$: 'Text "Probably you meant 'Contravariant' class instance with the following methods:"+ ' :$$: 'Text " * contramap :: (a -> b) -> LogAction m b -> LogAction m a"+ ' :$$: 'Text " * (>$) :: b -> LogAction m b -> LogAction m a" #endif )
src/Colog/Core/Class.hs view
@@ -4,7 +4,7 @@ {- | Module : Colog.Core.Class-Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log+Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log SPDX-License-Identifier : MPL-2.0 Maintainer : Co-Log <xrom.xkov@gmail.com> Stability : Stable@@ -21,7 +21,7 @@ , Lens' ) where -import Colog.Core.Action (LogAction)+import Colog.Core.Action (LogAction) import Data.Functor.Const (Const (..))
src/Colog/Core/IO.hs view
@@ -2,7 +2,7 @@ {- | Module : Colog.Core.IO-Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log+Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log SPDX-License-Identifier : MPL-2.0 Maintainer : Co-Log <xrom.xkov@gmail.com> Stability : Stable@@ -33,10 +33,11 @@ , logFlush ) where -import Colog.Core.Action (LogAction (..))+import Colog.Core.Action (LogAction (..)) import Control.Monad.IO.Class (MonadIO, liftIO)-import Data.Semigroup ((<>))-import System.IO (Handle, IOMode (AppendMode), hFlush, hPrint, hPutStrLn, stderr, withFile)+import Data.Semigroup ((<>))+import System.IO (Handle, IOMode (AppendMode), hFlush, hPrint,+ hPutStrLn, stderr, withFile) {- $setup
src/Colog/Core/Severity.hs view
@@ -2,7 +2,7 @@ {- | Module : Colog.Core.Severity-Copyright : (c) 2018-2020 Kowainik, 2021-2022 Co-Log+Copyright : (c) 2018-2020 Kowainik, 2021-2023 Co-Log SPDX-License-Identifier : MPL-2.0 Maintainer : Co-Log <xrom.xkov@gmail.com> Stability : Stable