From b50c5c3b0c80ff559d1ba75f31bd86dba1546bb2 Mon Sep 17 00:00:00 2001 From: Andrey Mokhov Date: Sun, 19 May 2024 23:27:44 +0100 Subject: [PATCH] Drop support for GHC 8.6 and GHC 8.8 (#314) * Drop support for GHC 8.6 and GHC 8.8 * Update changelog * Minor cleanup --- .github/workflows/ci.yml | 2 +- CHANGES.md | 4 ++-- algebraic-graphs.cabal | 2 +- src/Algebra/Graph/Export.hs | 8 ++++---- src/Algebra/Graph/Label.hs | 2 +- test/Algebra/Graph/Test/Arbitrary.hs | 1 - 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48eff8e0..9f57488d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - ghc: ['9.8.2', '9.6.3', '9.4.7', '9.2.8', '9.0.2', '8.10.7', '8.8.4', '8.6.5'] + ghc: ['9.8.2', '9.6.3', '9.4.7', '9.2.8', '9.0.2', '8.10.7'] include: - os: windows-latest # Testing on MacOS is disabled until GitHub actions support 'allow-failure' diff --git a/CHANGES.md b/CHANGES.md index 9292f452..05209ba5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,8 +2,8 @@ ## 0.8 -* #305: Support GHC 9.4 and GHC 9.6. -* #303: Stop supporting GHC 8.4. +* #305, #312: Support GHC 9.4, GHC 9.6 and GHC 9.8. +* #303, #314: Stop supporting GHC 8.4, GHC 8.6 and GHC 8.8. ## 0.7 diff --git a/algebraic-graphs.cabal b/algebraic-graphs.cabal index 64a17895..26384120 100644 --- a/algebraic-graphs.cabal +++ b/algebraic-graphs.cabal @@ -12,7 +12,7 @@ homepage: https://github.com/snowleopard/alga bug-reports: https://github.com/snowleopard/alga/issues category: Algebra, Algorithms, Data Structures, Graphs build-type: Simple -tested-with: GHC==9.8.2, GHC==9.6.3, GHC==9.4.7, GHC==9.2.8, GHC==9.0.2, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5 +tested-with: GHC==9.8.2, GHC==9.6.3, GHC==9.4.7, GHC==9.2.8, GHC==9.0.2, GHC==8.10.7 description: is a library for algebraic construction and manipulation of graphs in Haskell. See diff --git a/src/Algebra/Graph/Export.hs b/src/Algebra/Graph/Export.hs index 473eabab..f7d77074 100644 --- a/src/Algebra/Graph/Export.hs +++ b/src/Algebra/Graph/Export.hs @@ -37,7 +37,7 @@ import Algebra.Graph.Internal -- implementation uses difference lists). Here @s@ is the type of abstract -- symbols or strings (text or binary). 'Doc' @s@ is a 'Monoid', therefore -- 'mempty' corresponds to the /empty document/ and two documents can be --- concatenated with 'mappend' (or operator 'Data.Monoid.<>'). Documents +-- concatenated with 'mappend' (or operator 'Data.Semigroup.<>'). Documents -- comprising a single symbol or string can be constructed using the function -- 'literal'. Alternatively, you can construct documents as string literals, -- e.g. simply as @"alga"@, by using the @OverloadedStrings@ GHC extension. To @@ -91,7 +91,7 @@ isEmpty (Doc xs) = null xs -- constructed directly from string literals (see the second example below). -- -- @ --- literal "Hello, " 'Data.Monoid.<>' literal "World!" == literal "Hello, World!" +-- literal "Hello, " 'Data.Semigroup.<>' literal "World!" == literal "Hello, World!" -- literal "I am just a string literal" == "I am just a string literal" -- 'render' . literal == 'id' -- @ @@ -101,8 +101,8 @@ literal = Doc . pure -- | Render the document as a single string. An inverse of the function 'literal'. -- -- @ --- render ('literal' "al" 'Data.Monoid.<>' 'literal' "ga") :: ('IsString' s, 'Monoid' s) => s --- render ('literal' "al" 'Data.Monoid.<>' 'literal' "ga") == "alga" +-- render ('literal' "al" 'Data.Semigroup.<>' 'literal' "ga") :: ('IsString' s, 'Monoid' s) => s +-- render ('literal' "al" 'Data.Semigroup.<>' 'literal' "ga") == "alga" -- render 'mempty' == 'mempty' -- render . 'literal' == 'id' -- @ diff --git a/src/Algebra/Graph/Label.hs b/src/Algebra/Graph/Label.hs index e0a1c283..dc41588a 100644 --- a/src/Algebra/Graph/Label.hs +++ b/src/Algebra/Graph/Label.hs @@ -71,7 +71,7 @@ Instances of this type class must satisfy the following semiring laws: > x <.> (y <+> z) == x <.> y <+> x <.> z > (x <+> y) <.> z == x <.> z <+> y <.> z -} -class (Monoid a, Semigroup a) => Semiring a where +class Monoid a => Semiring a where one :: a (<.>) :: a -> a -> a diff --git a/test/Algebra/Graph/Test/Arbitrary.hs b/test/Algebra/Graph/Test/Arbitrary.hs index 3e88cff7..be373751 100644 --- a/test/Algebra/Graph/Test/Arbitrary.hs +++ b/test/Algebra/Graph/Test/Arbitrary.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- |