diff --git a/CHANGES.md b/CHANGES.md
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,10 @@
 # Change log
 
+## 0.8
+
+* #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
 
 * #294: Change the argument order of `bfs*`, `dfs*` and `reachable` algorithms.
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2016-2022 Andrey Mokhov
+Copyright (c) 2016-2025 Andrey Mokhov
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # Algebraic graphs
 
-[![Hackage version](https://img.shields.io/hackage/v/algebraic-graphs.svg?label=Hackage)](https://hackage.haskell.org/package/algebraic-graphs) [![Build status](https://img.shields.io/github/workflow/status/snowleopard/alga/ci/master.svg)](https://github.com/snowleopard/alga/actions)
+[![Hackage version](https://img.shields.io/hackage/v/algebraic-graphs.svg?label=Hackage)](https://hackage.haskell.org/package/algebraic-graphs) [![Build status](https://img.shields.io/github/actions/workflow/status/snowleopard/alga/ci.yml?branch=master)](https://github.com/snowleopard/alga/actions)
 
 **Alga** is a library for algebraic construction and manipulation of graphs in Haskell. See
 [this Haskell Symposium paper](https://github.com/snowleopard/alga-paper) and the
diff --git a/algebraic-graphs.cabal b/algebraic-graphs.cabal
--- a/algebraic-graphs.cabal
+++ b/algebraic-graphs.cabal
@@ -1,18 +1,18 @@
 cabal-version: 2.2
 name:          algebraic-graphs
-version:       0.7
+version:       0.8
 synopsis:      A library for algebraic graph construction and transformation
 license:       MIT
 license-file:  LICENSE
 author:        Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard
 maintainer:    Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard,
                Alexandre Moine <alexandre@moine.me>, github: @nobrakal
-copyright:     Andrey Mokhov, 2016-2022
+copyright:     Andrey Mokhov, 2016-2025
 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.2, GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4
+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:
     <https://github.com/snowleopard/alga Alga> is a library for algebraic construction and
     manipulation of graphs in Haskell. See <https://github.com/snowleopard/alga-paper this paper>
@@ -68,10 +68,10 @@
 
 common common-settings
     build-depends:      array        >= 0.4     && < 0.6,
-                        base         >= 4.11    && < 5,
-                        containers   >= 0.5.5.1 && < 0.8,
-                        deepseq      >= 1.3.0.1 && < 1.5,
-                        transformers >= 0.4     && < 0.6
+                        base         >= 4.12    && < 5,
+                        containers   >= 0.5.5.1 && < 0.9,
+                        deepseq      >= 1.3.0.1 && < 1.6,
+                        transformers >= 0.4     && < 0.7
     default-language:   Haskell2010
     default-extensions: ConstraintKinds
                         DeriveFunctor
@@ -86,6 +86,7 @@
                         TupleSections
                         TypeApplications
                         TypeFamilies
+                        TypeOperators
     other-extensions:   CPP
                         OverloadedStrings
                         RecordWildCards
@@ -161,7 +162,7 @@
                         Data.Graph.Test.Typed
     build-depends:      algebraic-graphs,
                         extra              >= 1.4     && < 2,
-                        inspection-testing >= 0.4.2.2 && < 0.6,
-                        QuickCheck         >= 2.14    && < 2.15
+                        inspection-testing >= 0.4.2.2 && < 0.7,
+                        QuickCheck         >= 2.14    && < 2.16
     other-extensions:   ConstrainedClassMethods
                         TemplateHaskell
diff --git a/src/Algebra/Graph.hs b/src/Algebra/Graph.hs
--- a/src/Algebra/Graph.hs
+++ b/src/Algebra/Graph.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -56,7 +56,7 @@
 import Data.Foldable (toList)
 import Data.Maybe (fromMaybe)
 import Data.String
-import Data.Tree
+import Data.Tree (Tree (..))
 import GHC.Generics
 
 import Algebra.Graph.Internal
diff --git a/src/Algebra/Graph/Acyclic/AdjacencyMap.hs b/src/Algebra/Graph/Acyclic/AdjacencyMap.hs
--- a/src/Algebra/Graph/Acyclic/AdjacencyMap.hs
+++ b/src/Algebra/Graph/Acyclic/AdjacencyMap.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Acyclic.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/AdjacencyIntMap.hs b/src/Algebra/Graph/AdjacencyIntMap.hs
--- a/src/Algebra/Graph/AdjacencyIntMap.hs
+++ b/src/Algebra/Graph/AdjacencyIntMap.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.AdjacencyIntMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -51,7 +51,7 @@
 import Data.List ((\\))
 import Data.Monoid (Sum (..))
 import Data.Set (Set)
-import Data.Tree
+import Data.Tree (Forest, Tree (..))
 import GHC.Generics
 
 import qualified Data.IntMap.Strict as IntMap
diff --git a/src/Algebra/Graph/AdjacencyIntMap/Algorithm.hs b/src/Algebra/Graph/AdjacencyIntMap/Algorithm.hs
--- a/src/Algebra/Graph/AdjacencyIntMap/Algorithm.hs
+++ b/src/Algebra/Graph/AdjacencyIntMap/Algorithm.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.AdjacencyIntMap.Algorithm
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : unstable
diff --git a/src/Algebra/Graph/AdjacencyMap.hs b/src/Algebra/Graph/AdjacencyMap.hs
--- a/src/Algebra/Graph/AdjacencyMap.hs
+++ b/src/Algebra/Graph/AdjacencyMap.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -55,7 +55,7 @@
 import Data.Monoid
 import Data.Set (Set)
 import Data.String
-import Data.Tree
+import Data.Tree (Forest, Tree (..))
 import GHC.Generics
 
 import qualified Data.Map.Strict as Map
diff --git a/src/Algebra/Graph/AdjacencyMap/Algorithm.hs b/src/Algebra/Graph/AdjacencyMap/Algorithm.hs
--- a/src/Algebra/Graph/AdjacencyMap/Algorithm.hs
+++ b/src/Algebra/Graph/AdjacencyMap/Algorithm.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.AdjacencyMap.Algorithm
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : unstable
@@ -33,10 +33,9 @@
 import Data.Either
 import Data.List.NonEmpty (NonEmpty(..), (<|))
 import Data.Maybe
-import Data.Tree
+import Data.Tree (Forest, Tree (..), flatten, levels, unfoldForestM_BF)
 
 import Algebra.Graph.AdjacencyMap
-import Algebra.Graph.Internal
 
 import qualified Algebra.Graph.NonEmpty.AdjacencyMap as NonEmpty
 import qualified Data.Array                          as Array
@@ -381,23 +380,25 @@
     -- called when exiting vertex v. if v is the bottom of a scc
     -- boundary, we add a new SCC, otherwise v is part of a larger scc
     -- being constructed and we continue.
-    exit v = do newComponent <- (v==).snd.head <$> gets boundaryStack
-                when newComponent $ insertComponent v
-                return newComponent
+    exit v = do boundaryStack <- gets boundaryStack
+                case boundaryStack of
+                    (p_top, top) : newBoundaryStack | v == top -> do
+                       insertComponent p_top top newBoundaryStack
+                       return True
 
-    insertComponent v = modify'
-      (\(SCC pre scc bnd pth pres sccs gs es_i es_o) ->
+                    _ -> return False
+
+    insertComponent p_v v newBoundaryStack = modify'
+      (\(SCC pre scc _oldBoundaryStack pth pres sccs gs es_i es_o) ->
          let (curr,v_pth') = span (/=v) pth
-             pth' = tail v_pth' -- Here we know that v_pth' starts with v
+             pth' = drop 1 v_pth' -- Here we know that v_pth' starts with v
              (es,es_i') = span ((>=p_v).fst) es_i
              g_i | null es = vertex v
                  | otherwise = edges (snd <$> es)
-             p_v = fst $ head bnd
              scc' = scc + 1
-             bnd' = tail bnd
              sccs' = List.foldl' (\sccs x -> Map.insert x scc sccs) sccs (v:curr)
              gs' = g_i:gs
-          in SCC pre scc' bnd' pth' pres sccs' gs' es_i' es_o)
+          in SCC pre scc' newBoundaryStack pth' pres sccs' gs' es_i' es_o)
 
     inedge uv = modify'
       (\(SCC pre scc bnd pth pres sccs gs es_i es_o) ->
diff --git a/src/Algebra/Graph/Bipartite/AdjacencyMap.hs b/src/Algebra/Graph/Bipartite/AdjacencyMap.hs
--- a/src/Algebra/Graph/Bipartite/AdjacencyMap.hs
+++ b/src/Algebra/Graph/Bipartite/AdjacencyMap.hs
@@ -1,7 +1,7 @@
 ----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Bipartite.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -53,19 +53,13 @@
     consistent
     ) where
 
-import Control.Monad
-import Control.Monad.Trans.Maybe
-import Control.Monad.Trans.State
 import Data.Either
-import Data.Foldable (asum)
 import Data.List ((\\), sort)
 import Data.Map.Strict (Map)
-import Data.Maybe
 import Data.Set (Set)
 import GHC.Exts (IsList(..))
 import GHC.Generics
 
-import qualified Algebra.Graph              as G
 import qualified Algebra.Graph.AdjacencyMap as AM
 
 import qualified Data.Map.Strict as Map
diff --git a/src/Algebra/Graph/Bipartite/AdjacencyMap/Algorithm.hs b/src/Algebra/Graph/Bipartite/AdjacencyMap/Algorithm.hs
--- a/src/Algebra/Graph/Bipartite/AdjacencyMap/Algorithm.hs
+++ b/src/Algebra/Graph/Bipartite/AdjacencyMap/Algorithm.hs
@@ -2,7 +2,7 @@
 ----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Bipartite.AdjacencyMap.Algorithm
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/Class.hs b/src/Algebra/Graph/Class.hs
--- a/src/Algebra/Graph/Class.hs
+++ b/src/Algebra/Graph/Class.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Class
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -46,7 +46,7 @@
     path, circuit, clique, biclique, star, tree, forest
     ) where
 
-import Data.Tree
+import Data.Tree (Forest, Tree (..))
 
 import Algebra.Graph.Label (Dioid, one)
 
diff --git a/src/Algebra/Graph/Example/Todo.hs b/src/Algebra/Graph/Example/Todo.hs
--- a/src/Algebra/Graph/Example/Todo.hs
+++ b/src/Algebra/Graph/Example/Todo.hs
@@ -1,6 +1,14 @@
 {-# LANGUAGE OverloadedStrings #-}
-module Algebra.Graph.Example.Todo (Todo, todo, low, high, (~*~), (>*<), priority) where
+module Algebra.Graph.Example.Todo (
+    -- * Creating and manipulating to-do lists
+    Todo, todo, low, high, (~*~), (>*<), priority,
 
+    -- * Examples
+    shopping, holiday
+    ) where
+
+-- Based on https://blogs.ncl.ac.uk/andreymokhov/graphs-in-disguise/
+
 import Data.Map (Map)
 import Data.String
 
@@ -13,10 +21,10 @@
 data Todo a = T (Map a Int) (AdjacencyMap a) deriving Show
 
 instance Ord a => Eq (Todo a) where
-  x == y = todo x == todo y
+    x == y = todo x == todo y
 
 instance (IsString a, Ord a) => IsString (Todo a) where
-  fromString = C.vertex . fromString
+    fromString = C.vertex . fromString
 
 -- Lower the priority of items in a given todo list
 low :: Todo a -> Todo a
@@ -39,8 +47,7 @@
 x >*< y = high x `C.connect` low y
 
 todo :: forall a. Ord a => Todo a -> Maybe [a]
-todo (T p g) =
-  case AM.topSort $ gmap prioritise g of
+todo (T p g) = case AM.topSort $ gmap prioritise g of
     Left _ -> Nothing
     Right xs -> Just $ map snd xs
   where
@@ -48,16 +55,26 @@
     prioritise x = (negate $ Map.findWithDefault 0 x p, x)
 
 instance (IsString a, Ord a) => Num (Todo a) where
-  fromInteger i = fromString $ show (fromInteger i :: Integer)
-  (+)           = C.overlay
-  (*)           = C.connect
-  signum        = const C.empty
-  abs           = id
-  negate        = id
+    fromInteger i = fromString $ show (fromInteger i :: Integer)
+    (+)           = C.overlay
+    (*)           = C.connect
+    signum        = const C.empty
+    abs           = id
+    negate        = id
 
 instance Ord a => Graph (Todo a) where
-  type Vertex (Todo a) = a
-  empty    = T Map.empty AM.empty
-  vertex x = T (Map.singleton x 0) (C.vertex x)
-  overlay (T p1 g1) (T p2 g2) = T (Map.unionWith (+) p1 p2) (C.overlay g1 g2)
-  connect (T p1 g1) (T p2 g2) = T (Map.unionWith (+) p1 p2) (C.connect g1 g2)
+    type Vertex (Todo a) = a
+    empty    = T Map.empty AM.empty
+    vertex x = T (Map.singleton x 0) (C.vertex x)
+    overlay (T p1 g1) (T p2 g2) = T (Map.unionWith (+) p1 p2) (C.overlay g1 g2)
+    connect (T p1 g1) (T p2 g2) = T (Map.unionWith (+) p1 p2) (C.connect g1 g2)
+
+-- λ> todo shopping
+-- Just ["coat","presents","phone wife","scarf"]
+shopping :: Todo String
+shopping = "presents" + "coat" + "phone wife" ~*~ "scarf"
+
+-- λ> todo holiday
+-- Just ["coat","presents","phone wife","scarf","pack","travel"]
+holiday :: Todo String
+holiday = shopping * "pack" * "travel"
diff --git a/src/Algebra/Graph/Export.hs b/src/Algebra/Graph/Export.hs
--- a/src/Algebra/Graph/Export.hs
+++ b/src/Algebra/Graph/Export.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Export
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -37,7 +37,7 @@
 -- 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 @@
 -- 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 @@
 -- | 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/Export/Dot.hs b/src/Algebra/Graph/Export/Dot.hs
--- a/src/Algebra/Graph/Export/Dot.hs
+++ b/src/Algebra/Graph/Export/Dot.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Export.Dot
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -21,7 +21,7 @@
     export, exportAsIs, exportViaShow
     ) where
 
-import Data.List (map, null, intersperse)
+import Data.List (intersperse)
 import Data.Monoid
 import Data.String hiding (unlines)
 import Prelude hiding (unlines)
diff --git a/src/Algebra/Graph/HigherKinded/Class.hs b/src/Algebra/Graph/HigherKinded/Class.hs
--- a/src/Algebra/Graph/HigherKinded/Class.hs
+++ b/src/Algebra/Graph/HigherKinded/Class.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.HigherKinded.Class
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -54,7 +54,7 @@
 
 import Control.Applicative (Alternative(empty, (<|>)))
 import Control.Monad (MonadPlus, mfilter)
-import Data.Tree
+import Data.Tree (Forest, Tree (..))
 
 import qualified Algebra.Graph as G
 
diff --git a/src/Algebra/Graph/Internal.hs b/src/Algebra/Graph/Internal.hs
--- a/src/Algebra/Graph/Internal.hs
+++ b/src/Algebra/Graph/Internal.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Internal
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -29,13 +29,11 @@
 
 import Data.Coerce
 import Data.Foldable
-import Data.IntSet (IntSet)
 import Data.Semigroup (Endo (..))
 import Data.Set (Set)
 
-import qualified Data.IntSet as IntSet
-import qualified Data.Set    as Set
-import qualified GHC.Exts    as Exts
+import qualified Data.Set as Set
+import qualified GHC.Exts as Exts
 
 -- | An abstract list data type with /O(1)/ time concatenation (the current
 -- implementation uses difference lists). Here @a@ is the type of list elements.
diff --git a/src/Algebra/Graph/Label.hs b/src/Algebra/Graph/Label.hs
--- a/src/Algebra/Graph/Label.hs
+++ b/src/Algebra/Graph/Label.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Label
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -22,17 +22,16 @@
     NonNegative, finite, finiteWord, unsafeFinite, infinite, getFinite,
     Distance, distance, getDistance, Capacity, capacity, getCapacity,
     Count, count, getCount, PowerSet (..), Minimum, getMinimum, noMinimum,
-    Path, Label, isZero, RegularExpression,
+    Path, Label, symbol, symbols, isZero, RegularExpression,
 
     -- * Combining edge labels
     Optimum (..), ShortestPath, AllShortestPaths, CountShortestPaths, WidestPath
     ) where
 
-import Control.Applicative
 import Control.Monad
 import Data.Coerce
 import Data.Maybe
-import Data.Monoid (Any (..), Monoid (..), Sum (..))
+import Data.Monoid (Any (..), Sum (..))
 import Data.Semigroup (Max (..), Min (..))
 import Data.Set (Set)
 import GHC.Exts (IsList (..))
@@ -72,7 +71,7 @@
         > 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
 
@@ -285,11 +284,11 @@
 instance (Num a, Eq a) => Num (Extended a) where
     fromInteger = Finite . fromInteger
 
-    (+) = liftA2 (+)
+    (+) = liftM2 (+)
 
     Finite 0 * _ = Finite 0
     _ * Finite 0 = Finite 0
-    x * y = liftA2 (*) x y
+    x * y = liftM2 (*) x y
 
     negate = fmap negate
     signum = fmap signum
@@ -331,7 +330,7 @@
 
 instance (Monoid a, Ord a) => Semiring (Minimum a) where
     one   = pure mempty
-    (<.>) = liftA2 mappend
+    (<.>) = liftM2 mappend
 
 instance (Monoid a, Ord a) => Dioid (Minimum a)
 
@@ -364,8 +363,8 @@
 
 instance (Monoid a, Ord a) => Dioid (PowerSet a) where
 
--- | The type of /free labels/ over the underlying set of symbols @a@. This data
--- type is an instance of classes 'StarSemiring' and 'Dioid'.
+-- | The type of /free labels/ over the underlying set of symbols @a@. 'Label' values
+-- can be manipulated via its 'Semigroup', 'Monoid' and 'StarSemiring' class instances.
 data Label a = Zero
              | One
              | Symbol a
@@ -377,9 +376,17 @@
 infixl 6 :+:
 infixl 7 :*:
 
+-- | Wrap a value into a 'Symbol' constructor
+symbol :: a -> Label a
+symbol = Symbol
+
+-- | Wrap a list of values into 'Symbol' constructors terminated by 'Zero'
+symbols :: Foldable t => t a -> Label a
+symbols = foldr ((<>) . Symbol) Zero
+
 instance IsList (Label a) where
     type Item (Label a) = a
-    fromList = foldr ((<>) . Symbol) Zero
+    fromList = symbols
     toList   = error "Label.toList cannot be given a reasonable definition"
 
 instance Show a => Show (Label a) where
diff --git a/src/Algebra/Graph/Labelled.hs b/src/Algebra/Graph/Labelled.hs
--- a/src/Algebra/Graph/Labelled.hs
+++ b/src/Algebra/Graph/Labelled.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Labelled
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -54,10 +54,9 @@
 import qualified Algebra.Graph.Labelled.AdjacencyMap as AM
 import qualified Algebra.Graph.ToGraph               as T
 
-import qualified Data.IntSet as IntSet
-import qualified Data.Set    as Set
-import qualified Data.Map    as Map
-import qualified GHC.Exts    as Exts
+import qualified Data.Set as Set
+import qualified Data.Map as Map
+import qualified GHC.Exts as Exts
 
 -- | Edge-labelled graphs, where the type variable @e@ stands for edge labels.
 -- For example, 'Graph' @Bool@ @a@ is isomorphic to unlabelled graphs defined in
@@ -71,7 +70,7 @@
 instance (Eq e, Monoid e, Ord a) => Eq (Graph e a) where
     x == y = toAdjacencyMap x == toAdjacencyMap y
 
-instance (Eq e, Monoid e, Ord a, Ord e) => Ord (Graph e a) where
+instance (Monoid e, Ord a, Ord e) => Ord (Graph e a) where
     compare x y = compare (toAdjacencyMap x) (toAdjacencyMap y)
 
 -- | __Note:__ this does not satisfy the usual ring laws; see 'Graph'
diff --git a/src/Algebra/Graph/Labelled/AdjacencyMap.hs b/src/Algebra/Graph/Labelled/AdjacencyMap.hs
--- a/src/Algebra/Graph/Labelled/AdjacencyMap.hs
+++ b/src/Algebra/Graph/Labelled/AdjacencyMap.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Labelled.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/Labelled/Example/Automaton.hs b/src/Algebra/Graph/Labelled/Example/Automaton.hs
--- a/src/Algebra/Graph/Labelled/Example/Automaton.hs
+++ b/src/Algebra/Graph/Labelled/Example/Automaton.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Labelled.Example.Automaton
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/Labelled/Example/Network.hs b/src/Algebra/Graph/Labelled/Example/Network.hs
--- a/src/Algebra/Graph/Labelled/Example/Network.hs
+++ b/src/Algebra/Graph/Labelled/Example/Network.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Labelled.Example.Network
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/NonEmpty.hs b/src/Algebra/Graph/NonEmpty.hs
--- a/src/Algebra/Graph/NonEmpty.hs
+++ b/src/Algebra/Graph/NonEmpty.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.NonEmpty
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -53,7 +53,6 @@
     ) where
 
 import Control.DeepSeq
-import Control.Monad
 import Control.Monad.Trans.State
 import Data.List.NonEmpty (NonEmpty (..))
 import Data.String
diff --git a/src/Algebra/Graph/NonEmpty/AdjacencyMap.hs b/src/Algebra/Graph/NonEmpty/AdjacencyMap.hs
--- a/src/Algebra/Graph/NonEmpty/AdjacencyMap.hs
+++ b/src/Algebra/Graph/NonEmpty/AdjacencyMap.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.NonEmpty.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/Relation.hs b/src/Algebra/Graph/Relation.hs
--- a/src/Algebra/Graph/Relation.hs
+++ b/src/Algebra/Graph/Relation.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Relation
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -46,15 +46,13 @@
 import Data.Bifunctor
 import Data.Set (Set, union)
 import Data.String
-import Data.Tree
+import Data.Tree (Tree (..))
 import Data.Tuple
 
 import qualified Data.IntSet as IntSet
 import qualified Data.Maybe  as Maybe
 import qualified Data.Set    as Set
 import qualified Data.Tree   as Tree
-
-import Algebra.Graph.Internal
 
 import qualified Algebra.Graph                 as G
 import qualified Algebra.Graph.AdjacencyIntMap as AIM
diff --git a/src/Algebra/Graph/Relation/Preorder.hs b/src/Algebra/Graph/Relation/Preorder.hs
--- a/src/Algebra/Graph/Relation/Preorder.hs
+++ b/src/Algebra/Graph/Relation/Preorder.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Relation.Preorder
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/Relation/Reflexive.hs b/src/Algebra/Graph/Relation/Reflexive.hs
--- a/src/Algebra/Graph/Relation/Reflexive.hs
+++ b/src/Algebra/Graph/Relation/Reflexive.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Relation.Reflexive
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/Relation/Symmetric.hs b/src/Algebra/Graph/Relation/Symmetric.hs
--- a/src/Algebra/Graph/Relation/Symmetric.hs
+++ b/src/Algebra/Graph/Relation/Symmetric.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Relation.Symmetric
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -45,16 +45,13 @@
 import Data.Coerce
 import Data.Set (Set)
 import Data.String
-import Data.Tree
+import Data.Tree (Forest, Tree)
 
 import qualified Data.IntSet as IntSet
 import qualified Data.Set    as Set
 
-import qualified Algebra.Graph                 as G
-import qualified Algebra.Graph.AdjacencyIntMap as AIM
-import qualified Algebra.Graph.AdjacencyMap    as AM
-import qualified Algebra.Graph.ToGraph         as T
-import qualified Algebra.Graph.Relation        as R
+import qualified Algebra.Graph.ToGraph  as T
+import qualified Algebra.Graph.Relation as R
 
 {-| This data type represents a /symmetric binary relation/ over a set of
 elements of type @a@. Symmetric relations satisfy all laws of the
diff --git a/src/Algebra/Graph/Relation/Transitive.hs b/src/Algebra/Graph/Relation/Transitive.hs
--- a/src/Algebra/Graph/Relation/Transitive.hs
+++ b/src/Algebra/Graph/Relation/Transitive.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Relation.Transitive
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/ToGraph.hs b/src/Algebra/Graph/ToGraph.hs
--- a/src/Algebra/Graph/ToGraph.hs
+++ b/src/Algebra/Graph/ToGraph.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.ToGraph
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Algebra/Graph/Undirected.hs b/src/Algebra/Graph/Undirected.hs
--- a/src/Algebra/Graph/Undirected.hs
+++ b/src/Algebra/Graph/Undirected.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Undirected
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/src/Data/Graph/Typed.hs b/src/Data/Graph/Typed.hs
--- a/src/Data/Graph/Typed.hs
+++ b/src/Data/Graph/Typed.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Data.Graph.Typed
--- Copyright  : (c) Anton Lorenzen, Andrey Mokhov 2016-2022
+-- Copyright  : (c) Anton Lorenzen, Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : anfelor@posteo.de, andrey.mokhov@gmail.com
 -- Stability  : unstable
diff --git a/test/Algebra/Graph/Test.hs b/test/Algebra/Graph/Test.hs
--- a/test/Algebra/Graph/Test.hs
+++ b/test/Algebra/Graph/Test.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/API.hs b/test/Algebra/Graph/Test/API.hs
--- a/test/Algebra/Graph/Test/API.hs
+++ b/test/Algebra/Graph/Test/API.hs
@@ -3,7 +3,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.API
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Acyclic/AdjacencyMap.hs b/test/Algebra/Graph/Test/Acyclic/AdjacencyMap.hs
--- a/test/Algebra/Graph/Test/Acyclic/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/Acyclic/AdjacencyMap.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Acyclic.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/AdjacencyIntMap.hs b/test/Algebra/Graph/Test/AdjacencyIntMap.hs
--- a/test/Algebra/Graph/Test/AdjacencyIntMap.hs
+++ b/test/Algebra/Graph/Test/AdjacencyIntMap.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.AdjacencyIntMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/AdjacencyMap.hs b/test/Algebra/Graph/Test/AdjacencyMap.hs
--- a/test/Algebra/Graph/Test/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/AdjacencyMap.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Arbitrary.hs b/test/Algebra/Graph/Test/Arbitrary.hs
--- a/test/Algebra/Graph/Test/Arbitrary.hs
+++ b/test/Algebra/Graph/Test/Arbitrary.hs
@@ -1,9 +1,8 @@
-{-# LANGUAGE CPP #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Arbitrary
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -15,10 +14,8 @@
     arbitraryGraph, arbitraryRelation, arbitraryAdjacencyMap,
     ) where
 
-import Control.Monad
 import Data.List.NonEmpty (NonEmpty (..), toList)
 import Data.Maybe (catMaybes)
-import Data.Tree
 import Test.QuickCheck
 
 import Algebra.Graph
diff --git a/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs b/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs
--- a/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Bipartite.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -20,7 +20,7 @@
 import Algebra.Graph.Test
 import Data.Either
 import Data.Either.Extra
-import Data.List (nub, sort)
+import Data.List (nub)
 import Data.Map.Strict (Map)
 import Data.Set (Set)
 
@@ -30,7 +30,6 @@
 import qualified Data.Map.Strict                      as Map
 import qualified Data.Set                             as Set
 import qualified Data.Tuple
-import qualified Algebra.Graph.Bipartite.AdjacencyMap as B
 
 type AI   = AM.AdjacencyMap Int
 type AII  = AM.AdjacencyMap (Either Int Int)
diff --git a/test/Algebra/Graph/Test/Export.hs b/test/Algebra/Graph/Test/Export.hs
--- a/test/Algebra/Graph/Test/Export.hs
+++ b/test/Algebra/Graph/Test/Export.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Export
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Generic.hs b/test/Algebra/Graph/Test/Generic.hs
--- a/test/Algebra/Graph/Test/Generic.hs
+++ b/test/Algebra/Graph/Test/Generic.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Generic
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -13,7 +13,7 @@
 
 import Control.Monad (when)
 import Data.Either
-import Data.List (nub, sort)
+import Data.List (nub)
 import Data.List.NonEmpty (NonEmpty (..))
 import Data.Tree
 import Data.Tuple
diff --git a/test/Algebra/Graph/Test/Graph.hs b/test/Algebra/Graph/Test/Graph.hs
--- a/test/Algebra/Graph/Test/Graph.hs
+++ b/test/Algebra/Graph/Test/Graph.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Graph
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Internal.hs b/test/Algebra/Graph/Test/Internal.hs
--- a/test/Algebra/Graph/Test/Internal.hs
+++ b/test/Algebra/Graph/Test/Internal.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Internal
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Label.hs b/test/Algebra/Graph/Test/Label.hs
--- a/test/Algebra/Graph/Test/Label.hs
+++ b/test/Algebra/Graph/Test/Label.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Label
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Labelled/AdjacencyMap.hs b/test/Algebra/Graph/Test/Labelled/AdjacencyMap.hs
--- a/test/Algebra/Graph/Test/Labelled/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/Labelled/AdjacencyMap.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Labelled.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Labelled/Graph.hs b/test/Algebra/Graph/Test/Labelled/Graph.hs
--- a/test/Algebra/Graph/Test/Labelled/Graph.hs
+++ b/test/Algebra/Graph/Test/Labelled/Graph.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Labelled.Graph
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/NonEmpty/AdjacencyMap.hs b/test/Algebra/Graph/Test/NonEmpty/AdjacencyMap.hs
--- a/test/Algebra/Graph/Test/NonEmpty/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/NonEmpty/AdjacencyMap.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.NonEmpty.AdjacencyMap
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/NonEmpty/Graph.hs b/test/Algebra/Graph/Test/NonEmpty/Graph.hs
--- a/test/Algebra/Graph/Test/NonEmpty/Graph.hs
+++ b/test/Algebra/Graph/Test/NonEmpty/Graph.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.NonEmpty.Graph
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Relation.hs b/test/Algebra/Graph/Test/Relation.hs
--- a/test/Algebra/Graph/Test/Relation.hs
+++ b/test/Algebra/Graph/Test/Relation.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Relation
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Relation/Symmetric.hs b/test/Algebra/Graph/Test/Relation/Symmetric.hs
--- a/test/Algebra/Graph/Test/Relation/Symmetric.hs
+++ b/test/Algebra/Graph/Test/Relation/Symmetric.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Relation.Symmetric
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/RewriteRules.hs b/test/Algebra/Graph/Test/RewriteRules.hs
--- a/test/Algebra/Graph/Test/RewriteRules.hs
+++ b/test/Algebra/Graph/Test/RewriteRules.hs
@@ -2,7 +2,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.RewriteRules
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Algebra/Graph/Test/Undirected.hs b/test/Algebra/Graph/Test/Undirected.hs
--- a/test/Algebra/Graph/Test/Undirected.hs
+++ b/test/Algebra/Graph/Test/Undirected.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Algebra.Graph.Test.Undirected
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : andrey.mokhov@gmail.com
 -- Stability  : experimental
diff --git a/test/Data/Graph/Test/Typed.hs b/test/Data/Graph/Test/Typed.hs
--- a/test/Data/Graph/Test/Typed.hs
+++ b/test/Data/Graph/Test/Typed.hs
@@ -1,7 +1,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module     : Data.Graph.Test.Typed
--- Copyright  : (c) Andrey Mokhov 2016-2022
+-- Copyright  : (c) Andrey Mokhov 2016-2025
 -- License    : MIT (see the file LICENSE)
 -- Maintainer : anfelor@posteo.de, andrey.mokhov@gmail.com
 -- Stability  : experimental
@@ -20,7 +20,7 @@
 import Data.Array (array)
 import Data.Graph.Typed
 import Data.Tree
-import Data.List (nub, sort)
+import Data.List (nub)
 
 import qualified Data.Graph  as KL
 import qualified Data.IntSet as IntSet
