cabal-install-parsers 0.4.1 → 0.4.2
raw patch · 4 files changed
+16/−11 lines, 4 filesdep ~tastydep ~tree-diffPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: tasty, tree-diff
API changes (from Hackage documentation)
Files
- Changelog.md +4/−0
- cabal-install-parsers.cabal +6/−6
- src/Cabal/Config.hs +4/−3
- test/Golden.hs +2/−2
Changelog.md view
@@ -1,3 +1,7 @@+## 0.4.2++- `findConfig` respects `CABAL_DIR` environment variable+ ## 0.4.1 - Use `Cabal-3.4`
cabal-install-parsers.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: cabal-install-parsers-version: 0.4.1+version: 0.4.2 synopsis: Utilities to work with cabal-install files description: @cabal-install-parsers@ provides parsers for @cabal-install@ files:@@ -21,7 +21,7 @@ category: Development build-type: Simple tested-with:- GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.3+ GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1 extra-source-files: Changelog.md@@ -54,7 +54,7 @@ -- GHC-boot libraries build-depends:- , base >=4.10 && <4.15+ , base >=4.10 && <4.16 , binary ^>=0.8.5 , bytestring ^>=0.10.8.1 , Cabal ^>=3.4.0.0@@ -99,7 +99,7 @@ -- dependencies needing explicit constraints build-depends:- , tasty ^>=1.2.3 || ^>=1.3.1+ , tasty ^>=1.2.3 || ^>=1.3.1 || ^>=1.4 , tasty-hunit ^>=0.10.0.2 test-suite cabal-parsers-golden@@ -122,9 +122,9 @@ -- dependencies needing explicit constraints build-depends: , ansi-terminal >=0.10 && <0.12- , tasty ^>=1.2.3 || ^>=1.3.1+ , tasty ^>=1.2.3 || ^>=1.3.1 || ^>=1.4 , tasty-golden ^>=2.3.1.1- , tree-diff ^>=0.1+ , tree-diff ^>=0.2 benchmark cabal-parsers-bench default-language: Haskell2010
src/Cabal/Config.hs view
@@ -52,7 +52,7 @@ -- Read config ------------------------------------------------------------------------------- --- | High level convinience function to find and read @~\/.cabal\/config@ file+-- | High level convenience function to find and read @~\/.cabal\/config@ file -- -- May throw 'IOException' when file doesn't exist, and 'ParseError' -- on parse error.@@ -74,8 +74,9 @@ case env of Just p -> return p Nothing -> do- c <- getAppUserDataDirectory "cabal"- return (c </> "config")+ cabalDirVar <- lookupEnv "CABAL_DIR"+ cabalDir <- maybe (getAppUserDataDirectory "cabal") return cabalDirVar+ return (cabalDir </> "config") ------------------------------------------------------------------------------- -- Config
test/Golden.hs view
@@ -9,7 +9,7 @@ import Text.PrettyPrint (Doc, render) import qualified Data.ByteString as BS-import qualified Data.Map.Strict as Map+import qualified Data.TreeDiff.OMap as OMap import Distribution.Fields (PrettyField (..)) import Distribution.Types.SourceRepo (KnownRepoType, RepoKind, RepoType, SourceRepo)@@ -36,7 +36,7 @@ ------------------------------------------------------------------------------- instance (ToExpr uri, ToExpr opt, ToExpr pkg) => ToExpr (Project uri opt pkg) where- toExpr prj = Rec "Project" $ Map.fromList+ toExpr prj = Rec "Project" $ OMap.fromList [ field "prjPackages" prjPackages , field "prjOptPackages" prjOptPackages , field "prjUriPackages" prjUriPackages