packages feed

Cabal 3.2.0.0 → 3.2.1.0

raw patch · 92 files changed

+745/−151 lines, 92 filesdep ~QuickCheckdep ~Win32dep ~tastynew-uploaderPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: QuickCheck, Win32, tasty, time

API changes (from Hackage documentation)

- Distribution.Compat.Graph: instance (Distribution.Compat.Graph.IsNode a, Distribution.Compat.Graph.IsNode b, Distribution.Compat.Graph.Key a GHC.Types.~ Distribution.Compat.Graph.Key b) => Distribution.Compat.Graph.IsNode (Data.Either.Either a b)
- Distribution.Compat.Prelude.Internal: class Monad m => MonadFail (m :: Type -> Type)
- Distribution.Compat.Prelude.Internal: data Proxy (t :: k)
- Distribution.Utils.IOData: instance (a GHC.Types.~ GHC.Types.Char) => Distribution.Utils.IOData.KnownIODataMode [a]
- Distribution.Utils.Structured: instance (i GHC.Types.~ GHC.Generics.C, GHC.Generics.Constructor c, Distribution.Utils.Structured.GStructuredProd f) => Distribution.Utils.Structured.GStructuredSum (GHC.Generics.M1 i c f)
- Distribution.Utils.Structured: instance (i GHC.Types.~ GHC.Generics.D, GHC.Generics.Datatype c, Distribution.Utils.Structured.GStructuredSum f) => Distribution.Utils.Structured.GStructured (GHC.Generics.M1 i c f)
- Distribution.Utils.Structured: instance (i GHC.Types.~ GHC.Generics.S, Distribution.Utils.Structured.GStructuredProd f) => Distribution.Utils.Structured.GStructuredProd (GHC.Generics.M1 i c f)
+ Distribution.CabalSpecVersion: cabalSpecFromVersionDigitsMaybe :: [Int] -> Maybe CabalSpecVersion
+ Distribution.CabalSpecVersion: cabalSpecMinimumLibraryVersion :: CabalSpecVersion -> [Int]
+ Distribution.CabalSpecVersion: cabalSpecToVersionDigits :: CabalSpecVersion -> [Int]
+ Distribution.Compat.Graph: instance (Distribution.Compat.Graph.IsNode a, Distribution.Compat.Graph.IsNode b, Distribution.Compat.Graph.Key a Data.Type.Equality.~ Distribution.Compat.Graph.Key b) => Distribution.Compat.Graph.IsNode (Data.Either.Either a b)
+ Distribution.Compat.Prelude.Internal: data Proxy (t :: k) :: forall k. () => k -> Type
+ Distribution.Compat.Process: createProcess :: CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)
+ Distribution.Compat.Process: enableProcessJobs :: CreateProcess -> CreateProcess
+ Distribution.Compat.Process: rawSystem :: String -> [String] -> IO ExitCode
+ Distribution.Compat.Process: runInteractiveProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> IO (Handle, Handle, Handle, ProcessHandle)
+ Distribution.Utils.IOData: instance (a Data.Type.Equality.~ GHC.Types.Char) => Distribution.Utils.IOData.KnownIODataMode [a]
+ Distribution.Utils.Structured: instance (i Data.Type.Equality.~ GHC.Generics.C, GHC.Generics.Constructor c, Distribution.Utils.Structured.GStructuredProd f) => Distribution.Utils.Structured.GStructuredSum (GHC.Generics.M1 i c f)
+ Distribution.Utils.Structured: instance (i Data.Type.Equality.~ GHC.Generics.D, GHC.Generics.Datatype c, Distribution.Utils.Structured.GStructuredSum f) => Distribution.Utils.Structured.GStructured (GHC.Generics.M1 i c f)
+ Distribution.Utils.Structured: instance (i Data.Type.Equality.~ GHC.Generics.S, Distribution.Utils.Structured.GStructuredProd f) => Distribution.Utils.Structured.GStructuredProd (GHC.Generics.M1 i c f)
- Distribution.Compat.Prelude.Internal: (!!) :: [a] -> Int -> a
+ Distribution.Compat.Prelude.Internal: (!!) :: () => [a] -> Int -> a
- Distribution.Compat.Prelude.Internal: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
+ Distribution.Compat.Prelude.Internal: ($!) :: () => (a -> b) -> a -> b
- Distribution.Compat.Prelude.Internal: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
+ Distribution.Compat.Prelude.Internal: ($) :: () => (a -> b) -> a -> b
- Distribution.Compat.Prelude.Internal: (++) :: [a] -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: (++) :: () => [a] -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: (.) :: (b -> c) -> (a -> b) -> a -> c
+ Distribution.Compat.Prelude.Internal: (.) :: () => (b -> c) -> (a -> b) -> a -> c
- Distribution.Compat.Prelude.Internal: Proxy :: Proxy (t :: k)
+ Distribution.Compat.Prelude.Internal: Proxy :: Proxy
- Distribution.Compat.Prelude.Internal: asTypeOf :: a -> a -> a
+ Distribution.Compat.Prelude.Internal: asTypeOf :: () => a -> a -> a
- Distribution.Compat.Prelude.Internal: break :: (a -> Bool) -> [a] -> ([a], [a])
+ Distribution.Compat.Prelude.Internal: break :: () => (a -> Bool) -> [a] -> ([a], [a])
- Distribution.Compat.Prelude.Internal: catMaybes :: [Maybe a] -> [a]
+ Distribution.Compat.Prelude.Internal: catMaybes :: () => [Maybe a] -> [a]
- Distribution.Compat.Prelude.Internal: const :: a -> b -> a
+ Distribution.Compat.Prelude.Internal: const :: () => a -> b -> a
- Distribution.Compat.Prelude.Internal: curry :: ((a, b) -> c) -> a -> b -> c
+ Distribution.Compat.Prelude.Internal: curry :: () => ((a, b) -> c) -> a -> b -> c
- Distribution.Compat.Prelude.Internal: cycle :: [a] -> [a]
+ Distribution.Compat.Prelude.Internal: cycle :: () => [a] -> [a]
- Distribution.Compat.Prelude.Internal: drop :: Int -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: drop :: () => Int -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: dropWhile :: (a -> Bool) -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: dropWhile :: () => (a -> Bool) -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: either :: (a -> c) -> (b -> c) -> Either a b -> c
+ Distribution.Compat.Prelude.Internal: either :: () => (a -> c) -> (b -> c) -> Either a b -> c
- Distribution.Compat.Prelude.Internal: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
+ Distribution.Compat.Prelude.Internal: error :: HasCallStack => [Char] -> a
- Distribution.Compat.Prelude.Internal: errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
+ Distribution.Compat.Prelude.Internal: errorWithoutStackTrace :: () => [Char] -> a
- Distribution.Compat.Prelude.Internal: fail :: MonadFail m => String -> m a
+ Distribution.Compat.Prelude.Internal: fail :: Monad m => String -> m a
- Distribution.Compat.Prelude.Internal: filter :: (a -> Bool) -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: filter :: () => (a -> Bool) -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: flip :: (a -> b -> c) -> b -> a -> c
+ Distribution.Compat.Prelude.Internal: flip :: () => (a -> b -> c) -> b -> a -> c
- Distribution.Compat.Prelude.Internal: fromMaybe :: a -> Maybe a -> a
+ Distribution.Compat.Prelude.Internal: fromMaybe :: () => a -> Maybe a -> a
- Distribution.Compat.Prelude.Internal: fst :: (a, b) -> a
+ Distribution.Compat.Prelude.Internal: fst :: () => (a, b) -> a
- Distribution.Compat.Prelude.Internal: head :: NonEmpty a -> a
+ Distribution.Compat.Prelude.Internal: head :: () => NonEmpty a -> a
- Distribution.Compat.Prelude.Internal: id :: a -> a
+ Distribution.Compat.Prelude.Internal: id :: () => a -> a
- Distribution.Compat.Prelude.Internal: infixl 6 +
+ Distribution.Compat.Prelude.Internal: infixl 6 -
- Distribution.Compat.Prelude.Internal: init :: NonEmpty a -> [a]
+ Distribution.Compat.Prelude.Internal: init :: () => NonEmpty a -> [a]
- Distribution.Compat.Prelude.Internal: intercalate :: [a] -> [[a]] -> [a]
+ Distribution.Compat.Prelude.Internal: intercalate :: () => [a] -> [[a]] -> [a]
- Distribution.Compat.Prelude.Internal: intersperse :: a -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: intersperse :: () => a -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: ioError :: IOError -> IO a
+ Distribution.Compat.Prelude.Internal: ioError :: () => IOError -> IO a
- Distribution.Compat.Prelude.Internal: isJust :: Maybe a -> Bool
+ Distribution.Compat.Prelude.Internal: isJust :: () => Maybe a -> Bool
- Distribution.Compat.Prelude.Internal: isNothing :: Maybe a -> Bool
+ Distribution.Compat.Prelude.Internal: isNothing :: () => Maybe a -> Bool
- Distribution.Compat.Prelude.Internal: iterate :: (a -> a) -> a -> [a]
+ Distribution.Compat.Prelude.Internal: iterate :: () => (a -> a) -> a -> [a]
- Distribution.Compat.Prelude.Internal: last :: NonEmpty a -> a
+ Distribution.Compat.Prelude.Internal: last :: () => NonEmpty a -> a
- Distribution.Compat.Prelude.Internal: listToMaybe :: [a] -> Maybe a
+ Distribution.Compat.Prelude.Internal: listToMaybe :: () => [a] -> Maybe a
- Distribution.Compat.Prelude.Internal: map :: (a -> b) -> [a] -> [b]
+ Distribution.Compat.Prelude.Internal: map :: () => (a -> b) -> [a] -> [b]
- Distribution.Compat.Prelude.Internal: mapMaybe :: (a -> Maybe b) -> [a] -> [b]
+ Distribution.Compat.Prelude.Internal: mapMaybe :: () => (a -> Maybe b) -> [a] -> [b]
- Distribution.Compat.Prelude.Internal: maybe :: b -> (a -> b) -> Maybe a -> b
+ Distribution.Compat.Prelude.Internal: maybe :: () => b -> (a -> b) -> Maybe a -> b
- Distribution.Compat.Prelude.Internal: maybeToList :: Maybe a -> [a]
+ Distribution.Compat.Prelude.Internal: maybeToList :: () => Maybe a -> [a]
- Distribution.Compat.Prelude.Internal: nubBy :: (a -> a -> Bool) -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: nubBy :: () => (a -> a -> Bool) -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: readParen :: Bool -> ReadS a -> ReadS a
+ Distribution.Compat.Prelude.Internal: readParen :: () => Bool -> ReadS a -> ReadS a
- Distribution.Compat.Prelude.Internal: repeat :: a -> [a]
+ Distribution.Compat.Prelude.Internal: repeat :: () => a -> [a]
- Distribution.Compat.Prelude.Internal: replicate :: Int -> a -> [a]
+ Distribution.Compat.Prelude.Internal: replicate :: () => Int -> a -> [a]
- Distribution.Compat.Prelude.Internal: reverse :: [a] -> [a]
+ Distribution.Compat.Prelude.Internal: reverse :: () => [a] -> [a]
- Distribution.Compat.Prelude.Internal: scanl :: (b -> a -> b) -> b -> [a] -> [b]
+ Distribution.Compat.Prelude.Internal: scanl :: () => (b -> a -> b) -> b -> [a] -> [b]
- Distribution.Compat.Prelude.Internal: scanl1 :: (a -> a -> a) -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: scanl1 :: () => (a -> a -> a) -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: scanr :: (a -> b -> b) -> b -> [a] -> [b]
+ Distribution.Compat.Prelude.Internal: scanr :: () => (a -> b -> b) -> b -> [a] -> [b]
- Distribution.Compat.Prelude.Internal: scanr1 :: (a -> a -> a) -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: scanr1 :: () => (a -> a -> a) -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
+ Distribution.Compat.Prelude.Internal: seq :: () => a -> b -> b
- Distribution.Compat.Prelude.Internal: snd :: (a, b) -> b
+ Distribution.Compat.Prelude.Internal: snd :: () => (a, b) -> b
- Distribution.Compat.Prelude.Internal: sortBy :: (a -> a -> Ordering) -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: sortBy :: () => (a -> a -> Ordering) -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: span :: (a -> Bool) -> [a] -> ([a], [a])
+ Distribution.Compat.Prelude.Internal: span :: () => (a -> Bool) -> [a] -> ([a], [a])
- Distribution.Compat.Prelude.Internal: splitAt :: Int -> [a] -> ([a], [a])
+ Distribution.Compat.Prelude.Internal: splitAt :: () => Int -> [a] -> ([a], [a])
- Distribution.Compat.Prelude.Internal: tail :: NonEmpty a -> [a]
+ Distribution.Compat.Prelude.Internal: tail :: () => NonEmpty a -> [a]
- Distribution.Compat.Prelude.Internal: take :: Int -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: take :: () => Int -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: takeWhile :: (a -> Bool) -> [a] -> [a]
+ Distribution.Compat.Prelude.Internal: takeWhile :: () => (a -> Bool) -> [a] -> [a]
- Distribution.Compat.Prelude.Internal: typeRep :: forall k proxy (a :: k). Typeable a => proxy a -> TypeRep
+ Distribution.Compat.Prelude.Internal: typeRep :: Typeable a => proxy a -> TypeRep
- Distribution.Compat.Prelude.Internal: uncurry :: (a -> b -> c) -> (a, b) -> c
+ Distribution.Compat.Prelude.Internal: uncurry :: () => (a -> b -> c) -> (a, b) -> c
- Distribution.Compat.Prelude.Internal: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
+ Distribution.Compat.Prelude.Internal: undefined :: HasCallStack => a
- Distribution.Compat.Prelude.Internal: unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
+ Distribution.Compat.Prelude.Internal: unfoldr :: () => (b -> Maybe (a, b)) -> b -> [a]
- Distribution.Compat.Prelude.Internal: until :: (a -> Bool) -> (a -> a) -> a -> a
+ Distribution.Compat.Prelude.Internal: until :: () => (a -> Bool) -> (a -> a) -> a -> a
- Distribution.Compat.Prelude.Internal: unzip :: [(a, b)] -> ([a], [b])
+ Distribution.Compat.Prelude.Internal: unzip :: () => [(a, b)] -> ([a], [b])
- Distribution.Compat.Prelude.Internal: unzip3 :: [(a, b, c)] -> ([a], [b], [c])
+ Distribution.Compat.Prelude.Internal: unzip3 :: () => [(a, b, c)] -> ([a], [b], [c])
- Distribution.Compat.Prelude.Internal: zip :: [a] -> [b] -> [(a, b)]
+ Distribution.Compat.Prelude.Internal: zip :: () => [a] -> [b] -> [(a, b)]
- Distribution.Compat.Prelude.Internal: zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
+ Distribution.Compat.Prelude.Internal: zip3 :: () => [a] -> [b] -> [c] -> [(a, b, c)]
- Distribution.Compat.Prelude.Internal: zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
+ Distribution.Compat.Prelude.Internal: zipWith :: () => (a -> b -> c) -> [a] -> [b] -> [c]
- Distribution.Compat.Prelude.Internal: zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
+ Distribution.Compat.Prelude.Internal: zipWith3 :: () => (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- Distribution.Compat.Stack: callStack :: HasCallStack => CallStack
+ Distribution.Compat.Stack: callStack :: HasCallStack -> CallStack
- Distribution.Compat.Stack: withFrozenCallStack :: HasCallStack => (HasCallStack => a) -> a
+ Distribution.Compat.Stack: withFrozenCallStack :: HasCallStack => (HasCallStack -> a) -> a
- Distribution.Compat.Typeable: typeRep :: forall k proxy (a :: k). Typeable a => proxy a -> TypeRep
+ Distribution.Compat.Typeable: typeRep :: Typeable a => proxy a -> TypeRep
- Distribution.Simple.Utils: intercalate :: [a] -> [[a]] -> [a]
+ Distribution.Simple.Utils: intercalate :: () => [a] -> [[a]] -> [a]
- Distribution.Utils.Generic: intercalate :: [a] -> [[a]] -> [a]
+ Distribution.Utils.Generic: intercalate :: () => [a] -> [[a]] -> [a]

Files

Cabal.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name:          Cabal-version:       3.2.0.0+version:       3.2.1.0 copyright:     2003-2020, Cabal Development Team (see AUTHORS file) license:       BSD3 license-file:  LICENSE@@ -133,6 +133,8 @@   tests/ParserTests/regressions/common3.format   tests/ParserTests/regressions/cxx-options-with-optimization.cabal   tests/ParserTests/regressions/cxx-options-with-optimization.check+  tests/ParserTests/regressions/denormalised-paths.cabal+  tests/ParserTests/regressions/denormalised-paths.check   tests/ParserTests/regressions/elif.cabal   tests/ParserTests/regressions/elif.expr   tests/ParserTests/regressions/elif.format@@ -279,7 +281,7 @@     filepath   >= 1.3.0.1  && < 1.5,     pretty     >= 1.1.1    && < 1.2,     process    >= 1.1.0.2  && < 1.7,-    time       >= 1.4.0.1  && < 1.10+    time       >= 1.4.0.1  && < 1.11    if flag(bundled-binary-generic)     build-depends: binary >= 0.5.1.1 && < 0.7@@ -287,7 +289,7 @@     build-depends: binary >= 0.7 && < 0.9    if os(windows)-    build-depends: Win32 >= 2.3.0.0 && < 2.9+    build-depends: Win32 >= 2.3.0.0 && < 2.11   else     build-depends: unix  >= 2.6.0.0 && < 2.8 @@ -334,6 +336,7 @@     Distribution.Compat.Newtype     Distribution.Compat.ResponseFile     Distribution.Compat.Prelude.Internal+    Distribution.Compat.Process     Distribution.Compat.Semigroup     Distribution.Compat.Stack     Distribution.Compat.Time@@ -635,7 +638,7 @@     directory,     filepath,     integer-logarithms >= 1.0.2 && <1.1,-    tasty >= 1.2.3 && < 1.3,+    tasty >= 1.2.3 && < 1.4,     tasty-hunit,     tasty-quickcheck,     tagged,@@ -643,7 +646,7 @@     text,     pretty,     Diff >=0.4 && <0.5,-    QuickCheck >= 2.13.2 && < 2.14,+    QuickCheck >= 2.14 && < 2.15,     Cabal   ghc-options: -Wall   default-language: Haskell2010@@ -658,7 +661,7 @@     bytestring,     directory,     filepath,-    tasty >= 1.2.3 && < 1.3,+    tasty >= 1.2.3 && < 1.4,     tasty-hunit,     tasty-quickcheck,     tasty-golden >=2.3.1.1 && <2.4,@@ -688,7 +691,7 @@     bytestring,     directory,     filepath,-    tasty >= 1.2.3 && < 1.3,+    tasty >= 1.2.3 && < 1.4,     tasty-golden >=2.3.1.1 && <2.4,     Diff >=0.4 && <0.5,     Cabal@@ -762,7 +765,7 @@     bytestring    build-depends:-    tasty >= 1.2.3 && < 1.3,+    tasty >= 1.2.3 && < 1.4,     tasty-hunit,     tasty-quickcheck,     QuickCheck
ChangeLog.md view
@@ -1,3 +1,11 @@+# 3.2.1.0 [Oleg Grenrus](mailto:oleg.grenris@iki.fi) October 2020+  * Pass `cxx-options` with `-optcxx` for GHC >= 8.10+  * Use process jobs when calling subprocesses+  * Require custom-setup for `cabal-version: 1.24` and later+  * Accept `linux-androideabi` as an alias for Android+  * Fix ghci being launched before other sources are built +  * Require cabal-versions >=1.25 to be exact+ # 3.2.0.0 [Herbert Valerio Riedel](mailto:hvr@gnu.org) April 2020   * Change free text `String` fields to use `ShortText` in package description     and installed packge info.@@ -24,6 +32,21 @@ # 3.0.1.0 [Herbert Valerio Riedel](mailto:hvr@gnu.org) April 2020   * Add GHC-8.8 flags to `normaliseGhcFlags`     ([#6379](https://github.com/haskell/cabal/pull/6379)).+    `Language.Haskell.Extension`+  * Use more `NonEmpty` instead of ordinary lists+  * Add `Distribution.Utils.Structured` for fingeprinting `Binary` blobs+  * Add `null`, `length` and `unsafeFromUTF8BS` to `Distribution.Utils.ShortText`+  * Refactor `Distribution.Utils.IOData` module+  * Rename `Distribution.Compat.MD5` to `Distribution.Utils.MD5`+  * Add `safeHead`, `safeTail`, `safeLast` to `Distribution.Utils.Generic`+  * Add `unsnoc` and `unsnocNE` to `Distribution.Utils.Generic`+  * Add `Set'` modifier to `Distribution.Parsec.Newtypes`+  * Add `Distribution.Compat.Async`+  * Add `Distribution.Compat.Process` with `enableProcessJobs`++# 3.0.1.0 TBW+  * Add GHC-8.8 flags to normaliseGhcFlags+    ([#6379](https://github.com/haskell/cabal/pull/6379))   * Typo fixes     ([#6372](https://github.com/haskell/cabal/pull/6372)).   * Limit version number parts to contain at most 9 digits
Distribution/CabalSpecVersion.hs view
@@ -53,21 +53,61 @@  cabalSpecFromVersionDigits :: [Int] -> CabalSpecVersion cabalSpecFromVersionDigits v-    | v >= [2,5]  = CabalSpecV3_0-    | v >= [2,3]  = CabalSpecV2_4-    | v >= [2,1]  = CabalSpecV2_2-    | v >= [1,25] = CabalSpecV2_0-    | v >= [1,23] = CabalSpecV1_24-    | v >= [1,21] = CabalSpecV1_22-    | v >= [1,19] = CabalSpecV1_20-    | v >= [1,17] = CabalSpecV1_18-    | v >= [1,11] = CabalSpecV1_12-    | v >= [1,9]  = CabalSpecV1_10-    | v >= [1,7]  = CabalSpecV1_8-    | v >= [1,5]  = CabalSpecV1_6-    | v >= [1,3]  = CabalSpecV1_4-    | v >= [1,1]  = CabalSpecV1_2-    | otherwise   = CabalSpecV1_0+    = fromMaybe cabalSpecLatest (cabalSpecFromVersionDigitsMaybe v)++cabalSpecFromVersionDigitsMaybe :: [Int] -> Maybe CabalSpecVersion+cabalSpecFromVersionDigitsMaybe v+    | v == [3,0]  = Just CabalSpecV3_0+    | v == [2,4]  = Just CabalSpecV2_4+    | v == [2,2]  = Just CabalSpecV2_2+    | v == [2,0]  = Just CabalSpecV2_0+    | v >= [1,25] = Nothing+    | v >= [1,23] = Just CabalSpecV1_24+    | v >= [1,21] = Just CabalSpecV1_22+    | v >= [1,19] = Just CabalSpecV1_20+    | v >= [1,17] = Just CabalSpecV1_18+    | v >= [1,11] = Just CabalSpecV1_12+    | v >= [1,9]  = Just CabalSpecV1_10+    | v >= [1,7]  = Just CabalSpecV1_8+    | v >= [1,5]  = Just CabalSpecV1_6+    | v >= [1,3]  = Just CabalSpecV1_4+    | v >= [1,1]  = Just CabalSpecV1_2+    | otherwise   = Just CabalSpecV1_0++cabalSpecToVersionDigits :: CabalSpecVersion -> [Int]+cabalSpecToVersionDigits CabalSpecV3_0   = [3,0]+cabalSpecToVersionDigits CabalSpecV2_4   = [2,4]+cabalSpecToVersionDigits CabalSpecV2_2   = [2,2]+cabalSpecToVersionDigits CabalSpecV2_0   = [2,0]+cabalSpecToVersionDigits CabalSpecV1_24  = [1,24]+cabalSpecToVersionDigits CabalSpecV1_22  = [1,22]+cabalSpecToVersionDigits CabalSpecV1_20  = [1,20]+cabalSpecToVersionDigits CabalSpecV1_18  = [1,18]+cabalSpecToVersionDigits CabalSpecV1_12  = [1,12]+cabalSpecToVersionDigits CabalSpecV1_10  = [1,10]+cabalSpecToVersionDigits CabalSpecV1_8   = [1,8]+cabalSpecToVersionDigits CabalSpecV1_6   = [1,6]+cabalSpecToVersionDigits CabalSpecV1_4   = [1,4]+cabalSpecToVersionDigits CabalSpecV1_2   = [1,2]+cabalSpecToVersionDigits CabalSpecV1_0   = [1,0]++-- | What is the minimum Cabal library version which knows how handle+-- this spec version.+--+-- /Note:/ this is a point where we could decouple cabal-spec and Cabal+-- versions, if we ever want that.+--+-- >>> cabalSpecMinimumLibraryVersion CabalSpecV3_0+-- [2,5]+--+-- >>> cabalSpecMinimumLibraryVersion CabalSpecV2_4+-- [2,3]+--+cabalSpecMinimumLibraryVersion :: CabalSpecVersion -> [Int]+cabalSpecMinimumLibraryVersion CabalSpecV1_0 = [1,0]+cabalSpecMinimumLibraryVersion csv = case cabalSpecToVersionDigits (pred csv) of+    [x,y] -> [x, y+1]+    xs    -> xs  specHasCommonStanzas :: CabalSpecVersion -> HasCommonStanzas specHasCommonStanzas v =
+ Distribution/Compat/Process.hs view
@@ -0,0 +1,82 @@+{-# LANGUAGE CPP #-}+module Distribution.Compat.Process (+    -- * Redefined functions+    createProcess,+    runInteractiveProcess,+    rawSystem,+    -- * Additions+    enableProcessJobs,+    ) where++import System.Exit (ExitCode (..))+import System.IO   (Handle)++import           System.Process (CreateProcess, ProcessHandle)+import qualified System.Process as Process++#if MIN_VERSION_process(1,2,0)+import           System.Process (waitForProcess)+#endif++-------------------------------------------------------------------------------+-- enableProcessJobs+-------------------------------------------------------------------------------++-- | Enable process jobs to ensure accurate determination of process completion+-- in the presence of @exec(3)@ on Windows.+--+-- Unfortunately the process job support is badly broken in @process@ releases+-- prior to 1.6.8, so we disable it in these versions, despite the fact that+-- this means we may see sporatic build failures without jobs.+enableProcessJobs :: CreateProcess -> CreateProcess+#ifdef MIN_VERSION_process+#if MIN_VERSION_process(1,6,8)+enableProcessJobs cp = cp {Process.use_process_jobs = True}+#else+enableProcessJobs cp = cp+#endif+#else+enableProcessJobs cp = cp+#endif++-------------------------------------------------------------------------------+-- process redefinitions+-------------------------------------------------------------------------------++-- | 'System.Process.createProcess' with process jobs enabled when appropriate.+-- See 'enableProcessJobs'.+createProcess :: CreateProcess+              -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)+createProcess = Process.createProcess . enableProcessJobs++-- | 'System.Process.rawSystem' with process jobs enabled when appropriate.+-- See 'enableProcessJobs'.+rawSystem :: String -> [String] -> IO ExitCode+rawSystem cmd args = do+#if MIN_VERSION_process(1,2,0)+  (_,_,_,p) <- createProcess (Process.proc cmd args) { Process.delegate_ctlc = True }+  waitForProcess p+#else+  -- With very old 'process', just do its rawSystem+  Process.rawSystem cmd args+#endif++-- | 'System.Process.runInteractiveProcess' with process jobs enabled when+-- appropriate. See 'enableProcessJobs'.+runInteractiveProcess+  :: FilePath                   -- ^ Filename of the executable (see 'RawCommand' for details)+  -> [String]                   -- ^ Arguments to pass to the executable+  -> Maybe FilePath             -- ^ Optional path to the working directory+  -> Maybe [(String,String)]    -- ^ Optional environment (otherwise inherit)+  -> IO (Handle,Handle,Handle,ProcessHandle)+runInteractiveProcess cmd args mb_cwd mb_env = do+  (mb_in, mb_out, mb_err, p) <-+      createProcess (Process.proc cmd args)+              { Process.std_in  = Process.CreatePipe,+                Process.std_out = Process.CreatePipe,+                Process.std_err = Process.CreatePipe,+                Process.env     = mb_env,+                Process.cwd     = mb_cwd }+  return (fromJust mb_in, fromJust mb_out, fromJust mb_err, p)+  where+    fromJust = maybe (error "runInteractiveProcess: fromJust") id
Distribution/PackageDescription/Check.hs view
@@ -79,6 +79,9 @@ import qualified Distribution.Types.GenericPackageDescription.Lens as L import qualified Distribution.Types.PackageDescription.Lens        as L +-- $setup+-- >>> import Control.Arrow ((&&&))+ -- | Results of some kind of failed package check. -- -- There are a range of severities, from merely dubious to totally insane.@@ -773,6 +776,16 @@   , check (maybe False isAbsoluteOnAnyPlatform (repoSubdir repo)) $       PackageDistInexcusable         "The 'subdir' field of a source-repository must be a relative path."++  , check (maybe False isAbsoluteOnAnyPlatform (repoSubdir repo)) $+      PackageDistInexcusable+        "The 'subdir' field of a source-repository must be a relative path."++  , do+      subdir <- repoSubdir repo+      err    <- isGoodRelativeDirectoryPath subdir+      return $ PackageDistInexcusable $+        "The 'subdir' field of a source-repository is not a good relative path: " ++ show err   ]   | repo <- sourceRepos pkg ] @@ -1049,27 +1062,42 @@    where (badFlags, goodFlags) = unzip flags +data PathKind+    = PathKindFile+    | PathKindDirectory+    | PathKindGlob+ checkPaths :: PackageDescription -> [PackageCheck] checkPaths pkg =   [ PackageBuildWarning $-         quote (kind ++ ": " ++ path)+         quote (field ++ ": " ++ path)       ++ " is a relative path outside of the source tree. "       ++ "This will not work when generating a tarball with 'sdist'."-  | (path, kind) <- relPaths ++ absPaths+  | (path, field, _) <- relPaths ++ absPaths   , isOutsideTree path ]   ++   [ PackageDistInexcusable $-      quote (kind ++ ": " ++ path) ++ " is an absolute path."-  | (path, kind) <- relPaths+      quote (field ++ ": " ++ path) ++ " is an absolute path."+  | (path, field, _) <- relPaths   , isAbsoluteOnAnyPlatform path ]   ++   [ PackageDistInexcusable $-         quote (kind ++ ": " ++ path) ++ " points inside the 'dist' "+      quote (field ++ ": " ++ path) ++ " is not good relative path: " ++ err+  | (path, field, kind) <- relPaths+  -- these are not paths, but globs...+  , err <- maybeToList $ case kind of+      PathKindFile      -> isGoodRelativeFilePath path+      PathKindGlob      -> isGoodRelativeGlob path+      PathKindDirectory -> isGoodRelativeDirectoryPath path+  ]+  +++  [ PackageDistInexcusable $+         quote (field ++ ": " ++ path) ++ " points inside the 'dist' "       ++ "directory. This is not reliable because the location of this "       ++ "directory is configurable by the user (or package manager). In "       ++ "addition the layout of the 'dist' directory is subject to change "       ++ "in future versions of Cabal."-  | (path, kind) <- relPaths ++ absPaths+  | (path, field, _) <- relPaths ++ absPaths   , isInsideDist path ]   ++   [ PackageDistInexcusable $@@ -1109,29 +1137,34 @@       "dist"    :_ -> True       ".":"dist":_ -> True       _            -> False+     -- paths that must be relative+    relPaths :: [(FilePath, String, PathKind)]     relPaths =-         [ (path, "extra-source-files") | path <- extraSrcFiles pkg ]-      ++ [ (path, "extra-tmp-files")    | path <- extraTmpFiles pkg ]-      ++ [ (path, "extra-doc-files")    | path <- extraDocFiles pkg ]-      ++ [ (path, "data-files")         | path <- dataFiles     pkg ]-      ++ [ (path, "data-dir")           | path <- [dataDir      pkg]]-      ++ [ (path, "license-file")       | path <- licenseFiles  pkg ]+         [ (path, "extra-source-files", PathKindGlob) | path <- extraSrcFiles pkg ]+      ++ [ (path, "extra-tmp-files", PathKindFile)    | path <- extraTmpFiles pkg ]+      ++ [ (path, "extra-doc-files", PathKindGlob)    | path <- extraDocFiles pkg ]+      ++ [ (path, "data-files", PathKindGlob)         | path <- dataFiles     pkg ]+      ++ [ (path, "data-dir", PathKindDirectory)           | path <- [dataDir      pkg]]+      ++ [ (path, "license-file", PathKindFile)       | path <- licenseFiles  pkg ]       ++ concat-         [    [ (path, "asm-sources")      | path <- asmSources      bi ]-           ++ [ (path, "cmm-sources")      | path <- cmmSources      bi ]-           ++ [ (path, "c-sources")        | path <- cSources        bi ]-           ++ [ (path, "cxx-sources")      | path <- cxxSources      bi ]-           ++ [ (path, "js-sources")       | path <- jsSources       bi ]-           ++ [ (path, "install-includes") | path <- installIncludes bi ]-           ++ [ (path, "hs-source-dirs")   | path <- hsSourceDirs    bi ]+         [    [ (path, "asm-sources", PathKindFile)      | path <- asmSources      bi ]+           ++ [ (path, "cmm-sources", PathKindFile)      | path <- cmmSources      bi ]+           ++ [ (path, "c-sources", PathKindFile)        | path <- cSources        bi ]+           ++ [ (path, "cxx-sources", PathKindFile)      | path <- cxxSources      bi ]+           ++ [ (path, "js-sources", PathKindFile)       | path <- jsSources       bi ]+           ++ [ (path, "install-includes", PathKindFile) | path <- installIncludes bi ]+           ++ [ (path, "hs-source-dirs", PathKindDirectory)   | path <- hsSourceDirs    bi ]          | bi <- allBuildInfo pkg ]+     -- paths that are allowed to be absolute+    absPaths :: [(FilePath, String, PathKind)]     absPaths = concat-      [    [ (path, "includes")         | path <- includes        bi ]-        ++ [ (path, "include-dirs")     | path <- includeDirs     bi ]-        ++ [ (path, "extra-lib-dirs")   | path <- extraLibDirs    bi ]-      | bi <- allBuildInfo pkg ]+      [ [ (path, "includes",       PathKindFile)      | path <- includes     bi ] +++        [ (path, "include-dirs",   PathKindDirectory) | path <- includeDirs  bi ] +++        [ (path, "extra-lib-dirs", PathKindDirectory) | path <- extraLibDirs bi ]+      | bi <- allBuildInfo pkg+      ]  --TODO: check sets of paths that would be interpreted differently between Unix -- and windows, ie case-sensitive or insensitive. Things that might clash, or@@ -2285,3 +2318,246 @@     extension = takeExtension path     isHaskell = extension `elem` [".hs", ".lhs"]     isC       = isJust (filenameCDialect extension)++-- | Whether a path is a good relative path.+--+-- >>> let test fp = putStrLn $ show (isGoodRelativeDirectoryPath fp) ++ "; " ++ show (isGoodRelativeFilePath fp)+--+-- >>> test "foo/bar/quu"+-- Nothing; Nothing+--+-- Trailing slash is not allowed for files, for directories it is ok.+--+-- >>> test "foo/"+-- Nothing; Just "trailing slash"+--+-- Leading @./@ is fine, but @.@ and @./@ are not valid files.+--+-- >>> traverse_ test [".", "./", "./foo/bar"]+-- Nothing; Just "trailing dot segment"+-- Nothing; Just "trailing slash"+-- Nothing; Nothing+--+-- Lastly, not good file nor directory cases:+--+-- >>> traverse_ test ["", "/tmp/src", "foo//bar", "foo/.", "foo/./bar", "foo/../bar", "foo*bar"]+-- Just "empty path"; Just "empty path"+-- Just "posix absolute path"; Just "posix absolute path"+-- Just "empty path segment"; Just "empty path segment"+-- Just "trailing same directory segment: ."; Just "trailing same directory segment: ."+-- Just "same directory segment: ."; Just "same directory segment: .."+-- Just "parent directory segment: .."; Just "parent directory segment: .."+-- Just "reserved character '*'"; Just "reserved character '*'"+--+-- For the last case, 'isGoodRelativeGlob' doesn't warn:+--+-- >>> traverse_ (print . isGoodRelativeGlob) ["foo/../bar", "foo*bar"]+-- Just "parent directory segment: .."+-- Nothing+--+isGoodRelativeFilePath :: FilePath -> Maybe String+isGoodRelativeFilePath = state0+  where+    -- Reserved characters+    -- https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file+    isReserved c = c `elem` "<>:\"\\/|?*"++    -- initial state+    state0 []                    = Just "empty path"+    state0 (c:cs) | c == '.'     = state1 cs+                  | c == '/'     = Just "posix absolute path"+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state3 cs++    -- after .+    state1 []                    = Just "trailing dot segment"+    state1 (c:cs) | c == '.'     = state4 cs+                  | c == '/'     = state2 cs+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state5 cs++    -- after ./+    state2 []                    = Just "trailing slash"+    state2 (c:cs) | c == '.'     = state3 cs+                  | c == '/'     = Just "empty path segment"+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state5 cs++    -- after non-first segment's .+    state3 []                    = Just "trailing same directory segment: ."+    state3 (c:cs) | c == '.'     = state4 cs+                  | c == '/'     = Just "same directory segment: .."+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state5 cs++    -- after non-first segment's ..+    state4 []                    = Just "trailing parent directory segment: .."+    state4 (c:cs) | c == '.'     = state5 cs+                  | c == '/'     = Just "parent directory segment: .."+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state5 cs++    -- in a segment which is ok.+    state5 []                    = Nothing+    state5 (c:cs) | c == '.'     = state3 cs+                  | c == '/'     = state2 cs+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state5 cs++-- | See 'isGoodRelativeFilePath'.+--+-- This is barebones function. We check whether the glob is a valid file+-- by replacing stars @*@ with @x@ses.+isGoodRelativeGlob :: FilePath -> Maybe String+isGoodRelativeGlob = isGoodRelativeFilePath . map f where+    f '*' = 'x'+    f c   = c++-- | See 'isGoodRelativeFilePath'.+isGoodRelativeDirectoryPath :: FilePath -> Maybe String+isGoodRelativeDirectoryPath = state0+  where+    -- Reserved characters+    -- https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file+    isReserved c = c `elem` "<>:\"\\/|?*"++    -- initial state+    state0 []                    = Just "empty path"+    state0 (c:cs) | c == '.'     = state5 cs+                  | c == '/'     = Just "posix absolute path"+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state4 cs++    -- after ./+    state1 []                    = Nothing -- "./"+    state1 (c:cs) | c == '.'     = state2 cs+                  | c == '/'     = Just "empty path segment"+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state4 cs++    -- after non-first setgment's .+    state2 []                    = Just "trailing same directory segment: ."+    state2 (c:cs) | c == '.'     = state3 cs+                  | c == '/'     = Just "same directory segment: ."+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state4 cs++    -- after non-first segment's ..+    state3 []                    = Just "trailing parent directory segment: ."+    state3 (c:cs) | c == '.'     = state4 cs+                  | c == '/'     = Just "parent directory segment: .."+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state4 cs++    -- in a segment which is ok.+    state4 []                    = Nothing+    state4 (c:cs) | c == '.'     = state4 cs+                  | c == '/'     = state1 cs+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state4 cs++    -- after .+    state5 []                    = Nothing -- "."+    state5 (c:cs) | c == '.'     = state3 cs+                  | c == '/'     = state1 cs+                  | isReserved c = Just ("reserved character " ++ show c)+                  | otherwise    = state4 cs++-- [Note: Good relative paths]+--+-- Using @kleene@ we can define an extended regex:+--+-- @+-- import Algebra.Lattice+-- import Kleene+-- import Kleene.ERE (ERE (..), intersections)+--+-- data C = CDot | CSlash | COtherReserved | CChar+--   deriving (Eq, Ord, Enum, Bounded, Show)+--+-- reservedR :: ERE C+-- reservedR = notChar CSlash /\ notChar COtherReserved+--+-- pathPieceR :: ERE C+-- pathPieceR = intersections+--     [ plus reservedR+--     , ERENot (string [CDot])+--     , ERENot (string [CDot,CDot])+--     ]+--+-- filePathR :: ERE C+-- filePathR = optional (string [CDot, CSlash]) <> pathPieceR <> star (char CSlash <> pathPieceR)+--+-- dirPathR :: ERE C+-- dirPathR = (char CDot \/ filePathR) <> optional (char CSlash)+--+-- plus :: ERE C -> ERE C+-- plus r = r <> star r+--+-- optional :: ERE C -> ERE C+-- optional r = mempty \/ r+-- @+--+-- Results in following state machine for @filePathR@+--+-- @+-- 0 -> \x -> if+--     | x <= CDot           -> 1+--     | x <= COtherReserved -> 6+--     | otherwise           -> 5+-- 1 -> \x -> if+--     | x <= CDot           -> 4+--     | x <= CSlash         -> 2+--     | x <= COtherReserved -> 6+--     | otherwise           -> 5+-- 2 -> \x -> if+--     | x <= CDot           -> 3+--     | x <= COtherReserved -> 6+--     | otherwise           -> 5+-- 3 -> \x -> if+--     | x <= CDot           -> 4+--     | x <= COtherReserved -> 6+--     | otherwise           -> 5+-- 4 -> \x -> if+--     | x <= CDot           -> 5+--     | x <= COtherReserved -> 6+--     | otherwise           -> 5+-- 5+ -> \x -> if+--     | x <= CDot           -> 5+--     | x <= CSlash         -> 2+--     | x <= COtherReserved -> 6+--     | otherwise           -> 5+-- 6 -> \_ -> 6 -- black hole+-- @+--+-- and @dirPathR@:+--+-- @+-- 0 -> \x -> if+--     | x <= CDot           -> 5+--     | x <= COtherReserved -> 6+--     | otherwise           -> 4+-- 1+ -> \x -> if+--     | x <= CDot           -> 2+--     | x <= COtherReserved -> 6+--     | otherwise           -> 4+-- 2 -> \x -> if+--     | x <= CDot           -> 3+--     | x <= COtherReserved -> 6+--     | otherwise           -> 4+-- 3 -> \x -> if+--     | x <= CDot           -> 4+--     | x <= COtherReserved -> 6+--     | otherwise           -> 4+-- 4+ -> \x -> if+--     | x <= CDot           -> 4+--     | x <= CSlash         -> 1+--     | x <= COtherReserved -> 6+--     | otherwise           -> 4+-- 5+ -> \x -> if+--     | x <= CDot           -> 3+--     | x <= CSlash         -> 1+--     | x <= COtherReserved -> 6+--     | otherwise           -> 4+-- 6 -> \_ -> 6 -- black hole+-- @
Distribution/PackageDescription/FieldGrammar.hs view
@@ -100,7 +100,7 @@     <*> pure []       -- benchmarks     --  * Files     <*> monoidalFieldAla    "data-files"         (alaList' VCat FilePathNT) L.dataFiles-    <*> optionalFieldDefAla "data-dir"           FilePathNT                 L.dataDir ""+    <*> optionalFieldDefAla "data-dir"           FilePathNT                 L.dataDir "."     <*> monoidalFieldAla    "extra-source-files" (alaList' VCat FilePathNT) L.extraSrcFiles     <*> monoidalFieldAla    "extra-tmp-files"    (alaList' VCat FilePathNT) L.extraTmpFiles     <*> monoidalFieldAla    "extra-doc-files"    (alaList' VCat FilePathNT) L.extraDocFiles
Distribution/PackageDescription/Parsec.hs view
@@ -179,7 +179,10 @@                  return v -    let specVer = cabalSpecFromVersionDigits (versionNumbers cabalVer)+    specVer <- case cabalSpecFromVersionDigitsMaybe (versionNumbers cabalVer) of+        Just csv -> return csv+        Nothing  -> parseFatalFailure zeroPos $+            "Unsupported cabal-version " ++ prettyShow cabalVer ++ ". See https://github.com/haskell/cabal/issues/4899."      -- reset cabal version     setCabalSpecVersion (Just cabalVer)@@ -199,6 +202,7 @@     gpd1 <- view stateGpd <$> execStateT (goSections specVer sectionFields) (SectionS gpd Map.empty)      checkForUndefinedFlags gpd1+    checkForUndefinedCustomSetup gpd1     gpd1 `deepseq` return gpd1   where     safeLast :: [a] -> Maybe a@@ -672,9 +676,14 @@     goBranch acc (CondBranch _ t (Just e))  = go acc t && go acc e  ---------------------------------------------------------------------------------- Flag check+-- Post parsing checks ------------------------------------------------------------------------------- +-- | Check that we +--+-- * don't use undefined flags (very bad)+-- * define flags which are unused (just bad)+-- checkForUndefinedFlags :: GenericPackageDescription -> ParseResult () checkForUndefinedFlags gpd = do     let definedFlags, usedFlags :: Set.Set FlagName@@ -688,6 +697,18 @@   where     f :: CondTree ConfVar c a -> Const (Set.Set FlagName) (CondTree ConfVar c a)     f ct = Const (Set.fromList (freeVars ct))++-- | Since @cabal-version: 1.24@ one can specify @custom-setup@.+-- Let us require it.+--+checkForUndefinedCustomSetup :: GenericPackageDescription -> ParseResult ()+checkForUndefinedCustomSetup gpd = do+    let pd  = packageDescription gpd+    let csv = specVersion pd++    when (buildType pd == Custom && isNothing (setupBuildInfo pd)) $+        when (csv >= mkVersion [1,24]) $ parseFailure zeroPos $+            "Since cabal-version: 1.24 specifying custom-setup section is mandatory"  ------------------------------------------------------------------------------- -- Old syntax
Distribution/PackageDescription/PrettyPrint.hs view
@@ -64,6 +64,7 @@ showGenericPackageDescription :: GenericPackageDescription -> String showGenericPackageDescription gpd = showFields (const []) $ ppGenericPackageDescription v gpd   where+    v :: CabalSpecVersion     v = cabalSpecFromVersionDigits       $ versionNumbers       $ specVersion
Distribution/PackageDescription/Quirks.hs view
@@ -250,7 +250,24 @@          (Fingerprint 12475837388692175691 18053834261188158945)          (Fingerprint 16279938253437334942 15753349540193002309)          (bsReplace "9223372036854775807" "999")-+    -- Not UTF8+    , mk "Name:                     nat\nVersion:                  0.1\nDescription:            Implementation of natural numbers and integers by a binary\n                                representation. The implementation is supposed to be lazy and\n                   "+         (Fingerprint 9222512268705577108 13085311382746579495)+         (Fingerprint 17468921266614378430 13221316288008291892)+         (bsReplace "\xf6" "\xc3\xb6")+    -- cabal-version: 2+    , mk "name:                streaming-bracketed\nversion:             0.1.0.0\nsynopsis:            A resource management decorator for \"streaming\".        \ndescription:         This package provides a decorator for the Stream type from\n                     the \"st"+         (Fingerprint 14670044663153191927 1427497586294143829)+         (Fingerprint 9233007756654759985 6571998449003682006)+         (bsReplace "cabal-version:       2" "cabal-version: 2.0")+    , mk "name:                streaming-bracketed\nversion:             0.1.0.1\nsynopsis:            A resource management decorator for \"streaming\".        \ndescription:         This package provides a decorator for the Stream type from\n                     \"stream"+         (Fingerprint 7298738862909203815 10141693276062967842)+         (Fingerprint 1349949738792220441 3593683359695349293)+         (bsReplace "cabal-version:       2" "cabal-version: 2.0")+    , mk "name:           zsyntax\nversion:        0.2.0.0\ndescription:    An automated theorem prover for Zsyntax, a\n                logical calculus for molecular biology inspired by linear logic,\n                that can be used to automatically verify biological\n"+         (Fingerprint 17812331267506881875 3005293725141563863)+         (Fingerprint 3445957263137759540 12472369104312474458)+         (bsReplace "cabal-version:  2" "cabal-version: 2.0")     ]   where     mk a b c d = ((a, b), (c, d))
Distribution/Simple/GHC.hs view
@@ -508,7 +508,7 @@         when (forceStatic || withStaticLib lbi)       whenGHCiLib = when (withGHCiLib lbi)       forRepl = maybe False (const True) mReplFlags-      ifReplLib = when forRepl+      whenReplLib = when forRepl       replFlags = fromMaybe mempty mReplFlags       comp = compiler lbi       ghcVersion = compilerVersion comp@@ -670,10 +670,6 @@            unless forRepl $ whenProfLib   (runGhcProgIfNeeded   profCxxOpts)       | filename <- cxxSources libBi] -  ifReplLib $ do-    when (null (allLibModules lib clbi)) $ warn verbosity "No exposed modules"-    ifReplLib (runGhcProg replOpts)-   -- build any C sources   unless (not has_code || null (cSources libBi)) $ do     info verbosity "Building C Sources..."@@ -770,6 +766,9 @@   -- TODO: problem here is we need the .c files built first, so we can load them   -- with ghci, but .c files can depend on .h files generated by ghc by ffi   -- exports.+  whenReplLib $ do+    when (null (allLibModules lib clbi)) $ warn verbosity "No exposed modules"+    runGhcProg replOpts    -- link:   when has_code . unless forRepl $ do
Distribution/Simple/Program/GHC.hs view
@@ -685,7 +685,11 @@   , concat [ [ "-optP-include", "-optP" ++ inc]            | inc <- flags ghcOptCppIncludes ]   , [ "-optc" ++ opt | opt <- ghcOptCcOptions opts]-  , [ "-optc" ++ opt | opt <- ghcOptCxxOptions opts]+  , -- C++ compiler options: GHC >= 8.10 requires -optcxx, older requires -optc+    let cxxflag = case compilerCompatVersion GHC comp of+                Just v | v >= mkVersion [8, 10] -> "-optcxx"+                _ -> "-optc"+    in [ cxxflag ++ opt | opt <- ghcOptCxxOptions opts]   , [ "-opta" ++ opt | opt <- ghcOptAsmOptions opts]    -----------------
Distribution/Simple/Utils.hs view
@@ -233,12 +233,11 @@ import Data.Time.Clock.POSIX (getPOSIXTime, POSIXTime) import Control.Exception (IOException, evaluate, throwIO, fromException) import Numeric (showFFloat)-import qualified System.Process as Process-         ( CreateProcess(..), StdStream(..), proc)+import Distribution.Compat.Process  (createProcess, rawSystem, runInteractiveProcess) import System.Process-         ( ProcessHandle, createProcess, rawSystem, runInteractiveProcess+         ( ProcessHandle          , showCommandForUser, waitForProcess)-+import qualified System.Process as Process import qualified GHC.IO.Exception as GHC  import qualified Text.PrettyPrint as Disp@@ -679,6 +678,8 @@ maybeExit cmd = do   res <- cmd   unless (res == ExitSuccess) $ exitWith res++  printRawCommandAndArgs :: Verbosity -> FilePath -> [String] -> IO () printRawCommandAndArgs verbosity path args = withFrozenCallStack $
Distribution/System.hs view
@@ -122,7 +122,8 @@ osAliases Compat     FreeBSD = ["kfreebsdgnu"] osAliases Permissive Solaris = ["solaris2"] osAliases Compat     Solaris = ["solaris2"]-osAliases _          Android = ["linux-android"]+osAliases Permissive Android = ["linux-android", "linux-androideabi", "linux-androideabihf"]+osAliases Compat     Android = ["linux-android"] osAliases _          _       = []  instance Pretty OS where
Distribution/Types/PackageDescription.hs view
@@ -246,7 +246,7 @@                       testSuites   = [],                       benchmarks   = [],                       dataFiles    = [],-                      dataDir      = "",+                      dataDir      = ".",                       extraSrcFiles = [],                       extraTmpFiles = [],                       extraDocFiles = []
Distribution/Utils/Generic.hs view
@@ -542,6 +542,7 @@ isAbsoluteOnAnyPlatform :: FilePath -> Bool -- C:\\directory isAbsoluteOnAnyPlatform (drive:':':'\\':_) = isAlpha drive+isAbsoluteOnAnyPlatform (drive:':':'/':_)  = isAlpha drive -- UNC isAbsoluteOnAnyPlatform ('\\':'\\':_) = True -- Posix root
tests/CheckTests.hs view
@@ -40,6 +40,7 @@     , checkTest "ghc-option-j.cabal"     , checkTest "multiple-libs-2.cabal"     , checkTest "assoc-cpp-options.cabal"+    , checkTest "denormalised-paths.cabal"     ]  checkTest :: FilePath -> TestTree
tests/HackageTests.hs view
@@ -152,17 +152,48 @@ -- Parsec test: whether we can parse everything ------------------------------------------------------------------------------- -parseParsecTest :: FilePath -> B.ByteString -> IO (Sum Int)-parseParsecTest fpath bs = do-    let (_warnings, parsec) = Parsec.runParseResult $-                              Parsec.parseGenericPackageDescription bs-    case parsec of-        Right _ -> return (Sum 1)-        Left (_, errors) -> do+parseParsecTest :: Bool -> FilePath -> B.ByteString -> IO ParsecResult+parseParsecTest keepGoing fpath bs = do+    let (warnings, result) = Parsec.runParseResult $+                             Parsec.parseGenericPackageDescription bs++    let w | null warnings = 0+          | otherwise     = 1++    case result of+        Right gpd                    -> do+            forEachGPD fpath bs gpd+            return (ParsecResult 1 w 0)++        Left (_, errors) | keepGoing -> do             traverse_ (putStrLn . Parsec.showPError fpath) errors+            return (ParsecResult 1 w 1)+                         | otherwise -> do+            traverse_ (putStrLn . Parsec.showPError fpath) errors             exitFailure +-- | A hook to make queries on Hackage+forEachGPD :: FilePath -> B8.ByteString -> L.GenericPackageDescription -> IO ()+forEachGPD _ _ _ = return ()+ -------------------------------------------------------------------------------+-- ParsecResult+-------------------------------------------------------------------------------++data ParsecResult = ParsecResult !Int !Int !Int+  deriving (Eq, Show)++instance Semigroup ParsecResult where+    ParsecResult x y z <> ParsecResult u v w = ParsecResult (x + u) (y + v) (z + w)++instance Monoid ParsecResult where+    mempty  = ParsecResult 0 0 0+    mappend = (<>)++instance NFData ParsecResult where+    rnf (ParsecResult _ _ _) = ()++------------------------------------------------------------------------------- -- Check test ------------------------------------------------------------------------------- @@ -309,15 +340,22 @@      defaultA = do         putStrLn "Default action: parsec k"-        parsecA (mkPredicate ["k"])+        parsecA (mkPredicate ["k"]) False      readFieldsP = readFieldsA <$> prefixP     readFieldsA pfx = parseIndex pfx readFieldTest -    parsecP = parsecA <$> prefixP-    parsecA pfx = do-        Sum n <- parseIndex pfx parseParsecTest+    parsecP = parsecA <$> prefixP <*> keepGoingP+    keepGoingP =+        O.flag' True  (O.long "keep-going") <|>+        O.flag' False (O.long "no-keep-going") <|>+        pure False++    parsecA pfx keepGoing = do+        ParsecResult n w f <- parseIndex pfx (parseParsecTest keepGoing)         putStrLn $ show n ++ " files processed"+        putStrLn $ show w ++ " files contained warnings"+        putStrLn $ show f ++ " files failed to parse"      roundtripP = roundtripA <$> prefixP <*> testFieldsP     roundtripA pfx testFieldsTransform = do
tests/ParserTests/errors/common1.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.1+cabal-version:       2.2 name:                common version:             0 synopsis:            Common-stanza demo demo
tests/ParserTests/errors/common1.errors view
@@ -1,2 +1,2 @@-VERSION: Just (mkVersion [2,1])+VERSION: Just (mkVersion [2,2]) common1.cabal:17:3: Undefined common stanza imported: windo
tests/ParserTests/errors/common2.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.1+cabal-version:       2.2 name:                common version:             0 synopsis:            Common-stanza demo demo
tests/ParserTests/errors/common2.errors view
@@ -1,2 +1,2 @@-VERSION: Just (mkVersion [2,1])+VERSION: Just (mkVersion [2,2]) common2.cabal:13:3: Undefined common stanza imported: windows
tests/ParserTests/errors/common3.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.1+cabal-version:       2.2 name:                common version:             0 synopsis:            Common-stanza demo demo
tests/ParserTests/errors/common3.errors view
@@ -1,2 +1,2 @@-VERSION: Just (mkVersion [2,1])+VERSION: Just (mkVersion [2,2]) common3.cabal:22:1: Duplicate common stanza: deps
tests/ParserTests/errors/forward-compat2.cabal view
@@ -2,7 +2,7 @@ version:             0 synopsis:            Common-stanza demo demo build-type:          Simple-cabal-version:       2.1+cabal-version:       2.2  source-repository head   Type:     git
tests/ParserTests/errors/forward-compat2.errors view
@@ -1,2 +1,2 @@-VERSION: Just (mkVersion [2,1])+VERSION: Just (mkVersion [2,2]) forward-compat2.cabal:5:1: cabal-version should be at the beginning of the file starting with spec version 2.2. See https://github.com/haskell/cabal/issues/4899
tests/ParserTests/errors/forward-compat3.errors view
@@ -1,2 +1,3 @@ VERSION: Just (mkVersion [99999,99])+forward-compat3.cabal:0:0: Unsupported cabal-version 99999.99. See https://github.com/haskell/cabal/issues/4899. forward-compat3.cabal:0:0: Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.
tests/ParserTests/errors/leading-comma-2c.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                leading-comma version:             0 synopsis:            leading comma, trailing comma, or ordinary
tests/ParserTests/errors/leading-comma-2c.errors view
@@ -1,4 +1,4 @@-VERSION: Just (mkVersion [2,5])+VERSION: Just (mkVersion [3,0]) leading-comma-2c.cabal:10:30:  unexpected 'N' expecting space, comma, white space or end of input
tests/ParserTests/errors/removed-fields.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                removed-fields version:             0 synopsis:            some fields are removed
tests/ParserTests/errors/removed-fields.errors view
@@ -1,3 +1,3 @@-VERSION: Just (mkVersion [2,5])+VERSION: Just (mkVersion [3,0]) removed-fields.cabal:13:3: The field "extensions" is removed in the Cabal specification version 3.0. Please use 'default-extensions' or 'other-extensions' fields. removed-fields.cabal:14:3: The field "extensions" is removed in the Cabal specification version 3.0. Please use 'default-extensions' or 'other-extensions' fields.
tests/ParserTests/errors/version-sets-1.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                version-sets version:             0 synopsis:            version set notation
tests/ParserTests/errors/version-sets-1.errors view
@@ -1,4 +1,4 @@-VERSION: Just (mkVersion [2,5])+VERSION: Just (mkVersion [3,0]) version-sets-1.cabal:8:31:  unexpected "}" expecting space or version digit (integral without leading zeroes)
tests/ParserTests/errors/version-sets-2.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                version-sets version:             0 synopsis:            version set notation
tests/ParserTests/errors/version-sets-2.errors view
@@ -1,4 +1,4 @@-VERSION: Just (mkVersion [2,5])+VERSION: Just (mkVersion [3,0]) version-sets-2.cabal:8:29:  unexpected "{" expecting space or version digit (integral without leading zeroes)
tests/ParserTests/errors/version-sets-3.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                version-sets version:             0 synopsis:            version set notation
tests/ParserTests/errors/version-sets-3.errors view
@@ -1,4 +1,4 @@-VERSION: Just (mkVersion [2,5])+VERSION: Just (mkVersion [3,0]) version-sets-3.cabal:8:40:  unexpected "}" expecting space or version digit (integral without leading zeroes)
tests/ParserTests/errors/version-sets-4.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                version-sets version:             0 synopsis:            version set notation
tests/ParserTests/errors/version-sets-4.errors view
@@ -1,4 +1,4 @@-VERSION: Just (mkVersion [2,5])+VERSION: Just (mkVersion [3,0]) version-sets-4.cabal:8:35:  unexpected "*" expecting version digit (integral without leading zeroes)
tests/ParserTests/regressions/Octree-0.5.expr view
@@ -292,7 +292,7 @@                            category = "Data",                            copyright = "Copyright by Michal J. Gajda '2012",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "Octree data structure is relatively shallow data structure for space partitioning.",                            executables = [],
tests/ParserTests/regressions/big-version.expr view
@@ -68,7 +68,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/common-conditional.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.6+cabal-version:       3.0 name:                common-conditional version:             0 synopsis:            Common-stanza demo demo
tests/ParserTests/regressions/common-conditional.expr view
@@ -599,7 +599,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],@@ -625,7 +625,7 @@                                              repoSubdir = Nothing,                                              repoTag = Nothing,                                              repoType = Just Git}],-                           specVersionRaw = Left `mkVersion [2,6]`,+                           specVersionRaw = Left `mkVersion [3,0]`,                            stability = "",                            subLibraries = [],                            synopsis = "Common-stanza demo demo",
tests/ParserTests/regressions/common-conditional.format view
@@ -1,4 +1,4 @@-cabal-version: 2.6+cabal-version: 3.0 name:          common-conditional version:       0 synopsis:      Common-stanza demo demo
tests/ParserTests/regressions/common.expr view
@@ -138,7 +138,7 @@                            copyright = "",                            customFieldsPD = [_×_ "x-revision" "1",                                              _×_ "x-follows-version-policy" ""],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/common2.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.1+cabal-version:       2.2 name:                common version:             0 synopsis:            Common-stanza demo demo
tests/ParserTests/regressions/common2.expr view
@@ -627,7 +627,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],@@ -653,7 +653,7 @@                                              repoSubdir = Nothing,                                              repoTag = Nothing,                                              repoType = Just Git}],-                           specVersionRaw = Left `mkVersion [2,1]`,+                           specVersionRaw = Left `mkVersion [2,2]`,                            stability = "",                            subLibraries = [],                            synopsis = "Common-stanza demo demo",
tests/ParserTests/regressions/common2.format view
@@ -1,4 +1,4 @@-cabal-version: 2.1+cabal-version: 2.2 name:          common version:       0 synopsis:      Common-stanza demo demo
tests/ParserTests/regressions/common3.expr view
@@ -162,7 +162,7 @@                            copyright = "",                            customFieldsPD = [_×_ "x-revision" "1",                                              _×_ "x-follows-version-policy" ""],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
+ tests/ParserTests/regressions/denormalised-paths.cabal view
@@ -0,0 +1,71 @@+cabal-version: 2.4+name:          assoc+version:       1.1+license:       BSD-3-Clause+license-files: LICENSE LICENSE2/ .+synopsis:      swap and assoc: Symmetric and Semigroupy Bifunctors+category:      Data+description:+  Provides generalisations of+  @swap :: (a,b) -> (b,a)@ and+  @assoc :: ((a,b),c) -> (a,(b,c))@+  to+  @Bifunctor@s supporting similar operations (e.g. @Either@, @These@).++author:        Oleg Grenrus <oleg.grenrus@iki.fi>+maintainer:    Oleg Grenrus <oleg.grenrus@iki.fi>+build-type:    Simple+tested-with:+  GHC ==7.0.4+   || ==7.2.2+   || ==7.4.2+   || ==7.6.3+   || ==7.8.4+   || ==7.10.3+   || ==8.0.2+   || ==8.2.2+   || ==8.4.4+   || ==8.6.5+   || ==8.8.1++extra-source-files:+  files/**/*.txt/+  files/../foo.txt++source-repository head+  type:     git+  location: https://github.com/phadej/assoc.git+  subdir:   ./.++source-repository this+  type:     git+  location: https://github.com/phadej/assoc.git+  tag:      v1.1+  subdir:   foo/++library+  default-language: Haskell2010+  build-depends:+      base        >=4.3   && <4.13+    , bifunctors  >=5.5.4 && <5.6++  exposed-modules:+    Data.Bifunctor.Assoc+    Data.Bifunctor.Swap++  -- this is fine+  hs-source-dirs:   src/++  -- collection of invalid sources+  hs-source-dirs:   src/.+  hs-source-dirs:   src/../src+  hs-source-dirs:   src/../../assoc/src+  -- this is forbidden by a parser+  -- hs-source-dirs:   C:/foo/bar+  hs-source-dirs:   C:foo/bar+  hs-source-dirs:   ||s+  -- this is forbidden by a parser+  -- hs-source-dirs:   /var/secret/source++  -- this is the only case catched by Cabal-3.0.2.0+  hs-source-dirs:   ../../assoc/src
+ tests/ParserTests/regressions/denormalised-paths.check view
@@ -0,0 +1,12 @@+The 'subdir' field of a source-repository is not a good relative path: "trailing same directory segment: ."+'hs-source-dirs: ../../assoc/src' is a relative path outside of the source tree. This will not work when generating a tarball with 'sdist'.+'extra-source-files: files/**/*.txt/' is not good relative path: trailing slash+'extra-source-files: files/../foo.txt' is not good relative path: parent directory segment: ..+'license-file: LICENSE2/' is not good relative path: trailing slash+'license-file: .' is not good relative path: trailing dot segment+'hs-source-dirs: src/.' is not good relative path: trailing same directory segment: .+'hs-source-dirs: src/../src' is not good relative path: parent directory segment: ..+'hs-source-dirs: src/../../assoc/src' is not good relative path: parent directory segment: ..+'hs-source-dirs: C:foo/bar' is not good relative path: reserved character ':'+'hs-source-dirs: ||s' is not good relative path: reserved character '|'+'hs-source-dirs: ../../assoc/src' is not good relative path: parent directory segment: ..
tests/ParserTests/regressions/elif.expr view
@@ -140,7 +140,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/elif2.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.1+cabal-version:       2.2 name:                elif version:             0 synopsis:            The elif demo
tests/ParserTests/regressions/elif2.expr view
@@ -336,7 +336,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],@@ -362,7 +362,7 @@                                              repoSubdir = Nothing,                                              repoTag = Nothing,                                              repoType = Just Git}],-                           specVersionRaw = Left `mkVersion [2,1]`,+                           specVersionRaw = Left `mkVersion [2,2]`,                            stability = "",                            subLibraries = [],                            synopsis = "The elif demo",
tests/ParserTests/regressions/elif2.format view
@@ -1,4 +1,4 @@-cabal-version: 2.1+cabal-version: 2.2 name:          elif version:       0 synopsis:      The elif demo
tests/ParserTests/regressions/encoding-0.8.expr view
@@ -89,7 +89,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/generics-sop.expr view
@@ -655,7 +655,7 @@                            category = "Generics",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["A library to support the definition of generic functions.\n",
tests/ParserTests/regressions/hidden-main-lib.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                hidden-main-lib version:             0 synopsis:            main lib have to be visible
tests/ParserTests/regressions/hidden-main-lib.expr view
@@ -75,7 +75,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],@@ -94,7 +94,7 @@                            pkgUrl = "",                            setupBuildInfo = Nothing,                            sourceRepos = [],-                           specVersionRaw = Left `mkVersion [2,5]`,+                           specVersionRaw = Left `mkVersion [3,0]`,                            stability = "",                            subLibraries = [],                            synopsis = "main lib have to be visible",
tests/ParserTests/regressions/hidden-main-lib.format view
@@ -1,5 +1,5 @@ hidden-main-lib.cabal:11:3: Unknown field: "visibility"-cabal-version: 2.5+cabal-version: 3.0 name:          hidden-main-lib version:       0 synopsis:      main lib have to be visible
tests/ParserTests/regressions/indentation.expr view
@@ -68,7 +68,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["* foo\n",
tests/ParserTests/regressions/indentation2.expr view
@@ -68,7 +68,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat ["foo\n", "  indent2\n", "    indent4"],                            executables = [],
tests/ParserTests/regressions/indentation3.expr view
@@ -68,7 +68,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["indent0\n",
tests/ParserTests/regressions/issue-5055.expr view
@@ -210,7 +210,7 @@                            category = "Test",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "no type in all branches.",                            executables = [],
tests/ParserTests/regressions/issue-5846.expr view
@@ -118,7 +118,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/issue-6083-pkg-pkg.expr view
@@ -84,7 +84,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/issue-774.expr view
@@ -73,7 +73,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["Here is some C code:\n",
tests/ParserTests/regressions/jaeger-flamegraph.expr view
@@ -343,7 +343,7 @@                            category = "Testing",                            copyright = "(c) 2018 Symbiont.io",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["This is a small tool to convert JSON dumps obtained from a Jaeger\n",
tests/ParserTests/regressions/leading-comma-2.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                leading-comma version:             0 synopsis:            leading comma, trailing comma, or ordinary
tests/ParserTests/regressions/leading-comma-2.expr view
@@ -127,7 +127,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],@@ -146,7 +146,7 @@                            pkgUrl = "",                            setupBuildInfo = Nothing,                            sourceRepos = [],-                           specVersionRaw = Left `mkVersion [2,5]`,+                           specVersionRaw = Left `mkVersion [3,0]`,                            stability = "",                            subLibraries = [],                            synopsis = "leading comma, trailing comma, or ordinary",
tests/ParserTests/regressions/leading-comma-2.format view
@@ -1,4 +1,4 @@-cabal-version: 2.5+cabal-version: 3.0 name:          leading-comma version:       0 synopsis:      leading comma, trailing comma, or ordinary
tests/ParserTests/regressions/leading-comma.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.1+cabal-version:       2.2 name:                leading-comma version:             0 synopsis:            leading comma, trailing comma, or ordinary
tests/ParserTests/regressions/leading-comma.expr view
@@ -120,7 +120,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],@@ -139,7 +139,7 @@                            pkgUrl = "",                            setupBuildInfo = Nothing,                            sourceRepos = [],-                           specVersionRaw = Left `mkVersion [2,1]`,+                           specVersionRaw = Left `mkVersion [2,2]`,                            stability = "",                            subLibraries = [],                            synopsis = "leading comma, trailing comma, or ordinary",
tests/ParserTests/regressions/leading-comma.format view
@@ -1,4 +1,4 @@-cabal-version: 2.1+cabal-version: 2.2 name:          leading-comma version:       0 synopsis:      leading comma, trailing comma, or ordinary
tests/ParserTests/regressions/libpq1.expr view
@@ -581,7 +581,7 @@                            copyright = concat                                          ["(c) 2010 Grant Monroe\n", "(c) 2011 Leon P Smith"],                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["This is a binding to libpq: the C application\n",
tests/ParserTests/regressions/libpq2.expr view
@@ -581,7 +581,7 @@                            copyright = concat                                          ["(c) 2010 Grant Monroe\n", "(c) 2011 Leon P Smith"],                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["This is a binding to libpq: the C application\n",
tests/ParserTests/regressions/mixin-1.cabal view
@@ -1,6 +1,7 @@ cabal-version: 2.0 name: mixin version: 0+build-type: Simple  executable str-example   main-is:             Main.hs
tests/ParserTests/regressions/mixin-1.expr view
@@ -88,11 +88,11 @@                           {author = "",                            benchmarks = [],                            bugReports = "",-                           buildTypeRaw = Nothing,+                           buildTypeRaw = Just Simple,                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/mixin-1.format view
@@ -1,6 +1,7 @@ cabal-version: 2.0 name:          mixin version:       0+build-type:    Simple  executable str-example     main-is:        Main.hs
tests/ParserTests/regressions/mixin-2.expr view
@@ -92,7 +92,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/mixin-3.expr view
@@ -91,7 +91,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/multiple-libs-2.expr view
@@ -140,7 +140,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/noVersion.expr view
@@ -81,7 +81,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/nothing-unicode.expr view
@@ -136,7 +136,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [_×_ "x-\28961" "\28961"],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/shake.expr view
@@ -2059,7 +2059,7 @@                            category = "Development, Shake",                            copyright = "Neil Mitchell 2011-2017",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = ["html/viz.js",                                         "html/profile.html",                                         "html/progress.html",
tests/ParserTests/regressions/spdx-1.expr view
@@ -68,7 +68,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/spdx-2.expr view
@@ -68,7 +68,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/spdx-3.expr view
@@ -68,7 +68,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],
tests/ParserTests/regressions/th-lift-instances.expr view
@@ -476,7 +476,7 @@                            category = "Template Haskell",                            copyright = "Copyright (C) 2013-2014 Benno F\252nfst\252ck",                            customFieldsPD = [_×_ "x-revision" "1"],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["Most data types in haskell platform do not have Lift instances. This package provides orphan instances\n",
tests/ParserTests/regressions/version-sets.cabal view
@@ -1,4 +1,4 @@-cabal-version:       2.5+cabal-version:       3.0 name:                version-sets version:             0 synopsis:            version set notation
tests/ParserTests/regressions/version-sets.expr view
@@ -198,7 +198,7 @@                            category = "",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = "",                            executables = [],@@ -217,7 +217,7 @@                            pkgUrl = "",                            setupBuildInfo = Nothing,                            sourceRepos = [],-                           specVersionRaw = Left `mkVersion [2,5]`,+                           specVersionRaw = Left `mkVersion [3,0]`,                            stability = "",                            subLibraries = [],                            synopsis = "version set notation",
tests/ParserTests/regressions/version-sets.format view
@@ -1,4 +1,4 @@-cabal-version: 2.5+cabal-version: 3.0 name:          version-sets version:       0 tested-with:
tests/ParserTests/regressions/wl-pprint-indef.expr view
@@ -165,7 +165,7 @@                            category = "Text",                            copyright = "",                            customFieldsPD = [],-                           dataDir = "",+                           dataDir = ".",                            dataFiles = [],                            description = concat                                            ["This is a pretty printing library based on Wadler's paper \"A Prettier\n",