diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright Tony Day (c) 2017
+Copyright (c) 2016, Tony Day
 
 All rights reserved.
 
diff --git a/formatn.cabal b/formatn.cabal
--- a/formatn.cabal
+++ b/formatn.cabal
@@ -1,45 +1,105 @@
-cabal-version: 2.4
-name:          formatn
-version:       0.3.0
-synopsis:      Formatting of doubles.
+cabal-version: 3.0
+name: formatn
+version: 0.3.0.1
+license: BSD-3-Clause
+license-file: LICENSE
+copyright: Tony Day (c) 2016
+category: text
+author: Tony Day
+maintainer: tonyday567@gmail.com
+homepage: https://github.com/tonyday567/formatn#readme
+bug-reports: https://github.com/tonyday567/formatn/issues
+synopsis: Formatting of doubles.
 description:
-  This package provides support for number formatting styles, especially styles involving significant figure calculations.
-  .
-  == Usage
-  .
-  >>> import Data.FormatN
-  >>> comma (Just 3) 1234
-  1,230
+    This package provides support for number formatting styles, especially styles involving significant figure calculations.
+    .
+    == Usage
+    .
+    >>> import Data.FormatN
+    >>> comma (Just 3) 1234
+    1,230
 
-category:      Development
-homepage:      https://github.com/tonyday567/formatn#readme
-bug-reports:   https://github.com/tonyday567/formatn/issues
-author:        Tony Day
-maintainer:    tonyday567@gmail.com
-copyright:     2016 Tony Day
-license:       BSD-3-Clause
-license-file:  LICENSE
-build-type:    Simple
-tested-with:   GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.2.5 || ==9.4.4
+build-type: Simple
+tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.2.5 || ==9.4.7 || ==9.6.3 || ==9.8.1
 
 source-repository head
-  type:     git
-  location: https://github.com/tonyday567/formatn
+    type: git
+    location: https://github.com/tonyday567/formatn
 
-library
-  hs-source-dirs:     src
-  default-extensions:
-  ghc-options:
-    -Wall -Wcompat -Wincomplete-record-updates
-    -Wincomplete-uni-patterns -Wredundant-constraints
+common ghc-options-stanza
+    ghc-options:
+        -Wall
+        -Wcompat
+        -Widentities
+        -Wincomplete-record-updates
+        -Wincomplete-uni-patterns
+        -Wpartial-fields
+        -Wredundant-constraints
 
-  build-depends:
-    , base >= 4.7 && < 5
-    , containers >= 0.6 && < 0.7
-    , text >= 1.2 && < 2.1
-    -- just for cabal-docspec --check-properties
-    , QuickCheck >= 2.14.2 && < 2.15
+common ghc2021-stanza
+    if impl ( ghc >= 9.2 )
+        default-language: GHC2021
 
-  exposed-modules:    Data.FormatN
-  other-modules:
-  default-language:   Haskell2010
+    if impl ( ghc < 9.2 )
+        default-language: Haskell2010
+        default-extensions:
+            BangPatterns
+            BinaryLiterals
+            ConstrainedClassMethods
+            ConstraintKinds
+            DeriveDataTypeable
+            DeriveFoldable
+            DeriveFunctor
+            DeriveGeneric
+            DeriveLift
+            DeriveTraversable
+            DoAndIfThenElse
+            EmptyCase
+            EmptyDataDecls
+            EmptyDataDeriving
+            ExistentialQuantification
+            ExplicitForAll
+            FlexibleContexts
+            FlexibleInstances
+            ForeignFunctionInterface
+            GADTSyntax
+            GeneralisedNewtypeDeriving
+            HexFloatLiterals
+            ImplicitPrelude
+            InstanceSigs
+            KindSignatures
+            MonomorphismRestriction
+            MultiParamTypeClasses
+            NamedFieldPuns
+            NamedWildCards
+            NumericUnderscores
+            PatternGuards
+            PolyKinds
+            PostfixOperators
+            RankNTypes
+            RelaxedPolyRec
+            ScopedTypeVariables
+            StandaloneDeriving
+            StarIsType
+            TraditionalRecordSyntax
+            TupleSections
+            TypeApplications
+            TypeOperators
+            TypeSynonymInstances
+
+    if impl ( ghc < 9.2 ) && impl ( ghc >= 8.10 )
+        default-extensions:
+            ImportQualifiedPost
+            StandaloneKindSignatures
+
+library
+    import: ghc-options-stanza
+    import: ghc2021-stanza
+    hs-source-dirs: src
+    build-depends:
+        -- just for cabal-docspec --check-properties
+        , QuickCheck >=2.14.2 && <2.15
+        , base       >=4.7 && <5
+        , containers >=0.6 && <0.8
+        , text       >=1.2 && <2.2
+    exposed-modules: Data.FormatN
diff --git a/src/Data/FormatN.hs b/src/Data/FormatN.hs
--- a/src/Data/FormatN.hs
+++ b/src/Data/FormatN.hs
@@ -91,12 +91,12 @@
 import Data.Bool
 import Data.Containers.ListUtils (nubOrd)
 import Data.Foldable
-import qualified Data.List as List
-import qualified Data.Map.Strict as Map
+import Data.List qualified as List
+import Data.Map.Strict qualified as Map
 import Data.Maybe
 import Data.Ord
 import Data.Text (Text, pack)
-import qualified Data.Text as Text
+import Data.Text qualified as Text
 import GHC.Generics hiding (prec)
 import Numeric
 import Prelude hiding (exponent)
