Skip to content

Commit

Permalink
[Chore] Support ghc-9.8.1
Browse files Browse the repository at this point in the history
Problem: there is ghc-9.8 for a while, but we don't
support it for several reasons.

Solution:
1. Permit text up to 2.1.1 (currently the latest one).
2. Add explicit kind signatures for custom operators, because
otherwise there is a warning.
3. Add 9.8.1 to tested-with.
4. Update the CI config accordingly. Let's still consider 9.6
as the main version (it's probably more popular) and use it for 3 OS.
  • Loading branch information
gromakovsky committed Mar 8, 2024
1 parent 8a3cdfb commit 442fe96
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ jobs:
- "9.2.8"
- "9.4.5"
- "9.6.3"
# Use only the latest compiler on non-Linux
- "9.8.1"
# Use only the "main" (usually latest) compiler version on non-Linux
exclude:
- os: macOS-latest
ghc: 9.8.1
- os: macOS-latest
ghc: 9.4.5
- os: macOS-latest
Expand All @@ -50,6 +53,8 @@ jobs:
ghc: 9.0.2
- os: macOS-latest
ghc: 8.10.7
- os: windows-latest
ghc: 9.8.1
- os: windows-latest
ghc: 9.4.5
- os: windows-latest
Expand Down
21 changes: 12 additions & 9 deletions src/Universum/TypeOps.hs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExplicitNamespaces #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExplicitNamespaces #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE TypeOperators #-}

-- | Type operators for writing convenient type signatures.

Expand All @@ -25,6 +26,7 @@ import Data.Kind (Constraint)
-- =
-- f :: Either String (Maybe Int)
-- @
type ($) :: (k2 -> k1) -> k2 -> k1
type f $ a = f a
infixr 2 $

Expand Down Expand Up @@ -66,4 +68,5 @@ type family Each (c :: [k -> Constraint]) (as :: [k]) where
-- =
-- a :: (Show a, Read a) => a -> a
-- @
type With :: [k -> Constraint] -> k -> Constraint
type With a b = a <+> b
3 changes: 2 additions & 1 deletion universum.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tested-with: GHC == 8.10.7
, GHC == 9.2.8
, GHC == 9.4.5
, GHC == 9.6.3
, GHC == 9.8.1
extra-doc-files: CHANGES.md
, CONTRIBUTING.md
, README.md
Expand Down Expand Up @@ -106,7 +107,7 @@ library
, stm
-- Make sure that "toString-toText-rewritting" note
-- is still valid when bumping this constraint.
, text >= 1.0.0.0 && <= 2.0.2
, text >= 1.0.0.0 && <= 2.1
, transformers
, unordered-containers
, utf8-string
Expand Down

0 comments on commit 442fe96

Please sign in to comment.