From 8d5e47ac05d74cefe778489f18f23991d48d1f66 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Sat, 13 Jan 2024 16:35:56 +0100 Subject: [PATCH] Sed-replace CRLF files --- .../haddock-api-2.18.1-check.cabal | 294 +++++++++--------- .../regressions/issue-7776-a.cabal | 50 +-- .../regressions/issue-7776-b.cabal | 54 ++-- .../regressions/issue-7776-c.cabal | 38 +-- .../PackageTests/NewHaddock/Fails/Example.hs | 12 +- .../NewSdist/ManyDataFiles/Main.hs | 8 +- .../NewSdist/ManyDataFiles/cabal.project | 2 +- .../ManyDataFiles/many-data-files.cabal | 18 +- .../ManyDataFiles/many-data-files.out | 4 +- .../ManyDataFiles/many-data-files.test.hs | 34 +- .../PackageTests/ProfLate/cabal.out | 4 +- .../PackageTests/ProfLate/setup.cabal.out | 10 +- .../PackageTests/ProfLate/setup.out | 10 +- changelog.d/base16-script-cache | 18 +- changelog.d/pr-9018 | 22 +- changelog.d/pr-9332 | 8 +- 16 files changed, 293 insertions(+), 293 deletions(-) diff --git a/Cabal-tests/tests/ParserTests/regressions/haddock-api-2.18.1-check.cabal b/Cabal-tests/tests/ParserTests/regressions/haddock-api-2.18.1-check.cabal index 5ecfcd13e79..e4495d5116a 100644 --- a/Cabal-tests/tests/ParserTests/regressions/haddock-api-2.18.1-check.cabal +++ b/Cabal-tests/tests/ParserTests/regressions/haddock-api-2.18.1-check.cabal @@ -1,147 +1,147 @@ -name: haddock-api -version: 2.18.1 -synopsis: A documentation-generation tool for Haskell libraries -description: Haddock is a documentation-generation tool for Haskell - libraries -license: BSD3 -license-file: LICENSE -author: Simon Marlow, David Waern -maintainer: Alex Biehl , Simon Hengel , Mateusz Kowalczyk -homepage: http://www.haskell.org/haddock/ -bug-reports: https://github.com/haskell/haddock/issues -copyright: (c) Simon Marlow, David Waern -category: Documentation -build-type: Simple -cabal-version: >= 1.10 - -extra-source-files: - CHANGES.md - -data-dir: - resources -data-files: - html/solarized.css - html/haddock-util.js - html/highlight.js - html/Classic.theme/haskell_icon.gif - html/Classic.theme/minus.gif - html/Classic.theme/plus.gif - html/Classic.theme/xhaddock.css - html/Ocean.std-theme/hslogo-16.png - html/Ocean.std-theme/minus.gif - html/Ocean.std-theme/ocean.css - html/Ocean.std-theme/plus.gif - html/Ocean.std-theme/synopsis.png - latex/haddock.sty - -library - default-language: Haskell2010 - - -- this package typically supports only single major versions - build-depends: base ^>= 4.10.0 - , Cabal ^>= 2.0.0 - , ghc ^>= 8.2 - , ghc-paths ^>= 0.1.0.9 - , haddock-library == 1.4.4.* - , xhtml ^>= 3000.2.2 - - -- Versions for the dependencies below are transitively pinned by - -- the non-reinstallable `ghc` package and hence need no version - -- bounds - build-depends: array - , bytestring - , containers - , deepseq - , directory - , filepath - , ghc-boot - , transformers - - hs-source-dirs: src - - ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 - ghc-options: -Wall - if impl(ghc >= 8.0) - ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances - - exposed-modules: - Documentation.Haddock - - other-modules: - Haddock - Haddock.Interface - Haddock.Interface.Rename - Haddock.Interface.Create - Haddock.Interface.AttachInstances - Haddock.Interface.LexParseRn - Haddock.Interface.ParseModuleHeader - Haddock.Interface.Specialize - Haddock.Parser - Haddock.Utils - Haddock.Backends.Xhtml - Haddock.Backends.Xhtml.Decl - Haddock.Backends.Xhtml.DocMarkup - Haddock.Backends.Xhtml.Layout - Haddock.Backends.Xhtml.Names - Haddock.Backends.Xhtml.Themes - Haddock.Backends.Xhtml.Types - Haddock.Backends.Xhtml.Utils - Haddock.Backends.LaTeX - Haddock.Backends.HaddockDB - Haddock.Backends.Hoogle - Haddock.Backends.Hyperlinker - Haddock.Backends.Hyperlinker.Ast - Haddock.Backends.Hyperlinker.Parser - Haddock.Backends.Hyperlinker.Renderer - Haddock.Backends.Hyperlinker.Types - Haddock.Backends.Hyperlinker.Utils - Haddock.ModuleTree - Haddock.Types - Haddock.Doc - Haddock.Version - Haddock.InterfaceFile - Haddock.Options - Haddock.GhcUtils - Haddock.Syb - Haddock.Convert - Paths_haddock_api - - autogen-modules: - Paths_haddock_api - -test-suite spec - type: exitcode-stdio-1.0 - default-language: Haskell2010 - main-is: Spec.hs - ghc-options: -Wall - - hs-source-dirs: - test - , src - - -- NB: We only use a small subset of lib:haddock-api here, which - -- explains why this component has a smaller build-depends set - other-modules: - Haddock.Backends.Hyperlinker.ParserSpec - Haddock.Backends.Hyperlinker.Parser - Haddock.Backends.Hyperlinker.Types - - build-depends: - ghc ^>= 8.2 - , hspec ^>= 2.4.4 - , QuickCheck ^>= 2.10 - - -- Versions for the dependencies below are transitively pinned by - -- the non-reinstallable `ghc` package and hence need no version - -- bounds - build-depends: - base - , containers - - build-tool-depends: - hspec-discover:hspec-discover ^>= 2.4.4 - -source-repository head - type: git - subdir: haddock-api - location: https://github.com/haskell/haddock.git +name: haddock-api +version: 2.18.1 +synopsis: A documentation-generation tool for Haskell libraries +description: Haddock is a documentation-generation tool for Haskell + libraries +license: BSD3 +license-file: LICENSE +author: Simon Marlow, David Waern +maintainer: Alex Biehl , Simon Hengel , Mateusz Kowalczyk +homepage: http://www.haskell.org/haddock/ +bug-reports: https://github.com/haskell/haddock/issues +copyright: (c) Simon Marlow, David Waern +category: Documentation +build-type: Simple +cabal-version: >= 1.10 + +extra-source-files: + CHANGES.md + +data-dir: + resources +data-files: + html/solarized.css + html/haddock-util.js + html/highlight.js + html/Classic.theme/haskell_icon.gif + html/Classic.theme/minus.gif + html/Classic.theme/plus.gif + html/Classic.theme/xhaddock.css + html/Ocean.std-theme/hslogo-16.png + html/Ocean.std-theme/minus.gif + html/Ocean.std-theme/ocean.css + html/Ocean.std-theme/plus.gif + html/Ocean.std-theme/synopsis.png + latex/haddock.sty + +library + default-language: Haskell2010 + + -- this package typically supports only single major versions + build-depends: base ^>= 4.10.0 + , Cabal ^>= 2.0.0 + , ghc ^>= 8.2 + , ghc-paths ^>= 0.1.0.9 + , haddock-library == 1.4.4.* + , xhtml ^>= 3000.2.2 + + -- Versions for the dependencies below are transitively pinned by + -- the non-reinstallable `ghc` package and hence need no version + -- bounds + build-depends: array + , bytestring + , containers + , deepseq + , directory + , filepath + , ghc-boot + , transformers + + hs-source-dirs: src + + ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 + ghc-options: -Wall + if impl(ghc >= 8.0) + ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances + + exposed-modules: + Documentation.Haddock + + other-modules: + Haddock + Haddock.Interface + Haddock.Interface.Rename + Haddock.Interface.Create + Haddock.Interface.AttachInstances + Haddock.Interface.LexParseRn + Haddock.Interface.ParseModuleHeader + Haddock.Interface.Specialize + Haddock.Parser + Haddock.Utils + Haddock.Backends.Xhtml + Haddock.Backends.Xhtml.Decl + Haddock.Backends.Xhtml.DocMarkup + Haddock.Backends.Xhtml.Layout + Haddock.Backends.Xhtml.Names + Haddock.Backends.Xhtml.Themes + Haddock.Backends.Xhtml.Types + Haddock.Backends.Xhtml.Utils + Haddock.Backends.LaTeX + Haddock.Backends.HaddockDB + Haddock.Backends.Hoogle + Haddock.Backends.Hyperlinker + Haddock.Backends.Hyperlinker.Ast + Haddock.Backends.Hyperlinker.Parser + Haddock.Backends.Hyperlinker.Renderer + Haddock.Backends.Hyperlinker.Types + Haddock.Backends.Hyperlinker.Utils + Haddock.ModuleTree + Haddock.Types + Haddock.Doc + Haddock.Version + Haddock.InterfaceFile + Haddock.Options + Haddock.GhcUtils + Haddock.Syb + Haddock.Convert + Paths_haddock_api + + autogen-modules: + Paths_haddock_api + +test-suite spec + type: exitcode-stdio-1.0 + default-language: Haskell2010 + main-is: Spec.hs + ghc-options: -Wall + + hs-source-dirs: + test + , src + + -- NB: We only use a small subset of lib:haddock-api here, which + -- explains why this component has a smaller build-depends set + other-modules: + Haddock.Backends.Hyperlinker.ParserSpec + Haddock.Backends.Hyperlinker.Parser + Haddock.Backends.Hyperlinker.Types + + build-depends: + ghc ^>= 8.2 + , hspec ^>= 2.4.4 + , QuickCheck ^>= 2.10 + + -- Versions for the dependencies below are transitively pinned by + -- the non-reinstallable `ghc` package and hence need no version + -- bounds + build-depends: + base + , containers + + build-tool-depends: + hspec-discover:hspec-discover ^>= 2.4.4 + +source-repository head + type: git + subdir: haddock-api + location: https://github.com/haskell/haddock.git diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-7776-a.cabal b/Cabal-tests/tests/ParserTests/regressions/issue-7776-a.cabal index 477ec159ca9..b5517d56b1e 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-7776-a.cabal +++ b/Cabal-tests/tests/ParserTests/regressions/issue-7776-a.cabal @@ -1,26 +1,26 @@ -cabal-version: 3.4 -name: issue -version: 7776 -build-type: Simple -synopsis: duplicate-module check -category: Test -description: - With duplicate modules guarded by exclusive conditions, it should be buildable but should show a warning. - It *could* be smart enough to don't show the warning but we have to teach it about -license: BSD-3-Clause -license-file: LICENSE -maintainer: Cabal Contributors - --- Example taken from ghc-source-gen -library - exposed-modules: Foo - if impl(ghc<8.10) - other-modules: - GHC.Hs.Type - hs-source-dirs: - compat - if impl(ghc>=8.10) && impl(ghc<9.0) - other-modules: - GHC.Hs.Type - hs-source-dirs: +cabal-version: 3.4 +name: issue +version: 7776 +build-type: Simple +synopsis: duplicate-module check +category: Test +description: + With duplicate modules guarded by exclusive conditions, it should be buildable but should show a warning. + It *could* be smart enough to don't show the warning but we have to teach it about +license: BSD-3-Clause +license-file: LICENSE +maintainer: Cabal Contributors + +-- Example taken from ghc-source-gen +library + exposed-modules: Foo + if impl(ghc<8.10) + other-modules: + GHC.Hs.Type + hs-source-dirs: + compat + if impl(ghc>=8.10) && impl(ghc<9.0) + other-modules: + GHC.Hs.Type + hs-source-dirs: compat-8.10 diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-7776-b.cabal b/Cabal-tests/tests/ParserTests/regressions/issue-7776-b.cabal index c3cde22e1e8..464d6ba334f 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-7776-b.cabal +++ b/Cabal-tests/tests/ParserTests/regressions/issue-7776-b.cabal @@ -1,27 +1,27 @@ -cabal-version: 3.4 -name: issue -version: 7776 -build-type: Simple -synopsis: duplicate-module check -category: Test -description: With duplicate modules, even with overlapping conditions, it should be buildable but should show a warning. -license: BSD-3-Clause -license-file: LICENSE -maintainer: Cabal Contributors - --- Example taken from hashable-1.3.0 -library - exposed-modules: Foo - -- the base lower bound makes the package not buildable with ghc < 6.8 - -- but cabal is not smart enough to know it :-P - build-depends: base >= 4.5 && < 4.15 - -benchmark benchmarks - main-is: Benchmarks.hs - other-modules: - Data.Hashable.RandomSource - type: exitcode-stdio-1.0 - if impl(ghc >= 6.8) - Ghc-options: -fwarn-tabs - else - other-modules: Data.Hashable.RandomSource +cabal-version: 3.4 +name: issue +version: 7776 +build-type: Simple +synopsis: duplicate-module check +category: Test +description: With duplicate modules, even with overlapping conditions, it should be buildable but should show a warning. +license: BSD-3-Clause +license-file: LICENSE +maintainer: Cabal Contributors + +-- Example taken from hashable-1.3.0 +library + exposed-modules: Foo + -- the base lower bound makes the package not buildable with ghc < 6.8 + -- but cabal is not smart enough to know it :-P + build-depends: base >= 4.5 && < 4.15 + +benchmark benchmarks + main-is: Benchmarks.hs + other-modules: + Data.Hashable.RandomSource + type: exitcode-stdio-1.0 + if impl(ghc >= 6.8) + Ghc-options: -fwarn-tabs + else + other-modules: Data.Hashable.RandomSource diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-7776-c.cabal b/Cabal-tests/tests/ParserTests/regressions/issue-7776-c.cabal index 75d40d451dd..07755c16e5a 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-7776-c.cabal +++ b/Cabal-tests/tests/ParserTests/regressions/issue-7776-c.cabal @@ -1,19 +1,19 @@ -cabal-version: 3.4 -name: issue -version: 7776 -build-type: Simple -synopsis: duplicate-module check -category: Test -description: With duplicate modules not guarded by any condition, it should throw an error. -license: BSD-3-Clause -license-file: LICENSE -maintainer: Cabal Contributors - -library - exposed-modules: Foo - other-modules: - GHC.Hs.Type - hs-source-dirs: - compat - other-modules: - GHC.Hs.Type +cabal-version: 3.4 +name: issue +version: 7776 +build-type: Simple +synopsis: duplicate-module check +category: Test +description: With duplicate modules not guarded by any condition, it should throw an error. +license: BSD-3-Clause +license-file: LICENSE +maintainer: Cabal Contributors + +library + exposed-modules: Foo + other-modules: + GHC.Hs.Type + hs-source-dirs: + compat + other-modules: + GHC.Hs.Type diff --git a/cabal-testsuite/PackageTests/NewHaddock/Fails/Example.hs b/cabal-testsuite/PackageTests/NewHaddock/Fails/Example.hs index 76287b43f72..c29012fc826 100644 --- a/cabal-testsuite/PackageTests/NewHaddock/Fails/Example.hs +++ b/cabal-testsuite/PackageTests/NewHaddock/Fails/Example.hs @@ -1,6 +1,6 @@ -module Example where - -import Prelude - -example :: Int -example = False +module Example where + +import Prelude + +example :: Int +example = False diff --git a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/Main.hs b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/Main.hs index ed19e6004cc..8e366f26a96 100644 --- a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/Main.hs +++ b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/Main.hs @@ -1,4 +1,4 @@ -module Main (main) where - -main :: IO () -main = putStrLn "Hello, World!" +module Main (main) where + +main :: IO () +main = putStrLn "Hello, World!" diff --git a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/cabal.project b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/cabal.project index f95e96bf5b5..e6fdbadb439 100644 --- a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/cabal.project +++ b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/cabal.project @@ -1 +1 @@ -packages: . +packages: . diff --git a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.cabal b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.cabal index 4bc31217b98..3ac52d11163 100644 --- a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.cabal +++ b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.cabal @@ -1,9 +1,9 @@ -cabal-version: 2.2 -name: many-data-files -version: 0 - -data-files: data/*.txt - -executable dummy - default-language: Haskell2010 - main-is: Main.hs +cabal-version: 2.2 +name: many-data-files +version: 0 + +data-files: data/*.txt + +executable dummy + default-language: Haskell2010 + main-is: Main.hs diff --git a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.out b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.out index d1d7884f33a..7303a453b6e 100644 --- a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.out +++ b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.out @@ -1,2 +1,2 @@ -# cabal v2-sdist -Wrote tarball sdist to /many-data-files.dist/source/dist-newstyle/sdist/many-data-files-0.tar.gz +# cabal v2-sdist +Wrote tarball sdist to /many-data-files.dist/source/dist-newstyle/sdist/many-data-files-0.tar.gz diff --git a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.test.hs b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.test.hs index 2db0070c4ed..e414b19b093 100644 --- a/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.test.hs +++ b/cabal-testsuite/PackageTests/NewSdist/ManyDataFiles/many-data-files.test.hs @@ -1,17 +1,17 @@ -import Test.Cabal.Prelude - -import Control.Applicative ((<$>)) -import System.Directory ( createDirectoryIfMissing ) -import qualified Data.ByteString.Char8 as BS - -main = cabalTest . withSourceCopy $ do - limit <- getOpenFilesLimit - cwd <- testCurrentDir <$> getTestEnv - - case limit of - Just n -> do - liftIO $ createDirectoryIfMissing False (cwd "data") - forM_ [1 .. n + 100] $ \i -> - liftIO $ BS.writeFile (cwd "data" ("data-file-" ++ show i) <.> "txt") (BS.pack "a data file\n") - cabal "v2-sdist" ["many-data-files"] - Nothing -> skip "no open file limit" +import Test.Cabal.Prelude + +import Control.Applicative ((<$>)) +import System.Directory ( createDirectoryIfMissing ) +import qualified Data.ByteString.Char8 as BS + +main = cabalTest . withSourceCopy $ do + limit <- getOpenFilesLimit + cwd <- testCurrentDir <$> getTestEnv + + case limit of + Just n -> do + liftIO $ createDirectoryIfMissing False (cwd "data") + forM_ [1 .. n + 100] $ \i -> + liftIO $ BS.writeFile (cwd "data" ("data-file-" ++ show i) <.> "txt") (BS.pack "a data file\n") + cabal "v2-sdist" ["many-data-files"] + Nothing -> skip "no open file limit" diff --git a/cabal-testsuite/PackageTests/ProfLate/cabal.out b/cabal-testsuite/PackageTests/ProfLate/cabal.out index e420dc33c70..e6a1d4ad751 100644 --- a/cabal-testsuite/PackageTests/ProfLate/cabal.out +++ b/cabal-testsuite/PackageTests/ProfLate/cabal.out @@ -1,2 +1,2 @@ -# cabal clean -# cabal build +# cabal clean +# cabal build diff --git a/cabal-testsuite/PackageTests/ProfLate/setup.cabal.out b/cabal-testsuite/PackageTests/ProfLate/setup.cabal.out index 2ec51f2ad09..12c885de8ff 100644 --- a/cabal-testsuite/PackageTests/ProfLate/setup.cabal.out +++ b/cabal-testsuite/PackageTests/ProfLate/setup.cabal.out @@ -1,5 +1,5 @@ -# Setup configure -Configuring profLate-0.1... -# Setup build -Preprocessing executable 'main' for profLate-0.1... -Building executable 'main' for profLate-0.1... +# Setup configure +Configuring profLate-0.1... +# Setup build +Preprocessing executable 'main' for profLate-0.1... +Building executable 'main' for profLate-0.1... diff --git a/cabal-testsuite/PackageTests/ProfLate/setup.out b/cabal-testsuite/PackageTests/ProfLate/setup.out index 2ec51f2ad09..12c885de8ff 100644 --- a/cabal-testsuite/PackageTests/ProfLate/setup.out +++ b/cabal-testsuite/PackageTests/ProfLate/setup.out @@ -1,5 +1,5 @@ -# Setup configure -Configuring profLate-0.1... -# Setup build -Preprocessing executable 'main' for profLate-0.1... -Building executable 'main' for profLate-0.1... +# Setup configure +Configuring profLate-0.1... +# Setup build +Preprocessing executable 'main' for profLate-0.1... +Building executable 'main' for profLate-0.1... diff --git a/changelog.d/base16-script-cache b/changelog.d/base16-script-cache index b395f946a09..a2473271635 100644 --- a/changelog.d/base16-script-cache +++ b/changelog.d/base16-script-cache @@ -1,9 +1,9 @@ -synopsis: Script cache dir is the base16 hash of the canonical path of the script. -prs: #9459 -packages: cabal-install - -description: { - -Script cache dir is the base16 hash of the canonical path of the script. - -} +synopsis: Script cache dir is the base16 hash of the canonical path of the script. +prs: #9459 +packages: cabal-install + +description: { + +Script cache dir is the base16 hash of the canonical path of the script. + +} diff --git a/changelog.d/pr-9018 b/changelog.d/pr-9018 index bdce59ead14..b823fc4c33a 100644 --- a/changelog.d/pr-9018 +++ b/changelog.d/pr-9018 @@ -1,11 +1,11 @@ -synopsis: Structured Errors and Error Codes for Cabal -packages: cabal -prs: #9018 -issues: #8618 #8543 - - -description: { - -This will replace the `die'` function with `dieWithException` function which will throw structured errors rather than mere strings and also assign codes to corresponding errors that can be added to the error index. - -} +synopsis: Structured Errors and Error Codes for Cabal +packages: cabal +prs: #9018 +issues: #8618 #8543 + + +description: { + +This will replace the `die'` function with `dieWithException` function which will throw structured errors rather than mere strings and also assign codes to corresponding errors that can be added to the error index. + +} diff --git a/changelog.d/pr-9332 b/changelog.d/pr-9332 index c5d4c3d4ac4..c2851a647d4 100644 --- a/changelog.d/pr-9332 +++ b/changelog.d/pr-9332 @@ -1,4 +1,4 @@ -synopsis: Don't report `index.html` file as created, if not created by Haddock -packages: Cabal cabal-install -prs: #9332 -issues: #5120 +synopsis: Don't report `index.html` file as created, if not created by Haddock +packages: Cabal cabal-install +prs: #9332 +issues: #5120