Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] Build with LTS-21.0, prepare a release #289

Merged
merged 9 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ checkmark indicating that you are sure it is dealt with (be that by irrelevance)

- Record your changes

- [ ] I added an entry to the [changelog](https:/serokell/universum/tree/master/CHANGES.md) if my changes are visible to the users
- [ ] I added an entry to the [changelog](https:/serokell/universum/tree/master/CHANGES.md) (creating the `Unreleased` section if necessary) if my changes are visible to the users
and
- [ ] provided a migration guide for breaking changes if possible

Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,33 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.6"]
cabal: ["3.8"]
# If you update this list of supported compiler versions,
# make sure to update the `tested-with` section of `universum.cabal`.
ghc:
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.1"
- "9.2.2"
- "9.0.2"
- "9.2.8"
- "9.4.5"
# Use only the latest compiler on non-Linux
exclude:
- os: macOS-latest
ghc: 9.0.1
ghc: 9.2.8
- os: macOS-latest
ghc: 9.0.2
- os: macOS-latest
ghc: 8.8.4
- os: macOS-latest
ghc: 8.6.5
ghc: 8.10.7
- os: windows-latest
ghc: 9.2.8
- os: windows-latest
ghc: 9.0.1
ghc: 9.0.2
- os: windows-latest
ghc: 8.8.4
- os: windows-latest
ghc: 8.6.5
ghc: 8.10.7

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -91,8 +95,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
stack: ["2.7"]
ghc: ["9.0.2"]
stack: ["2.9.3"]
ghc: ["9.4.5"]

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 10 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
1.8.2
=====

* [#289](https:/serokell/universum/pull/289):
Make universum work with LTS-21.0.
* Re-export `(~)` type operator.
* [#283](https:/serokell/universum/pull/283):
Bump the upper version bound on `text` to `2.0.2`.

1.8.1.1
=======

* [#282](https:/serokell/universum/pull/282):
Bump version bound on `text` to `2.0.1`.
Bump the upper version bound on `text` to `2.0.1`.

1.8.1
=====
Expand Down
7 changes: 7 additions & 0 deletions src/Universum/Base.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE Unsafe #-}

Expand All @@ -24,6 +25,9 @@ module Universum.Base
, module Data.Proxy
, module Data.Typeable
, module Data.Void
#if MIN_VERSION_base(4,17,0)
, module Data.Type.Equality
#endif

, module GHC.Base
, module GHC.Enum
Expand Down Expand Up @@ -67,6 +71,9 @@ import Data.Traversable (Traversable (..), fmapDefault, foldMapDefault, forM, ma
import Data.Proxy (Proxy (..))
import Data.Typeable (Typeable)
import Data.Void (Void, absurd, vacuous)
#if MIN_VERSION_base(4,17,0)
import Data.Type.Equality (type (~))
#endif

import GHC.Base (String, asTypeOf, maxInt, minInt, ord, seq)
import GHC.Enum (Bounded (..), Enum (..), boundedEnumFrom, boundedEnumFromThen)
Expand Down
10 changes: 9 additions & 1 deletion src/Universum/Container/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,13 @@ instance FromList (NonEmpty a) where

instance FromList IntSet
instance Ord a => FromList (Set a)
instance (Eq k, Hashable k) => FromList (HashMap k v)
instance FromList (IntMap v)
instance Ord k => FromList (Map k v)
#if MIN_VERSION_hashable(1,4,0)
instance (Hashable k) => FromList (HashMap k v)
#else
instance (Eq k, Hashable k) => FromList (HashMap k v)
#endif

instance FromList T.Text
instance FromList TL.Text
Expand Down Expand Up @@ -575,7 +579,11 @@ instance Ord v => Container (Set v) where
notElem = Set.notMember
{-# INLINE notElem #-}

#if MIN_VERSION_hashable(1,4,0)
instance (Hashable v) => Container (HashSet v) where
#else
instance (Eq v, Hashable v) => Container (HashSet v) where
#endif
elem = HashSet.member
{-# INLINE elem #-}

Expand Down
4 changes: 4 additions & 0 deletions src/Universum/Monad/Container.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilies #-}

Expand All @@ -18,6 +19,9 @@ import Control.Applicative (Applicative (pure))
import Data.Function ((.))
import Data.Traversable (Traversable (traverse))
import Prelude (Bool (..), Monoid, flip)
#if MIN_VERSION_base(4,17,0)
import Data.Type.Equality (type (~))
#endif

import Universum.Base (IO)
import Universum.Container (Container, Element, fold, toList)
Expand Down
3 changes: 3 additions & 0 deletions src/Universum/String/Conversion.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import Data.Function (id, (.))
import Data.Maybe (Maybe)
import Data.String (String)
import qualified Data.Text.Internal as T

#if !MIN_VERSION_text(2,0,2)
import qualified Data.Text.Internal.Fusion.Common as TF
#endif

import Universum.Functor ((<$>))
import Universum.String.Reexport (ByteString, IsString, Read, Text, fromString)
Expand Down
6 changes: 6 additions & 0 deletions src/Universum/VarArg.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}

-- | Provides operator of variable-arguments function composition.
Expand All @@ -12,6 +14,10 @@ module Universum.VarArg
( SuperComposition(..)
) where

#if MIN_VERSION_base(4,17,0)
import Data.Type.Equality (type (~))
#endif

-- $setup
-- >>> import Universum.Base ((+))
-- >>> import Universum.Container (null)
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolver: lts-19.0
resolver: lts-21.0
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
size: 616897
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/0.yaml
sha256: bbf2be02f17940bac1f87cb462d4fb0c3355de6dcfc53d84f4f9ad3ee2164f65
original: lts-19.0
sha256: 1867d84255dff8c87373f5dd03e5a5cb1c10a99587e26c8793e750c54e83ffdc
size: 639139
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/0.yaml
original: lts-21.0
12 changes: 7 additions & 5 deletions universum.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: universum
version: 1.8.1.1
version: 1.8.2
synopsis: Custom prelude used in Serokell
description: See README.md file for more details.
homepage: https:/serokell/universum
Expand All @@ -13,11 +13,11 @@ category: Prelude
stability: stable
build-type: Simple
bug-reports: https:/serokell/universum/issues
tested-with: GHC == 8.6.5
, GHC == 8.8.4
tested-with: GHC == 8.8.4
, GHC == 8.10.7
, GHC == 9.0.1
, GHC == 9.2.2
, GHC == 9.0.2
, GHC == 9.2.8
, GHC == 9.4.5
extra-doc-files: CHANGES.md
, CONTRIBUTING.md
, README.md
Expand Down Expand Up @@ -48,6 +48,8 @@ common common-options

default-language: Haskell2010

default-extensions: TypeOperators

library
import: common-options
hs-source-dirs: src
Expand Down