packages feed

cabal-cargs 1.2.0 → 1.3.0

raw patch · 4 files changed

+54/−31 lines, 4 filesdep ~Cabaldep ~cabal-lensesdep ~lensPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: Cabal, cabal-lenses, lens, tasty

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,3 +1,8 @@+1.3.0+-----+* Support Cabal 3.0+* Tested with ghc 8.10.1+ 1.2.0 ----- * Support Cabal 2.4 and ghc 8.6
cabal-cargs.cabal view
@@ -1,17 +1,22 @@-cabal-version: >=1.9.2-name: cabal-cargs-version: 1.2.0-license: BSD3-license-file: LICENSE-maintainer: daniel.trstenjak@gmail.com-author: Daniel Trstenjak-tested-with: ghc ==7.6.2 ghc ==7.6.3 ghc ==7.8.3 ghc ==7.10.1-             ghc ==8.0.1 ghc ==8.2.1 ghc ==8.4.2 ghc ==8.6.3-synopsis: A command line program for extracting compiler arguments from a cabal file.+cabal-version:      >=1.10.0+name:               cabal-cargs+version:            1.3.0+license:            BSD3+license-file:       LICENSE+maintainer:         daniel.trstenjak@gmail.com+author:             Daniel Trstenjak+tested-with:+    ghc ==7.6.2 ghc ==7.6.3 ghc ==7.8.3 ghc ==7.10.1 ghc ==8.0.1+    ghc ==8.2.1 ghc ==8.4.2 ghc ==8.6.3 ghc ==8.10.1++synopsis:+    A command line program for extracting compiler arguments from a cabal file.+ description:     For further details please consult the <https://github.com/dan-t/cabal-cargs README>.-category: Utils, Development-build-type: Simple++category:           Utils, Development+build-type:         Simple extra-source-files:     README.md     CHANGELOG@@ -33,7 +38,7 @@     tests/outputFiles/withSandbox/.gitignore  source-repository head-    type: git+    type:     git     location: https://github.com/dan-t/cabal-cargs  library@@ -44,16 +49,19 @@         CabalCargs.Format         CabalCargs.Spec         CabalCargs.CompilerArgs-    cpp-options: -DCABAL-    hs-source-dirs: lib++    cpp-options:      -DCABAL+    hs-source-dirs:   lib     other-modules:         CabalCargs.BuildInfo         Paths_cabal_cargs-    ghc-options: -W++    default-language: Haskell2010+    ghc-options:      -W     build-depends:         base >=3 && <5,         cmdargs >=0.10.5 && <0.11,-        lens >=4.0.1 && <4.18,+        lens >=4.0.1 && <4.20,         directory >=1.0 && <1.4,         filepath >=1.0 && <1.5,         transformers >=0.3.0.0 && <0.6,@@ -61,26 +69,28 @@         system-filepath >=0.4.9 && <0.5,         system-fileio >=0.3.12 && <0.4,         unordered-containers >=0.2.3.3 && <0.3,-        cabal-lenses >=0.8.0 && <0.10,-        Cabal >=2.2.0.0 && <2.5,+        cabal-lenses >=0.10.0 && <0.11,+        Cabal >=3.0.0.0 && <4.0,         bytestring >=0.9 && <0.11  executable cabal-cargs-    main-is: Main.hs-    hs-source-dirs: exe-    ghc-options: -W+    main-is:          Main.hs+    hs-source-dirs:   exe+    default-language: Haskell2010+    ghc-options:      -W     build-depends:         base >=3 && <5,         cabal-cargs -any  test-suite tests-    type: exitcode-stdio-1.0-    main-is: Main.hs-    hs-source-dirs: tests-    ghc-options: -W+    type:             exitcode-stdio-1.0+    main-is:          Main.hs+    hs-source-dirs:   tests+    default-language: Haskell2010+    ghc-options:      -W     build-depends:         base >=3 && <5,-        tasty >=0.9.0.1 && <1.3,+        tasty >=0.9.0.1 && <1.4,         tasty-golden >=2.2.0.2 && <2.4,         filepath >=1.3.0.1 && <1.5,         cabal-cargs -any
lib/CabalCargs/BuildInfo.hs view
@@ -5,7 +5,7 @@    ) where  import Distribution.PackageDescription (BuildInfo(..))-import Distribution.Compiler (CompilerFlavor(..))+import Distribution.Compiler (PerCompilerFlavor(..)) import Control.Lens import qualified CabalCargs.Fields as F import qualified CabalLenses as CL@@ -15,7 +15,7 @@ -- | A lens from a 'BuildInfo' to a list of stringified field entries of the 'BuildInfo'. field :: F.Field -> Traversal' BuildInfo [String] field F.Hs_Source_Dirs         = CL.hsSourceDirsL-field F.Ghc_Options            = CL.optionsL . traversed . filtered ((== GHC) . fst) . _2+field F.Ghc_Options            = CL.optionsL . ghcOptionsL field F.Default_Extensions     = oldAndDefaultExtensionsL . extsToStrings field F.Default_Language       = CL.defaultLanguageL . langToString field F.Cpp_Options            = CL.cppOptionsL@@ -50,7 +50,7 @@ extsToStrings :: Iso' [Extension] [String] extsToStrings = iso (map toString) (map toExt)    where-      toString ext = +      toString ext =          case ext of               EnableExtension knownExt    -> show knownExt               DisableExtension knownExt   -> "No" ++ show knownExt@@ -93,3 +93,11 @@ --   list and doesn't modify the given BuildInfo. nopLens :: Lens' BuildInfo [String] nopLens = lens (const []) const+++-- | A lens that accesses the ghc options of the PerCompilerFlavor+ghcOptionsL :: Lens' (PerCompilerFlavor [String]) [String]+ghcOptionsL = lens getter setter+   where+      getter (PerCompilerFlavor ghcOpts _)           = ghcOpts+      setter (PerCompilerFlavor _ ghcjsOpts) ghcOpts = PerCompilerFlavor ghcOpts ghcjsOpts
lib/CabalCargs/Spec.hs view
@@ -7,7 +7,7 @@  import Distribution.PackageDescription (GenericPackageDescription) import Distribution.PackageDescription.Parsec (parseGenericPackageDescription, runParseResult)-import Distribution.Parsec.Common (PWarning)+import Distribution.Parsec.Warning (PWarning) import qualified Distribution.System as Sys import CabalCargs.Args (Args) import qualified CabalCargs.Args as A