cabal-fix 0.0.0.1 → 0.0.0.2
raw patch · 3 files changed
+15/−15 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- cabal-fix.cabal +3/−3
- readme.org +8/−8
- src/CabalFix.hs +4/−4
cabal-fix.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: cabal-fix-version: 0.0.0.1+version: 0.0.0.2 license: BSD-3-Clause license-file: LICENSE category: distribution@@ -106,7 +106,7 @@ build-depends: , Cabal-syntax >=3.10 && <3.11 , algebraic-graphs >=0.7 && <0.8- , base >=4.17 && <5+ , base >=4.14 && <5 , bytestring >=0.11 && <0.13 , containers >=0.6 && <0.8 , directory >=1.3 && <1.4@@ -133,7 +133,7 @@ main-is: cabal-fix.hs hs-source-dirs: app build-depends:- , base >=4.17 && <5+ , base >=4.14 && <5 , bytestring >=0.11 && <0.13 , cabal-fix , directory >=1.3 && <1.4
readme.org view
@@ -1,7 +1,7 @@ * cabal-fix -[[https://hackage.haskell.org/package/cabal-fixes][https://img.shields.io/hackage/v/cabal-fix.svg]]-[[https://github.com/tonyday567/cabal-fixes/actions?query=workflow%3Ahaskell-ci][https://github.com/tonyday567/cabal-fix/workflows/haskell-ci/badge.svg]]+[[https://hackage.haskell.org/package/cabal-fix][https://img.shields.io/hackage/v/cabal-fix.svg]]+[[https://github.com/tonyday567/cabal-fix/actions?query=workflow%3Ahaskell-ci][https://github.com/tonyday567/cabal-fix/workflows/haskell-ci/badge.svg]] ~cabal-fix~ helps fix your cabal files. This package: @@ -321,13 +321,13 @@ #+begin_example Right (Just [ -" build-depends: base ^>=4.17.2.1",- +" build-depends: base >=4.17 && <5",+ +" build-depends: base >=4.14 && <5", -" default-language: GHC2021", +" main-is: Main.hs", -" type: exitcode-stdio-1.0", +" build-depends:", -" hs-source-dirs: test",- +" base >=4.17 && <5,",+ +" base >=4.14 && <5,", -" main-is: Main.hs", +" minimal", -" build-depends:",@@ -366,13 +366,13 @@ #+begin_example Just [ -" build-depends: base ^>=4.17.2.1",- +" build-depends: base >=4.17 && <5",+ +" build-depends: base >=4.14 && <5", -" default-language: GHC2021", +" main-is: Main.hs", -" type: exitcode-stdio-1.0", +" build-depends:", -" hs-source-dirs: test",- +" base >=4.17 && <5,",+ +" base >=4.14 && <5,", -" main-is: Main.hs", +" minimal", -" build-depends:",@@ -427,7 +427,7 @@ -"extra-doc-files: CHANGELOG.md", +"extra-doc-files: CHANGELOG.md", -" build-depends: base ^>=4.17.2.1",- +" build-depends: base >=4.17 && <5",+ +" build-depends: base >=4.14 && <5", -" -- Base language which the package is written in.", +" -- The entrypoint to the test suite.", -" default-language: GHC2021",@@ -438,7 +438,7 @@ -"", +" build-depends:", -" -- LANGUAGE extensions used by modules in this package.",- +" base >=4.17 && <5,",+ +" base >=4.14 && <5,", -" -- other-extensions:", +" simple", -" -- The interface type and version of the test suite.",
src/CabalFix.hs view
@@ -187,7 +187,7 @@ -- If a field list doesn't need commas, then they should be removed. -- -- >>> preferredDeps defaultConfig--- [("base",">=4.17 && <5")]+-- [("base",">=4.14 && <5")] -- -- Standard practice compared with the much tighter eg @base ^>=4.17.2.1@ --@@ -283,7 +283,7 @@ -- An opinionated list of preferred builddeps: -- defaultPreferredDeps :: [(ByteString, ByteString)]-defaultPreferredDeps = [("base", ">=4.17 && <5")]+defaultPreferredDeps = [("base", ">=4.14 && <5")] -- | Whether the value part of each field should be vertically aligned on a column. data ValueAlignment = ValueAligned | ValueUnaligned deriving (Eq, Show, Read, Generic)@@ -631,7 +631,7 @@ -- | Align dependencies (if depAlignment is DepAligned), remove ranges for any self-dependency, and substitute preferred dependency ranges. -- -- >>> fs & toListOf (section' "test-suite" % each % secFields' % field' "build-depends" % each) & fmap (fixBuildDeps cfg "minimal")--- [Field (Name [] "build-depends") [FieldLine [] ", base >=4.17 && <5",FieldLine [] ", minimal"]]+-- [Field (Name [] "build-depends") [FieldLine [] ", base >=4.14 && <5",FieldLine [] ", minimal"]] fixBuildDeps :: Config -> FieldName -> Field ann -> Field ann fixBuildDeps cfg pname f = overField (bool id (over fieldLines' (fixBDLines cfg pname)) (isName "build-depends" f)) f @@ -1010,7 +1010,7 @@ fieldRemovals = [], preferredDeps = [ ( "base",- ">=4.17 && <5"+ ">=4.14 && <5" ) ], addFields = [],