packages feed

cabal-bounds 0.6 → 0.7

raw patch · 12 files changed

+913/−211 lines, 12 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ CabalBounds.Args: haskellPlatform :: Args -> String
+ CabalBounds.Args: missing :: Args -> Bool
- CabalBounds.Args: Update :: Bool -> Bool -> Maybe VersionComp -> Maybe VersionComp -> Bool -> [String] -> [String] -> [String] -> [String] -> [String] -> String -> String -> String -> Args
+ CabalBounds.Args: Update :: Bool -> Bool -> Maybe VersionComp -> Maybe VersionComp -> Bool -> [String] -> [String] -> [String] -> [String] -> [String] -> Bool -> String -> String -> String -> [String] -> Args
- CabalBounds.Args: setupConfigFile :: Args -> String
+ CabalBounds.Args: setupConfigFile :: Args -> [String]

Files

README.md view
@@ -3,11 +3,12 @@  A command line program for managing the bounds/versions of the dependencies in a cabal file. -`cabal-bounds` is able to do two things:-* drop the bounds of the dependencies in the cabal file-* update the bounds of the dependencies in the cabal file using the cabal build information+`cabal-bounds` is able to do three things with the bounds of the dependencies in the cabal file:+* drop them+* update them by the library versions of the current cabal build+* update them by the library versions of a haskell platform release -Example: Raise the upper Bounds+Example: Raise the Upper Bounds ===============================  If you have several cabalized projects, then it can be quite time consuming to keep the@@ -32,6 +33,42 @@     # update the upper bound of all dependencies in 'myproject.cabal' by the cabal build information     $> cabal-bounds update --upper --ignore=base myproject.cabal dist/dist-sandbox-*/setup-config  +Example: Update Bounds by Haskell Platform+==========================================++Ensuring that your project builds with the current [haskell platform](<https://www.haskell.org/platform/>) - or+perhaps the last two ones - can make it, especially for beginners, a lot easier to build your project.++`cabal-bounds` supports the updating of the bounds by the library versions of a specific haskell platform release.++To update the bounds to the haskell platform `2013.2.0.0`:++    $> cabal-bounds update --haskell-platform=2013.2.0.0 myproject.cabal++There're two additional symbolic names for specifying a haskell platform release: `current` and `previous`.++So one use case might be to initialize the bounds to library versions used by a haskell platform release,+test if your project builds and works with these, and then raise the upper bounds to the newest available versions:++    # intialize the bounds to the previous haskell platform release+    $> cabal-bounds update --ignore=base --haskell-platform=previous myproject.cabal++    # build and test the project++    # initialize the lower bounds of libraries not present in the haskell platform+    $> cabal-bounds update --lower --missing --ignore=base myproject.cabal dist/dist-sandbox-*/setup-config++    # drop the upper bounds to test your project with the newest available library versions+    $> cabal-bounds drop --upper --ignore=base myproject.cabal++    # build and test the project++    # set the upper bounds to the ones used in the current build+    $> cabal-bounds update --upper --ignore=base myproject.cabal dist/dist-sandbox-*/setup-config++If you specify a haskell platform release and a setup config file at once, then the setup config library+verions are only used for the libraries not present in the haskell platform release.+ Example: Bound Changes ====================== @@ -96,6 +133,7 @@ * `--only=name` * `--ignore=name` +You can also only update the dependencies without a bound by specifying the `--missing` flag. If you omit these options, then all dependencies are considered and modified.  All options taking a name can be specified multiple times:
cabal-bounds.cabal view
@@ -1,5 +1,5 @@ name: cabal-bounds-version: 0.6+version: 0.7 cabal-version: >=1.9.2 build-type: Simple license: BSD3@@ -7,153 +7,18 @@ maintainer: daniel.trstenjak@gmail.com synopsis: A command line program for managing the bounds/versions of the dependencies in a cabal file. description:-    'cabal-bounds' is able to do two things:-    .-    * drop the bounds of the dependencies in the cabal file-    .-    * update the bounds of the dependencies in the cabal file using the cabal build information-    .-    .-    .-    /Example: Raise the upper Bounds/-    .-    .-    If you have several cabalized projects, then it can be quite time consuming to keep the-    bounds of your dependencies up to date. Especially if you're following the package versioning-    policy, then you want to raise your upper bounds from time to time, to allow the building with-    newer versions of the dependencies.-    .-    'cabal-bounds' tries to automate this update process to some degree. So a typical update process might look like:-    .-    > # update the version infos of all libraries-    > $> cabal update-    >-    > # drops the upper bound of all dependencies in 'myproject.cabal',-    > # most likely you want to ignore 'base'-    > $> cabal-bounds drop --upper --ignore=base myproject.cabal-    >-    > # create a cabal sandbox for building of 'myproject'-    > $> cabal sandbox init-    >-    > # build 'myproject'-    > $> cabal install-    >-    > # update the upper bound of all dependencies in 'myproject.cabal'-    > # by the cabal build information-    > $> cabal-bounds update --upper --ignore=base myproject.cabal dist/dist-sandbox-*/setup-config-    .-    .-    .-    /Example: Bound Changes/-    .-    .-    The '=>' shows what the result is of the operation for every dependency. Left is the dependency before-    calling the command, right the one after calling.-    .-    > $> cabal-bounds drop ...-    > lens >=4.0.1 && <4.1   =>   lens-    >-    > $> cabal-bounds drop --upper ...-    > lens >=4.0.1 && <4.1   =>   lens >=4.0.1-    .-    If the cabal build (the setup-config) uses 'lens 4.1.2', then the results of the 'update' command would be:-    .-    > $> cabal-bounds update ...-    > lens >=4.0.1 && <4.1   =>   lens >=4.1.2 && <4.2-    > lens                   =>   lens >=4.1.2 && <4.2-    >-    > $> cabal-bounds update --lower ...-    > lens >=4.0.1 && <5     =>   lens >=4.1.2 && <5-    > lens >=4.0.1 && <4.1   =>   lens >=4.1.2-    > lens <4.1              =>   lens >=4.1.2-    > lens                   =>   lens >=4.1.2-    >-    > $> cabal-bounds update --upper ...-    > lens >=4.0.1 && <4.1   =>   lens >=4.0.1 && <4.2-    > lens >=4.0.1           =>   lens >=4.0.1 && <4.2-    > lens                   =>   lens <4.2-    .-    You can also specify which component of the version number should be updated:-    .-    > $> cabal-bounds update --lowercomp=minor ...-    > lens >=4.0.1 && <4.1   =>   lens >=4.1.2-    >-    > $> cabal-bounds update --lowercomp=major2 ...-    > lens >=4.0.1 && <4.1   =>   lens >=4.1-    >-    > $> cabal-bounds update --lowercomp=major1 ...-    > lens >=4.0.1 && <4.1   =>   lens >=4 && <4.1-    >-    > $> cabal-bounds update --uppercomp=minor ...-    > lens >=4.0.1 && <4.1   =>   lens >=4.0.1 && <4.1.3-    >-    > $> cabal-bounds update --uppercomp=major2 ...-    > lens >=4.0.1 && <4.1   =>   lens >=4.0.1 && <4.2-    >-    > $> cabal-bounds update --uppercomp=major1 ...-    > lens >=4.0.1 && <4.1   =>   lens >=4.0.1 && <5-    .-    .-    .-    /Installation/-    .-    .-    You have to ensure, that the 'Cabal' library of 'cabal-bounds' matches the one used by the 'cabal' binary:-    .-    > $> cabal --version-    > cabal-install version 1.18.0.2-    > using version 1.18.1 of the Cabal library-    >-    > $> cabal install --constraint="Cabal == 1.18.1" cabal-bounds-    .-    If you update the 'cabal' binary and the used 'Cabal' library changes, then you have to rebuild 'cabal-bounds'.-    .-    .-    .-    /Options/-    .-    .-    You can restrict the modification to certain sections in the cabal file by specifing the type and the name of the section:-    .-    * --library-    .-    * --executable=name-    .-    * --testsuite=name-    .-    * --benchmark=name-    .-    If you omit these options, then all sections are considered and modified.-    .-    .-    You can also restrict the modification of dependencies by specifing which dependencies should only or shouldn't be modified:-    .-    * --only=name-    .-    * --ignore=name-    .-    If you omit these options, then all dependencies are considered and modified.-    .-    .-    All options taking a name can be specified multiple times:-    .-    e.g. '--executable=exe1 --executable=exe2' or '--ignore=base --ignore=whatever'-    .-    Please consult 'cabal-bounds --help' for a complete list of options.-    .-    .+    A command line program for managing the bounds/versions of the dependencies in a cabal file.     .-    /Issues/+    `cabal-bounds` is able to do three things with the bounds of the dependencies in the cabal file:     .+    * drop them     .-    Perhaps the currently most annoying thing is, that you have to live with the reformating of your-    'cabal' file done by the pretty printer of the 'Cabal' library.+    * update them by the library versions of the current cabal build     .-    To reformat your 'cabal' file without changing any bounds you can call 'cabal-bounds' with the name of-    a section that isn't present in the 'cabal' file:+    * update them by the library versions of a haskell platform release     .-    > $> cabal-bounds drop --executable=blub myproject.cabal-category: Utils+    For further details please consult the <https://github.com/dan-t/cabal-bounds README>.+category: Utils Development author: Daniel Trstenjak extra-source-files:     README.md@@ -195,6 +60,7 @@         CabalBounds.Dependencies         CabalBounds.Drop         CabalBounds.Update+        CabalBounds.HaskellPlatform     ghc-options: -W   executable cabal-bounds
lib/CabalBounds/Args.hs view
@@ -37,10 +37,12 @@                    , benchmark       :: [String]                    , only            :: [String]                    , ignore          :: [String]+                   , missing         :: Bool                    , output          :: String+                   , haskellPlatform :: String                    , cabalFile       :: String-                   , setupConfigFile :: String-                   } +                   , setupConfigFile :: [String]+                   }           deriving (Data, Typeable, Show, Eq)  @@ -87,7 +89,9 @@    , benchmark       = def    , only            = def    , ignore          = def+   , missing         = def    , output          = def+   , haskellPlatform = def    , cabalFile       = def    , setupConfigFile = def    }@@ -111,9 +115,11 @@ updateArgs = Update    { lower           = def &= explicit &= name "lower" &= name "L" &= help "Only the lower bound is updated. The same as using '--lowercomp=minor'."    , upper           = def &= explicit &= name "upper" &= name "U" &= help "Only the upper bound is updated. The same as using '--uppercomp=major2'."-   , lowerComp       = def &= explicit &= name "lowercomp" &= help "Only the lower bound is updated with the specified version component. (major1, major2 or minor)" +   , lowerComp       = def &= explicit &= name "lowercomp" &= help "Only the lower bound is updated with the specified version component. (major1, major2 or minor)"    , upperComp       = def &= explicit &= name "uppercomp" &= help "Only the upper bound is updated with the specified version component. (major1, major2 or minor)"-   , setupConfigFile = def &= argPos 1 &= typ "SETUP-CONFIG-FILE"+   , missing         = def &= help "Only the dependencies having missing bounds are updated."+   , haskellPlatform = def &= explicit &= typ "VERSION" &= name "haskell-platform" &= help "Update bounds by the library versions of the specified haskell platform version"+   , setupConfigFile = def &= args &= typ "SETUP-CONFIG-FILE"    }  
lib/CabalBounds/Bound.hs view
@@ -5,7 +5,7 @@    , UpdateBound(..)    , boundOfDrop    , boundOfUpdate-   ) where   +   ) where  import CabalBounds.Args (Args(Drop, Update)) import qualified CabalBounds.Args as A@@ -16,9 +16,16 @@                | DropBoth                deriving (Show, Eq) -data UpdateBound = UpdateLower VersionComp-                 | UpdateUpper VersionComp-                 | UpdateBoth { lowerComp :: VersionComp, upperComp :: VersionComp }++-- | The bound is only updated if it's missing.+type IfMissing = Bool++type LowerComp = VersionComp+type UpperComp = VersionComp++data UpdateBound = UpdateLower LowerComp IfMissing+                 | UpdateUpper UpperComp IfMissing+                 | UpdateBoth LowerComp UpperComp IfMissing                  deriving (Show, Eq)  @@ -30,16 +37,16 @@ boundOfUpdate :: Args -> UpdateBound boundOfUpdate upd@Update {}    | hasLower && hasUpper-   = UpdateBoth lowerComp upperComp+   = UpdateBoth lowerComp upperComp ifMissing     | hasLower-   = UpdateLower lowerComp+   = UpdateLower lowerComp ifMissing     | hasUpper-   = UpdateUpper upperComp+   = UpdateUpper upperComp ifMissing     | otherwise-   = UpdateBoth lowerComp upperComp+   = UpdateBoth lowerComp upperComp ifMissing    where       lowerComp          | Just comp <- A.lowerComp upd@@ -54,6 +61,8 @@           | otherwise          = defaultUpperComp++      ifMissing = A.missing upd        hasLower = A.lower upd || (isJust . A.lowerComp $ upd)       hasUpper = A.upper upd || (isJust . A.upperComp $ upd)
lib/CabalBounds/Dependencies.hs view
@@ -10,9 +10,10 @@ import qualified CabalBounds.Args as A import Distribution.Package (Dependency(..), PackageName(..)) -data Dependencies = AllDependencies-                  | OnlyDependencies [String]-                  | IgnoreDependencies [String]+-- | Which dependencies in the cabal file should the considered.+data Dependencies = AllDependencies              -- ^ all dependencies+                  | OnlyDependencies [String]    -- ^ only the listed dependencies+                  | IgnoreDependencies [String]  -- ^ all dependencies but the listed ones                   deriving (Show, Eq)  
+ lib/CabalBounds/HaskellPlatform.hs view
@@ -0,0 +1,384 @@++module CabalBounds.HaskellPlatform+   ( librariesOf+   , currentLibraries+   , previousLibraries+   , allVersions+   , HPVersion+   ) where++import qualified Distribution.Version as V+import Control.Applicative ((<$>))+import Data.List (find)++type LibName    = String+type LibVersion = V.Version+type Library    = (LibName, LibVersion)+type HPVersion  = String+++-- | the libraries of the given haskell platform version+librariesOf :: HPVersion -> Maybe [Library]+librariesOf hpVers = snd <$> find ((== hpVers) . fst) allVersions+++-- | the libraries of the current haskell platform+currentLibraries :: [Library]+currentLibraries = snd . last $ allVersions+++-- | the libraries of the previous haskell platform+previousLibraries :: [Library]+previousLibraries = snd . head . drop 1 . reverse $ allVersions+++-- | all haskell platform versions and their libraries+allVersions :: [(HPVersion, [Library])]+allVersions =+   [ ("2010.2.0.0", libs_2010_2_0_0)+   , ("2011.2.0.0", libs_2011_2_0_0)+   , ("2011.2.0.1", libs_2011_2_0_1)+   , ("2011.4.0.0", libs_2011_4_0_0)+   , ("2012.2.0.0", libs_2012_2_0_0)+   , ("2012.4.0.0", libs_2012_4_0_0)+   , ("2013.2.0.0", libs_2013_2_0_0)+   ]+++libs_2010_2_0_0 =+   [ lib "array" [0,3,0,1]+   , lib "base" [4,2,0,2]+   , lib "bytestring" [0,9,1,7]+   , lib "Cabal" [1,8,0,6]+   , lib "cgi" [3001,1,7,3]+   , lib "containers" [0,3,0,0]+   , lib "deepseq" [1,1,0,0]+   , lib "directory" [1,0,1,1]+   , lib "extensible-exceptions" [0,1,1,1]+   , lib "fgl" [5,4,2,3]+   , lib "filepath" [1,1,0,4]+   , lib "GLUT" [2,1,2,1]+   , lib "haskell-src" [1,0,1,3]+   , lib "haskell98" [1,0,1,1]+   , lib "hpc" [0,5,0,5]+   , lib "html" [1,0,1,2]+   , lib "HTTP" [4000,0,9]+   , lib "HUnit" [1,2,2,1]+   , lib "mtl" [1,1,0,2]+   , lib "network" [2,2,1,7]+   , lib "old-locale" [1,0,0,2]+   , lib "old-time" [1,0,0,5]+   , lib "OpenGL" [2,2,3,0]+   , lib "parallel" [2,2,0,1]+   , lib "parsec" [2,1,0,1]+   , lib "pretty" [1,0,1,1]+   , lib "process" [1,0,1,3]+   , lib "QuickCheck" [2,1,1,1]+   , lib "random" [1,0,0,2]+   , lib "regex-base" [0,93,2]+   , lib "regex-compat" [0,93,1]+   , lib "regex-posix" [0,94,2]+   , lib "stm" [2,1,2,1]+   , lib "syb" [0,1,0,2]+   , lib "template-haskell" [2,4,0,1]+   , lib "time" [1,1,4]+   , lib "unix" [2,4,0,2]+   , lib "xhtml" [3000,2,0,1]+   , lib "zlib" [0,5,2,0]+   ]+++libs_2011_2_0_0 =+   [ lib "array" [0,3,0,2]+   , lib "base" [4,3,1,0]+   , lib "bytestring" [0,9,1,10]+   , lib "Cabal" [1,10,1,0]+   , lib "cgi" [3001,1,7,4]+   , lib "containers" [0,4,0,0]+   , lib "deepseq" [1,1,0,2]+   , lib "directory" [1,1,0,0]+   , lib "extensible-exceptions" [0,1,1,2]+   , lib "fgl" [5,4,2,3]+   , lib "filepath" [1,2,0,0]+   , lib "GLUT" [2,1,2,1]+   , lib "haskell-src" [1,0,1,4]+   , lib "haskell2010" [1,0,0,0]+   , lib "haskell98" [1,1,0,1]+   , lib "hpc" [0,5,0,6]+   , lib "html" [1,0,1,2]+   , lib "HTTP" [4000,1,1]+   , lib "HUnit" [1,2,2,3]+   , lib "mtl" [2,0,1,0]+   , lib "network" [2,3,0,2]+   , lib "old-locale" [1,0,0,2]+   , lib "old-time" [1,0,0,6]+   , lib "OpenGL" [2,2,3,0]+   , lib "parallel" [3,1,0,1]+   , lib "parsec" [3,1,1]+   , lib "pretty" [1,0,1,2]+   , lib "process" [1,0,1,5]+   , lib "QuickCheck" [2,4,0,1]+   , lib "random" [1,0,0,3]+   , lib "regex-base" [0,93,2]+   , lib "regex-compat" [0,93,1]+   , lib "regex-posix" [0,94,4]+   , lib "stm" [2,2,0,1]+   , lib "syb" [0,3]+   , lib "template-haskell" [2,5,0,0]+   , lib "text" [0,11,0,5]+   , lib "time" [1,2,0,3]+   , lib "transformers" [0,2,2,0]+   , lib "unix" [2,4,2,0]+   , lib "xhtml" [3000,2,0,1]+   , lib "zlib" [0,5,3,1]+   ]+++libs_2011_2_0_1 =+   [ lib "array" [0,3,0,2]+   , lib "base" [4,3,1,0]+   , lib "bytestring" [0,9,1,10]+   , lib "Cabal" [1,10,1,0]+   , lib "cgi" [3001,1,7,4]+   , lib "containers" [0,4,0,0]+   , lib "deepseq" [1,1,0,2]+   , lib "directory" [1,1,0,0]+   , lib "extensible-exceptions" [0,1,1,2]+   , lib "fgl" [5,4,2,3]+   , lib "filepath" [1,2,0,0]+   , lib "GLUT" [2,1,2,1]+   , lib "haskell-src" [1,0,1,4]+   , lib "haskell2010" [1,0,0,0]+   , lib "haskell98" [1,1,0,1]+   , lib "hpc" [0,5,0,6]+   , lib "html" [1,0,1,2]+   , lib "HTTP" [4000,1,1]+   , lib "HUnit" [1,2,2,3]+   , lib "mtl" [2,0,1,0]+   , lib "network" [2,3,0,2]+   , lib "old-locale" [1,0,0,2]+   , lib "old-time" [1,0,0,6]+   , lib "OpenGL" [2,2,3,0]+   , lib "parallel" [3,1,0,1]+   , lib "parsec" [3,1,1]+   , lib "pretty" [1,0,1,2]+   , lib "process" [1,0,1,5]+   , lib "QuickCheck" [2,4,0,1]+   , lib "random" [1,0,0,3]+   , lib "regex-base" [0,93,2]+   , lib "regex-compat" [0,93,1]+   , lib "regex-posix" [0,94,4]+   , lib "stm" [2,2,0,1]+   , lib "syb" [0,3]+   , lib "template-haskell" [2,5,0,0]+   , lib "text" [0,11,0,6]+   , lib "time" [1,2,0,3]+   , lib "transformers" [0,2,2,0]+   , lib "unix" [2,4,2,0]+   , lib "xhtml" [3000,2,0,1]+   , lib "zlib" [0,5,3,1]+   ]+++libs_2011_4_0_0 =+   [ lib "array" [0,3,0,2]+   , lib "base" [4,3,1,0]+   , lib "bytestring" [0,9,1,10]+   , lib "Cabal" [1,10,2,0]+   , lib "cgi" [3001,1,7,4]+   , lib "containers" [0,4,0,0]+   , lib "deepseq" [1,1,0,2]+   , lib "directory" [1,1,0,0]+   , lib "extensible-exceptions" [0,1,1,2]+   , lib "fgl" [5,4,2,4]+   , lib "filepath" [1,2,0,0]+   , lib "GLUT" [2,1,2,1]+   , lib "haskell-src" [1,0,1,4]+   , lib "haskell2010" [1,0,0,0]+   , lib "haskell98" [1,1,0,1]+   , lib "hpc" [0,5,0,6]+   , lib "html" [1,0,1,2]+   , lib "HTTP" [4000,1,2]+   , lib "HUnit" [1,2,4,2]+   , lib "mtl" [2,0,1,0]+   , lib "network" [2,3,0,5]+   , lib "old-locale" [1,0,0,2]+   , lib "old-time" [1,0,0,6]+   , lib "OpenGL" [2,2,3,0]+   , lib "parallel" [3,1,0,1]+   , lib "parsec" [3,1,1]+   , lib "pretty" [1,0,1,2]+   , lib "process" [1,0,1,5]+   , lib "QuickCheck" [2,4,1,1]+   , lib "random" [1,0,0,3]+   , lib "regex-base" [0,93,2]+   , lib "regex-compat" [0,95,1]+   , lib "regex-posix" [0,95,1]+   , lib "stm" [2,2,0,1]+   , lib "syb" [0,3,3]+   , lib "template-haskell" [2,5,0,0]+   , lib "text" [0,11,1,5]+   , lib "time" [1,2,0,3]+   , lib "transformers" [0,2,2,0]+   , lib "unix" [2,4,2,0]+   , lib "xhtml" [3000,2,0,4]+   , lib "zlib" [0,5,3,1]+   ]+++libs_2012_2_0_0 =+   [ lib "array" [0,4,0,0]+   , lib "base" [4,5,0,0]+   , lib "bytestring" [0,9,2,1]+   , lib "Cabal" [1,14,0]+   , lib "cgi" [3001,1,7,4]+   , lib "containers" [0,4,2,1]+   , lib "deepseq" [1,3,0,0]+   , lib "directory" [1,1,0,2]+   , lib "extensible-exceptions" [0,1,1,4]+   , lib "fgl" [5,4,2,4]+   , lib "filepath" [1,3,0,0]+   , lib "GLUT" [2,1,2,1]+   , lib "haskell-src" [1,0,1,5]+   , lib "haskell2010" [1,1,0,1]+   , lib "haskell98" [2,0,0,1]+   , lib "hpc" [0,5,1,1]+   , lib "html" [1,0,1,2]+   , lib "HTTP" [4000,2,3]+   , lib "HUnit" [1,2,4,2]+   , lib "mtl" [2,1,1]+   , lib "network" [2,3,0,13]+   , lib "old-locale" [1,0,0,4]+   , lib "old-time" [1,1,0,0]+   , lib "OpenGL" [2,2,3,1]+   , lib "parallel" [3,2,0,2]+   , lib "parsec" [3,1,2]+   , lib "pretty" [1,1,1,0]+   , lib "process" [1,1,0,1]+   , lib "QuickCheck" [2,4,2]+   , lib "random" [1,0,1,1]+   , lib "regex-base" [0,93,2]+   , lib "regex-compat" [0,95,1]+   , lib "regex-posix" [0,95,1]+   , lib "stm" [2,3]+   , lib "syb" [0,3,6,1]+   , lib "template-haskell" [2,7,0,0]+   , lib "text" [0,11,2,0]+   , lib "time" [1,4]+   , lib "transformers" [0,3,0,0]+   , lib "unix" [2,5,1,0]+   , lib "xhtml" [3000,2,1]+   , lib "zlib" [0,5,3,3]+   ]+++libs_2012_4_0_0 =+   [ lib "array" [0,4,0,0]+   , lib "async" [2,0,1,3]+   , lib "base" [4,5,1,0]+   , lib "bytestring" [0,9,2,1]+   , lib "Cabal" [1,14,0]+   , lib "cgi" [3001,1,7,4]+   , lib "containers" [0,4,2,1]+   , lib "deepseq" [1,3,0,0]+   , lib "directory" [1,1,0,2]+   , lib "extensible-exceptions" [0,1,1,4]+   , lib "fgl" [5,4,2,4]+   , lib "filepath" [1,3,0,0]+   , lib "GLUT" [2,1,2,1]+   , lib "haskell-src" [1,0,1,5]+   , lib "haskell2010" [1,1,0,1]+   , lib "haskell98" [2,0,0,1]+   , lib "hpc" [0,5,1,1]+   , lib "html" [1,0,1,2]+   , lib "HTTP" [4000,2,5]+   , lib "HUnit" [1,2,5,1]+   , lib "mtl" [2,1,2]+   , lib "network" [2,3,1,0]+   , lib "old-locale" [1,0,0,4]+   , lib "old-time" [1,1,0,0]+   , lib "OpenGL" [2,2,3,1]+   , lib "parallel" [3,2,0,3]+   , lib "parsec" [3,1,3]+   , lib "pretty" [1,1,1,0]+   , lib "primitive" [0,5,0,1]+   , lib "process" [1,1,0,1]+   , lib "QuickCheck" [2,5,1,1]+   , lib "random" [1,0,1,1]+   , lib "regex-base" [0,93,2]+   , lib "regex-compat" [0,95,1]+   , lib "regex-posix" [0,95,2]+   , lib "split" [0,2,1,1]+   , lib "stm" [2,4]+   , lib "syb" [0,3,7]+   , lib "template-haskell" [2,7,0,0]+   , lib "text" [0,11,2,3]+   , lib "time" [1,4]+   , lib "transformers" [0,3,0,0]+   , lib "unix" [2,5,1,1]+   , lib "vector" [0,10,0,1]+   , lib "xhtml" [3000,2,1]+   , lib "zlib" [0,5,4,0]+   ]+++libs_2013_2_0_0 =+   [ lib "array" [0,4,0,1]+   , lib "async" [2,0,1,4]+   , lib "attoparsec" [0,10,4,0]+   , lib "base" [4,6,0,1]+   , lib "bytestring" [0,10,0,2]+   , lib "Cabal" [1,16,0]+   , lib "case-insensitive" [1,0,0,1]+   , lib "cgi" [3001,1,7,5]+   , lib "containers" [0,4,2,1]+   , lib "deepseq" [1,3,0,0]+   , lib "directory" [1,2,0,1]+   , lib "fgl" [5,4,2,4]+   , lib "filepath" [1,3,0,1]+   , lib "GLUT" [2,4,0,0]+   , lib "GLUTRaw" [1,3,0,0]+   , lib "hashable" [1,1,2,5]+   , lib "haskell-src" [1,0,1,5]+   , lib "haskell2010" [1,1,1,0]+   , lib "haskell98" [2,0,0,1]+   , lib "hpc" [0,6,0,0]+   , lib "html" [1,0,1,2]+   , lib "HTTP" [4000,2,8]+   , lib "HUnit" [1,2,5,2]+   , lib "mtl" [2,1,2]+   , lib "network" [2,4,1,2]+   , lib "old-locale" [1,0,0,5]+   , lib "old-time" [1,1,0,1]+   , lib "OpenGL" [2,8,0,0]+   , lib "OpenGLRaw" [1,3,0,0]+   , lib "parallel" [3,2,0,3]+   , lib "parsec" [3,1,3]+   , lib "pretty" [1,1,1,0]+   , lib "primitive" [0,5,0,1]+   , lib "process" [1,1,0,2]+   , lib "QuickCheck" [2,6]+   , lib "random" [1,0,1,1]+   , lib "regex-base" [0,93,2]+   , lib "regex-compat" [0,95,1]+   , lib "regex-posix" [0,95,2]+   , lib "split" [0,2,2]+   , lib "stm" [2,4,2]+   , lib "syb" [0,4,0]+   , lib "template-haskell" [2,8,0,0]+   , lib "text" [0,11,3,1]+   , lib "time" [1,4,0,1]+   , lib "transformers" [0,3,0,0]+   , lib "unordered-containers" [0,2,3,0]+   , lib "unix" [2,6,0,1]+   , lib "Win32" [2,3,0,0]+   , lib "vector" [0,10,0,1]+   , lib "xhtml" [3000,2,1]+   , lib "zlib" [0,5,4,1]+   ]+++type VersionBranch = [Int]++lib :: LibName -> VersionBranch -> Library+lib libName branch = (libName, V.Version { V.versionBranch = branch , V.versionTags = [] })
lib/CabalBounds/Main.hs view
@@ -1,4 +1,4 @@-{-# Language StandaloneDeriving #-}+{-# Language StandaloneDeriving, PatternGuards #-}  module CabalBounds.Main    ( cabalBounds@@ -9,16 +9,23 @@ import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) import Distribution.Simple.Configure (ConfigStateFileErrorType(..), tryGetConfigStateFile) import Distribution.Simple.LocalBuildInfo (LocalBuildInfo)+import qualified Distribution.Simple.LocalBuildInfo as BI+import qualified Distribution.Package as P+import qualified Distribution.Simple.PackageIndex as PX+import qualified Distribution.InstalledPackageInfo as PI+import qualified Distribution.Version as V import qualified CabalBounds.Args as A import qualified CabalBounds.Bound as B import qualified CabalBounds.Sections as S import qualified CabalBounds.Dependencies as DP import qualified CabalBounds.Drop as D import qualified CabalBounds.Update as U+import qualified CabalBounds.HaskellPlatform as HP 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+import qualified Data.HashMap.Strict as HM  type Error = String @@ -32,11 +39,18 @@ cabalBounds args@A.Update {} =    leftToJust <$> runEitherT (do       pkgDescrp <- packageDescription $ A.cabalFile args-      buildInfo <- localBuildInfo $ A.setupConfigFile args-      let pkgDescrp' = U.update (B.boundOfUpdate args) (S.sections args pkgDescrp) (DP.dependencies args) pkgDescrp buildInfo+      libs      <- libraries setupConfigFile (A.haskellPlatform args)+      let pkgDescrp' = U.update (B.boundOfUpdate args) (S.sections args pkgDescrp) (DP.dependencies args) libs pkgDescrp       liftIO $ writeFile (A.outputFile args) (showGenericPackageDescription pkgDescrp'))+   where+      setupConfigFile+         | (file:_) <- A.setupConfigFile args+         = file +         | otherwise+         = "" + packageDescription :: FilePath -> EitherT Error IO GenericPackageDescription packageDescription file = do    contents <- liftIO $ SIO.readFile file@@ -45,10 +59,40 @@         ParseOk _ pkgDescrp -> right pkgDescrp  -localBuildInfo :: FilePath -> EitherT Error IO LocalBuildInfo-localBuildInfo file =  do-   binfo <- liftIO $ tryGetConfigStateFile file-   bimapEitherT show id (hoistEither binfo)+type SetupConfigFile = String++libraries :: SetupConfigFile -> HP.HPVersion -> EitherT Error IO U.Libraries+libraries "" ""              = left "Missing setup config file and haskell platform version"+libraries confFile ""        = installedLibraries confFile+libraries "" hpVersion       = haskellPlatformLibraries hpVersion+libraries confFile hpVersion = do+   instLibs <- installedLibraries confFile+   hpLibs   <- haskellPlatformLibraries hpVersion+   right $ HM.union hpLibs instLibs+++haskellPlatformLibraries :: HP.HPVersion -> EitherT Error IO U.Libraries+haskellPlatformLibraries hpVersion =+   case hpVersion of+        "current"  -> right . HM.fromList $ HP.currentLibraries+        "previous" -> right . HM.fromList $ HP.previousLibraries+        version | Just libs <- HP.librariesOf version -> right . HM.fromList $ libs+                | otherwise                           -> left $ "Invalid haskell platform version '" ++ version ++ "'"+++installedLibraries :: SetupConfigFile -> EitherT Error IO U.Libraries+installedLibraries confFile = do+   binfo <- liftIO $ tryGetConfigStateFile confFile+   bimapEitherT show buildInfoLibs (hoistEither binfo)+   where+      buildInfoLibs :: LocalBuildInfo -> U.Libraries+      buildInfoLibs = HM.fromList+                    . map (\(P.PackageName n, v) -> (n, newestVersion v))+                    . filter ((not . null) . snd)+                    . PX.allPackagesByName . BI.installedPkgs++      newestVersion :: [PI.InstalledPackageInfo] -> V.Version+      newestVersion = maximum . map (P.pkgVersion . PI.sourcePackageId)   leftToJust :: Either a b -> Maybe a
lib/CabalBounds/Update.hs view
@@ -1,72 +1,79 @@ module CabalBounds.Update    ( update+   , Libraries    ) where  import qualified Distribution.PackageDescription as D import qualified Distribution.Package as P import qualified Distribution.Version as V-import qualified Distribution.Simple.LocalBuildInfo as BI-import qualified Distribution.Simple.PackageIndex as PX-import qualified Distribution.InstalledPackageInfo as PI import Control.Lens import CabalBounds.Bound (UpdateBound(..))-import CabalBounds.Dependencies (Dependencies, filterDependency)+import CabalBounds.Dependencies (Dependencies(..), filterDependency) import CabalBounds.VersionComp (VersionComp(..)) import qualified CabalLenses as CL import Data.List (foldl') import qualified Data.HashMap.Strict as HM import Data.Maybe (fromMaybe) -type PkgName           = String-type InstalledPackages = HM.HashMap PkgName V.Version+type PkgName    = String+type LibName    = String+type LibVersion = V.Version+type Libraries  = HM.HashMap LibName LibVersion  -update :: UpdateBound -> [CL.Section] -> Dependencies -> D.GenericPackageDescription -> BI.LocalBuildInfo -> D.GenericPackageDescription-update bound sections deps pkgDescrp buildInfo =+update :: UpdateBound -> [CL.Section] -> Dependencies -> Libraries -> D.GenericPackageDescription -> D.GenericPackageDescription+update bound sections deps libs pkgDescrp =    foldl' updateSection pkgDescrp sections    where       updateSection pkgDescrp section =          pkgDescrp & CL.dependencyIf condVars section . filterDep %~ updateDep        filterDep = filterDependency deps-      updateDep = updateDependency bound (installedPackages buildInfo)+      updateDep = updateDependency bound libs       condVars  = CL.fromDefaults pkgDescrp  -updateDependency :: UpdateBound -> InstalledPackages -> P.Dependency -> P.Dependency-updateDependency (UpdateLower comp) instPkgs dep =-   fromMaybe dep $ do-      version <- HM.lookup pkgName_ instPkgs-      let newLowerVersion = comp `compOf` version-          newLowerBound   = V.LowerBound newLowerVersion V.InclusiveBound-          vrange          = fromMaybe (V.orLaterVersion newLowerVersion) $ modifyVersionIntervals (updateLower newLowerBound) versionRange_-      return $ mkDependency pkgName_ vrange+updateDependency :: UpdateBound -> Libraries -> P.Dependency -> P.Dependency+updateDependency (UpdateLower comp ifMissing) libs dep =+   fromMaybe dep $+      if ifMissing && lowerBound_ /= noLowerBound+         then return dep+         else do+            version <- HM.lookup pkgName_ libs+            let newLowerVersion = comp `compOf` version+                newLowerBound   = V.LowerBound newLowerVersion V.InclusiveBound+                vrange          = fromMaybe (V.orLaterVersion newLowerVersion)+                                            (modifyVersionIntervals (updateLower newLowerBound) versionRange_)+            return $ mkDependency pkgName_ vrange    where       updateLower newLowerBound []        = [(newLowerBound, V.NoUpperBound)]       updateLower newLowerBound intervals = intervals & _head . lowerBound .~ newLowerBound -      pkgName_ = pkgName dep+      pkgName_      = pkgName dep       versionRange_ = versionRange dep+      lowerBound_   = fromMaybe noLowerBound $ V.asVersionIntervals versionRange_ ^? _head . lowerBound -updateDependency (UpdateUpper comp) instPkgs dep =-   fromMaybe dep $ do-        upperVersion <- HM.lookup pkgName_ instPkgs-        let newUpperVersion = comp `compOf` upperVersion-            newUpperBound   = V.UpperBound (nextVersion newUpperVersion) V.ExclusiveBound-        vrange <- modifyVersionIntervals (updateUpper newUpperBound) versionRange_-        return $ mkDependency pkgName_ vrange+updateDependency (UpdateUpper comp ifMissing) libs dep =+   fromMaybe dep $+      if ifMissing && upperBound_ /= V.NoUpperBound+         then return dep+         else do+            upperVersion <- HM.lookup pkgName_ libs+            let newUpperVersion = comp `compOf` upperVersion+                newUpperBound   = V.UpperBound (nextVersion newUpperVersion) V.ExclusiveBound+            vrange <- modifyVersionIntervals (updateUpper newUpperBound) versionRange_+            return $ mkDependency pkgName_ vrange    where       versionRange_ = versionRange dep       pkgName_      = pkgName dep+      upperBound_   = fromMaybe V.NoUpperBound $ V.asVersionIntervals versionRange_ ^? _head . upperBound        updateUpper newUpperBound []        = [(noLowerBound, newUpperBound)]       updateUpper newUpperBound intervals = intervals & _last . upperBound .~ newUpperBound -      noLowerBound = V.LowerBound (V.Version [0] []) V.InclusiveBound--updateDependency (UpdateBoth lowerComp upperComp) instPkgs dep =-    updateDependency (UpdateLower lowerComp) instPkgs $-    updateDependency (UpdateUpper upperComp) instPkgs dep+updateDependency (UpdateBoth lowerComp upperComp ifMissing) libs dep =+    updateDependency (UpdateLower lowerComp ifMissing) libs $+    updateDependency (UpdateUpper upperComp ifMissing) libs dep   modifyVersionIntervals :: ([V.VersionInterval] -> [V.VersionInterval]) -> V.VersionRange -> Maybe V.VersionRange@@ -93,16 +100,6 @@       increaseLastComp = reverse . (& ix 0 %~ (+ 1)) . reverse  -installedPackages :: BI.LocalBuildInfo -> InstalledPackages-installedPackages = HM.fromList-                    . map (\(P.PackageName n, v) -> (n, newestVersion v))-                    . filter ((not . null) . snd)-                    . PX.allPackagesByName . BI.installedPkgs-   where-      newestVersion :: [PI.InstalledPackageInfo] -> V.Version-      newestVersion = maximum . map (P.pkgVersion . PI.sourcePackageId)-- pkgName :: P.Dependency -> PkgName pkgName (P.Dependency (P.PackageName name) _) = name @@ -121,3 +118,7 @@  upperBound :: Lens' V.VersionInterval V.UpperBound upperBound = _2+++noLowerBound :: V.LowerBound+noLowerBound = V.LowerBound (V.Version [0] []) V.InclusiveBound
tests/Main.hs view
@@ -68,11 +68,22 @@    , test "UpdateMajor1Upper" $ defaultUpdate {upperComp = Just Major1 }    , test "UpdateMinorLowerAndUpper" $ defaultUpdate { lowerComp = Just Minor, upperComp = Just Minor }    , test "UpdateMajor1LowerAndUpper" $ defaultUpdate { lowerComp = Just Major1, upperComp = Just Major1 }+   , test "UpdateOnlyMissing" $ defaultUpdate { missing = True }+   , testWithoutSetupConfig "UpdateByHaskellPlatform" $ defaultUpdate { haskellPlatform = "2013.2.0.0" }+   , test "UpdateByHaskellPlatformAndSetupConfig" $ defaultUpdate { haskellPlatform = "2013.2.0.0" }    ]   test :: String -> Args -> T.TestTree-test testName args =+test testName args = test_ testName args True+++testWithoutSetupConfig :: String -> Args -> T.TestTree+testWithoutSetupConfig testName args = test_ testName args False+++test_ :: String -> Args -> Bool -> T.TestTree+test_ testName args withSetupConfig =    G.goldenVsFileDiff testName diff goldenFile outputFile command    where       command = do@@ -88,7 +99,7 @@                                 }               Update {} -> args { cabalFile       = inputFile                                 , output          = outputFile-                                , setupConfigFile = setupConfigFile+                                , setupConfigFile = [setupConfigFile | withSetupConfig]                                 }        diff ref new    = ["diff", "-u", ref, new]
+ tests/goldenFiles/UpdateByHaskellPlatform.cabal view
@@ -0,0 +1,114 @@+name: cabal-bounds+version: 0.1+cabal-version: >=1.9.2+build-type: Simple+license: AllRightsReserved+maintainer: daniel.trstenjak@gmail.com+synopsis: A command line program for managing the bounds/versions of the dependencies in a cabal file.+description:+    A command line program for managing the bounds/versions of the dependencies in a cabal file.+category: Utils+author: Daniel Trstenjak+ +source-repository head+    type: git+    location: https://github.com/dan-t/cabal-bounds+ +library+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.5 && <0.11,+        lens -any,+        pretty-show -any,+        strict -any,+        Cabal >=1.16.0 && <1.17+    exposed-modules:+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    exposed: True+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+ +executable cabal-bounds+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.5 && <0.11,+        lens -any,+        pretty-show -any,+        strict -any,+        Cabal >=1.16.0 && <1.17+    main-is: ExeMain1.hs+    buildable: True+    cpp-options: -DCABAL+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+ +executable other-exe+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.5 && <0.11,+        lens -any,+        pretty-show -any,+        strict -any,+        Cabal >=1.16.0 && <1.17+    main-is: ExeMain2.hs+    buildable: True+    cpp-options: -DCABAL+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+ +test-suite some-test+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.5 && <0.11,+        lens -any,+        pretty-show -any,+        strict -any,+        Cabal >=1.16.0 && <1.17+    type: exitcode-stdio-1.0+    main-is: TestMain1.hs+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+test-suite other-test+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.5 && <0.11,+        lens -any,+        pretty-show -any,+        strict -any,+        Cabal >=1.16.0 && <1.17+    type: exitcode-stdio-1.0+    main-is: TestMain2.hs+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+ 
+ tests/goldenFiles/UpdateByHaskellPlatformAndSetupConfig.cabal view
@@ -0,0 +1,114 @@+name: cabal-bounds+version: 0.1+cabal-version: >=1.9.2+build-type: Simple+license: AllRightsReserved+maintainer: daniel.trstenjak@gmail.com+synopsis: A command line program for managing the bounds/versions of the dependencies in a cabal file.+description:+    A command line program for managing the bounds/versions of the dependencies in a cabal file.+category: Utils+author: Daniel Trstenjak+ +source-repository head+    type: git+    location: https://github.com/dan-t/cabal-bounds+ +library+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.7 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.16.0 && <1.17+    exposed-modules:+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    exposed: True+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+ +executable cabal-bounds+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.7 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.16.0 && <1.17+    main-is: ExeMain1.hs+    buildable: True+    cpp-options: -DCABAL+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+ +executable other-exe+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.7 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.16.0 && <1.17+    main-is: ExeMain2.hs+    buildable: True+    cpp-options: -DCABAL+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+ +test-suite some-test+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.7 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.16.0 && <1.17+    type: exitcode-stdio-1.0+    main-is: TestMain1.hs+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+test-suite other-test+    build-depends:+        base >=4.6.0.1 && <4.7,+        cmdargs >=0.10.7 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.16.0 && <1.17+    type: exitcode-stdio-1.0+    main-is: TestMain2.hs+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+ 
+ tests/goldenFiles/UpdateOnlyMissing.cabal view
@@ -0,0 +1,114 @@+name: cabal-bounds+version: 0.1+cabal-version: >=1.9.2+build-type: Simple+license: AllRightsReserved+maintainer: daniel.trstenjak@gmail.com+synopsis: A command line program for managing the bounds/versions of the dependencies in a cabal file.+description:+    A command line program for managing the bounds/versions of the dependencies in a cabal file.+category: Utils+author: Daniel Trstenjak+ +source-repository head+    type: git+    location: https://github.com/dan-t/cabal-bounds+ +library+    build-depends:+        base >=3 && <5,+        cmdargs >=0.10.5 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.20.0.1 && <1.21+    exposed-modules:+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    exposed: True+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+ +executable cabal-bounds+    build-depends:+        base >=3 && <5,+        cmdargs >=0.10.5 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.20.0.1 && <1.21+    main-is: ExeMain1.hs+    buildable: True+    cpp-options: -DCABAL+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+ +executable other-exe+    build-depends:+        base >=3 && <5,+        cmdargs >=0.10.5 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.20.0.1 && <1.21+    main-is: ExeMain2.hs+    buildable: True+    cpp-options: -DCABAL+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+ +test-suite some-test+    build-depends:+        base >=3 && <5,+        cmdargs >=0.10.5 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.20.0.1 && <1.21+    type: exitcode-stdio-1.0+    main-is: TestMain1.hs+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+test-suite other-test+    build-depends:+        base >=3 && <5,+        cmdargs >=0.10.5 && <0.11,+        lens >=4.0.1 && <4.1,+        pretty-show >=1.6.7 && <1.7,+        strict >=0.3.2 && <0.4,+        Cabal >=1.20.0.1 && <1.21+    type: exitcode-stdio-1.0+    main-is: TestMain2.hs+    buildable: True+    hs-source-dirs: src+    other-modules:+        Paths_cabal_bounds+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+