Skip to content

Commit

Permalink
Merge pull request #140 from serokell/gromak/maintenance-july23
Browse files Browse the repository at this point in the history
[Chore] Update some versions
  • Loading branch information
gromakovsky authored Sep 22, 2023
2 parents 665459f + 415f1cc commit 9b9e4d5
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 30 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,27 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.6"]
cabal: ["3.10"]
# If you update this list of supported compiler versions,
# make sure to update the `tested-with` section of `o-clock.cabal`.
ghc:
- "8.6.5"
- "8.8.3"
- "8.10.4"
- "9.0.2"
- "9.2.4"
- "9.2.8"
- "9.4.5"
- "9.6.2"
exclude:
- os: macOS-latest
ghc: 8.10.4
ghc: 9.4.5
- os: macOS-latest
ghc: 8.8.3
ghc: 9.2.8
- os: macOS-latest
ghc: 8.6.5
ghc: 9.0.2
- os: windows-latest
ghc: 8.10.4
ghc: 9.4.5
- os: windows-latest
ghc: 8.8.3
ghc: 9.2.8
- os: windows-latest
ghc: 8.6.5
ghc: 9.0.2

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -90,15 +89,15 @@ jobs:
- name: Haddock
# Run haddock for all components
run: |
cabal haddock --project-file=cabal.project.ci --haddock-all
cabal haddock --project-file=cabal.project.ci
stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
stack: ["2.9.1"]
ghc: ["9.0.2"]
stack: ["2.11.1"]
ghc: ["9.4.5"]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ Change log
o'clock uses [PVP Versioning][1].
The change log is available [on GitHub][2].

Unreleased
1.4.0
=====

* [#136](https://github.com/serokell/o-clock/pull/136)
+ Remove `toNum`.
* [#139](https://github.com/serokell/o-clock/pull/139)
+ Add `Data` instance to `Time`.
* [#140](https://github.com/serokell/o-clock/pull/140)
+ Increase some upper bounds.

1.3.0
=====
Expand Down
21 changes: 10 additions & 11 deletions o-clock.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cabal-version: 2.2
-- SPDX-License-Identifier: MPL-2.0

name: o-clock
version: 1.3.0
version: 1.4.0
synopsis: Type-safe time library.
description: See README.md for details.
homepage: https://github.com/serokell/o-clock
Expand All @@ -20,11 +20,10 @@ stability: stable
extra-doc-files: CHANGELOG.md
, README.md
, README.lhs
tested-with: GHC == 8.6.5
, GHC == 8.8.3
, GHC == 8.10.4
, GHC == 9.0.2
, GHC == 9.2.4
tested-with: GHC == 9.0.2
, GHC == 9.2.8
, GHC == 9.4.5
, GHC == 9.6.2

source-repository head
type: git
Expand All @@ -50,7 +49,7 @@ library
TypeApplications
TypeFamilies
if flag(aeson)
build-depends: aeson >= 1.2.4 && < 2.1
build-depends: aeson >= 1.2.4 && < 2.3
, text
cpp-options: -DHAS_aeson

Expand All @@ -74,9 +73,9 @@ test-suite o-clock-test
Test.Time.Units

build-depends: o-clock
, hedgehog >= 0.6 && < 1.3
, hedgehog >= 0.6 && < 1.4
, hspec-expectations ^>= 0.8
, tasty >= 0.12 && < 1.5
, tasty >= 0.12 && < 1.6
, tasty-hedgehog >= 0.1 && < 1.5.0
, tasty-hunit-compat ^>= 0.2
, type-spec >= 0.3.0.1 && < 0.5
Expand All @@ -95,7 +94,7 @@ test-suite o-clock-doctest
main-is: Doctest.hs

build-tool-depends: doctest:doctest
build-depends: doctest >= 0.16 && < 0.21
build-depends: doctest >= 0.16 && < 0.23
, Glob >= 0.9 && < 0.11
ghc-options: -threaded -rtsopts -with-rtsopts=-N

Expand All @@ -109,7 +108,7 @@ test-suite readme-test

build-tool-depends: markdown-unlit:markdown-unlit
build-depends: o-clock
, markdown-unlit ^>= 0.5
, markdown-unlit >= 0.5 && < 0.7
ghc-options: -threaded -rtsopts -with-rtsopts=-N -pgmL markdown-unlit

benchmark o-clock-benchmark
Expand Down
19 changes: 17 additions & 2 deletions src/Time/Rational.hs
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
-- SPDX-FileCopyrightText: 2019 Serokell <https://serokell.io>
-- SPDX-FileCopyrightText: 2019-2023 Serokell <https://serokell.io>
--
-- SPDX-License-Identifier: MPL-2.0

{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}

-- See https://github.com/ghc/ghc/commit/13d627bbd0bc3dd30d672de341aa7f471be0aa2c
-- Starting from 9.6, GHC doesn't print promotion ticks when they are not necessary.
-- Because of that we need to support too many cases in doctests.
-- Let's force redundant ticks for now and remove this flag later when we stop
-- supporting 9.0 at least.
#if ( __GLASGOW_HASKELL__ >= 906 )
{-# OPTIONS_GHC -fprint-redundant-promotion-ticks #-}
#endif

-- | This module introduces 'Rat' kind and all necessary functional.

module Time.Rational
Expand Down Expand Up @@ -44,6 +54,11 @@ import GHC.TypeNats (Div, KnownNat, Mod, Nat, natVal, type (<=?))
import qualified GHC.TypeNats
import Unsafe.Coerce (unsafeCoerce)

#if ( __GLASGOW_HASKELL__ >= 906 )
-- $setup
-- >>> {-# OPTIONS_GHC -fprint-redundant-promotion-ticks #-}
#endif

-- | Data structure represents the rational number.
-- Rational number can be represented as a pair of
-- natural numbers @n@ and @m@ where @m@ is nor equal
Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SPDX-FileCopyrightText: 2019-2021 Serokell <https://serokell.io>
# SPDX-FileCopyrightText: 2019-2023 Serokell <https://serokell.io>
#
# SPDX-License-Identifier: MPL-2.0

resolver: lts-19.27
resolver: lts-21.12

extra-deps:
- tiempo-0.0.1.1
Expand Down

0 comments on commit 9b9e4d5

Please sign in to comment.