diff --git a/diagrams-pgf.cabal b/diagrams-pgf.cabal
--- a/diagrams-pgf.cabal
+++ b/diagrams-pgf.cabal
@@ -1,5 +1,5 @@
 name:                diagrams-pgf
-version:             1.4.1.1
+version:             1.4.2
 synopsis:            PGF backend for diagrams drawing EDSL.
 license:             BSD3
 license-file:        LICENSE
@@ -13,7 +13,7 @@
 cabal-version:       1.18
 extra-source-files:  README.md, diagrams/*.svg
 extra-doc-files:     diagrams/*.svg
-tested-with:         GHC ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.3 || ==8.6.5 || ==8.8.1
+tested-with:         GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1 || ==9.2.1
 
 description:
   This package provides a modular backend for rendering diagrams created
@@ -34,22 +34,22 @@
     Graphics.Rendering.PGF
   hs-source-dirs:      src
   build-depends:
-    base                 >= 4.4   && < 4.14,
+    base                 >= 4.4   && < 4.17,
     bytestring           >= 0.9   && < 1.1,
     bytestring-builder               < 1.1,
     containers           >= 0.3   && < 0.7,
     colour,
-    diagrams-core        >= 1.4   && < 1.5,
+    diagrams-core        >= 1.4   && < 1.6,
     diagrams-lib         >= 1.4   && < 1.5,
     directory            >= 1.0   && < 1.4,
     filepath             >= 1.2   && < 1.5,
-    hashable             >= 1.1   && < 1.4,
+    hashable             >= 1.1   && < 1.5,
     mtl                  >= 2.1   && < 3.0,
-    optparse-applicative >= 0.13  && < 0.16,
+    optparse-applicative >= 0.13  && < 0.17,
     process              >= 1.0   && < 1.7,
     split                >= 0.1.2 && < 0.3,
     texrunner            <= 0.0.2,
-    time                 >= 1.2   && < 1.10,
+    time                 >= 1.2   && < 1.14,
     JuicyPixels,
     vector,
     zlib
diff --git a/src/Diagrams/Backend/PGF/Render.hs b/src/Diagrams/Backend/PGF/Render.hs
--- a/src/Diagrams/Backend/PGF/Render.hs
+++ b/src/Diagrams/Backend/PGF/Render.hs
@@ -72,6 +72,7 @@
     , _readable   :: Bool          -- ^ Indented lines for @.tex@ output.
     , _standalone :: Bool          -- ^ Should @.tex@ output be standalone.
     }
+    deriving Eq
 
   renderRTree _ ops (toRender -> R r) =
     P.renderWith (ops^.surface) (ops^.readable) (ops^.standalone) bounds r
diff --git a/src/Diagrams/Backend/PGF/Surface.hs b/src/Diagrams/Backend/PGF/Surface.hs
--- a/src/Diagrams/Backend/PGF/Surface.hs
+++ b/src/Diagrams/Backend/PGF/Surface.hs
@@ -288,6 +288,18 @@
   hashWithSalt s ConTeXt  = s `hashWithSalt` (2::Int)
   hashWithSalt s PlainTeX = s `hashWithSalt` (3::Int)
 
+instance Eq Surface where
+  Surface tf1 cm1 ar1 ps1 p1 bd1 ed1 == Surface tf2 cm2 ar2 ps2 p2 bd2 ed2
+    = and
+      [ tf1 == tf2
+      , cm1 == cm2
+      , ar1 == ar2
+      , (ps1 <*> Just (V2 1 2)) == (ps2 <*> Just (V2 1 2))
+      , p1 == p2
+      , bd1 == bd2
+      , ed1 == ed2
+      ]
+
 instance Hashable Surface where
   hashWithSalt s (Surface tf cm ar ps p bd ed)
     = s                    `hashWithSalt`
