diff --git a/cabal-bounds.cabal b/cabal-bounds.cabal
--- a/cabal-bounds.cabal
+++ b/cabal-bounds.cabal
@@ -1,5 +1,5 @@
 name: cabal-bounds
-version: 0.9
+version: 0.9.1
 cabal-version: >=1.9.2
 build-type: Simple
 license: BSD3
diff --git a/lib/CabalBounds/Dependencies.hs b/lib/CabalBounds/Dependencies.hs
--- a/lib/CabalBounds/Dependencies.hs
+++ b/lib/CabalBounds/Dependencies.hs
@@ -1,14 +1,18 @@
-{-# LANGUAGE PatternGuards, Rank2Types #-}
+{-# LANGUAGE PatternGuards, Rank2Types, CPP #-}
 
 module CabalBounds.Dependencies
    ( Dependencies(..)
    , dependencies
    , filterDependency
+   , allDependency
+   , dependencyIf
    ) where
 
 import Control.Lens
 import qualified CabalBounds.Args as A
+import qualified CabalLenses as CL
 import Distribution.Package (Dependency(..), PackageName(..))
+import Distribution.PackageDescription (GenericPackageDescription)
 
 -- | Which dependencies in the cabal file should the considered.
 data Dependencies = AllDependencies              -- ^ all dependencies
@@ -38,3 +42,23 @@
 
 filterDependency (IgnoreDependencies deps) =
    filtered (\(Dependency (PackageName pkgName) _) -> pkgName `notElem` deps)
+
+
+-- | A traversal for all 'Dependency' of all 'Section'.
+allDependency :: Traversal' GenericPackageDescription Dependency
+allDependency =
+#if MIN_VERSION_Cabal(1,22,0)
+   CL.allBuildInfo . CL.targetBuildDependsL . traversed
+#else
+   CL.allDependency
+#endif
+
+
+-- | A traversal for the 'Dependency' of 'Section' that match 'CondVars'.
+dependencyIf :: CL.CondVars -> CL.Section -> Traversal' GenericPackageDescription Dependency
+dependencyIf condVars section =
+#if MIN_VERSION_Cabal(1,22,0)
+   CL.buildInfoIf condVars section . CL.targetBuildDependsL . traversed
+#else
+   CL.dependencyIf
+#endif
diff --git a/lib/CabalBounds/Drop.hs b/lib/CabalBounds/Drop.hs
--- a/lib/CabalBounds/Drop.hs
+++ b/lib/CabalBounds/Drop.hs
@@ -7,7 +7,7 @@
 import Prelude hiding (drop)
 import Control.Lens
 import CabalBounds.Bound (DropBound(..))
-import CabalBounds.Dependencies (Dependencies, filterDependency)
+import CabalBounds.Dependencies (Dependencies, filterDependency, dependencyIf)
 import qualified CabalLenses as CL
 import Data.List (foldl')
 import Distribution.PackageDescription (GenericPackageDescription)
@@ -20,7 +20,7 @@
    foldl' dropFromSection pkgDescrp sections
    where
       dropFromSection pkgDescrp section =
-         pkgDescrp & CL.dependencyIf condVars section . filterDep %~ dropFromDep
+         pkgDescrp & dependencyIf condVars section . filterDep %~ dropFromDep
 
       filterDep   = filterDependency deps
       dropFromDep = dropFromDependency bound
diff --git a/lib/CabalBounds/Dump.hs b/lib/CabalBounds/Dump.hs
--- a/lib/CabalBounds/Dump.hs
+++ b/lib/CabalBounds/Dump.hs
@@ -8,6 +8,7 @@
 import Data.List (foldl')
 import Data.Maybe (fromMaybe)
 import qualified CabalLenses as CL
+import CabalBounds.Dependencies (allDependency)
 import Control.Lens
 
 type LibName    = String
@@ -18,7 +19,8 @@
 dump :: [GenericPackageDescription] -> [Library]
 dump pkgDescrps = HM.toList $ foldl' addLibsFromPkgDescrp HM.empty pkgDescrps
    where
-      addLibsFromPkgDescrp libs pkgDescrp = foldl' addLibFromDep libs (pkgDescrp ^.. CL.allDependency)
+      addLibsFromPkgDescrp libs pkgDescrp =
+         foldl' addLibFromDep libs (pkgDescrp ^.. allDependency)
 
       addLibFromDep libs dep
          | lowerBound_ /= CL.noLowerBound
diff --git a/lib/CabalBounds/Main.hs b/lib/CabalBounds/Main.hs
--- a/lib/CabalBounds/Main.hs
+++ b/lib/CabalBounds/Main.hs
@@ -6,7 +6,7 @@
 
 import Distribution.PackageDescription (GenericPackageDescription)
 import Distribution.PackageDescription.Parse (parsePackageDescription, ParseResult(..))
-import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription)
+import qualified Distribution.PackageDescription.PrettyPrint as PP
 import Distribution.Simple.Configure (tryGetConfigStateFile)
 
 #if MIN_VERSION_Cabal(1,22,0) == 0
@@ -27,12 +27,16 @@
 import qualified CabalBounds.Update as U
 import qualified CabalBounds.Dump as D
 import qualified CabalBounds.HaskellPlatform as HP
-import qualified CabalLenses as CL
 import qualified System.IO.Strict as SIO
 import Control.Applicative ((<$>))
 import Control.Monad.Trans.Either (EitherT, runEitherT, bimapEitherT, hoistEither, left, right)
 import Control.Monad.IO.Class
+
+#if MIN_VERSION_Cabal(1,22,0) && MIN_VERSION_Cabal(1,22,1) == 0
+import qualified CabalLenses as CL
 import Control.Lens
+#endif
+
 import qualified Data.HashMap.Strict as HM
 import Data.List (foldl', sortBy)
 import Data.Function (on)
@@ -45,14 +49,14 @@
    leftToJust <$> runEitherT (do
       pkgDescrp <- packageDescription $ A.cabalFile args
       let pkgDescrp' = D.drop (B.boundOfDrop args) (S.sections args pkgDescrp) (DP.dependencies args) pkgDescrp
-      liftIO $ writeFile (A.outputFile args) (showGenericPackageDescription . clearTargetBuildDepends $ pkgDescrp'))
+      liftIO $ writeFile (A.outputFile args) (showGenericPackageDescription pkgDescrp'))
 
 cabalBounds args@A.Update {} =
    leftToJust <$> runEitherT (do
       pkgDescrp <- packageDescription $ A.cabalFile args
       libs      <- libraries (A.haskellPlatform args) (A.fromFile args) setupConfigFile
       let pkgDescrp' = U.update (B.boundOfUpdate args) (S.sections args pkgDescrp) (DP.dependencies args) libs pkgDescrp
-      liftIO $ writeFile (A.outputFile args) (showGenericPackageDescription . clearTargetBuildDepends $ pkgDescrp'))
+      liftIO $ writeFile (A.outputFile args) (showGenericPackageDescription pkgDescrp'))
    where
       setupConfigFile
          | (file:_) <- A.setupConfigFile args
@@ -82,12 +86,6 @@
         ParseOk _ pkgDescrp -> right pkgDescrp
 
 
--- | clear the 'targetBuildDepends' field of all 'BuildInfo'
-clearTargetBuildDepends :: GenericPackageDescription -> GenericPackageDescription
-clearTargetBuildDepends pkgDescrp =
-   pkgDescrp & CL.allBuildInfo . CL.targetBuildDependsL .~ []
-
-
 packageDescriptions :: [FilePath] -> EitherT Error IO [GenericPackageDescription]
 packageDescriptions []    = left "Missing cabal file"
 packageDescriptions files = mapM packageDescription files
@@ -147,6 +145,24 @@
 
 leftToJust :: Either a b -> Maybe a
 leftToJust = either Just (const Nothing)
+
+
+showGenericPackageDescription :: GenericPackageDescription -> String
+showGenericPackageDescription =
+#if MIN_VERSION_Cabal(1,22,1)
+   PP.showGenericPackageDescription
+#elif MIN_VERSION_Cabal(1,22,0)
+   PP.showGenericPackageDescription . clearTargetBuildDepends
+   where
+      clearTargetBuildDepends pkgDescrp =
+         pkgDescrp & CL.allBuildInfo . CL.targetBuildDependsL .~ []
+#else
+   ensureLastIsNewline . PP.showGenericPackageDescription
+   where
+      ensureLastIsNewline xs =
+         if last xs == '\n' then xs else xs ++ "\n"
+#endif
+
 
 #if MIN_VERSION_Cabal(1,22,0) == 0
 deriving instance Show ConfigStateFileErrorType
diff --git a/lib/CabalBounds/Update.hs b/lib/CabalBounds/Update.hs
--- a/lib/CabalBounds/Update.hs
+++ b/lib/CabalBounds/Update.hs
@@ -9,7 +9,7 @@
 import Control.Lens
 import Control.Applicative ((<$>))
 import CabalBounds.Bound (UpdateBound(..))
-import CabalBounds.Dependencies (Dependencies(..), filterDependency)
+import CabalBounds.Dependencies (Dependencies(..), filterDependency, dependencyIf)
 import CabalBounds.VersionComp (VersionComp(..))
 import qualified CabalLenses as CL
 import Data.List (foldl')
@@ -26,7 +26,7 @@
    foldl' updateSection pkgDescrp sections
    where
       updateSection pkgDescrp section =
-         pkgDescrp & CL.dependencyIf condVars section . filterDep %~ updateDep
+         pkgDescrp & dependencyIf condVars section . filterDep %~ updateDep
 
       filterDep = filterDependency deps
       updateDep = updateDependency bound libs
@@ -57,7 +57,7 @@
          else do
             upperVersion <- HM.lookup pkgName_ libs
             let newUpperVersion = comp `compOf` upperVersion
-                newUpperBound   = V.UpperBound (nextVersion newUpperVersion) V.ExclusiveBound
+                newUpperBound   = V.UpperBound (nextVersion comp newUpperVersion) V.ExclusiveBound
                 newIntervals    = (versionRange_ ^. CL.intervals) & _last . CL.upperBound .~ newUpperBound
                 vrange          = fromMaybe (V.earlierVersion newUpperVersion) (mkVersionRange newIntervals)
             return $ dep & CL.versionRange .~ vrange
@@ -73,18 +73,23 @@
 
 compOf :: VersionComp -> V.Version -> V.Version
 Major1 `compOf` version =
-   version & CL.versionBranchL %~ (take 1 . ensureMinimalVersionBranch Major1)
+   version & CL.versionBranchL %~ take 1
            & CL.versionTagsL   .~ []
 
 Major2 `compOf` version =
-   version & CL.versionBranchL %~ (take 2 . ensureMinimalVersionBranch Major2)
+   version & CL.versionBranchL %~ take 2
            & CL.versionTagsL   .~ []
 
 Minor `compOf` version =
-   version & CL.versionBranchL %~ ensureMinimalVersionBranch Minor
-           & CL.versionTagsL   .~ []
+   version & CL.versionTagsL .~ []
 
 
+nextVersion :: VersionComp -> V.Version -> V.Version
+nextVersion comp version =
+   version & CL.versionBranchL         %~ ensureMinimalVersionBranch comp
+           & CL.versionBranchL . _last %~ (+ 1)
+
+
 ensureMinimalVersionBranch :: VersionComp -> [Int] -> [Int]
 ensureMinimalVersionBranch comp branch =
    let numDigits  = numNeededVersionDigits comp
@@ -96,10 +101,6 @@
       numNeededVersionDigits Major1 = 1
       numNeededVersionDigits Major2 = 2
       numNeededVersionDigits Minor  = 3
-
-
-nextVersion :: V.Version -> V.Version
-nextVersion version = version & CL.versionBranchL . _last %~ (+ 1)
 
 
 mkVersionRange :: [V.VersionInterval] -> Maybe V.VersionRange
diff --git a/tests/goldenFiles/DropBothIgnoreBase.cabal b/tests/goldenFiles/DropBothIgnoreBase.cabal
--- a/tests/goldenFiles/DropBothIgnoreBase.cabal
+++ b/tests/goldenFiles/DropBothIgnoreBase.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs -any,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs -any,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs -any,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs -any,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs -any,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropBothOfAll.cabal b/tests/goldenFiles/DropBothOfAll.cabal
--- a/tests/goldenFiles/DropBothOfAll.cabal
+++ b/tests/goldenFiles/DropBothOfAll.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base -any,
         cmdargs -any,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropBothOfAllExes.cabal b/tests/goldenFiles/DropBothOfAllExes.cabal
--- a/tests/goldenFiles/DropBothOfAllExes.cabal
+++ b/tests/goldenFiles/DropBothOfAllExes.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropBothOfExe.cabal b/tests/goldenFiles/DropBothOfExe.cabal
--- a/tests/goldenFiles/DropBothOfExe.cabal
+++ b/tests/goldenFiles/DropBothOfExe.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropBothOfLib.cabal b/tests/goldenFiles/DropBothOfLib.cabal
--- a/tests/goldenFiles/DropBothOfLib.cabal
+++ b/tests/goldenFiles/DropBothOfLib.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base -any,
         cmdargs -any,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropBothOfOtherExe.cabal b/tests/goldenFiles/DropBothOfOtherExe.cabal
--- a/tests/goldenFiles/DropBothOfOtherExe.cabal
+++ b/tests/goldenFiles/DropBothOfOtherExe.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropBothOfTest.cabal b/tests/goldenFiles/DropBothOfTest.cabal
--- a/tests/goldenFiles/DropBothOfTest.cabal
+++ b/tests/goldenFiles/DropBothOfTest.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base -any,
         cmdargs -any,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropBothOnlyBase.cabal b/tests/goldenFiles/DropBothOnlyBase.cabal
--- a/tests/goldenFiles/DropBothOnlyBase.cabal
+++ b/tests/goldenFiles/DropBothOnlyBase.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base -any,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base -any,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base -any,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base -any,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base -any,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropUpperIgnoreBase.cabal b/tests/goldenFiles/DropUpperIgnoreBase.cabal
--- a/tests/goldenFiles/DropUpperIgnoreBase.cabal
+++ b/tests/goldenFiles/DropUpperIgnoreBase.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropUpperOfAll.cabal b/tests/goldenFiles/DropUpperOfAll.cabal
--- a/tests/goldenFiles/DropUpperOfAll.cabal
+++ b/tests/goldenFiles/DropUpperOfAll.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropUpperOfAllExes.cabal b/tests/goldenFiles/DropUpperOfAllExes.cabal
--- a/tests/goldenFiles/DropUpperOfAllExes.cabal
+++ b/tests/goldenFiles/DropUpperOfAllExes.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropUpperOfExe.cabal b/tests/goldenFiles/DropUpperOfExe.cabal
--- a/tests/goldenFiles/DropUpperOfExe.cabal
+++ b/tests/goldenFiles/DropUpperOfExe.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropUpperOfLib.cabal b/tests/goldenFiles/DropUpperOfLib.cabal
--- a/tests/goldenFiles/DropUpperOfLib.cabal
+++ b/tests/goldenFiles/DropUpperOfLib.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropUpperOfOtherExe.cabal b/tests/goldenFiles/DropUpperOfOtherExe.cabal
--- a/tests/goldenFiles/DropUpperOfOtherExe.cabal
+++ b/tests/goldenFiles/DropUpperOfOtherExe.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropUpperOfTest.cabal b/tests/goldenFiles/DropUpperOfTest.cabal
--- a/tests/goldenFiles/DropUpperOfTest.cabal
+++ b/tests/goldenFiles/DropUpperOfTest.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/DropUpperOnlyBase.cabal b/tests/goldenFiles/DropUpperOnlyBase.cabal
--- a/tests/goldenFiles/DropUpperOnlyBase.cabal
+++ b/tests/goldenFiles/DropUpperOnlyBase.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/FromFile.cabal b/tests/goldenFiles/FromFile.cabal
--- a/tests/goldenFiles/FromFile.cabal
+++ b/tests/goldenFiles/FromFile.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <2.3,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <2.3,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <2.3,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <2.3,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=3 && <5,
         cmdargs >=0.10.5 && <2.3,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal -any
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
diff --git a/tests/goldenFiles/UpdateByHaskellPlatform.cabal b/tests/goldenFiles/UpdateByHaskellPlatform.cabal
--- a/tests/goldenFiles/UpdateByHaskellPlatform.cabal
+++ b/tests/goldenFiles/UpdateByHaskellPlatform.cabal
@@ -15,6 +15,11 @@
     location: https://github.com/dan-t/cabal-bounds
 
 library
+    exposed-modules:
+        CabalBounds.Args
+        CabalBounds.Command
+        CabalBounds.Execute
+        CabalBounds.Lenses
     build-depends:
         base >=4.6.0.1 && <4.7,
         cmdargs >=0.10.5 && <0.11,
@@ -22,16 +27,12 @@
         pretty-show -any,
         strict -any,
         Cabal >=1.16.0 && <1.17
-    exposed-modules:
-        CabalBounds.Args
-        CabalBounds.Command
-        CabalBounds.Execute
-        CabalBounds.Lenses
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
 
 executable cabal-bounds
+    main-is: ExeMain1.hs
     build-depends:
         base >=4.6.0.1 && <4.7,
         cmdargs >=0.10.5 && <0.11,
@@ -39,7 +40,6 @@
         pretty-show -any,
         strict -any,
         Cabal >=1.16.0 && <1.17
-    main-is: ExeMain1.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -51,6 +51,7 @@
     ghc-options: -W
 
 executable other-exe
+    main-is: ExeMain2.hs
     build-depends:
         base >=4.6.0.1 && <4.7,
         cmdargs >=0.10.5 && <0.11,
@@ -58,7 +59,6 @@
         pretty-show -any,
         strict -any,
         Cabal >=1.16.0 && <1.17
-    main-is: ExeMain2.hs
     cpp-options: -DCABAL
     hs-source-dirs: src
     other-modules:
@@ -70,6 +70,8 @@
     ghc-options: -W
 
 test-suite some-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain1.hs
     build-depends:
         base >=4.6.0.1 && <4.7,
         cmdargs >=0.10.5 && <0.11,
@@ -77,8 +79,6 @@
         pretty-show -any,
         strict -any,
         Cabal >=1.16.0 && <1.17
-    type: exitcode-stdio-1.0
-    main-is: TestMain1.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
@@ -88,6 +88,8 @@
         CabalBounds.Lenses
     ghc-options: -W
 test-suite other-test
+    type: exitcode-stdio-1.0
+    main-is: TestMain2.hs
     build-depends:
         base >=4.6.0.1 && <4.7,
         cmdargs >=0.10.5 && <0.11,
@@ -95,8 +97,6 @@
         pretty-show -any,
         strict -any,
         Cabal >=1.16.0 && <1.17
-    type: exitcode-stdio-1.0
-    main-is: TestMain2.hs
     hs-source-dirs: src
     other-modules:
         Paths_cabal_bounds
