diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,8 @@
+2024-09-07
+        * Version bump (4.0). (#532)
+        * Add support for pretty-printing struct update expressions. (#526)
+        * Add support for pretty-printing array update expressions. (#36)
+
 2024-07-07
         * Version bump (3.20). (#522)
 
diff --git a/copilot-prettyprinter.cabal b/copilot-prettyprinter.cabal
--- a/copilot-prettyprinter.cabal
+++ b/copilot-prettyprinter.cabal
@@ -1,6 +1,6 @@
 cabal-version:       >=1.10
 name:                copilot-prettyprinter
-version:             3.20
+version:             4.0
 synopsis:            A prettyprinter of Copilot Specifications.
 description:
   A prettyprinter of Copilot specifications.
@@ -45,7 +45,7 @@
     base   >= 4.9 && < 5,
     pretty >= 1.0 && < 1.2,
 
-    copilot-core >= 3.20 && < 3.21
+    copilot-core >= 4.0 && < 4.1
 
   exposed-modules:
 
diff --git a/src/Copilot/PrettyPrint.hs b/src/Copilot/PrettyPrint.hs
--- a/src/Copilot/PrettyPrint.hs
+++ b/src/Copilot/PrettyPrint.hs
@@ -99,7 +99,10 @@
   BwXor    _   -> ppInfix "^"
   BwShiftL _ _ -> ppInfix "<<"
   BwShiftR _ _ -> ppInfix ">>"
-  Index    _   -> ppInfix ".!!"
+  Index    _   -> ppInfix "!"
+  UpdateField (Struct _) _ f -> \ doc1 doc2 ->
+    parens $ doc1 <+> text "##" <+> text (accessorName f) <+> text "=:" <+> doc2
+  UpdateField _ _ _ -> impossible "ppOp2" "Copilot.PrettyPrint"
 
 -- | Pretty-print a ternary operation.
 ppOp3 :: Op3 a b c d -> Doc -> Doc -> Doc -> Doc
@@ -108,6 +111,8 @@
     text "(if"   <+> doc1 <+>
     text "then" <+> doc2 <+>
     text "else" <+> doc3 <> text ")"
+  UpdateArray _ -> \ doc1 doc2 doc3 ->
+    parens $ doc1 <+> text "!!" <+> doc2 <+> text "=:" <+> doc3
 
 -- | Parenthesize two 'Doc's, separated by an infix 'String'.
 ppInfix :: String -> Doc -> Doc -> Doc
