From 14a1d05c9221a68aa1822be9aee0f6242fd09c6c Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Fri, 17 Oct 2025 21:27:15 +0800 Subject: [PATCH] chore: remove hadrian --- hadrian/.gitignore | 33 - hadrian/LICENSE | 21 - hadrian/README.md | 419 ------ hadrian/Setup.hs | 3 - hadrian/bindist/Makefile | 267 ---- hadrian/bindist/config.mk.in | 235 ---- hadrian/bindist/cwrappers/cwrapper.c | 161 --- hadrian/bindist/cwrappers/cwrapper.h | 7 - hadrian/bindist/cwrappers/getLocation.c | 40 - hadrian/bindist/cwrappers/getLocation.h | 4 - hadrian/bindist/cwrappers/version-wrapper.c | 30 - hadrian/bootstrap/README.md | 41 - hadrian/bootstrap/bootstrap.py | 524 -------- hadrian/bootstrap/cabal.project | 1 - hadrian/bootstrap/generate_bootstrap_plans | 27 - hadrian/bootstrap/hadrian-bootstrap-gen.cabal | 20 - hadrian/bootstrap/plan-9_10_1.json | 1003 -------------- hadrian/bootstrap/plan-9_6_1.json | 1040 --------------- hadrian/bootstrap/plan-9_6_2.json | 1040 --------------- hadrian/bootstrap/plan-9_6_3.json | 1040 --------------- hadrian/bootstrap/plan-9_6_4.json | 1039 --------------- hadrian/bootstrap/plan-9_6_5.json | 1002 -------------- hadrian/bootstrap/plan-9_6_6.json | 1002 -------------- hadrian/bootstrap/plan-9_8_1.json | 1039 --------------- hadrian/bootstrap/plan-9_8_2.json | 1039 --------------- hadrian/bootstrap/plan-bootstrap-9_10_1.json | 372 ------ hadrian/bootstrap/plan-bootstrap-9_6_1.json | 391 ------ hadrian/bootstrap/plan-bootstrap-9_6_2.json | 391 ------ hadrian/bootstrap/plan-bootstrap-9_6_3.json | 391 ------ hadrian/bootstrap/plan-bootstrap-9_6_4.json | 390 ------ hadrian/bootstrap/plan-bootstrap-9_6_5.json | 374 ------ hadrian/bootstrap/plan-bootstrap-9_6_6.json | 374 ------ hadrian/bootstrap/plan-bootstrap-9_8_1.json | 390 ------ hadrian/bootstrap/plan-bootstrap-9_8_2.json | 390 ------ hadrian/bootstrap/src/Main.hs | 232 ---- hadrian/build | 4 - hadrian/build-cabal | 36 - hadrian/build-cabal.bat | 51 - hadrian/build-stack | 15 - hadrian/build-stack-nix | 3 - hadrian/build-stack.bat | 11 - hadrian/build.bat | 4 - hadrian/cabal.project | 20 - hadrian/cfg/default.host.target.in | 47 - hadrian/cfg/default.target.in | 47 - hadrian/cfg/system.config.in | 127 -- hadrian/ci.project | 4 - hadrian/completion.sh | 7 - hadrian/doc/cross-compile.md | 58 - hadrian/doc/debugging.md | 109 -- hadrian/doc/expressions.md | 329 ----- hadrian/doc/flavours.md | 405 ------ hadrian/doc/make.md | 211 --- hadrian/doc/staged-compilation.svg | 1161 ----------------- hadrian/doc/testsuite.md | 217 --- hadrian/doc/user-settings.md | 447 ------- hadrian/doc/windows.md | 70 - hadrian/ghci | 4 - hadrian/ghci-cabal.in | 10 - hadrian/ghci-multi | 4 - hadrian/ghci-multi-cabal.in | 13 - hadrian/ghci-stack.in | 12 - hadrian/hadrian.cabal | 195 --- hadrian/hie-bios | 6 - hadrian/hie-bios.bat | 4 - hadrian/hie.yaml | 5 - hadrian/lint | 3 - hadrian/src/Base.hs | 223 ---- hadrian/src/Builder.hs | 635 --------- hadrian/src/CommandLine.hs | 405 ------ hadrian/src/Context.hs | 200 --- hadrian/src/Context/Path.hs | 52 - hadrian/src/Context/Type.hs | 31 - hadrian/src/Environment.hs | 20 - hadrian/src/Expression.hs | 170 --- hadrian/src/Expression/Type.hs | 19 - hadrian/src/Flavour.hs | 657 ---------- hadrian/src/Flavour/Type.hs | 80 -- hadrian/src/Hadrian/BuildPath.hs | 167 --- hadrian/src/Hadrian/Builder.hs | 164 --- hadrian/src/Hadrian/Builder/Ar.hs | 58 - hadrian/src/Hadrian/Builder/Git.hs | 14 - hadrian/src/Hadrian/Builder/Sphinx.hs | 42 - hadrian/src/Hadrian/Builder/Tar.hs | 43 - hadrian/src/Hadrian/Expression.hs | 144 -- hadrian/src/Hadrian/Haskell/Cabal.hs | 88 -- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 472 ------- hadrian/src/Hadrian/Haskell/Cabal/Type.hs | 86 -- hadrian/src/Hadrian/Haskell/Hash.hs | 254 ---- hadrian/src/Hadrian/Haskell/Hash.hs-boot | 8 - hadrian/src/Hadrian/Oracles/ArgsHash.hs | 51 - hadrian/src/Hadrian/Oracles/Cabal.hs | 41 - hadrian/src/Hadrian/Oracles/Cabal/Rules.hs | 79 -- hadrian/src/Hadrian/Oracles/Cabal/Type.hs | 62 - .../src/Hadrian/Oracles/DirectoryContents.hs | 64 - hadrian/src/Hadrian/Oracles/Path.hs | 60 - hadrian/src/Hadrian/Oracles/TextFile.hs | 189 --- hadrian/src/Hadrian/Package.hs | 84 -- hadrian/src/Hadrian/Target.hs | 29 - hadrian/src/Hadrian/Utilities.hs | 700 ---------- hadrian/src/Main.hs | 160 --- hadrian/src/Oracles/Flag.hs | 149 --- hadrian/src/Oracles/Flavour.hs | 34 - hadrian/src/Oracles/ModuleFiles.hs | 191 --- hadrian/src/Oracles/Setting.hs | 224 ---- hadrian/src/Oracles/TestSettings.hs | 125 -- hadrian/src/Packages.hs | 249 ---- hadrian/src/Progress.hs | 12 - hadrian/src/Rules.hs | 151 --- hadrian/src/Rules/BinaryDist.hs | 553 -------- hadrian/src/Rules/CabalReinstall.hs | 105 -- hadrian/src/Rules/Clean.hs | 45 - hadrian/src/Rules/Codes.hs | 37 - hadrian/src/Rules/Compile.hs | 311 ----- hadrian/src/Rules/Dependencies.hs | 59 - hadrian/src/Rules/Docspec.hs | 55 - hadrian/src/Rules/Documentation.hs | 430 ------ hadrian/src/Rules/Generate.hs | 730 ----------- hadrian/src/Rules/Gmp.hs | 170 --- hadrian/src/Rules/Libffi.hs | 246 ---- hadrian/src/Rules/Library.hs | 352 ----- hadrian/src/Rules/Library.hs-boot | 8 - hadrian/src/Rules/Lint.hs | 123 -- hadrian/src/Rules/Nofib.hs | 56 - hadrian/src/Rules/Program.hs | 130 -- hadrian/src/Rules/Register.hs | 314 ----- hadrian/src/Rules/Rts.hs | 187 --- hadrian/src/Rules/Selftest.hs | 125 -- hadrian/src/Rules/SimpleTargets.hs | 80 -- hadrian/src/Rules/SourceDist.hs | 194 --- hadrian/src/Rules/Test.hs | 362 ----- hadrian/src/Rules/ToolArgs.hs | 202 --- hadrian/src/Settings.hs | 129 -- hadrian/src/Settings/Builders/Alex.hs | 8 - hadrian/src/Settings/Builders/Ar.hs | 26 - hadrian/src/Settings/Builders/Cabal.hs | 272 ---- hadrian/src/Settings/Builders/Cc.hs | 37 - hadrian/src/Settings/Builders/Common.hs | 83 -- hadrian/src/Settings/Builders/Configure.hs | 43 - .../src/Settings/Builders/DeriveConstants.hs | 51 - hadrian/src/Settings/Builders/GenApply.hs | 17 - .../src/Settings/Builders/GenPrimopCode.hs | 29 - hadrian/src/Settings/Builders/Ghc.hs | 289 ---- hadrian/src/Settings/Builders/GhcPkg.hs | 62 - hadrian/src/Settings/Builders/Haddock.hs | 87 -- hadrian/src/Settings/Builders/Happy.hs | 9 - hadrian/src/Settings/Builders/HsCpp.hs | 17 - hadrian/src/Settings/Builders/Hsc2Hs.hs | 69 - hadrian/src/Settings/Builders/Ld.hs | 10 - hadrian/src/Settings/Builders/Make.hs | 46 - hadrian/src/Settings/Builders/MergeObjects.hs | 11 - hadrian/src/Settings/Builders/RunTest.hs | 408 ------ .../src/Settings/Builders/SplitSections.hs | 39 - .../src/Settings/Builders/Win32Tarballs.hs | 13 - hadrian/src/Settings/Builders/Xelatex.hs | 13 - hadrian/src/Settings/Default.hs | 338 ----- hadrian/src/Settings/Default.hs-boot | 21 - hadrian/src/Settings/Flavours/Benchmark.hs | 25 - hadrian/src/Settings/Flavours/Development.hs | 36 - hadrian/src/Settings/Flavours/GhcInGhci.hs | 29 - hadrian/src/Settings/Flavours/Performance.hs | 22 - hadrian/src/Settings/Flavours/Quick.hs | 46 - hadrian/src/Settings/Flavours/QuickCross.hs | 41 - hadrian/src/Settings/Flavours/Quickest.hs | 26 - hadrian/src/Settings/Flavours/Release.hs | 16 - hadrian/src/Settings/Flavours/Validate.hs | 64 - hadrian/src/Settings/Packages.hs | 537 -------- hadrian/src/Settings/Parser.hs | 273 ---- hadrian/src/Settings/Program.hs | 61 - hadrian/src/Settings/Warnings.hs | 95 -- hadrian/src/Stage.hs | 137 -- hadrian/src/Target.hs | 40 - hadrian/src/UserSettings.hs | 65 - hadrian/src/Utilities.hs | 71 - hadrian/src/Way.hs | 75 -- hadrian/src/Way/Type.hs | 98 -- hadrian/stack.yaml | 30 - hadrian/stack.yaml.lock | 61 - 178 files changed, 33946 deletions(-) delete mode 100644 hadrian/.gitignore delete mode 100644 hadrian/LICENSE delete mode 100644 hadrian/README.md delete mode 100644 hadrian/Setup.hs delete mode 100644 hadrian/bindist/Makefile delete mode 100644 hadrian/bindist/config.mk.in delete mode 100644 hadrian/bindist/cwrappers/cwrapper.c delete mode 100644 hadrian/bindist/cwrappers/cwrapper.h delete mode 100644 hadrian/bindist/cwrappers/getLocation.c delete mode 100644 hadrian/bindist/cwrappers/getLocation.h delete mode 100644 hadrian/bindist/cwrappers/version-wrapper.c delete mode 100644 hadrian/bootstrap/README.md delete mode 100755 hadrian/bootstrap/bootstrap.py delete mode 100644 hadrian/bootstrap/cabal.project delete mode 100755 hadrian/bootstrap/generate_bootstrap_plans delete mode 100644 hadrian/bootstrap/hadrian-bootstrap-gen.cabal delete mode 100644 hadrian/bootstrap/plan-9_10_1.json delete mode 100644 hadrian/bootstrap/plan-9_6_1.json delete mode 100644 hadrian/bootstrap/plan-9_6_2.json delete mode 100644 hadrian/bootstrap/plan-9_6_3.json delete mode 100644 hadrian/bootstrap/plan-9_6_4.json delete mode 100644 hadrian/bootstrap/plan-9_6_5.json delete mode 100644 hadrian/bootstrap/plan-9_6_6.json delete mode 100644 hadrian/bootstrap/plan-9_8_1.json delete mode 100644 hadrian/bootstrap/plan-9_8_2.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_10_1.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_6_1.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_6_2.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_6_3.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_6_4.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_6_5.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_6_6.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_8_1.json delete mode 100644 hadrian/bootstrap/plan-bootstrap-9_8_2.json delete mode 100644 hadrian/bootstrap/src/Main.hs delete mode 100755 hadrian/build delete mode 100755 hadrian/build-cabal delete mode 100644 hadrian/build-cabal.bat delete mode 100755 hadrian/build-stack delete mode 100755 hadrian/build-stack-nix delete mode 100644 hadrian/build-stack.bat delete mode 100644 hadrian/build.bat delete mode 100644 hadrian/cabal.project delete mode 100644 hadrian/cfg/default.host.target.in delete mode 100644 hadrian/cfg/default.target.in delete mode 100644 hadrian/cfg/system.config.in delete mode 100644 hadrian/ci.project delete mode 100755 hadrian/completion.sh delete mode 100644 hadrian/doc/cross-compile.md delete mode 100644 hadrian/doc/debugging.md delete mode 100644 hadrian/doc/expressions.md delete mode 100644 hadrian/doc/flavours.md delete mode 100644 hadrian/doc/make.md delete mode 100644 hadrian/doc/staged-compilation.svg delete mode 100644 hadrian/doc/testsuite.md delete mode 100644 hadrian/doc/user-settings.md delete mode 100644 hadrian/doc/windows.md delete mode 100755 hadrian/ghci delete mode 100755 hadrian/ghci-cabal.in delete mode 100755 hadrian/ghci-multi delete mode 100755 hadrian/ghci-multi-cabal.in delete mode 100755 hadrian/ghci-stack.in delete mode 100644 hadrian/hadrian.cabal delete mode 100755 hadrian/hie-bios delete mode 100644 hadrian/hie-bios.bat delete mode 100644 hadrian/hie.yaml delete mode 100755 hadrian/lint delete mode 100644 hadrian/src/Base.hs delete mode 100644 hadrian/src/Builder.hs delete mode 100644 hadrian/src/CommandLine.hs delete mode 100644 hadrian/src/Context.hs delete mode 100644 hadrian/src/Context/Path.hs delete mode 100644 hadrian/src/Context/Type.hs delete mode 100644 hadrian/src/Environment.hs delete mode 100644 hadrian/src/Expression.hs delete mode 100644 hadrian/src/Expression/Type.hs delete mode 100644 hadrian/src/Flavour.hs delete mode 100644 hadrian/src/Flavour/Type.hs delete mode 100644 hadrian/src/Hadrian/BuildPath.hs delete mode 100644 hadrian/src/Hadrian/Builder.hs delete mode 100644 hadrian/src/Hadrian/Builder/Ar.hs delete mode 100644 hadrian/src/Hadrian/Builder/Git.hs delete mode 100644 hadrian/src/Hadrian/Builder/Sphinx.hs delete mode 100644 hadrian/src/Hadrian/Builder/Tar.hs delete mode 100644 hadrian/src/Hadrian/Expression.hs delete mode 100644 hadrian/src/Hadrian/Haskell/Cabal.hs delete mode 100644 hadrian/src/Hadrian/Haskell/Cabal/Parse.hs delete mode 100644 hadrian/src/Hadrian/Haskell/Cabal/Type.hs delete mode 100644 hadrian/src/Hadrian/Haskell/Hash.hs delete mode 100644 hadrian/src/Hadrian/Haskell/Hash.hs-boot delete mode 100644 hadrian/src/Hadrian/Oracles/ArgsHash.hs delete mode 100644 hadrian/src/Hadrian/Oracles/Cabal.hs delete mode 100644 hadrian/src/Hadrian/Oracles/Cabal/Rules.hs delete mode 100644 hadrian/src/Hadrian/Oracles/Cabal/Type.hs delete mode 100644 hadrian/src/Hadrian/Oracles/DirectoryContents.hs delete mode 100644 hadrian/src/Hadrian/Oracles/Path.hs delete mode 100644 hadrian/src/Hadrian/Oracles/TextFile.hs delete mode 100644 hadrian/src/Hadrian/Package.hs delete mode 100644 hadrian/src/Hadrian/Target.hs delete mode 100644 hadrian/src/Hadrian/Utilities.hs delete mode 100644 hadrian/src/Main.hs delete mode 100644 hadrian/src/Oracles/Flag.hs delete mode 100644 hadrian/src/Oracles/Flavour.hs delete mode 100644 hadrian/src/Oracles/ModuleFiles.hs delete mode 100644 hadrian/src/Oracles/Setting.hs delete mode 100644 hadrian/src/Oracles/TestSettings.hs delete mode 100644 hadrian/src/Packages.hs delete mode 100644 hadrian/src/Progress.hs delete mode 100644 hadrian/src/Rules.hs delete mode 100644 hadrian/src/Rules/BinaryDist.hs delete mode 100644 hadrian/src/Rules/CabalReinstall.hs delete mode 100644 hadrian/src/Rules/Clean.hs delete mode 100644 hadrian/src/Rules/Codes.hs delete mode 100644 hadrian/src/Rules/Compile.hs delete mode 100644 hadrian/src/Rules/Dependencies.hs delete mode 100644 hadrian/src/Rules/Docspec.hs delete mode 100644 hadrian/src/Rules/Documentation.hs delete mode 100644 hadrian/src/Rules/Generate.hs delete mode 100644 hadrian/src/Rules/Gmp.hs delete mode 100644 hadrian/src/Rules/Libffi.hs delete mode 100644 hadrian/src/Rules/Library.hs delete mode 100644 hadrian/src/Rules/Library.hs-boot delete mode 100644 hadrian/src/Rules/Lint.hs delete mode 100644 hadrian/src/Rules/Nofib.hs delete mode 100644 hadrian/src/Rules/Program.hs delete mode 100644 hadrian/src/Rules/Register.hs delete mode 100644 hadrian/src/Rules/Rts.hs delete mode 100644 hadrian/src/Rules/Selftest.hs delete mode 100644 hadrian/src/Rules/SimpleTargets.hs delete mode 100644 hadrian/src/Rules/SourceDist.hs delete mode 100644 hadrian/src/Rules/Test.hs delete mode 100644 hadrian/src/Rules/ToolArgs.hs delete mode 100755 hadrian/src/Settings.hs delete mode 100644 hadrian/src/Settings/Builders/Alex.hs delete mode 100644 hadrian/src/Settings/Builders/Ar.hs delete mode 100644 hadrian/src/Settings/Builders/Cabal.hs delete mode 100644 hadrian/src/Settings/Builders/Cc.hs delete mode 100644 hadrian/src/Settings/Builders/Common.hs delete mode 100644 hadrian/src/Settings/Builders/Configure.hs delete mode 100644 hadrian/src/Settings/Builders/DeriveConstants.hs delete mode 100644 hadrian/src/Settings/Builders/GenApply.hs delete mode 100644 hadrian/src/Settings/Builders/GenPrimopCode.hs delete mode 100644 hadrian/src/Settings/Builders/Ghc.hs delete mode 100644 hadrian/src/Settings/Builders/GhcPkg.hs delete mode 100644 hadrian/src/Settings/Builders/Haddock.hs delete mode 100644 hadrian/src/Settings/Builders/Happy.hs delete mode 100644 hadrian/src/Settings/Builders/HsCpp.hs delete mode 100644 hadrian/src/Settings/Builders/Hsc2Hs.hs delete mode 100644 hadrian/src/Settings/Builders/Ld.hs delete mode 100644 hadrian/src/Settings/Builders/Make.hs delete mode 100644 hadrian/src/Settings/Builders/MergeObjects.hs delete mode 100644 hadrian/src/Settings/Builders/RunTest.hs delete mode 100644 hadrian/src/Settings/Builders/SplitSections.hs delete mode 100644 hadrian/src/Settings/Builders/Win32Tarballs.hs delete mode 100644 hadrian/src/Settings/Builders/Xelatex.hs delete mode 100644 hadrian/src/Settings/Default.hs delete mode 100644 hadrian/src/Settings/Default.hs-boot delete mode 100644 hadrian/src/Settings/Flavours/Benchmark.hs delete mode 100644 hadrian/src/Settings/Flavours/Development.hs delete mode 100644 hadrian/src/Settings/Flavours/GhcInGhci.hs delete mode 100644 hadrian/src/Settings/Flavours/Performance.hs delete mode 100644 hadrian/src/Settings/Flavours/Quick.hs delete mode 100644 hadrian/src/Settings/Flavours/QuickCross.hs delete mode 100644 hadrian/src/Settings/Flavours/Quickest.hs delete mode 100644 hadrian/src/Settings/Flavours/Release.hs delete mode 100644 hadrian/src/Settings/Flavours/Validate.hs delete mode 100644 hadrian/src/Settings/Packages.hs delete mode 100644 hadrian/src/Settings/Parser.hs delete mode 100644 hadrian/src/Settings/Program.hs delete mode 100644 hadrian/src/Settings/Warnings.hs delete mode 100644 hadrian/src/Stage.hs delete mode 100644 hadrian/src/Target.hs delete mode 100644 hadrian/src/UserSettings.hs delete mode 100644 hadrian/src/Utilities.hs delete mode 100644 hadrian/src/Way.hs delete mode 100644 hadrian/src/Way/Type.hs delete mode 100644 hadrian/stack.yaml delete mode 100644 hadrian/stack.yaml.lock diff --git a/hadrian/.gitignore b/hadrian/.gitignore deleted file mode 100644 index 56a35854f877..000000000000 --- a/hadrian/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# generated by the configure script -cfg/system.config -cfg/default.host.target -cfg/default.host.target.ghc-toolchain -cfg/default.target -cfg/default.target.ghc-toolchain -/ghci-stack -/ghci-multi-cabal -/ghci-cabal - -# build.bat and build specific -/bin/ - -# build-cabal specific -/dist/ -/.cabal-sandbox/ -cabal.sandbox.config - -# build-cabal-new specific -/dist-newstyle/ -.ghc.environment.* - -# build-stack and build-stack.bat specific -/.stack-work/ - -# the user settings -/UserSettings.hs - -# Mostly temp file by emacs -*~ - -# ghcid output -/ghcid.txt diff --git a/hadrian/LICENSE b/hadrian/LICENSE deleted file mode 100644 index ff60fa8b449c..000000000000 --- a/hadrian/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2014-2017 Andrey Mokhov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/hadrian/README.md b/hadrian/README.md deleted file mode 100644 index 77ebcea4ffe3..000000000000 --- a/hadrian/README.md +++ /dev/null @@ -1,419 +0,0 @@ -Hadrian -======= - -Hadrian is the build system for the [Glasgow Haskell Compiler][ghc]. It is -based on the [Shake][shake] library. If you are curious about -the rationale behind the -project and the architecture of the build system you can find more details in -this [Haskell Symposium 2016 paper](https://dl.acm.org/authorize?N41275) and this -[Haskell eXchange 2016 talk][talk]. - -Your first build ----------------- - -Put on the helmet and run the following commands from the root of the GHC -tree: - -``` -./boot && ./configure -hadrian/build -j -``` - -or on Windows: - -``` -./boot && ./configure --enable-tarballs-autodownload -hadrian/build.bat -j -``` - -Here flag `-j` enables parallelism and is optional. We will further refer to the -build script simply as `build`. - -* On Windows, if you do not want to install MSYS, you can use the Stack-based -build script (Stack provides a managed MSYS environment), as described in -[these instructions][windows-build]. If you don't mind installing MSYS yourself -or already have it, you can use the Cabal-based build script. - -* Hadrian is written in Haskell and depends on `shake` (plus a few packages that -`shake` depends on), `mtl`, `quickcheck`, and GHC core libraries. - -* If you have never built GHC before, start with the -[preparation guide][ghc-preparation]. - -* By default Hadrian will fetch dependencies from the internet. If this is a problem - for your build system then see the [bootstrap](bootstrap/README.md) directory for - instructions about how to build hadrian without an internet connection. - - -Using the build system ----------------------- -Once your first build is successful, simply run `build` to rebuild after some -changes. Build results are placed into `_build` by default. - -#### Choosing a build flavour - -There are many different ways to build a compiler, each way is called a flavour. - -* `--flavour=FLAVOUR`: choose a build flavour. The following settings are -currently supported: `default`, `quick`, `quickest`, `perf`, `prof`, `devel1` -and `devel2`. As an example, the `quickest` flavour adds `-O0` flag to all GHC -invocations and builds libraries only in the `vanilla` way, which speeds up -builds by 3-4x. - -In addition to the overall build flavour there are also "flavour transformers" -which can slightly modify the build settings for a flavour. Some common flavour -transformers are: - -* `no_profiled_libs`: Don't build profiled libraries -* `lint`: Build with core lint enabled. -* etc - -A flavour transformer is appended to a normal flavour name using `+` - -``` ---flavour=default+lint -``` - -Build flavours and flavour transformers are documented -[here](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/flavours.md). - -#### Command line flags - -In addition to standard Shake flags (try `--help`), the build system -currently supports several others: - -* `--build-root=PATH` or `-oPATH`: specify the directory in which you want to -store all build products. By default Hadrian builds everything in the `_build/` -subdirectory of the GHC source tree. This option is useful -for GHC developers who want to build GHC in different ways or at different -commits, from the same source directory, and have the build products sit in -different, isolated folders. - - -* `--freeze1`: freeze Stage1 GHC, i.e. do not rebuild it even if some of its -source files are out-of-date. This allows to significantly reduce the rebuild -time when you are working on a feature that affects both Stage1 and Stage2 -compilers, but may lead to incorrect build results. To unfreeze Stage1 GHC -simply drop the `--freeze1` flag and Hadrian will rebuild all out-of-date files. - -* `--freeze2`: just like `--freeze1` but tell Hadrian to additionally freeze -Stage2 GHC. - -* `--skip-depends`: skips rebuilding Haskell module dependency files. - -* `--bignum={native,gmp,check-gmp,ffi}`: choose which bignum implementation to use. The default is `gmp`. - -* `--color` and `--no-color`: choose whether to use colors when printing build -progress info. By default, Hadrian tries to determine if the terminal supports -colored output, and proceeds accordingly. - -* `--progress-info=STYLE`: choose how build progress info is printed. There are -four settings: `none`, `brief` (one line per build command; this is the default -setting), `normal` (typically a box per build command), and `unicorn` (when -`normal` just won't do). - -* `-V`/`--verbose`: run Hadrian in verbose mode. This makes commands print their stdout - and produces slightly more output on a failure (including hadrian call stacks). - -* `-VV`: run hadrian in diagnostics mode: In particular this prints diagnostic -messages by Shake oracles and full command lines for all commands. - -* `--lint`: run [Shake Lint](https://shakebuild.com/manual#lint) during the -build to check that the build system is well formed. Note that the Lint check -currently fails under certain circumstances, as discussed in -[this ticket](https://gitlab.haskell.org/ghc/ghc/issues/15971). - -#### Expressions - -Hadrian expressions are used extensively for specifying build settings. For an -explanation of how they work, see the [documentation](doc/expressions.md). - -#### User settings - -The Make-based build system uses `mk/build.mk` to specify user build settings. -Hadrian uses `hadrian/UserSettings.hs` for the same purpose, see -[documentation](doc/user-settings.md). - -#### Building libraries and executables - -You can build a specific library or executable for a given stage by running -`build stage::`. Examples: - -```sh -# Build the Stage1 GHC compiler, and place the binary to the directory -# _build/stage0/bin/ghc (because it is built by the Stage0 compiler). -build stage1:exe:ghc-bin - -# Build the Stage2 GHC compiler, and place the binary to the directory -# _build/stage1/bin/ghc (because it is built by the Stage1 compiler). -build stage2:exe:ghc-bin - -# Build the `ghc` library with the bootstrapping (Stage0) compiler, and register -# it in the package database stored in the directory _build/stage0/lib. -build stage0:lib:ghc - -# Build the Cabal library with the Stage1 compiler and register it -# in the package database stored in the directory _build/stage1/lib. - -# Build the `text` library with the Stage2 compiler and register it -# in the package database stored in the directory _build/stage2/lib. -build stage2:lib:text - -# Build Haddock using the Stage1 compiler and place the binary into the -# directory _build/stage1/haddock. -build stage1:exe:haddock -``` - -#### Choosing the compiler used to build Hadrian - -The `GHC` environment variable can be used to control which GHC is used to build hadrian. By -default the version of GHC on your path is used to build hadrian. -This can be a different version of GHC to the one you want to use as the boot compiler (which -is selected during ./configure). - -``` -GHC=$(which ghc-9.4.2) ./hadrian/build --- hadrian is built using ghc-9.4.2 -``` - -#### Fast feedback using ghci - -Running the `./hadrian/ghci` script will load the main compiler into -a ghci session. This is intended for fast development feedback, modules are only -typechecked so it isn't possible to run any functions in the repl. - -``` -./hadrian/ghci -``` - -You can also use this target with `ghcid`. - -``` -ghcid --command="./hadrian/ghci" -``` - -The first time this command is run hadrian will need to compile a few dependencies -which will take 1-2 minutes. Loading GHC into GHCi itself takes about 30 seconds and -reloads after that take in the region of 1-5 seconds depending on which modules -need to be recompiled. - -You can further speed up the script by passing `-j` as an argument. This will -have the effect of passing `-j` to both hadrian and ghci so they will both -build in parallel. - -``` -./hadrian/ghci -j8 -``` - -##### Multi-Repl Session - -You can also use the experimental multi-repl if you are booting with GHC-9.4 or -later. - -``` -./hadrian/ghci-multi -``` - -#### Testing - -To run GHC testsuite, use `build test`. See -[doc/testsuite.md](doc/testsuite.md) to learn about all associated command line -flags, as well as about the equivalents of the features that the Make build -system offers. - -NOTE: The only build flavours which are expected to pass the testsuite are those -tested in CI. If you use an untested flavour such as "Quick" then you run the -risk that not all tests will pass. In particular you can rely on the `validate` -and `perf` flavours being tested but no others. - -`build selftest` (no longer enabled by default) runs tests of the build system. -The current test coverage is close to zero (see [#197][test-issue]). - -#### Running linters - -There are two targets which runs the lint commands used by CI: - -* `lint:base`, runs hlint on the `base` library. -* `lint:compiler`, runs hlint on the `ghc` library. - -It's useful to know that you can combine multiple targets in build command. For example, -you can tell hadrian to build the compiler and also run the linters: - -``` -./hadrian/build stage2:exe:ghc-bin lint:compiler -``` - -#### Clean and full rebuild - -* `build clean` removes all build artefacts. - -* `build distclean` additionally remove the mingw tarballs and fs* files created - by `configure`. - -* `build -B` forces Shake to rerun all rules, even if the previous build results -are still up-to-date. - -#### Staged compilation - -GHC is a self-hosted compiler and consequently the build proceeds in several -stages: - -1. The build begins with a user-provided installation of GHC called the - stage0 (or bootstrap) compiler which is used (via the `build.*.sh` scripts) - to build Hadrian. -1. Hadrian uses the stage0 compiler to build a stage1 compiler (somewhat - confusingly found in `_build/stage0/bin/ghc`), linking against the stage0 - compiler's core libraries (e.g. `base`). -1. The stage1 compiler is used to build new core libraries (found in - `_build/stage1/lib`). -1. The stage1 compiler is used to build a stage2 compiler (found in - `_build/stage1/bin/ghc`), linking against these new core libraries. -1. Optionally (see the [Building Stage3](#building-stage3) section below) the - stage2 compiler can be used to build a stage3 compiler (found in - `build/stage2/bin/ghc`) as a further smoke-test. - -Note that the stage directories in the `_build` directory can be thought of as -named after the stage that was used to *build* the artifacts in each directory. - -These stages can be summarized graphically: - -![an overview of the stages of a Hadrian compilation](doc/staged-compilation.svg) - -#### Documentation - -To build all GHC documentation, run `build docs`. This includes - -* Haddock documentation for all libraries -* The user guide (PDF and HTML) -* The man page - -In order to only build haddock document there is the `build docs-haddock` target. - -In order to build the haddock documentation for just one package use the `docs:` command, -for example `docs:base` will just build the documentation for `base`. - -Alternatively, -you can use the `--docs` CLI flag to selectively disable some or -all of the documentation targets: - -- `--docs=none`: don't build any docs -- `--docs=no-haddocks`: don't build haddocks -- `--docs=no-sphinx`: don't build any user manual or manpage -- `--docs=no-sphinx-html`: don't build HTML versions of manuals -- `--docs=no-sphinx-pdfs`: don't build PDF versions of manuals -- `--docs=no-sphinx-man`: don't build the manpage - -You can pass several `--docs=...` flags, Hadrian will combine -their effects. - -To build haddock documentation for upload to hackage you need to pass the `--haddock-for-hackage` flag, -This will generate URLs which are appropiate for either uploading to a local hackage -server or the global hackage server. - -#### Source distribution - -To build a GHC source distribution tarball, run `build source-dist`. - -#### Binary distribution - -To build a GHC binary distribution, run `build binary-dist`. The resulting -tarball contains just enough to support the - -``` sh -$ ./configure [--prefix=PATH] && make install -``` - -workflow, for now. - -Note: On windows you need to use the `reloc-binary-dist` target. - -#### Relocatable Binary Distribution - -If you require a relocatable binary distribution (for example on Windows), then you -can build the `reloc-binary-dist` target. - -### Building and installing GHC - -You can get Hadrian to build _and_ install a binary distribution in one go -with the following command: - -``` sh -$ build install --prefix=/some/absolute/path -``` - -This builds everything that would be shipped in a bindist, without creating -the archive, and just runs `./configure --prefix=PATH` and `make install` -to get GHC installed installed at `/some/absolute/path`. - -#### Building Stage3 - -It is possible to define a build flavour that builds a Stage3 compiler, which is -a compiler built using Stage2. This is useful for cross-compilation. Detailed -instructions can be found in the corresponding -[part of the user settings manual](doc/user-settings.md#specifying-the-final-stage-to-build). - -#### Integrating Hadrian into other tooling - -The `tool-args` target is designed to allow hadrian to be integrated into other -tooling which uses the GHC API. -`tool-args` prints out a list of flags which hadrian will use to compile -a module in the `compiler` directory. Using these flags you can then set up -a GHC API session with the correct environment to load a module into your own -GHC session. This is how `haskell-ide-engine` is able to support hadrian. - -``` -> ./hadrian/build tool-args --hide-all-packages -no-user-package-db -package-db _build/stage0/lib/packag... -``` - - -The `./hadrian/ghci` script is implemented using this target. - -Troubleshooting ---------------- - -If you need help in debugging Hadrian, read the -[wiki](https://github.com/snowleopard/hadrian/wiki) -and Shake's [debugging tutorial](https://shakebuild.com/debugging). -If nothing helps, don't hesitate to create a GHC issue. - -Current limitations -------------------- -The new build system still lacks many important features: -* Dynamic linking on Windows is not supported [#343][dynamic-windows-issue]. - -Cheatsheet for Make users -------------------------- - -You can find a cheatsheet-style document that shows the Hadrian equivalents of -commands that GHC users are used to run with the Make build system -[here](doc/make.md). - -Acknowledgements ----------------- - -The list of people who helped create Hadrian is long, and we hope that it will -soon become even longer! The project was first developed in a separate GitHub -repository, where you can find the list of original -[contributors][contributors]. They had to stare at Makefiles for months, so give -them all a round of applause. Simon Peyton Jones and Simon Marlow helped with -deciphering these Makefiles, and Neil Mitchell patiently explained how to -translate Makefiles to (much nicer) Shakefiles. - -The initial development of Hadrian was funded by Newcastle University, EPSRC and -Microsoft Research. Other organisations that contributed at various stages of -the project are Haskell.Org and Google (both through supporting summer student -projects), as well as Well-Typed. - -[ghc]: https://en.wikipedia.org/wiki/Glasgow_Haskell_Compiler -[shake]: https://github.com/ndmitchell/shake -[make]: https://gitlab.haskell.org/ghc/ghc/wikis/building/architecture -[talk]: https://skillsmatter.com/skillscasts/8722-meet-hadrian-a-new-build-system-for-ghc -[issues]: https://github.com/snowleopard/hadrian/issues -[ghc-preparation]: https://gitlab.haskell.org/ghc/ghc/wikis/building/preparation -[ghc-windows-quick-build]: https://gitlab.haskell.org/ghc/ghc/wikis/building/preparation/windows#AQuickBuild -[windows-build]: https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/windows.md -[test-issue]: https://github.com/snowleopard/hadrian/issues/197 -[dynamic-windows-issue]: https://github.com/snowleopard/hadrian/issues/343 -[bin-dist-issue]: https://github.com/snowleopard/hadrian/issues/219 -[contributors]: https://github.com/snowleopard/hadrian/graphs/contributors diff --git a/hadrian/Setup.hs b/hadrian/Setup.hs deleted file mode 100644 index 200a2e51d0b4..000000000000 --- a/hadrian/Setup.hs +++ /dev/null @@ -1,3 +0,0 @@ -import Distribution.Simple -main = defaultMain - diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile deleted file mode 100644 index 2f3df5323b14..000000000000 --- a/hadrian/bindist/Makefile +++ /dev/null @@ -1,267 +0,0 @@ -MAKEFLAGS += --no-builtin-rules -.SUFFIXES: - -# Configuration from the source distribution's configure script. -include ./mk/project.mk - -# Configuration from the binary distribution's configure script. -include ./config.mk - -.PHONY: default -default: - @echo 'Run "make install" to install' - @false - -#----------------------------------------------------------------------- -# INSTALL RULES - -# Hacky function to check equality of two strings -# TODO : find if a better function exists -eq=$(and $(findstring $(1),$(2)),$(findstring $(2),$(1))) - -# patchpackageconf -# -# Hacky function to patch up the 'haddock-interfaces' and 'haddock-html' -# fields in the package .conf files -# -# $1 = package name (ex: 'bytestring') -# $2 = path to .conf file -# $3 = Docs Directory -# $4 = (relative) path from $${pkgroot} to docs directory ($3) -# $5 = package name and version (ex: bytestring-0.13) -# -define patchpackageconf \ - # We fix the paths to haddock files by using the relative path from the pkgroot - # to the doc files. - cat '$2' | sed 's|haddock-interfaces.*|haddock-interfaces: "$${pkgroot}/$4/html/libraries/$5/$1.haddock"|' \ - | sed 's|haddock-html.*|haddock-html: "$${pkgroot}/$4/html/libraries/$5"|' \ - | sed 's| $${pkgroot}/../../doc/html/.*||' \ - > '$2.copy' - # The rts package doesn't actually supply haddocks, so we stop advertising them - # altogether. - ((echo "$1" | grep rts) && (cat '$2.copy' | sed 's|haddock-.*||' > '$2.copy.copy')) || (cat '$2.copy' > '$2.copy.copy') - # We finally replace the original file. - mv '$2.copy.copy' '$2' - # Fix the mode, in case umask is set - chmod 644 '$2' -endef - -# QUESTION : should we use shell commands? - -.PHONY: show -show: - @echo '$(VALUE)="$($(VALUE))"' - - -.PHONY: install_extra -ifeq "$(EnableDistroToolchain)" "NO" -ifeq "$(Windows_Host)" "YES" -install_extra: install_mingw -endif -endif -install_extra: - -.PHONY: install_bin -ifeq "$(RelocatableBuild)" "YES" -install_bin: install_bin_direct -else -install_bin: install_bin_libdir install_wrappers -endif - -.PHONY: install -install: install_bin install_lib install_extra -install: install_man install_docs update_package_db -install: install_data - -ifeq "$(RelocatableBuild)" "YES" -ActualLibsDir=${ghclibdir} -ActualBinsDir=${bindir} -else -ActualLibsDir=${ghclibdir}/lib -ActualBinsDir=${ghclibdir}/bin -endif -WrapperBinsDir=${bindir} - -# N.B. this is duplicated from includes/ghc.mk. -lib/settings : config.mk - @rm -f $@ - @echo '[("C compiler command", "$(SettingsCCompilerCommand)")' >> $@ - @echo ',("C compiler flags", "$(SettingsCCompilerFlags)")' >> $@ - @echo ',("C++ compiler command", "$(SettingsCxxCompilerCommand)")' >> $@ - @echo ',("C++ compiler flags", "$(SettingsCxxCompilerFlags)")' >> $@ - @echo ',("C compiler link flags", "$(SettingsCCompilerLinkFlags)")' >> $@ - @echo ',("C compiler supports -no-pie", "$(SettingsCCompilerSupportsNoPie)")' >> $@ - @echo ',("CPP command", "$(SettingsCPPCommand)")' >> $@ - @echo ',("CPP flags", "$(SettingsCPPFlags)")' >> $@ - @echo ',("Haskell CPP command", "$(SettingsHaskellCPPCommand)")' >> $@ - @echo ',("Haskell CPP flags", "$(SettingsHaskellCPPFlags)")' >> $@ - @echo ',("JavaScript CPP command", "$(SettingsJavaScriptCPPCommand)")' >> $@ - @echo ',("JavaScript CPP flags", "$(SettingsJavaScriptCPPFlags)")' >> $@ - @echo ',("C-- CPP command", "$(SettingsCmmCPPCommand)")' >> $@ - @echo ',("C-- CPP flags", "$(SettingsCmmCPPFlags)")' >> $@ - @echo ',("C-- CPP supports -g0", "$(SettingsCmmCPPSupportsG0)")' >> $@ - @echo ',("ld supports compact unwind", "$(LdHasNoCompactUnwind)")' >> $@ - @echo ',("ld supports filelist", "$(LdHasFilelist)")' >> $@ - @echo ',("ld supports single module", "$(LdHasSingleModule)")' >> $@ - @echo ',("ld is GNU ld", "$(LdIsGNULd)")' >> $@ - @echo ',("Merge objects command", "$(SettingsMergeObjectsCommand)")' >> $@ - @echo ',("Merge objects flags", "$(SettingsMergeObjectsFlags)")' >> $@ - @echo ',("Merge objects supports response files", "$(MergeObjsSupportsResponseFiles)")' >> $@ - @echo ',("ar command", "$(SettingsArCommand)")' >> $@ - @echo ',("ar flags", "$(ArArgs)")' >> $@ - @echo ',("ar supports at file", "$(ArSupportsAtFile)")' >> $@ - @echo ',("ar supports -L", "$(ArSupportsDashL)")' >> $@ - @echo ',("ranlib command", "$(SettingsRanlibCommand)")' >> $@ - @echo ',("otool command", "$(SettingsOtoolCommand)")' >> $@ - @echo ',("install_name_tool command", "$(SettingsInstallNameToolCommand)")' >> $@ - @echo ',("windres command", "$(SettingsWindresCommand)")' >> $@ - @echo ',("unlit command", "$$topdir/../bin/$(CrossCompilePrefix)unlit")' >> $@ - @echo ',("cross compiling", "$(CrossCompiling)")' >> $@ - @echo ',("target platform string", "$(TARGETPLATFORM)")' >> $@ - @echo ',("target os", "$(HaskellTargetOs)")' >> $@ - @echo ',("target arch", "$(HaskellTargetArch)")' >> $@ - @echo ',("target word size", "$(TargetWordSize)")' >> $@ - @echo ',("target word big endian", "$(TargetWordBigEndian)")' >> $@ - @echo ',("target has GNU nonexec stack", "$(TargetHasGnuNonexecStack)")' >> $@ - @echo ',("target has .ident directive", "$(TargetHasIdentDirective)")' >> $@ - @echo ',("target has subsections via symbols", "$(TargetHasSubsectionsViaSymbols)")' >> $@ - @echo ',("target has libm", "$(TargetHasLibm)")' >> $@ - @echo ',("Unregisterised", "$(GhcUnregisterised)")' >> $@ - @echo ',("LLVM target", "$(LLVMTarget)")' >> $@ - @echo ',("LLVM llc command", "$(SettingsLlcCommand)")' >> $@ - @echo ',("LLVM opt command", "$(SettingsOptCommand)")' >> $@ - @echo ',("LLVM llvm-as command", "$(SettingsLlvmAsCommand)")' >> $@ - @echo ',("LLVM llvm-as flags", "$(SettingsLlvmAsFlags)")' >> $@ - @echo ',("Use inplace MinGW toolchain", "$(SettingsUseDistroMINGW)")' >> $@ - @echo - @echo ',("target RTS linker only supports shared libraries", "$(TargetRTSLinkerOnlySupportsSharedLibs)")' >> $@ - @echo ',("Use interpreter", "$(GhcWithInterpreter)")' >> $@ - @echo ',("Support SMP", "$(GhcWithSMP)")' >> $@ - @echo ',("RTS ways", "$(GhcRTSWays)")' >> $@ - @echo ',("Tables next to code", "$(TablesNextToCode)")' >> $@ - @echo ',("Leading underscore", "$(LeadingUnderscore)")' >> $@ - @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ - @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ - @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ - @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ - @echo "]" >> $@ - -# We need to install binaries relative to libraries. -BINARIES = $(wildcard ./bin/*) -.PHONY: install_bin_libdir -install_bin_libdir: - @echo "Copying binaries to $(DESTDIR)$(ActualBinsDir)" - $(INSTALL_DIR) "$(DESTDIR)$(ActualBinsDir)" - for i in $(BINARIES); do \ - if test -L "$$i"; then \ - cp -RP "$$i" "$(DESTDIR)$(ActualBinsDir)"; \ - else \ - $(INSTALL_PROGRAM) "$$i" "$(DESTDIR)$(ActualBinsDir)"; \ - fi; \ - done - -.PHONY: install_bin_direct -install_bin_direct: - @echo "Copying binaries to $(DESTDIR)$(WrapperBinsDir)" - $(INSTALL_DIR) "$(DESTDIR)$(WrapperBinsDir)" - $(INSTALL_PROGRAM) ./bin/* "$(DESTDIR)$(WrapperBinsDir)/" - -.PHONY: install_lib -install_lib: lib/settings - @echo "Copying libraries to $(DESTDIR)$(ActualLibsDir)" - $(INSTALL_DIR) "$(DESTDIR)$(ActualLibsDir)" - - @dest="$(DESTDIR)$(ActualLibsDir)"; \ - cd ./lib; \ - for i in `$(FIND) . -type f`; do \ - dir="`dirname $$i`" ; \ - $(INSTALL_DIR) "$$dest/$$dir" ; \ - case $$i in \ - *.a) \ - $(INSTALL_DATA) $$i "$$dest/$$dir" ; \ - $(RANLIB_CMD) "$$dest"/$$i ;; \ - *.dll) \ - $(INSTALL_PROGRAM) $$i "$$dest/$$dir" ; \ - $(STRIP_CMD) "$$dest"/$$i ;; \ - *.so) \ - $(INSTALL_SHLIB) $$i "$$dest/$$dir" ;; \ - *.dylib) \ - $(INSTALL_SHLIB) $$i "$$dest/$$dir" ;; \ - *.mjs) \ - $(INSTALL_SCRIPT) $$i "$$dest/`dirname $$i`" ;; \ - *) \ - $(INSTALL_DATA) $$i "$$dest/`dirname $$i`" ;; \ - esac; \ - done; \ - -.PHONY: install_docs -install_docs: - @echo "Copying docs to $(DESTDIR)$(docdir)" - $(INSTALL_DIR) "$(DESTDIR)$(docdir)" - - if [ -d doc ]; then \ - cd ./doc; $(FIND) . -type f -exec sh -c \ - '$(INSTALL_DIR) "$(DESTDIR)$(docdir)/`dirname $$1`" && $(INSTALL_DATA) "$$1" "$(DESTDIR)$(docdir)/`dirname $$1`"' \ - sh '{}' ';'; \ - fi - - if [ -d docs-utils ]; then \ - $(INSTALL_DIR) "$(DESTDIR)$(docdir)/html/libraries/"; \ - $(INSTALL_DATA) docs-utils/prologue.txt "$(DESTDIR)$(docdir)/html/libraries/"; \ - $(INSTALL_SCRIPT) docs-utils/gen_contents_index "$(DESTDIR)$(docdir)/html/libraries/"; \ - fi - -.PHONY: install_data -install_data: - @echo "Copying data to $(DESTDIR)share" - $(INSTALL_DIR) "$(DESTDIR)$(datadir)" - if [ -d share ]; then \ - cd ./share; $(FIND) . -type f -exec sh -c \ - '$(INSTALL_DIR) "$(DESTDIR)$(datadir)/`dirname $$1`" && \ - $(INSTALL_DATA) "$$1" "$(DESTDIR)$(datadir)/`dirname $$1`"' \ - sh '{}' ';'; \ - fi - -MAN_SECTION := 1 -MAN_PAGES := manpage/ghc.1 - -.PHONY: install_man -install_man: - if [ -f $(MAN_PAGES) ]; then \ - $(INSTALL_DIR) "$(DESTDIR)$(mandir)"; \ - $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man$(MAN_SECTION)"; \ - $(INSTALL_MAN) $(INSTALL_OPTS) $(MAN_PAGES) "$(DESTDIR)$(mandir)/man$(MAN_SECTION)"; \ - fi - -export SHELL -.PHONY: install_wrappers -install_wrappers: install_bin_libdir install_hsc2hs_wrapper - @echo "Installing wrapper scripts" - $(INSTALL_DIR) "$(DESTDIR)$(WrapperBinsDir)" - for p in `cd ./wrappers; $(FIND) . ! -type d`; do \ - mk/install_script.sh "$$p" "$(DESTDIR)/$(WrapperBinsDir)/$$p" "$(WrapperBinsDir)" "$(ActualBinsDir)" "$(ActualBinsDir)/$$p" "$(ActualLibsDir)" "$(docdir)" "$(includedir)"; \ - done - -.PHONY: install_hsc2hs_wrapper -install_hsc2hs_wrapper: - @echo Copying hsc2hs wrapper - cp mk/hsc2hs wrappers/$(CrossCompilePrefix)hsc2hs-ghc-$(ProjectVersion) - -PKG_CONFS = $(shell find "$(DESTDIR)$(ActualLibsDir)/package.conf.d" -name '*.conf' | sed "s: :\0xxx\0:g") -.PHONY: update_package_db -update_package_db: install_bin install_lib - @echo "Installing C++ standard library virtual package" - $(INSTALL_DATA) mk/system-cxx-std-lib-1.0.conf "$(DESTDIR)$(ActualLibsDir)/package.conf.d" - @echo "Updating the package DB" - $(foreach p, $(PKG_CONFS),\ - $(call patchpackageconf,$(shell echo $(notdir $p) | sed 's/-[0-9.]*-[0-9a-zA-Z]*\.conf//g'),$(shell echo "$p" | sed 's:\0xxx\0: :g'),$(docdir),$(shell mk/relpath.sh "$(ActualLibsDir)" "$(docdir)"),$(shell echo $(notdir $p) | sed 's/.conf//g'))) - '$(DESTDIR)$(ActualBinsDir)/$(CrossCompilePrefix)ghc-pkg' --global-package-db "$(DESTDIR)$(ActualLibsDir)/package.conf.d" recache - -.PHONY: install_mingw -install_mingw: - @echo "Installing MingGW" - $(INSTALL_DIR) "$(DESTDIR)$(prefix)/mingw" - cp -Rp ./mingw "$(DESTDIR)$(prefix)" - -# END INSTALL -# ---------------------------------------------------------------------- diff --git a/hadrian/bindist/config.mk.in b/hadrian/bindist/config.mk.in deleted file mode 100644 index b023eac98942..000000000000 --- a/hadrian/bindist/config.mk.in +++ /dev/null @@ -1,235 +0,0 @@ -#----------------------------------------------------------------------------- -# -# Definition of installation directories, we don't use half of these, but since -# the configure script has them on offer while passing through, we might as well -# set them. Note that we have to be careful, because the GNU coding standards -# have changed a bit over the course of time, and autoconf development reflects -# this. -# -# A little bit of history regarding autoconf and GNU coding standards, use this -# as a cheat-sheet for the stuff below: -# -# variable | default < 2.60 | default >= 2.60 -# ------------+--------------------+-------------------------------------- -# exec_prefix | ${prefix} | ${prefix} -# libdir | ${exec_prefix}/lib | ${exec_prefix}/lib -# datarootdir | NONE! | ${prefix}/share -# datadir | ${prefix}/share | ${datarootdir} -# infodir | ${prefix}/info | ${datarootdir}/info -# mandir | ${prefix}/man | ${datarootdir}/man -# docdir | NONE! | ${datarootdir}/doc/${PACKAGE_TARNAME} -# htmldir | NONE! | ${docdir} -# dvidir | NONE! | ${docdir} -# pdfdir | NONE! | ${docdir} -# psdir | NONE! | ${docdir} -# -# NOTE: The default e.g. ${docdir} above means that autoconf substitutes the -# string "${docdir}", not the value of docdir! This is crucial for the GNU -# coding standards. See #1924. - -# The build.mk contains information about the bindist such as whether there are -# profiled libraries. -include build.mk - -define set_default -# $1 = variable to set -# $2 = default value to use, if configure didn't expand it -# If $1 starts with an @ then configure didn't set it (because a version -# of autoconf that is too old was used), so set it to a sensible value -ifneq "$$(filter @%,$$($1))" "" -$1 = $2 -endif -endef - -prefix = @prefix@ - -datarootdir = @datarootdir@ -$(eval $(call set_default,datarootdir,$${prefix}/share)) - -exec_prefix = @exec_prefix@ -bindir = @bindir@ -datadir = @datadir@ -libdir = @libdir@ -includedir = @includedir@ -mandir = @mandir@ - -# Note that `./configure --docdir=/foo/bar` should work. -docdir = @docdir@ -PACKAGE_TARNAME = ghc-${ProjectVersion} -$(eval $(call set_default,docdir,$${datarootdir}/doc/$${PACKAGE_TARNAME})) - -htmldir = @htmldir@ -dvidir = @dvidir@ -pdfdir = @pdfdir@ -psdir = @psdir@ -$(eval $(call set_default,htmldir,$${docdir})) -$(eval $(call set_default,dvidir,$${docdir})) -$(eval $(call set_default,pdfdir,$${docdir})) -$(eval $(call set_default,psdir,$${docdir})) - -# On Windows we can only make a relocatable bindist because the normal install -# script creates wrapper scripts which do not work on windows. Therefore we force -# RelocatableBuild = YES here until/if that is ever fixed. -ifeq "$(Windows_Host)" "YES" -RelocatableBuild = YES -endif - -ifeq "$(RelocatableBuild)" "YES" - -# Hack: our directory layouts tend to be different on Windows, so -# hack around configure's bogus assumptions here. -datarootdir = $(prefix) -datadir = $(prefix)/lib -libdir = $(prefix)/lib - -docdir = $(prefix)/doc -htmldir = $(docdir) -dvidir = $(docdir) -pdfdir = $(docdir) -psdir = $(docdir) - -ghclibdir = $(libdir) - -else - -# Unix: override libdir and datadir to put ghc-specific stuff in -# a subdirectory with the version number included. -ghclibdir = $(libdir)/$(CrossCompilePrefix)ghc-$(ProjectVersion) -endif - -ghclibexecdir = $(ghclibdir) -topdir = $(ghclibdir) -ghcheaderdir = $(ghclibdir)/rts/include - -#----------------------------------------------------------------------------- -# Utilities needed by the installation Makefile - -FIND = @FindCmd@ -INSTALL = @INSTALL@ -INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL)) -LN_S = @LN_S@ -MV = mv -SED = @SedCmd@ -SHELL = @SHELL@ -RANLIB_CMD = @RanlibCmd@ -STRIP_CMD = @StripCmd@ - -# -# Invocations of `install' for different classes -# of targets: -# -INSTALL_PROGRAM = $(INSTALL) -m 755 -INSTALL_SCRIPT = $(INSTALL) -m 755 -INSTALL_SHLIB = $(INSTALL) -m 755 -INSTALL_DATA = $(INSTALL) -m 644 -INSTALL_HEADER = $(INSTALL) -m 644 -INSTALL_MAN = $(INSTALL) -m 644 -INSTALL_DOC = $(INSTALL) -m 644 -INSTALL_DIR = $(INSTALL) -m 755 -d - -#----------------------------------------------------------------------------- -# Build configuration - -CrossCompiling = @CrossCompiling@ -CrossCompilePrefix = @CrossCompilePrefix@ -GhcUnregisterised = @Unregisterised@ -EnableDistroToolchain = @SettingsUseDistroMINGW@ -BaseUnitId = @BaseUnitId@ - -# The THREADED_RTS requires `BaseReg` to be in a register and the -# `GhcUnregisterised` mode doesn't allow that. -GhcWithSMP := @GhcWithSMP@ - -ifeq "$(TargetArch_CPP)" "wasm32" -TargetRTSLinkerOnlySupportsSharedLibs=YES -else -TargetRTSLinkerOnlySupportsSharedLibs=NO -endif - -# Whether to include GHCi in the compiler. Depends on whether the RTS linker -# has support for this OS/ARCH combination. -OsSupportsGHCi=$(strip $(patsubst $(TargetOS_CPP), YES, $(findstring $(TargetOS_CPP), mingw32 linux solaris2 freebsd dragonfly netbsd openbsd darwin kfreebsdgnu wasi))) -ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc powerpc64 powerpc64le sparc sparc64 arm aarch64 riscv64 wasm32 loongarch64))) - -ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES" -GhcWithInterpreter=YES -else -GhcWithInterpreter=$(if $(findstring YES,$(DYNAMIC_GHC_PROGRAMS)),YES,NO) -endif - - - -ifneq "$(DESTDIR)" "" -override DESTDIR := $(abspath $(DESTDIR)) -endif - -# We can only build GHCi threaded if we have a threaded RTS: -GhcThreaded = $(if $(findstring thr,$(GhcRTSWays)),YES,NO) - -# Configuration for libffi -UseSystemLibFFI=@UseSystemLibFFI@ -UseLibffiForAdjustors=@UseLibffiForAdjustors@ - -# GHC needs arch-specific tweak at least in -# rts/Libdw.c:set_initial_registers() -GhcRtsWithLibdw=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 s390x),@UseLibdw@,NO)) - -#----------------------------------------------------------------------------- -# Settings - -# We are in the process of moving the settings file from being entirely -# generated by configure, to generated being by the build system. Many of these -# might become redundant. -# See Note [tooldir: How GHC finds mingw on Windows] - -LdHasFilelist = @LdHasFilelist@ -MergeObjsSupportsResponseFiles = @MergeObjsSupportsResponseFiles@ -LdHasBuildId = @LdHasBuildId@ -LdHasFilelist = @LdHasFilelist@ -LdIsGNULd = @LdIsGNULd@ -LdHasNoCompactUnwind = @LdHasNoCompactUnwind@ -LdHasSingleModule = @LdHasSingleModule@ -ArArgs = @ArArgs@ -ArSupportsAtFile = @ArSupportsAtFile@ -ArSupportsDashL = @ArSupportsDashL@ -HaskellHostOs = @HaskellHostOs@ -HaskellHostArch = @HaskellHostArch@ -HaskellTargetOs = @HaskellTargetOs@ -HaskellTargetArch = @HaskellTargetArch@ -TargetWordSize = @TargetWordSize@ -TargetWordBigEndian = @TargetWordBigEndian@ -TargetHasGnuNonexecStack = @TargetHasGnuNonexecStack@ -TargetHasIdentDirective = @TargetHasIdentDirective@ -TargetHasSubsectionsViaSymbols = @TargetHasSubsectionsViaSymbols@ -TargetHasLibm = @TargetHasLibm@ -TablesNextToCode = @TablesNextToCode@ -LeadingUnderscore = @LeadingUnderscore@ -LlvmTarget = @LlvmTarget@ - -SettingsCCompilerCommand = @SettingsCCompilerCommand@ -SettingsCxxCompilerCommand = @SettingsCxxCompilerCommand@ -SettingsCPPCommand = @SettingsCPPCommand@ -SettingsCPPFlags = @SettingsCPPFlags@ -SettingsHaskellCPPCommand = @SettingsHaskellCPPCommand@ -SettingsHaskellCPPFlags = @SettingsHaskellCPPFlags@ -SettingsJavaScriptCPPCommand = @SettingsJavaScriptCPPCommand@ -SettingsJavaScriptCPPFlags = @SettingsJavaScriptCPPFlags@ -SettingsCmmCPPCommand = @SettingsCmmCPPCommand@ -SettingsCmmCPPFlags = @SettingsCmmCPPFlags@ -SettingsCmmCPPSupportsG0 = @SettingsCmmCPPSupportsG0@ -SettingsCCompilerFlags = @SettingsCCompilerFlags@ -SettingsCxxCompilerFlags = @SettingsCxxCompilerFlags@ -SettingsCCompilerLinkFlags = @SettingsCCompilerLinkFlags@ -SettingsCCompilerSupportsNoPie = @SettingsCCompilerSupportsNoPie@ -SettingsMergeObjectsCommand = @SettingsMergeObjectsCommand@ -SettingsMergeObjectsFlags = @SettingsMergeObjectsFlags@ -SettingsArCommand = @SettingsArCommand@ -SettingsOtoolCommand = @SettingsOtoolCommand@ -SettingsInstallNameToolCommand = @SettingsInstallNameToolCommand@ -SettingsRanlibCommand = @SettingsRanlibCommand@ -SettingsWindresCommand = @SettingsWindresCommand@ -SettingsLibtoolCommand = @SettingsLibtoolCommand@ -SettingsLlcCommand = @SettingsLlcCommand@ -SettingsOptCommand = @SettingsOptCommand@ -SettingsLlvmAsCommand = @SettingsLlvmAsCommand@ -SettingsUseDistroMINGW = @SettingsUseDistroMINGW@ diff --git a/hadrian/bindist/cwrappers/cwrapper.c b/hadrian/bindist/cwrappers/cwrapper.c deleted file mode 100644 index 522c2b329afb..000000000000 --- a/hadrian/bindist/cwrappers/cwrapper.c +++ /dev/null @@ -1,161 +0,0 @@ - -/* gcc on mingw is hardcoded to use /mingw (which is c:/mingw) to - find various files. If this is a different version of mingw to the - one that we have in the GHC tree then things can go wrong. We - therefore need to add various -B flags to the gcc commandline, - so that it uses our in-tree mingw. Hence this wrapper. */ - -#include "cwrapper.h" -#include -#include -#include -#include -#include - -void die(const char *fmt, ...) { - va_list argp; - - va_start(argp, fmt); - vfprintf(stderr, fmt, argp); - va_end(argp); - exit(1); -} - -char *mkString(const char *fmt, ...) { - char *p; - int i, j; - va_list argp; - - va_start(argp, fmt); - i = vsnprintf(NULL, 0, fmt, argp); - va_end(argp); - - if (i < 0) { - die("vsnprintf 0 failed: errno %d: %s\n", errno, strerror(errno)); - } - - p = malloc(i + 1); - if (p == NULL) { - die("malloc failed: errno %d: %s\n", errno, strerror(errno)); - } - - va_start(argp, fmt); - j = vsnprintf(p, i + 1, fmt, argp); - va_end(argp); - if (j < 0) { - die("vsnprintf with %d failed: errno %d: %s\n", - i + 1, errno, strerror(errno)); - } - - return p; -} - -char *flattenAndQuoteArgs(char *ptr, int argc, char *argv[]) -{ - int i; - char *src; - - for (i = 0; i < argc; i++) { - *ptr++ = '"'; - src = argv[i]; - while(*src) { - if (*src == '"' || *src == '\\') { - *ptr++ = '\\'; - } - *ptr++ = *src++; - } - *ptr++ = '"'; - *ptr++ = ' '; - } - return ptr; -} - -/* This function takes a callback to be called after the creation of the child - process but before we block waiting for the child. Can be NULL. */ -__attribute__((noreturn)) int run (char *exePath, - int numArgs1, char **args1, - int numArgs2, char **args2, - runCallback callback) -{ - int i, cmdline_len; - char *new_cmdline, *ptr; - - STARTUPINFO si; - PROCESS_INFORMATION pi; - - ZeroMemory(&pi, sizeof(PROCESS_INFORMATION)); - ZeroMemory(&si, sizeof(STARTUPINFO)); - si.cb = sizeof(STARTUPINFO); - - /* Compute length of the flattened 'argv'. for each arg: - * + 1 for the space - * + chars * 2 (accounting for possible escaping) - * + 2 for quotes - */ - cmdline_len = 1 + strlen(exePath)*2 + 2; - for (i=0; i < numArgs1; i++) { - cmdline_len += 1 + strlen(args1[i])*2 + 2; - } - for (i=0; i < numArgs2; i++) { - cmdline_len += 1 + strlen(args2[i])*2 + 2; - } - - new_cmdline = (char*)malloc(sizeof(char) * (cmdline_len + 1)); - if (!new_cmdline) { - die("failed to start up %s; insufficient memory", exePath); - } - - ptr = flattenAndQuoteArgs(new_cmdline, 1, &exePath); - ptr = flattenAndQuoteArgs(ptr, numArgs1, args1); - ptr = flattenAndQuoteArgs(ptr, numArgs2, args2); - *--ptr = '\0'; // replace the final space with \0 - - /* Note: Used to use _spawnv(_P_WAIT, ...) here, but it suffered - from the parent intercepting console events such as Ctrl-C, - which it shouldn't. Installing an ignore-all console handler - didn't do the trick either. - - Irrespective of this issue, using CreateProcess() is preferable, - as it makes this wrapper work on both mingw and cygwin. - */ -#if 0 - fprintf(stderr, "Invoking %s\n", new_cmdline); fflush(stderr); -#endif - if (!CreateProcess(exePath, - new_cmdline, - NULL, - NULL, - TRUE, - 0, /* dwCreationFlags */ - NULL, /* lpEnvironment */ - NULL, /* lpCurrentDirectory */ - &si, /* lpStartupInfo */ - &pi) ) { - die("Unable to start %s (error code: %lu)\n", exePath, GetLastError()); - } - - /* Synchronize input and wait for target to be ready. */ - WaitForInputIdle(pi.hProcess, INFINITE); - - /* If we have a registered callback then call it before we block. */ - if (callback) - callback(); - - switch (WaitForSingleObject(pi.hProcess, INFINITE) ) { - case WAIT_OBJECT_0: - { - DWORD pExitCode; - if (GetExitCodeProcess(pi.hProcess, &pExitCode) == 0) { - exit(1); - } - exit(pExitCode); - } - case WAIT_ABANDONED: - case WAIT_FAILED: - /* in the event we get any hard errors, bring the child to a halt. */ - TerminateProcess(pi.hProcess,1); - exit(1); - default: - exit(1); - } -} diff --git a/hadrian/bindist/cwrappers/cwrapper.h b/hadrian/bindist/cwrappers/cwrapper.h deleted file mode 100644 index 3e9ccd4fe5c7..000000000000 --- a/hadrian/bindist/cwrappers/cwrapper.h +++ /dev/null @@ -1,7 +0,0 @@ - -void die(const char *fmt, ...); -char *mkString(const char *fmt, ...); -typedef void (*runCallback)(void); -__attribute__((noreturn)) int run(char *exePath, int numArgs1, char **args1, - int numArgs2, char **args2, - runCallback callback); diff --git a/hadrian/bindist/cwrappers/getLocation.c b/hadrian/bindist/cwrappers/getLocation.c deleted file mode 100644 index fcbe1b940c2f..000000000000 --- a/hadrian/bindist/cwrappers/getLocation.c +++ /dev/null @@ -1,40 +0,0 @@ - -#include "getLocation.h" -#include -#include - -static void die(char *msg) { - fprintf(stderr, "%s", msg); - exit(1); -} - -char *getExecutable(void) { - char *p; - int i; - int r; - - i = 2048; /* plenty, PATH_MAX is 512 under Win32 */ - p = malloc(i); - if (p == NULL) { - die("Malloc failed\n"); - } - r = GetModuleFileNameA(NULL, p, i); - if (r == 0) { - die("getModuleFileName failed\n"); - } - return p; -} - -char *getExecutablePath(void) { - char *p; - char *f; - - p = getExecutable(); - f = strrchr(p, '\\'); - if (f == NULL) { - die("No '\\' in executable location\n"); - } - f[0] = '\0'; - return p; -} - diff --git a/hadrian/bindist/cwrappers/getLocation.h b/hadrian/bindist/cwrappers/getLocation.h deleted file mode 100644 index 689a4427adc6..000000000000 --- a/hadrian/bindist/cwrappers/getLocation.h +++ /dev/null @@ -1,4 +0,0 @@ - -char *getExecutable(void); -char *getExecutablePath(void); - diff --git a/hadrian/bindist/cwrappers/version-wrapper.c b/hadrian/bindist/cwrappers/version-wrapper.c deleted file mode 100644 index 335be4e9d084..000000000000 --- a/hadrian/bindist/cwrappers/version-wrapper.c +++ /dev/null @@ -1,30 +0,0 @@ - -#include "cwrapper.h" -#include "getLocation.h" -#include -#include - -/* In order for this console program to pass on full event processing to called - process we need to remove it from the current console. Since we want the - child to inherit the handles so redirection etc all work we need to detach - from the console after the child has been created. However we don't want to - detach from the console in non-interactive scenarios otherwise we'll hit - #13411 again. So we only detach when we're sure we need to, see #14150. */ -void ReleaseResource(void) { - FreeConsole(); -} - -int main(int argc, char** argv) { - char *binDir; - char *exePath; - - binDir = getExecutablePath(); - exePath = mkString("%s/%s", binDir, EXE_PATH); - - run(exePath, 0, NULL, argc - 1, argv + 1, -#if INTERACTIVE_PROCESS - ReleaseResource); -#else - NULL); -#endif -} diff --git a/hadrian/bootstrap/README.md b/hadrian/bootstrap/README.md deleted file mode 100644 index 6385b1b6930b..000000000000 --- a/hadrian/bootstrap/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Bootstrapping hadrian - -These scripts are originally from the cabal-install repo with a few -small tweaks. - -This utility allows you to build hadrian without cabal-install, which can be useful -for packagers. If you are a developer then build hadrian using cabal-install. - -If you want to bootstrap with ghc-8.10.5 then run the ./bootstrap script with the -`plan-bootstrap-8_10_5.json` file. - - bootstrap.py -w /path/to-ghc -d plan-bootstrap-8_10_5.json - -This default option will download the dependencies using the network. - -The result of the bootstrap script will be a hadrian binary in -`_build/bin/hadrian`. - -Alternatively, you can provide a tarball with the source of any dependencies. - - bootstrap.py -w /path/to-ghc -s sources-tarball.tar.gz - -Which dependencies you need can be queried using the `list-sources` option. - - bootstrap.py -w /path/to-ghc -d plan-bootstrap-8_10_5.json list-sources - -This produces `fetch_plan.json` which tells you where to get each source from. - -You can instruct the script to create the tarball using the `fetch` option. - - bootstrap.py -w /path/to-ghc -d plan-bootstrap-8_10_5.json fetch -o sources-tarball - -## Generating the bootstrap plans - -There is a script (using nix) which can be used to generate the bootstrap plans for the range -of supported GHC versions using nix. - - generate_bootstrap_plans - -Otherwise you can run the commands in ./generate_bootstrap_plans directly. - diff --git a/hadrian/bootstrap/bootstrap.py b/hadrian/bootstrap/bootstrap.py deleted file mode 100755 index 1e6d287f8519..000000000000 --- a/hadrian/bootstrap/bootstrap.py +++ /dev/null @@ -1,524 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -""" -bootstrap.py - bootstrapping utility for hadrian - -See bootstrap/README.md for usage instructions. -""" - -USAGE = """ -This utility is only intended for use in building hadrian -on a new platform. If you already have a functional cabal-install -please rather run `cabal build hadrian .`. or `./hadrian/build` -""" - -from enum import Enum -import hashlib -import json -from pathlib import Path -import platform -import shutil -import subprocess -import tempfile -import sys -from textwrap import dedent -from typing import Optional, Dict, List, Tuple, \ - NewType, BinaryIO, NamedTuple - -#logging.basicConfig(level=logging.INFO) - -BUILDDIR = Path('_build') - -BINDIR = BUILDDIR / 'bin' # binaries go there (--bindir) -DISTDIR = BUILDDIR / 'dists' # --builddir -UNPACKED = BUILDDIR / 'unpacked' # where we unpack final package tarballs -TARBALLS = BUILDDIR / 'tarballs' # where we download tarballs -PSEUDOSTORE = BUILDDIR / 'pseudostore' # where we install packages -ARTIFACTS = BUILDDIR / 'artifacts' # Where we put the archive -TMPDIR = BUILDDIR / 'tmp' # -PKG_DB = BUILDDIR / 'packages.conf' # package db - -PackageName = NewType('PackageName', str) -Version = NewType('Version', str) -SHA256Hash = NewType('SHA256Hash', str) - -class PackageSource(Enum): - HACKAGE = 'hackage' - LOCAL = 'local' - -url = str - -BuiltinDep = NamedTuple('BuiltinDep', [ - ('package', PackageName), - ('version', Version), -]) - -BootstrapDep = NamedTuple('BootstrapDep', [ - ('package', PackageName), - ('version', Version), - ('source', PackageSource), - # source tarball SHA256 - ('src_sha256', Optional[SHA256Hash]), - # `revision` is only valid when source == HACKAGE. - ('revision', Optional[int]), - ('cabal_sha256', Optional[SHA256Hash]), - ('flags', List[str]), - ('component', Optional[str]), -]) - -BootstrapInfo = NamedTuple('BootstrapInfo', [ - ('builtin', List[BuiltinDep]), - ('dependencies', List[BootstrapDep]), -]) - -FetchInfo = NamedTuple('FetchInfo', [ - ('url', url), - ('sha256', SHA256Hash) -]) - -FetchPlan = Dict[Path, FetchInfo] - -class Compiler: - def __init__(self, ghc_path: Path): - if not ghc_path.is_file(): - print(f'GHC {ghc_path} is not a file') - sys.exit(1) - - self.ghc_path = ghc_path.resolve() - - exe = '' - if platform.system() == 'Windows': exe = '.exe' - - info = self._get_ghc_info() - self.version = info['Project version'] - #self.lib_dir = Path(info['LibDir']) - #self.ghc_pkg_path = (self.lib_dir / 'bin' / 'ghc-pkg').resolve() - self.ghc_pkg_path = (self.ghc_path.parent / ('ghc-pkg' + exe)).resolve() - if not self.ghc_pkg_path.is_file(): - raise TypeError(f'ghc-pkg {self.ghc_pkg_path} is not a file') - self.hsc2hs_path = (self.ghc_path.parent / ('hsc2hs' + exe)).resolve() - if not self.hsc2hs_path.is_file(): - raise TypeError(f'hsc2hs {self.hsc2hs_path} is not a file') - - def _get_ghc_info(self) -> Dict[str,str]: - from ast import literal_eval - p = subprocess_run([self.ghc_path, '--info'], stdout=subprocess.PIPE, check=True, encoding='UTF-8') - out = p.stdout.replace('\n', '').strip() - return dict(literal_eval(out)) - -PackageSpec = Tuple[PackageName, Version] - -class BadTarball(Exception): - def __init__(self, path: Path, expected_sha256: SHA256Hash, found_sha256: SHA256Hash): - self.path = path - self.expected_sha256 = expected_sha256 - self.found_sha256 = found_sha256 - - def __str__(self): - return '\n'.join([ - f'Bad tarball hash: {str(self.path)}', - f' expected: {self.expected_sha256}', - f' found: {self.found_sha256}', - ]) - -def package_url(package: PackageName, version: Version) -> str: - return f'https://hackage.haskell.org/package/{package}-{version}/{package}-{version}.tar.gz' - -def package_cabal_url(package: PackageName, version: Version, revision: int) -> str: - return f'https://hackage.haskell.org/package/{package}-{version}/revision/{revision}.cabal' - - -def verify_sha256(expected_hash: SHA256Hash, f: Path): - print(f"Verifying {f}...") - h = hash_file(hashlib.sha256(), f.open('rb')) - if h != expected_hash: - raise BadTarball(f, expected_hash, h) - -def read_bootstrap_info(path: Path) -> BootstrapInfo: - obj = json.load(path.open()) - - def bi_from_json(o: dict) -> BuiltinDep: - return BuiltinDep(**o) - - def dep_from_json(o: dict) -> BootstrapDep: - o['source'] = PackageSource(o['source']) - return BootstrapDep(**o) - - builtin = [bi_from_json(dep) for dep in obj['builtin'] ] - deps = [dep_from_json(dep) for dep in obj['dependencies'] ] - - return BootstrapInfo(dependencies=deps, builtin=builtin) - -def check_builtin(dep: BuiltinDep, ghc: Compiler) -> None: - subprocess_run([str(ghc.ghc_pkg_path), 'describe', f'{dep.package}-{dep.version}'], - check=True, stdout=subprocess.DEVNULL) - print(f'Using {dep.package}-{dep.version} from GHC...') - return - -def resolve_dep(dep : BootstrapDep) -> Path: - if dep.source == PackageSource.HACKAGE: - - tarball = TARBALLS / f'{dep.package}-{dep.version}.tar.gz' - verify_sha256(dep.src_sha256, tarball) - - cabal_file = TARBALLS / f'{dep.package}.cabal' - verify_sha256(dep.cabal_sha256, cabal_file) - - UNPACKED.mkdir(parents=True, exist_ok=True) - shutil.unpack_archive(tarball.resolve(), UNPACKED, 'gztar') - - sdist_dir = UNPACKED / f'{dep.package}-{dep.version}' - - # Update cabal file with revision - if dep.revision is not None: - shutil.copyfile(cabal_file, sdist_dir / f'{dep.package}.cabal') - - elif dep.source == PackageSource.LOCAL: - if dep.package == 'hadrian': - sdist_dir = Path(sys.path[0]).parent.resolve() - elif dep.package == 'ghc-toolchain': - sdist_dir = Path(sys.path[0]).parent.parent.resolve() / f'utils' / f'ghc-toolchain' - elif dep.package == 'ghc-platform': - sdist_dir = Path(sys.path[0]).parent.parent.resolve() / f'libraries' / f'ghc-platform' - else: - raise ValueError(f'Unknown local package {dep.package}') - return sdist_dir - - -def install_dep(dep: BootstrapDep, ghc: Compiler) -> None: - dist_dir = (DISTDIR / f'{dep.package}-{dep.version}').resolve() - - sdist_dir = resolve_dep(dep) - - install_sdist(dist_dir, sdist_dir, ghc, dep.flags, dep.component) - -def install_sdist(dist_dir: Path, sdist_dir: Path, ghc: Compiler, flags: List[str], component): - prefix = PSEUDOSTORE.resolve() - flags_option = ' '.join(flags) - setup_dist_dir = dist_dir / 'setup' - setup = setup_dist_dir / 'Setup' - - build_args = [ - f'--builddir={dist_dir}', - ] - - configure_args = build_args + [ - f'--package-db={PKG_DB.resolve()}', - f'--prefix={prefix}', - f'--bindir={BINDIR.resolve()}', - f'--with-compiler={ghc.ghc_path}', - f'--extra-prog-path={BINDIR.resolve()}', - f'--with-hc-pkg={ghc.ghc_pkg_path}', - f'--with-hsc2hs={ghc.hsc2hs_path}', - f'--flags={flags_option}', - f'{component or ""}' - ] - - def check_call(args: List[str]) -> None: - subprocess_run(args, cwd=sdist_dir, check=True) - - setup_dist_dir.mkdir(parents=True, exist_ok=True) - - - setup_file = sdist_dir / 'Setup.hs' - if not setup_file.exists(): - with open(setup_file, 'w') as setup_out: - setup_out.write('import Distribution.Simple\nmain = defaultMain') - - # Note: we pass -i so GHC doesn't look for anything else - # This should be fine for cabal-install dependencies. - check_call([str(ghc.ghc_path), '--make', '-package-env=-', '-i', f'-odir={setup_dist_dir}', f'-hidir={setup_dist_dir}', '-o', setup, 'Setup']) - check_call([setup, 'configure'] + configure_args) - check_call([setup, 'build'] + build_args) - check_call([setup, 'install'] + build_args) - -def hash_file(h, f: BinaryIO) -> SHA256Hash: - while True: - d = f.read(1024) - if len(d) == 0: - return SHA256Hash(h.hexdigest()) - - h.update(d) - - -# Cabal plan.json representation -UnitId = NewType('UnitId', str) -PlanUnit = NewType('PlanUnit', dict) - -def bootstrap(info: BootstrapInfo, ghc: Compiler) -> None: - if not PKG_DB.exists(): - print(f'Creating package database {PKG_DB}') - PKG_DB.parent.mkdir(parents=True, exist_ok=True) - subprocess_run([ghc.ghc_pkg_path, 'init', PKG_DB]) - - for dep in info.builtin: - check_builtin(dep, ghc) - - for dep in info.dependencies: - install_dep(dep, ghc) - -# Steps -####################################################################### - -def linuxname(i, r): - i = i.strip() # id - r = r.strip() # release - if i == '': return 'linux' - else: return f"{i}-{r}".lower() - -def macname(macver): - # https://en.wikipedia.org/wiki/MacOS_version_history#Releases - if macver.startswith('10.12.'): return 'sierra' - if macver.startswith('10.13.'): return 'high-sierra' - if macver.startswith('10.14.'): return 'mojave' - if macver.startswith('10.15.'): return 'catalina' - if macver.startswith('11.0.'): return 'big-sur' - else: return macver - -def archive_name(version): - # Ask platform information - machine = platform.machine() - if machine == '': machine = "unknown" - - system = platform.system().lower() - if system == '': system = "unknown" - - version = system - if system == 'linux': - try: - i = subprocess_run(['lsb_release', '-si'], stdout=subprocess.PIPE, encoding='UTF-8') - r = subprocess_run(['lsb_release', '-sr'], stdout=subprocess.PIPE, encoding='UTF-8') - version = linuxname(i.stdout, r.stdout) - except: - try: - with open('/etc/alpine-release') as f: - alpinever = f.read().strip() - return f'alpine-{alpinever}' - except: - pass - elif system == 'darwin': - version = 'darwin-' + macname(platform.mac_ver()[0]) - elif system == 'freebsd': - version = 'freebsd-' + platform.release().lower() - - return f'hadrian-{version}-{machine}-{version}' - -def make_archive(hadrian_path): - - print('Creating distribution tarball') - - # Get bootstrapped hadrian version - # This also acts as smoke test - p = subprocess_run([hadrian_path, '--numeric-version'], stdout=subprocess.PIPE, check=True, encoding='UTF-8') - cabalversion = p.stdout.replace('\n', '').strip() - - # Archive name - basename = ARTIFACTS.resolve() / (archive_name(cabalversion) + '-bootstrapped') - - # In temporary directory, create a directory which we will archive - tmpdir = TMPDIR.resolve() - tmpdir.mkdir(parents=True, exist_ok=True) - - rootdir = Path(tempfile.mkdtemp(dir=tmpdir)) - shutil.copy(hadrian_path, rootdir / 'hadrian') - - # Make archive... - fmt = 'xztar' - if platform.system() == 'Windows': fmt = 'zip' - archivename = shutil.make_archive(basename, fmt, rootdir) - - return archivename - -def fetch_from_plan(plan : FetchPlan, output_dir : Path): - import urllib.request - - output_dir.resolve() - output_dir.mkdir(parents=True, exist_ok=True) - - for path in plan: - output_path = output_dir / path - url = plan[path].url - sha = plan[path].sha256 - if not output_path.exists(): - print(f'Fetching {url}...') - with urllib.request.urlopen(url) as resp: - shutil.copyfileobj(resp, output_path.open('wb')) - verify_sha256(sha, output_path) - -def gen_fetch_plan(info : BootstrapInfo) -> FetchPlan : - sources_dict = {} - for dep in info.dependencies: - if not dep.package in ['hadrian', 'ghc-platform', 'ghc-toolchain']: - sources_dict[f"{dep.package}-{dep.version}.tar.gz"] = FetchInfo(package_url(dep.package, dep.version), dep.src_sha256) - if dep.revision is not None: - sources_dict[f"{dep.package}.cabal"] = FetchInfo(package_cabal_url(dep.package, dep.version, dep.revision), dep.cabal_sha256) - return sources_dict - -def find_ghc(compiler) -> Compiler: - # Find compiler - if compiler is None: - path = shutil.which('ghc') - if path is None: - raise ValueError("Couldn't find ghc in PATH") - ghc = Compiler(Path(path)) - else: - ghc = Compiler(compiler) - return ghc - - -def main() -> None: - import argparse - parser = argparse.ArgumentParser( - description="bootstrapping utility for hadrian.", - epilog = USAGE, - formatter_class = argparse.RawDescriptionHelpFormatter) - parser.add_argument('-d', '--deps', type=Path, help='bootstrap dependency file (plan-bootstrap.json)') - parser.add_argument('-w', '--with-compiler', type=Path, - help='path to GHC') - parser.add_argument('-s', '--bootstrap-sources', type=Path, - help='Path to prefetched bootstrap sources tarball') - parser.add_argument('--archive', dest='want_archive', action='store_true', - help='produce a Hadrian distribution archive (default)') - parser.add_argument('--no-archive', dest='want_archive', action='store_false', - help='do not produce a Hadrian distribution archive') - parser.set_defaults(want_archive=True) - - subparsers = parser.add_subparsers(dest="command") - - parser_list = subparsers.add_parser('list-sources', help='list all sources required to download') - parser_list.add_argument('-o','--output', type=Path, default='fetch_plan.json') - - parser_fetch = subparsers.add_parser('fetch', help='fetch all required sources from hackage (for offline builds)') - parser_fetch.add_argument('-o','--output', type=Path, default='bootstrap-sources') - parser_fetch.add_argument('-p','--fetch-plan', type=Path, default=None, help="A json document that lists the urls required for download (optional)") - - args = parser.parse_args() - - ghc = None - - sources_fmt = 'gztar' # The archive format for the bootstrap sources archive. - if platform.system() == 'Windows': sources_fmt = 'zip' - - if args.deps is None: - if args.bootstrap_sources is None: - # find appropriate plan in the same directory as the script - ghc = find_ghc(args.with_compiler) - args.deps = Path(sys.path[0]) / f"plan-bootstrap-{ghc.version.replace('.','_')}.json" - print(f"defaulting bootstrap plan to {args.deps}") - # We have a tarball with all the required information, unpack it and use for further - elif args.bootstrap_sources is not None and args.command != 'list-sources': - print(f'Unpacking {args.bootstrap_sources} to {TARBALLS}') - shutil.unpack_archive(args.bootstrap_sources.resolve(), TARBALLS, sources_fmt) - args.deps = TARBALLS / 'plan-bootstrap.json' - print(f"using plan-bootstrap.json ({args.deps}) from {args.bootstrap_sources}") - else: - print("We need a bootstrap plan (plan-bootstrap.json) or a tarball containing bootstrap information") - print("Perhaps pick an appropriate one from: ") - for child in Path(sys.path[0]).iterdir: - if child.match('plan-bootstrap-*.json'): - print(child) - sys.exit(1) - info = read_bootstrap_info(args.deps) - - print(dedent(""" - DO NOT use this script if you have another recent cabal-install available. - This script is intended only for bootstrapping hadrian on new - architectures. - """)) - - - if(args.command == 'fetch'): - if args.fetch_plan is not None: - plan = { path : FetchInfo(p["url"],p["sha256"]) for path, p in json.load(args.fetch_plan.open()).items() } - else: - plan = gen_fetch_plan(info) - - if ghc is None: - ghc = find_ghc(args.with_compiler) - - # In temporary directory, create a directory which we will archive - tmpdir = TMPDIR.resolve() - tmpdir.mkdir(parents=True, exist_ok=True) - - rootdir = Path(tempfile.mkdtemp(dir=tmpdir)) - - fetch_from_plan(plan, rootdir) - - shutil.copyfile(args.deps, rootdir / 'plan-bootstrap.json') - - archivename = shutil.make_archive(args.output, sources_fmt, root_dir=rootdir) - - print(f""" -Bootstrap sources saved to {archivename} - -Use `bootstrap.py -w {ghc.ghc_path} -s {archivename}` to continue -""") - - elif(args.command == 'list-sources'): - ghc = find_ghc(args.with_compiler) - plan = gen_fetch_plan(info) - with open(args.output, 'w') as out: - json.dump({path : val._asdict() for path,val in plan.items()}, out) - print(f"Required hackage sources saved to {args.output}") - tarfmt= "\n./" - print(f""" -Download the files listed in {args.output}, copying {args.deps} to plan-bootstrap.json, and save them to a tarball ($TARBALL) - -The contents of $TARBALL should look like: - -./ -./plan-bootstrap.json -./{tarfmt.join(path for path in plan)} - -To generate $TARBALL, e.g. files in sources-tarball, `TARBALL=sources-tarball.tar.gz; pushd sources-tarball; tar -zcf ../$TARBALL .; popd` - -Then use `bootstrap.py -w {ghc.ghc_path} -s $TARBALL` to continue - -Alternatively, you could use `bootstrap.py -w {ghc.ghc_path} -d {args.deps} fetch -o sources-tarball` to download and generate the tarball, skipping this step -""") - - elif(args.command == None): - if ghc is None: - ghc = find_ghc(args.with_compiler) - - print(f'Bootstrapping hadrian with GHC {ghc.version} at {ghc.ghc_path}...') - - if args.bootstrap_sources is None: - plan = gen_fetch_plan(info) - fetch_from_plan(plan, TARBALLS) - - bootstrap(info, ghc) - hadrian_path = (BINDIR / 'hadrian').resolve() - - print(dedent(f''' - Bootstrapping finished! - - The resulting hadrian executable can be found at - - {hadrian_path} - ''')) - - if args.want_archive: - dist_archive = make_archive(hadrian_path) - print(dedent(f''' - The Hadrian executable has been archived for distribution in - - {dist_archive} - ''')) - else: - print(f"No such command: {args.command}") - -def subprocess_run(args, **kwargs): - "Like subprocess.run, but also print what we run" - - args_str = ' '.join(map(str, args)) - extras = '' - if 'cwd' in kwargs: - extras += f' cwd={kwargs["cwd"]}' - print(f'bootstrap: running{extras} {args_str}') - - return subprocess.run(args, **kwargs) - -if __name__ == '__main__': - main() diff --git a/hadrian/bootstrap/cabal.project b/hadrian/bootstrap/cabal.project deleted file mode 100644 index e6fdbadb4398..000000000000 --- a/hadrian/bootstrap/cabal.project +++ /dev/null @@ -1 +0,0 @@ -packages: . diff --git a/hadrian/bootstrap/generate_bootstrap_plans b/hadrian/bootstrap/generate_bootstrap_plans deleted file mode 100755 index a4e0521406ce..000000000000 --- a/hadrian/bootstrap/generate_bootstrap_plans +++ /dev/null @@ -1,27 +0,0 @@ -nix build nixpkgs#jq.bin -o jq -PATH+=:$PWD/jq-bin/bin - -ghcs_nix="https://gitlab.haskell.org/bgamari/ghcs-nix/-/archive/master/ghcs-nix-master.tar.gz" - -nix build -f "$ghcs_nix" ghc-8_10_7 -o boot_ghc -cabal build --with-ghc-pkg $PWD/boot_ghc/bin/ghc-pkg -w $PWD/boot_ghc/bin/ghc hadrian-bootstrap-gen - -run() { - local ver="$1" - local drv="ghc-$ver" - echo "$ver" - nix build -f "$ghcs_nix" $drv - (cd ../; rm -r dist-newstyle; cabal build --dry-run hadrian --flags=-selftest -w bootstrap/result/bin/ghc) - jq --sort-keys < ../dist-newstyle/cache/plan.json > "plan-$ver.json" - cabal run --with-ghc-pkg $PWD/boot_ghc/bin/ghc-pkg -w $PWD/boot_ghc/bin/ghc -v0 hadrian-bootstrap-gen -- "plan-$ver.json" | jq --sort-keys | tee "plan-bootstrap-$ver.json" -} - -run "9_6_1" -run "9_6_2" -run "9_6_3" -run "9_6_4" -run "9_6_5" -run "9_6_6" -run "9_8_1" -run "9_8_2" -run "9_10_1" diff --git a/hadrian/bootstrap/hadrian-bootstrap-gen.cabal b/hadrian/bootstrap/hadrian-bootstrap-gen.cabal deleted file mode 100644 index 9668f9ac118e..000000000000 --- a/hadrian/bootstrap/hadrian-bootstrap-gen.cabal +++ /dev/null @@ -1,20 +0,0 @@ -cabal-version: 2.2 -name: hadrian-bootstrap-gen -version: 0 - -executable hadrian-bootstrap-gen - default-language: Haskell2010 - hs-source-dirs: src - ghc-options: -Wall - main-is: Main.hs - build-depends: - , aeson ^>=1.5.2.0 - , base - , bytestring ^>=0.10.8.2 - , Cabal - , cabal-install-parsers ^>=0.4.0.1 - , cabal-plan ^>=0.7.0.0 - , containers ^>=0.6.0.1 - , text ^>=1.2.3.0 - , topograph ^>=1.0.0.1 - , transformers ^>=0.5.6.2 diff --git a/hadrian/bootstrap/plan-9_10_1.json b/hadrian/bootstrap/plan-9_10_1.json deleted file mode 100644 index 6fc140dea47d..000000000000 --- a/hadrian/bootstrap/plan-9_10_1.json +++ /dev/null @@ -1,1003 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.10.1", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-590dd583a0f0c19d913dd750210632bf720140eae30d52aecc4ad7d9d3809c77", - "array-0.5.7.0-20cf", - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "containers-0.7-ade3", - "deepseq-1.5.0.0-98b3", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "filepath-1.5.2.0-f8c0", - "mtl-2.3.1-2128", - "parsec-3.1.17.0-52f5", - "pretty-1.1.3.6-d2be", - "process-1.6.25.0-ecea6c62e7bf4fe21fc2978201fc7a82061d9f9a8731647475afa131595f2864", - "time-1.12.2-c1d3", - "transformers-0.6.1.1-f453", - "unix-2.8.5.1-57b1" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-8b561620c89f97d42e4279fde93eea6632703c23d3a17f7922fd755f965fda4e", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.7.0-20cf", - "base-4.20.0.0-7b2c", - "binary-0.8.9.2-1319", - "bytestring-0.12.1.0-3a9c", - "containers-0.7-ade3", - "deepseq-1.5.0.0-98b3", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "filepath-1.5.2.0-f8c0", - "mtl-2.3.1-2128", - "parsec-3.1.17.0-52f5", - "pretty-1.1.3.6-d2be", - "text-2.1.1-ffc6", - "time-1.12.2-c1d3", - "transformers-0.6.1.1-f453" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-9ebb0ea8b4355ae62affc7404447c75d5e4f3c05bb128ccbf22fda49ce869e61" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-590dd583a0f0c19d913dd750210632bf720140eae30d52aecc4ad7d9d3809c77", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.10.1/alex-3.5.1.0-e-alex-9ebb0ea8b4355ae62affc7404447c75d5e4f3c05bb128ccbf22fda49ce869e61/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.7.0-20cf", - "base-4.20.0.0-7b2c", - "containers-0.7-ade3", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-9ebb0ea8b4355ae62affc7404447c75d5e4f3c05bb128ccbf22fda49ce869e61", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.20.0.0-7b2c" - ], - "id": "array-0.5.7.0-20cf", - "pkg-name": "array", - "pkg-version": "0.5.7.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-internal-9.1001.0-59a1", - "ghc-prim-0.11.0-e678" - ], - "id": "base-4.20.0.0-7b2c", - "pkg-name": "base", - "pkg-version": "4.20.0.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-83340c2cdd2743bed16c3d861a49fc0d1b6a649957c80f293025834a6072dd7d", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.7.0-20cf", - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "containers-0.7-ade3" - ], - "id": "binary-0.8.9.2-1319", - "pkg-name": "binary", - "pkg-version": "0.8.9.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "deepseq-1.5.0.0-98b3", - "ghc-prim-0.11.0-e678", - "template-haskell-2.22.0.0-5d7d" - ], - "id": "bytestring-0.12.1.0-3a9c", - "pkg-name": "bytestring", - "pkg-version": "0.12.1.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-eb0ebbe55e474fb9e033017098f5e645eb60d91a974ed9850a52ed14211e031d", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.7.0-20cf", - "base-4.20.0.0-7b2c", - "deepseq-1.5.0.0-98b3", - "template-haskell-2.22.0.0-5d7d" - ], - "id": "containers-0.7-ade3", - "pkg-name": "containers", - "pkg-version": "0.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-d1b26335401f92f3f241b453d55c87def558f94feab6217c7635a9420c5914f3", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.7.0-20cf", - "base-4.20.0.0-7b2c", - "ghc-prim-0.11.0-e678" - ], - "id": "deepseq-1.5.0.0-98b3", - "pkg-name": "deepseq", - "pkg-version": "1.5.0.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.20.0.0-7b2c", - "file-io-0.1.4-8cc544a4146e33473f9ba145e69cb654330fa7f3ff71bddfe02dba07990ef0c5", - "filepath-1.5.2.0-f8c0", - "os-string-2.0.2-826a", - "time-1.12.2-c1d3", - "unix-2.8.5.1-57b1" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "mtl-2.3.1-2128", - "stm-2.5.3.1-77c0", - "template-haskell-2.22.0.0-5d7d", - "transformers-0.6.1.1-f453" - ], - "id": "exceptions-0.10.7-a467", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "clock-0.8.4-eb0ebbe55e474fb9e033017098f5e645eb60d91a974ed9850a52ed14211e031d", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "filepath-1.5.2.0-f8c0", - "process-1.6.25.0-ecea6c62e7bf4fe21fc2978201fc7a82061d9f9a8731647475afa131595f2864", - "time-1.12.2-c1d3", - "unix-2.8.5.1-57b1" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-cb6c050467cc498b1571036ebfbd5555c163239dd491258d962387607b25603b", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "deepseq-1.5.0.0-98b3", - "filepath-1.5.2.0-f8c0", - "os-string-2.0.2-826a", - "unix-2.8.5.1-57b1" - ], - "exe-depends": [], - "flags": { - "os-string": true - }, - "id": "file-io-0.1.4-8cc544a4146e33473f9ba145e69cb654330fa7f3ff71bddfe02dba07990ef0c5", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "deepseq-1.5.0.0-98b3", - "exceptions-0.10.7-a467", - "os-string-2.0.2-826a", - "template-haskell-2.22.0.0-5d7d" - ], - "id": "filepath-1.5.2.0-f8c0", - "pkg-name": "filepath", - "pkg-version": "1.5.2.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "extra-1.8-cb6c050467cc498b1571036ebfbd5555c163239dd491258d962387607b25603b", - "filepath-1.5.2.0-f8c0" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-09e94665047ac4427e871817b244483afea5cb8f2e55f8dd3390a8e0fa98b060", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.11.0-e678" - ], - "id": "ghc-bignum-1.3-8f32", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c" - ], - "id": "ghc-boot-th-9.10.1-47ce", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.10.1", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3-8f32", - "ghc-prim-0.11.0-e678", - "rts-1.0.2" - ], - "id": "ghc-internal-9.1001.0-59a1", - "pkg-name": "ghc-internal", - "pkg-version": "9.1001.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.10.1/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.10.1/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.11.0-e678", - "pkg-name": "ghc-prim", - "pkg-version": "0.11.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.10.1/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "filepath-1.5.2.0-f8c0", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-ecea6c62e7bf4fe21fc2978201fc7a82061d9f9a8731647475afa131595f2864", - "text-2.1.1-ffc6", - "transformers-0.6.1.1-f453" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.10.1/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-8b561620c89f97d42e4279fde93eea6632703c23d3a17f7922fd755f965fda4e", - "base-4.20.0.0-7b2c", - "base16-bytestring-1.0.2.0-83340c2cdd2743bed16c3d861a49fc0d1b6a649957c80f293025834a6072dd7d", - "bytestring-0.12.1.0-3a9c", - "containers-0.7-ade3", - "cryptohash-sha256-0.11.102.1-d1b26335401f92f3f241b453d55c87def558f94feab6217c7635a9420c5914f3", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "extra-1.8-cb6c050467cc498b1571036ebfbd5555c163239dd491258d962387607b25603b", - "filepath-1.5.2.0-f8c0", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1-2128", - "parsec-3.1.17.0-52f5", - "shake-0.19.8-7073ec3c15d4b66c49ab43582837d0f7fa5d3cb1e07988dc9f097cb8f99742fc", - "text-2.1.1-ffc6", - "time-1.12.2-c1d3", - "transformers-0.6.1.1-f453", - "unordered-containers-0.2.20-f9f2dfea02e9faf9ac0df4da6b8e0148b9527c4c093d3a2bc9c7c445a305c5ba" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "containers-0.7-ade3", - "deepseq-1.5.0.0-98b3", - "filepath-1.5.2.0-f8c0", - "ghc-bignum-1.3-8f32", - "ghc-prim-0.11.0-e678", - "os-string-2.0.2-826a", - "text-2.1.1-ffc6" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "random-initial-seed": false - }, - "id": "hashable-1.5.0.0-b2f74b10704fcbfe973a88eecc12782516ea858e1711ce9ec46125bfa18f0b95", - "pkg-cabal-sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "pkg-version": "1.5.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-36fbae0dc9049dccc5fb5a681382fa181100ef10af15bf3d15f2fc40898c8490", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-3c3fed6103967c819b31f63aae8921238e40798dd54f2aec305685f4b881e394", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-1a0b139cf8a57c1e82d6225f302914c8bbf1f957c907c072d67e2370c10877e1", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-e35e956ad80268a190027b77aeb788c06a6115235741c658474c938b65eb6a68", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "transformers-0.6.1.1-f453" - ], - "id": "mtl-2.3.1-2128", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "deepseq-1.5.0.0-98b3", - "exceptions-0.10.7-a467", - "template-haskell-2.22.0.0-5d7d" - ], - "id": "os-string-2.0.2-826a", - "pkg-name": "os-string", - "pkg-version": "2.0.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "mtl-2.3.1-2128", - "text-2.1.1-ffc6" - ], - "id": "parsec-3.1.17.0-52f5", - "pkg-name": "parsec", - "pkg-version": "3.1.17.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "deepseq-1.5.0.0-98b3", - "ghc-prim-0.11.0-e678" - ], - "id": "pretty-1.1.3.6-d2be", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "deepseq-1.5.0.0-98b3", - "template-haskell-2.22.0.0-5d7d", - "transformers-0.6.1.1-f453" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-2c92d1ca44b0cc32603506319e3d55ae8419ea9c9085e303712b78842ff37568", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.20.0.0-7b2c", - "deepseq-1.5.0.0-98b3", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "filepath-1.5.2.0-f8c0", - "unix-2.8.5.1-57b1" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-ecea6c62e7bf4fe21fc2978201fc7a82061d9f9a8731647475afa131595f2864", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "deepseq-1.5.0.0-98b3", - "mtl-2.3.1-2128", - "splitmix-0.1.0.5-4ced065090b17ea754bad5ec63307eb6ba94220b14c6032732a9b53c116c491b" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-f8203c099a9c9af4e9c067bb9a529afaac23f4529f31643c6e3f893af2b6b590", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "binary-0.8.9.2-1319", - "bytestring-0.12.1.0-3a9c", - "deepseq-1.5.0.0-98b3", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "extra-1.8-cb6c050467cc498b1571036ebfbd5555c163239dd491258d962387607b25603b", - "filepath-1.5.2.0-f8c0", - "filepattern-0.1.3-09e94665047ac4427e871817b244483afea5cb8f2e55f8dd3390a8e0fa98b060", - "hashable-1.5.0.0-b2f74b10704fcbfe973a88eecc12782516ea858e1711ce9ec46125bfa18f0b95", - "heaps-0.4-36fbae0dc9049dccc5fb5a681382fa181100ef10af15bf3d15f2fc40898c8490", - "js-dgtable-0.5.2-3c3fed6103967c819b31f63aae8921238e40798dd54f2aec305685f4b881e394", - "js-flot-0.8.3-1a0b139cf8a57c1e82d6225f302914c8bbf1f957c907c072d67e2370c10877e1", - "js-jquery-3.3.1-e35e956ad80268a190027b77aeb788c06a6115235741c658474c938b65eb6a68", - "primitive-0.9.0.0-2c92d1ca44b0cc32603506319e3d55ae8419ea9c9085e303712b78842ff37568", - "process-1.6.25.0-ecea6c62e7bf4fe21fc2978201fc7a82061d9f9a8731647475afa131595f2864", - "random-1.2.1.2-f8203c099a9c9af4e9c067bb9a529afaac23f4529f31643c6e3f893af2b6b590", - "time-1.12.2-c1d3", - "transformers-0.6.1.1-f453", - "unix-2.8.5.1-57b1", - "unordered-containers-0.2.20-f9f2dfea02e9faf9ac0df4da6b8e0148b9527c4c093d3a2bc9c7c445a305c5ba", - "utf8-string-1.0.2-c73d334d63e6fb96ad4b1c4f74165caa1d390a8f6bd48947dea29c79efb1ed97" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-7073ec3c15d4b66c49ab43582837d0f7fa5d3cb1e07988dc9f097cb8f99742fc", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.10.1/shake-0.19.8-e-shake-456db07f083b62e4dac4cdf818153551cf14ba38c07cad8c63cc2e2740a3d2df/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.20.0.0-7b2c", - "binary-0.8.9.2-1319", - "bytestring-0.12.1.0-3a9c", - "deepseq-1.5.0.0-98b3", - "directory-1.3.9.0-eecbe3031bb431ae9af052a932ac3b0367614718db2e385403f8957eb3470f8c", - "extra-1.8-cb6c050467cc498b1571036ebfbd5555c163239dd491258d962387607b25603b", - "filepath-1.5.2.0-f8c0", - "filepattern-0.1.3-09e94665047ac4427e871817b244483afea5cb8f2e55f8dd3390a8e0fa98b060", - "hashable-1.5.0.0-b2f74b10704fcbfe973a88eecc12782516ea858e1711ce9ec46125bfa18f0b95", - "heaps-0.4-36fbae0dc9049dccc5fb5a681382fa181100ef10af15bf3d15f2fc40898c8490", - "js-dgtable-0.5.2-3c3fed6103967c819b31f63aae8921238e40798dd54f2aec305685f4b881e394", - "js-flot-0.8.3-1a0b139cf8a57c1e82d6225f302914c8bbf1f957c907c072d67e2370c10877e1", - "js-jquery-3.3.1-e35e956ad80268a190027b77aeb788c06a6115235741c658474c938b65eb6a68", - "primitive-0.9.0.0-2c92d1ca44b0cc32603506319e3d55ae8419ea9c9085e303712b78842ff37568", - "process-1.6.25.0-ecea6c62e7bf4fe21fc2978201fc7a82061d9f9a8731647475afa131595f2864", - "random-1.2.1.2-f8203c099a9c9af4e9c067bb9a529afaac23f4529f31643c6e3f893af2b6b590", - "time-1.12.2-c1d3", - "transformers-0.6.1.1-f453", - "unix-2.8.5.1-57b1", - "unordered-containers-0.2.20-f9f2dfea02e9faf9ac0df4da6b8e0148b9527c4c093d3a2bc9c7c445a305c5ba", - "utf8-string-1.0.2-c73d334d63e6fb96ad4b1c4f74165caa1d390a8f6bd48947dea29c79efb1ed97" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-456db07f083b62e4dac4cdf818153551cf14ba38c07cad8c63cc2e2740a3d2df", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "deepseq-1.5.0.0-98b3" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-4ced065090b17ea754bad5ec63307eb6ba94220b14c6032732a9b53c116c491b", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.7.0-20cf", - "base-4.20.0.0-7b2c" - ], - "id": "stm-2.5.3.1-77c0", - "pkg-name": "stm", - "pkg-version": "2.5.3.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "ghc-boot-th-9.10.1-47ce", - "ghc-prim-0.11.0-e678", - "pretty-1.1.3.6-d2be" - ], - "id": "template-haskell-2.22.0.0-5d7d", - "pkg-name": "template-haskell", - "pkg-version": "2.22.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.7.0-20cf", - "base-4.20.0.0-7b2c", - "binary-0.8.9.2-1319", - "bytestring-0.12.1.0-3a9c", - "deepseq-1.5.0.0-98b3", - "ghc-prim-0.11.0-e678", - "template-haskell-2.22.0.0-5d7d" - ], - "id": "text-2.1.1-ffc6", - "pkg-name": "text", - "pkg-version": "2.1.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "deepseq-1.5.0.0-98b3" - ], - "id": "time-1.12.2-c1d3", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c" - ], - "id": "transformers-0.6.1.1-f453", - "pkg-name": "transformers", - "pkg-version": "0.6.1.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c", - "filepath-1.5.2.0-f8c0", - "os-string-2.0.2-826a", - "time-1.12.2-c1d3" - ], - "id": "unix-2.8.5.1-57b1", - "pkg-name": "unix", - "pkg-version": "2.8.5.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "deepseq-1.5.0.0-98b3", - "hashable-1.5.0.0-b2f74b10704fcbfe973a88eecc12782516ea858e1711ce9ec46125bfa18f0b95", - "template-haskell-2.22.0.0-5d7d" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-f9f2dfea02e9faf9ac0df4da6b8e0148b9527c4c093d3a2bc9c7c445a305c5ba", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.20.0.0-7b2c", - "bytestring-0.12.1.0-3a9c" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-c73d334d63e6fb96ad4b1c4f74165caa1d390a8f6bd48947dea29c79efb1ed97", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-9_6_1.json b/hadrian/bootstrap/plan-9_6_1.json deleted file mode 100644 index de0c3702db96..000000000000 --- a/hadrian/bootstrap/plan-9_6_1.json +++ /dev/null @@ -1,1040 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.6.1", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-5523b20632f044b43e63106331611f555914afa2043dbd93894833fc5d14da96", - "array-0.5.5.0", - "base-4.18.0.0", - "bytestring-0.11.4.0", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "process-1.6.25.0-57b14e1c15c763b3422eb94708f47d8fd4285e7d02bc7499866e6fac4bdeab7b", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-d91afa7abff070ea7c60d400380284db56ba5f8d52401503e98a91eae7f5e818" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-e9942672fffb300e1bb85870a11d2793d507e6ede934ce0ae99c25701cd6662d", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "binary-0.8.9.1", - "bytestring-0.11.4.0", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-0c93c330f5f045958abfd2c7ce3c6b58bc1a16489929e1dfea11ec20e4da91c5" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-5523b20632f044b43e63106331611f555914afa2043dbd93894833fc5d14da96", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.1/alex-3.5.1.0-e-alex-0c93c330f5f045958abfd2c7ce3c6b58bc1a16489929e1dfea11ec20e4da91c5/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "containers-0.6.7", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-0c93c330f5f045958abfd2c7ce3c6b58bc1a16489929e1dfea11ec20e4da91c5", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.0.0" - ], - "id": "array-0.5.5.0", - "pkg-name": "array", - "pkg-version": "0.5.5.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "rts-1.0.2" - ], - "id": "base-4.18.0.0", - "pkg-name": "base", - "pkg-version": "4.18.0.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-971d5ff54884beb5835a2358897cb589a22441f7be65455f6395c93e6bb17edc", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "bytestring-0.11.4.0", - "containers-0.6.7" - ], - "id": "binary-0.8.9.1", - "pkg-name": "binary", - "pkg-version": "0.8.9.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "bytestring-0.11.4.0", - "pkg-name": "bytestring", - "pkg-version": "0.11.4.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-2bec9957d58d4c282241eb219bcbd793ffe27f98733f5b9defae3df7e3149bf3", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0" - ], - "id": "containers-0.6.7", - "pkg-name": "containers", - "pkg-version": "0.6.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-84c1e11971fdef393a85b333f3986b6bf1f69ebe9a25a4d2205dde487faae287", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "ghc-prim-0.10.0" - ], - "id": "deepseq-1.4.8.1", - "pkg-name": "deepseq", - "pkg-version": "1.4.8.1", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.0.0", - "file-io-0.1.4-597746e783b63329e94aa6d1d4283ea85668ab179afdca59b4a16ef0a54e54cb", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "os-string-2.0.6-9644826edc049168992feeaf140b1a71890a47367e24028ad8aef47f60500667", - "time-1.12.2", - "unix-2.8.5.1-d91afa7abff070ea7c60d400380284db56ba5f8d52401503e98a91eae7f5e818" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.0.0", - "mtl-2.3.1", - "stm-2.5.1.0", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "id": "exceptions-0.10.7", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "clock-0.8.4-2bec9957d58d4c282241eb219bcbd793ffe27f98733f5b9defae3df7e3149bf3", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "process-1.6.25.0-57b14e1c15c763b3422eb94708f47d8fd4285e7d02bc7499866e6fac4bdeab7b", - "time-1.12.2", - "unix-2.8.5.1-d91afa7abff070ea7c60d400380284db56ba5f8d52401503e98a91eae7f5e818" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-a629b802f3a4529517b8d8096fe2aee5eb53e56965f6577c8b336dd9ace86f5a", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "os-string-2.0.6-9644826edc049168992feeaf140b1a71890a47367e24028ad8aef47f60500667", - "unix-2.8.5.1-d91afa7abff070ea7c60d400380284db56ba5f8d52401503e98a91eae7f5e818" - ], - "exe-depends": [], - "flags": { - "os-string": true - }, - "id": "file-io-0.1.4-597746e783b63329e94aa6d1d4283ea85668ab179afdca59b4a16ef0a54e54cb", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "os-string-2.0.6-9644826edc049168992feeaf140b1a71890a47367e24028ad8aef47f60500667", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "cpphs": false - }, - "id": "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "pkg-cabal-sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "pkg-name": "filepath", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "pkg-version": "1.5.3.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "extra-1.8-a629b802f3a4529517b8d8096fe2aee5eb53e56965f6577c8b336dd9ace86f5a", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-c0d41be5b55a3c10d18a9a5e0aab670279ba68597acd7bf5a2b076cf552da040", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.10.0" - ], - "id": "ghc-bignum-1.3", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0" - ], - "id": "ghc-boot-th-9.6.1", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.6.1", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.1/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.1/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.10.0", - "pkg-name": "ghc-prim", - "pkg-version": "0.10.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.1/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-57b14e1c15c763b3422eb94708f47d8fd4285e7d02bc7499866e6fac4bdeab7b", - "text-2.0.2", - "transformers-0.6.1.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.1/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.1/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.1/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-e9942672fffb300e1bb85870a11d2793d507e6ede934ce0ae99c25701cd6662d", - "base-4.18.0.0", - "base16-bytestring-1.0.2.0-971d5ff54884beb5835a2358897cb589a22441f7be65455f6395c93e6bb17edc", - "bytestring-0.11.4.0", - "containers-0.6.7", - "cryptohash-sha256-0.11.102.1-84c1e11971fdef393a85b333f3986b6bf1f69ebe9a25a4d2205dde487faae287", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "extra-1.8-a629b802f3a4529517b8d8096fe2aee5eb53e56965f6577c8b336dd9ace86f5a", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1", - "parsec-3.1.16.1", - "shake-0.19.8-d4b15a4d23e021b2e318298dddffcbfadb3186f4e3b31b026e0054f3be9ed80d", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0", - "unordered-containers-0.2.20-a6d83ceacc932922c1e64730df197207429cbf4816c817ed8e6d03daf9c56738" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.1/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "containers-0.6.7", - "deepseq-1.4.8.1", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "os-string-2.0.6-9644826edc049168992feeaf140b1a71890a47367e24028ad8aef47f60500667", - "text-2.0.2" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "integer-gmp": true, - "random-initial-seed": false - }, - "id": "hashable-1.4.7.0-d92566e1f7b59e8f6e22cf52747bc7f834630f040032cd41134e5f5064138e12", - "pkg-cabal-sha256": "573f3ab242f75465a0d67ce9d84202650a1606575e6dbd6d31ffcf4767a9a379", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "3baee4c9027a08830d148ec524cbc0471de645e1e8426d46780ef2758df0e8da", - "pkg-version": "1.4.7.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-10f2624500611555afade74ad717785794548522ca3c4d48770cd531fe5f8eba", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-7ce8fb7fece641f2cd721a04eb5ea28ab8a26f5f3ff409b435ba34cb07184112", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-e215d82ccc0417298463d200a374835a6107ea079f7b2060611380a66c62da30", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-e5eade452191e19509b9ef439520265727094a83232af42036fdcb97351784b9", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.0.0", - "transformers-0.6.1.0" - ], - "id": "mtl-2.3.1", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "os-string-2.0.6-9644826edc049168992feeaf140b1a71890a47367e24028ad8aef47f60500667", - "pkg-cabal-sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "pkg-name": "os-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "pkg-version": "2.0.6", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "mtl-2.3.1", - "text-2.0.2" - ], - "id": "parsec-3.1.16.1", - "pkg-name": "parsec", - "pkg-version": "3.1.16.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0" - ], - "id": "pretty-1.1.3.6", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-3f5087fa1b8870976de034cada87b18c3282d742b7a56ecabd3382e424c2be09", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "unix-2.8.5.1-d91afa7abff070ea7c60d400380284db56ba5f8d52401503e98a91eae7f5e818" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-57b14e1c15c763b3422eb94708f47d8fd4285e7d02bc7499866e6fac4bdeab7b", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "mtl-2.3.1", - "splitmix-0.1.0.5-d993b0650f00eab1e9908d3448fe2c042dd04369b30efedfaffe902474c44a7f" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-e176021bf55b58172efd7b4aa4c6039c485f4179c287f2e998d95c0c142d84f5", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "binary-0.8.9.1", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "extra-1.8-a629b802f3a4529517b8d8096fe2aee5eb53e56965f6577c8b336dd9ace86f5a", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "filepattern-0.1.3-c0d41be5b55a3c10d18a9a5e0aab670279ba68597acd7bf5a2b076cf552da040", - "hashable-1.4.7.0-d92566e1f7b59e8f6e22cf52747bc7f834630f040032cd41134e5f5064138e12", - "heaps-0.4-10f2624500611555afade74ad717785794548522ca3c4d48770cd531fe5f8eba", - "js-dgtable-0.5.2-7ce8fb7fece641f2cd721a04eb5ea28ab8a26f5f3ff409b435ba34cb07184112", - "js-flot-0.8.3-e215d82ccc0417298463d200a374835a6107ea079f7b2060611380a66c62da30", - "js-jquery-3.3.1-e5eade452191e19509b9ef439520265727094a83232af42036fdcb97351784b9", - "primitive-0.9.0.0-3f5087fa1b8870976de034cada87b18c3282d742b7a56ecabd3382e424c2be09", - "process-1.6.25.0-57b14e1c15c763b3422eb94708f47d8fd4285e7d02bc7499866e6fac4bdeab7b", - "random-1.2.1.2-e176021bf55b58172efd7b4aa4c6039c485f4179c287f2e998d95c0c142d84f5", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-d91afa7abff070ea7c60d400380284db56ba5f8d52401503e98a91eae7f5e818", - "unordered-containers-0.2.20-a6d83ceacc932922c1e64730df197207429cbf4816c817ed8e6d03daf9c56738", - "utf8-string-1.0.2-6092eddfb0b2a51d52facf183c51bde98f4dc3f93ec659df090c8efb8f8a32c4" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-d4b15a4d23e021b2e318298dddffcbfadb3186f4e3b31b026e0054f3be9ed80d", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.1/shake-0.19.8-e-shake-7f63f87ee2cd6f1f6bb4963591cb7f6de0430240f69d23347d56ba5fb56167e9/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.18.0.0", - "binary-0.8.9.1", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9588eeed474b05569e53c759e00af3912bc29d038d050f97f5e31e954474704f", - "extra-1.8-a629b802f3a4529517b8d8096fe2aee5eb53e56965f6577c8b336dd9ace86f5a", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "filepattern-0.1.3-c0d41be5b55a3c10d18a9a5e0aab670279ba68597acd7bf5a2b076cf552da040", - "hashable-1.4.7.0-d92566e1f7b59e8f6e22cf52747bc7f834630f040032cd41134e5f5064138e12", - "heaps-0.4-10f2624500611555afade74ad717785794548522ca3c4d48770cd531fe5f8eba", - "js-dgtable-0.5.2-7ce8fb7fece641f2cd721a04eb5ea28ab8a26f5f3ff409b435ba34cb07184112", - "js-flot-0.8.3-e215d82ccc0417298463d200a374835a6107ea079f7b2060611380a66c62da30", - "js-jquery-3.3.1-e5eade452191e19509b9ef439520265727094a83232af42036fdcb97351784b9", - "primitive-0.9.0.0-3f5087fa1b8870976de034cada87b18c3282d742b7a56ecabd3382e424c2be09", - "process-1.6.25.0-57b14e1c15c763b3422eb94708f47d8fd4285e7d02bc7499866e6fac4bdeab7b", - "random-1.2.1.2-e176021bf55b58172efd7b4aa4c6039c485f4179c287f2e998d95c0c142d84f5", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-d91afa7abff070ea7c60d400380284db56ba5f8d52401503e98a91eae7f5e818", - "unordered-containers-0.2.20-a6d83ceacc932922c1e64730df197207429cbf4816c817ed8e6d03daf9c56738", - "utf8-string-1.0.2-6092eddfb0b2a51d52facf183c51bde98f4dc3f93ec659df090c8efb8f8a32c4" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-7f63f87ee2cd6f1f6bb4963591cb7f6de0430240f69d23347d56ba5fb56167e9", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-d993b0650f00eab1e9908d3448fe2c042dd04369b30efedfaffe902474c44a7f", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0" - ], - "id": "stm-2.5.1.0", - "pkg-name": "stm", - "pkg-version": "2.5.1.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0", - "ghc-boot-th-9.6.1", - "ghc-prim-0.10.0", - "pretty-1.1.3.6" - ], - "id": "template-haskell-2.20.0.0", - "pkg-name": "template-haskell", - "pkg-version": "2.20.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "binary-0.8.9.1", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "text-2.0.2", - "pkg-name": "text", - "pkg-version": "2.0.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1" - ], - "id": "time-1.12.2", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0" - ], - "id": "transformers-0.6.1.0", - "pkg-name": "transformers", - "pkg-version": "0.6.1.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "filepath-1.5.3.0-23d45b45a4e24fc48fdd4cdd8c99b03bd0dd80bc3272677575d2d90cc574f945", - "os-string-2.0.6-9644826edc049168992feeaf140b1a71890a47367e24028ad8aef47f60500667", - "time-1.12.2" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "unix-2.8.5.1-d91afa7abff070ea7c60d400380284db56ba5f8d52401503e98a91eae7f5e818", - "pkg-cabal-sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "pkg-name": "unix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "pkg-version": "2.8.5.1", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "hashable-1.4.7.0-d92566e1f7b59e8f6e22cf52747bc7f834630f040032cd41134e5f5064138e12", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-a6d83ceacc932922c1e64730df197207429cbf4816c817ed8e6d03daf9c56738", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-6092eddfb0b2a51d52facf183c51bde98f4dc3f93ec659df090c8efb8f8a32c4", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-9_6_2.json b/hadrian/bootstrap/plan-9_6_2.json deleted file mode 100644 index a070c557c5ba..000000000000 --- a/hadrian/bootstrap/plan-9_6_2.json +++ /dev/null @@ -1,1040 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.6.2", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-73607a983e50618c4998e171442181ebf63d9b53bbafd31bf085387aad1fc125", - "array-0.5.5.0", - "base-4.18.0.0", - "bytestring-0.11.4.0", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "process-1.6.25.0-1ab882e9588db296108792cedc48843f5f94057ce11c3da31c3a71f4c1bf1c18", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-fe92044d6c08e76e643d41dfc0b109abb85bfcae102bb81db46b461e1b546099" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-ed6502ae707faba783d001952d12fdb973923ce9cd3f95ff711890b447eb66f0", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "binary-0.8.9.1", - "bytestring-0.11.4.0", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-c9d01dd13b63873923da173301b45c0f6d86d63003ddb1224fc79d33547eaba7" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-73607a983e50618c4998e171442181ebf63d9b53bbafd31bf085387aad1fc125", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.2/alex-3.5.1.0-e-alex-c9d01dd13b63873923da173301b45c0f6d86d63003ddb1224fc79d33547eaba7/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "containers-0.6.7", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-c9d01dd13b63873923da173301b45c0f6d86d63003ddb1224fc79d33547eaba7", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.0.0" - ], - "id": "array-0.5.5.0", - "pkg-name": "array", - "pkg-version": "0.5.5.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "rts-1.0.2" - ], - "id": "base-4.18.0.0", - "pkg-name": "base", - "pkg-version": "4.18.0.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-569208a2a7ecfb8045fc7fe7a279b09e9e2138a544778fbde65aa2d73bc34715", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "bytestring-0.11.4.0", - "containers-0.6.7" - ], - "id": "binary-0.8.9.1", - "pkg-name": "binary", - "pkg-version": "0.8.9.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "bytestring-0.11.4.0", - "pkg-name": "bytestring", - "pkg-version": "0.11.4.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-f11a9cde8b1906313259232faef6141f8392173f2efd92dd8157c9f880df4efd", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0" - ], - "id": "containers-0.6.7", - "pkg-name": "containers", - "pkg-version": "0.6.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-78afa9227c65296150d46ce62a0875ab82c774f0d4cb9a5e622bdbf91e28a84f", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "ghc-prim-0.10.0" - ], - "id": "deepseq-1.4.8.1", - "pkg-name": "deepseq", - "pkg-version": "1.4.8.1", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.0.0", - "file-io-0.1.4-73f7a323dccd98ab659194f58304dc084917b8c8af4d4817e6f43d5a00a1bbb9", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "os-string-2.0.6-12196dc0e11eb99995eefc57413e73b3e2346d6cf73bba9425cc57fb0f4da835", - "time-1.12.2", - "unix-2.8.5.1-fe92044d6c08e76e643d41dfc0b109abb85bfcae102bb81db46b461e1b546099" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.0.0", - "mtl-2.3.1", - "stm-2.5.1.0", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "id": "exceptions-0.10.7", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "clock-0.8.4-f11a9cde8b1906313259232faef6141f8392173f2efd92dd8157c9f880df4efd", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "process-1.6.25.0-1ab882e9588db296108792cedc48843f5f94057ce11c3da31c3a71f4c1bf1c18", - "time-1.12.2", - "unix-2.8.5.1-fe92044d6c08e76e643d41dfc0b109abb85bfcae102bb81db46b461e1b546099" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-e2fe8735807820ba25bf5e99e3f910619dfca1b89cc26236d06af22ade4acd36", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "os-string-2.0.6-12196dc0e11eb99995eefc57413e73b3e2346d6cf73bba9425cc57fb0f4da835", - "unix-2.8.5.1-fe92044d6c08e76e643d41dfc0b109abb85bfcae102bb81db46b461e1b546099" - ], - "exe-depends": [], - "flags": { - "os-string": true - }, - "id": "file-io-0.1.4-73f7a323dccd98ab659194f58304dc084917b8c8af4d4817e6f43d5a00a1bbb9", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "os-string-2.0.6-12196dc0e11eb99995eefc57413e73b3e2346d6cf73bba9425cc57fb0f4da835", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "cpphs": false - }, - "id": "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "pkg-cabal-sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "pkg-name": "filepath", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "pkg-version": "1.5.3.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "extra-1.8-e2fe8735807820ba25bf5e99e3f910619dfca1b89cc26236d06af22ade4acd36", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-fbec107ac9870f8c483bd0ea7997f553425748e5c2179e99e5190dc26b7ef6af", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.10.0" - ], - "id": "ghc-bignum-1.3", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0" - ], - "id": "ghc-boot-th-9.6.2", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.6.2", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.2/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.2/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.10.0", - "pkg-name": "ghc-prim", - "pkg-version": "0.10.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.2/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-1ab882e9588db296108792cedc48843f5f94057ce11c3da31c3a71f4c1bf1c18", - "text-2.0.2", - "transformers-0.6.1.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.2/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.2/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.2/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-ed6502ae707faba783d001952d12fdb973923ce9cd3f95ff711890b447eb66f0", - "base-4.18.0.0", - "base16-bytestring-1.0.2.0-569208a2a7ecfb8045fc7fe7a279b09e9e2138a544778fbde65aa2d73bc34715", - "bytestring-0.11.4.0", - "containers-0.6.7", - "cryptohash-sha256-0.11.102.1-78afa9227c65296150d46ce62a0875ab82c774f0d4cb9a5e622bdbf91e28a84f", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "extra-1.8-e2fe8735807820ba25bf5e99e3f910619dfca1b89cc26236d06af22ade4acd36", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1", - "parsec-3.1.16.1", - "shake-0.19.8-9ac303f8c296b6b39a6094d6f269426dbf5fb2e48d0c0a417a6a1f46ba4d92d1", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0", - "unordered-containers-0.2.20-66e5541d8e974fa039b3f000611dcabeed6f6236772d6fde6c97c1cd18ab1062" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.2/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "containers-0.6.7", - "deepseq-1.4.8.1", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "os-string-2.0.6-12196dc0e11eb99995eefc57413e73b3e2346d6cf73bba9425cc57fb0f4da835", - "text-2.0.2" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "integer-gmp": true, - "random-initial-seed": false - }, - "id": "hashable-1.4.7.0-0f32b6df54b10f49e8311349216bcbed08675dd58b649f190298c5ce9e40712b", - "pkg-cabal-sha256": "573f3ab242f75465a0d67ce9d84202650a1606575e6dbd6d31ffcf4767a9a379", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "3baee4c9027a08830d148ec524cbc0471de645e1e8426d46780ef2758df0e8da", - "pkg-version": "1.4.7.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-27096567797e3a574c44460042cb2f50e139dd1a546ded5f74c952428ad3f35c", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-1ac2b22f85041d7018715bf4897e7a4fea0d639fb8ec1212a2c117736237d48d", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-7b7c9f9460227f957116aa58624dffbad2d5e4b80aaa6afc53c6455a85910c59", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-2e9b26a4f15f4cf0968cb5882f434b5e526d0bf9bc876bca28cca1290522ecdd", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.0.0", - "transformers-0.6.1.0" - ], - "id": "mtl-2.3.1", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "os-string-2.0.6-12196dc0e11eb99995eefc57413e73b3e2346d6cf73bba9425cc57fb0f4da835", - "pkg-cabal-sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "pkg-name": "os-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "pkg-version": "2.0.6", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "mtl-2.3.1", - "text-2.0.2" - ], - "id": "parsec-3.1.16.1", - "pkg-name": "parsec", - "pkg-version": "3.1.16.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0" - ], - "id": "pretty-1.1.3.6", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-6cb4f9751d6d10b31e96c774909a065f4ec4dd9d812b8090a58347a66ca58e50", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "unix-2.8.5.1-fe92044d6c08e76e643d41dfc0b109abb85bfcae102bb81db46b461e1b546099" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-1ab882e9588db296108792cedc48843f5f94057ce11c3da31c3a71f4c1bf1c18", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "mtl-2.3.1", - "splitmix-0.1.0.5-3307f57315e4bd816df89f2f34b54a4f48e0361adc7c66ab1cd559576b25ed30" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-4e8d6f842ce23a697f1d3b25c20e8561ffc5ddf7823235026f703d84261b4fbc", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "binary-0.8.9.1", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "extra-1.8-e2fe8735807820ba25bf5e99e3f910619dfca1b89cc26236d06af22ade4acd36", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "filepattern-0.1.3-fbec107ac9870f8c483bd0ea7997f553425748e5c2179e99e5190dc26b7ef6af", - "hashable-1.4.7.0-0f32b6df54b10f49e8311349216bcbed08675dd58b649f190298c5ce9e40712b", - "heaps-0.4-27096567797e3a574c44460042cb2f50e139dd1a546ded5f74c952428ad3f35c", - "js-dgtable-0.5.2-1ac2b22f85041d7018715bf4897e7a4fea0d639fb8ec1212a2c117736237d48d", - "js-flot-0.8.3-7b7c9f9460227f957116aa58624dffbad2d5e4b80aaa6afc53c6455a85910c59", - "js-jquery-3.3.1-2e9b26a4f15f4cf0968cb5882f434b5e526d0bf9bc876bca28cca1290522ecdd", - "primitive-0.9.0.0-6cb4f9751d6d10b31e96c774909a065f4ec4dd9d812b8090a58347a66ca58e50", - "process-1.6.25.0-1ab882e9588db296108792cedc48843f5f94057ce11c3da31c3a71f4c1bf1c18", - "random-1.2.1.2-4e8d6f842ce23a697f1d3b25c20e8561ffc5ddf7823235026f703d84261b4fbc", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-fe92044d6c08e76e643d41dfc0b109abb85bfcae102bb81db46b461e1b546099", - "unordered-containers-0.2.20-66e5541d8e974fa039b3f000611dcabeed6f6236772d6fde6c97c1cd18ab1062", - "utf8-string-1.0.2-ea45f454b717d3ce40da789187f7556e0108f666e268b9cb7fa268cf58000976" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-9ac303f8c296b6b39a6094d6f269426dbf5fb2e48d0c0a417a6a1f46ba4d92d1", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.2/shake-0.19.8-e-shake-b8cd2992af7dcbba589d4c28e926623afc966dfc046706c24b1911092c7ea031/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.18.0.0", - "binary-0.8.9.1", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "directory-1.3.9.0-f47d033a9c8715aca2ff03b448aec4c58f1dd37e51cbb90ea679de6665e809bc", - "extra-1.8-e2fe8735807820ba25bf5e99e3f910619dfca1b89cc26236d06af22ade4acd36", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "filepattern-0.1.3-fbec107ac9870f8c483bd0ea7997f553425748e5c2179e99e5190dc26b7ef6af", - "hashable-1.4.7.0-0f32b6df54b10f49e8311349216bcbed08675dd58b649f190298c5ce9e40712b", - "heaps-0.4-27096567797e3a574c44460042cb2f50e139dd1a546ded5f74c952428ad3f35c", - "js-dgtable-0.5.2-1ac2b22f85041d7018715bf4897e7a4fea0d639fb8ec1212a2c117736237d48d", - "js-flot-0.8.3-7b7c9f9460227f957116aa58624dffbad2d5e4b80aaa6afc53c6455a85910c59", - "js-jquery-3.3.1-2e9b26a4f15f4cf0968cb5882f434b5e526d0bf9bc876bca28cca1290522ecdd", - "primitive-0.9.0.0-6cb4f9751d6d10b31e96c774909a065f4ec4dd9d812b8090a58347a66ca58e50", - "process-1.6.25.0-1ab882e9588db296108792cedc48843f5f94057ce11c3da31c3a71f4c1bf1c18", - "random-1.2.1.2-4e8d6f842ce23a697f1d3b25c20e8561ffc5ddf7823235026f703d84261b4fbc", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-fe92044d6c08e76e643d41dfc0b109abb85bfcae102bb81db46b461e1b546099", - "unordered-containers-0.2.20-66e5541d8e974fa039b3f000611dcabeed6f6236772d6fde6c97c1cd18ab1062", - "utf8-string-1.0.2-ea45f454b717d3ce40da789187f7556e0108f666e268b9cb7fa268cf58000976" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-b8cd2992af7dcbba589d4c28e926623afc966dfc046706c24b1911092c7ea031", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-3307f57315e4bd816df89f2f34b54a4f48e0361adc7c66ab1cd559576b25ed30", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0" - ], - "id": "stm-2.5.1.0", - "pkg-name": "stm", - "pkg-version": "2.5.1.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0", - "ghc-boot-th-9.6.2", - "ghc-prim-0.10.0", - "pretty-1.1.3.6" - ], - "id": "template-haskell-2.20.0.0", - "pkg-name": "template-haskell", - "pkg-version": "2.20.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.0.0", - "binary-0.8.9.1", - "bytestring-0.11.4.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "text-2.0.2", - "pkg-name": "text", - "pkg-version": "2.0.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1" - ], - "id": "time-1.12.2", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.0.0" - ], - "id": "transformers-0.6.1.0", - "pkg-name": "transformers", - "pkg-version": "0.6.1.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0", - "filepath-1.5.3.0-2291337763d01acf90956a374fb464f997c60659ec648e65c2665fb66214980e", - "os-string-2.0.6-12196dc0e11eb99995eefc57413e73b3e2346d6cf73bba9425cc57fb0f4da835", - "time-1.12.2" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "unix-2.8.5.1-fe92044d6c08e76e643d41dfc0b109abb85bfcae102bb81db46b461e1b546099", - "pkg-cabal-sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "pkg-name": "unix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "pkg-version": "2.8.5.1", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "deepseq-1.4.8.1", - "hashable-1.4.7.0-0f32b6df54b10f49e8311349216bcbed08675dd58b649f190298c5ce9e40712b", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-66e5541d8e974fa039b3f000611dcabeed6f6236772d6fde6c97c1cd18ab1062", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.0.0", - "bytestring-0.11.4.0" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-ea45f454b717d3ce40da789187f7556e0108f666e268b9cb7fa268cf58000976", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-9_6_3.json b/hadrian/bootstrap/plan-9_6_3.json deleted file mode 100644 index dcc226ee6eb1..000000000000 --- a/hadrian/bootstrap/plan-9_6_3.json +++ /dev/null @@ -1,1040 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.6.3", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-802120a9b79f794bd6ad207b8b78034730c995cad70546b5f56da134f9535233", - "array-0.5.5.0", - "base-4.18.1.0", - "bytestring-0.11.5.2", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "process-1.6.25.0-fc04a312692fedc50a172d6192170ec4a633510b6c1c2bab100f18a912e680d1", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-bd52833566057036e5ff07d2a69cd3920b3b3f2cb2ae0b68102981056c709a38" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-89bf003b3abefa1f08a62db2d81d5f2e56837af7aa871060e210d18ef0739edc", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.5.0", - "base-4.18.1.0", - "binary-0.8.9.1", - "bytestring-0.11.5.2", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-ae9cccb4f918f7e8dfe7c45405b32a3ab29ae7be533ec2d834f7c5ea9e10e89b" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-802120a9b79f794bd6ad207b8b78034730c995cad70546b5f56da134f9535233", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.3/alex-3.5.1.0-e-alex-ae9cccb4f918f7e8dfe7c45405b32a3ab29ae7be533ec2d834f7c5ea9e10e89b/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.5.0", - "base-4.18.1.0", - "containers-0.6.7", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-ae9cccb4f918f7e8dfe7c45405b32a3ab29ae7be533ec2d834f7c5ea9e10e89b", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.1.0" - ], - "id": "array-0.5.5.0", - "pkg-name": "array", - "pkg-version": "0.5.5.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "rts-1.0.2" - ], - "id": "base-4.18.1.0", - "pkg-name": "base", - "pkg-version": "4.18.1.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-c6feac38708b67c973b5b79156b4c4012a012998a1702a07a50e96453c61466e", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.1.0", - "bytestring-0.11.5.2", - "containers-0.6.7" - ], - "id": "binary-0.8.9.1", - "pkg-name": "binary", - "pkg-version": "0.8.9.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.1.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "bytestring-0.11.5.2", - "pkg-name": "bytestring", - "pkg-version": "0.11.5.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-efb72c65d724b193982a03a7b4b7df236b38612b806623fcec9a65ebdefbb839", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.1.0", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0" - ], - "id": "containers-0.6.7", - "pkg-name": "containers", - "pkg-version": "0.6.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-09a738abb9fdefd8e75449dceffb485e7430924b1bb94d09d5c8505e7aee7298", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.1.0", - "ghc-prim-0.10.0" - ], - "id": "deepseq-1.4.8.1", - "pkg-name": "deepseq", - "pkg-version": "1.4.8.1", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.1.0", - "file-io-0.1.4-4edc7c9854f334886e610da03bd06297953d2a9387d815f655ea47ec60472833", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "os-string-2.0.6-7d3a79ff5431d4a0793adf512a13b1167460fbe533e55f6de0cf820e965bd641", - "time-1.12.2", - "unix-2.8.5.1-bd52833566057036e5ff07d2a69cd3920b3b3f2cb2ae0b68102981056c709a38" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.1.0", - "mtl-2.3.1", - "stm-2.5.1.0", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "id": "exceptions-0.10.7", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "clock-0.8.4-efb72c65d724b193982a03a7b4b7df236b38612b806623fcec9a65ebdefbb839", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "process-1.6.25.0-fc04a312692fedc50a172d6192170ec4a633510b6c1c2bab100f18a912e680d1", - "time-1.12.2", - "unix-2.8.5.1-bd52833566057036e5ff07d2a69cd3920b3b3f2cb2ae0b68102981056c709a38" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-470def05bf77ddac1e83d0f96cf6a6acba468c8b2c89a8da642a66ef7b9b5aea", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2", - "deepseq-1.4.8.1", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "os-string-2.0.6-7d3a79ff5431d4a0793adf512a13b1167460fbe533e55f6de0cf820e965bd641", - "unix-2.8.5.1-bd52833566057036e5ff07d2a69cd3920b3b3f2cb2ae0b68102981056c709a38" - ], - "exe-depends": [], - "flags": { - "os-string": true - }, - "id": "file-io-0.1.4-4edc7c9854f334886e610da03bd06297953d2a9387d815f655ea47ec60472833", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "os-string-2.0.6-7d3a79ff5431d4a0793adf512a13b1167460fbe533e55f6de0cf820e965bd641", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "cpphs": false - }, - "id": "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "pkg-cabal-sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "pkg-name": "filepath", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "pkg-version": "1.5.3.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "extra-1.8-470def05bf77ddac1e83d0f96cf6a6acba468c8b2c89a8da642a66ef7b9b5aea", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-5c7503a6e1a58674131f113c4df11c2dfff3d9090229f9b20965a155e74e01e5", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.10.0" - ], - "id": "ghc-bignum-1.3", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.1.0" - ], - "id": "ghc-boot-th-9.6.3", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.6.3", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.3/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.1.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.3/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.10.0", - "pkg-name": "ghc-prim", - "pkg-version": "0.10.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.3/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-fc04a312692fedc50a172d6192170ec4a633510b6c1c2bab100f18a912e680d1", - "text-2.0.2", - "transformers-0.6.1.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.3/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.3/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.3/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-89bf003b3abefa1f08a62db2d81d5f2e56837af7aa871060e210d18ef0739edc", - "base-4.18.1.0", - "base16-bytestring-1.0.2.0-c6feac38708b67c973b5b79156b4c4012a012998a1702a07a50e96453c61466e", - "bytestring-0.11.5.2", - "containers-0.6.7", - "cryptohash-sha256-0.11.102.1-09a738abb9fdefd8e75449dceffb485e7430924b1bb94d09d5c8505e7aee7298", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "extra-1.8-470def05bf77ddac1e83d0f96cf6a6acba468c8b2c89a8da642a66ef7b9b5aea", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1", - "parsec-3.1.16.1", - "shake-0.19.8-b48f9219aea1af5212f6c49378e958ceec17b1ac193260d2d26f3a46803b0778", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0", - "unordered-containers-0.2.20-d0db237b38c0ca5cf61db54c12fbf86e3ab181365b559a8433893242182fbe13" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.3/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2", - "containers-0.6.7", - "deepseq-1.4.8.1", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "os-string-2.0.6-7d3a79ff5431d4a0793adf512a13b1167460fbe533e55f6de0cf820e965bd641", - "text-2.0.2" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "integer-gmp": true, - "random-initial-seed": false - }, - "id": "hashable-1.4.7.0-c6fe63b8e799b6945007dd039a3dbed00fdd3a777c0a5b732556bbf7a1e24197", - "pkg-cabal-sha256": "573f3ab242f75465a0d67ce9d84202650a1606575e6dbd6d31ffcf4767a9a379", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "3baee4c9027a08830d148ec524cbc0471de645e1e8426d46780ef2758df0e8da", - "pkg-version": "1.4.7.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-306bf0b334e752fcfa1cee4fcb5e96873d2bbe70d4adf25a27e63e51e7a7c78d", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-f1410094bf8ebc6046d688e5a9c209b12f01f77f7199dcdb239054e38e647b2a", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-82b3fdcda1c968a819d98986fccd25796c9bb652009a1c8d4485fddc21d8b67c", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-6ccf83e1fcf35c10538d7b078b50f0a24e35d3c2f59f4b3dc986e97623cd3fa7", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.1.0", - "transformers-0.6.1.0" - ], - "id": "mtl-2.3.1", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "os-string-2.0.6-7d3a79ff5431d4a0793adf512a13b1167460fbe533e55f6de0cf820e965bd641", - "pkg-cabal-sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "pkg-name": "os-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "pkg-version": "2.0.6", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2", - "mtl-2.3.1", - "text-2.0.2" - ], - "id": "parsec-3.1.16.1", - "pkg-name": "parsec", - "pkg-version": "3.1.16.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.1.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0" - ], - "id": "pretty-1.1.3.6", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-bc0c2448b8440c60b61e99817f56f8a29c732474dcb3b3eb6e60b5205ec26866", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.1.0", - "deepseq-1.4.8.1", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "unix-2.8.5.1-bd52833566057036e5ff07d2a69cd3920b3b3f2cb2ae0b68102981056c709a38" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-fc04a312692fedc50a172d6192170ec4a633510b6c1c2bab100f18a912e680d1", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2", - "deepseq-1.4.8.1", - "mtl-2.3.1", - "splitmix-0.1.0.5-123b3f2acdfb5a81ee1a575c9b58f6a55b4d6eee1964abdbfbbc245336e33873" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-d21f8dc89e5e375f7ede7a3d6cf66aed822c1ff4db53e7ff85480216ef553814", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "binary-0.8.9.1", - "bytestring-0.11.5.2", - "deepseq-1.4.8.1", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "extra-1.8-470def05bf77ddac1e83d0f96cf6a6acba468c8b2c89a8da642a66ef7b9b5aea", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "filepattern-0.1.3-5c7503a6e1a58674131f113c4df11c2dfff3d9090229f9b20965a155e74e01e5", - "hashable-1.4.7.0-c6fe63b8e799b6945007dd039a3dbed00fdd3a777c0a5b732556bbf7a1e24197", - "heaps-0.4-306bf0b334e752fcfa1cee4fcb5e96873d2bbe70d4adf25a27e63e51e7a7c78d", - "js-dgtable-0.5.2-f1410094bf8ebc6046d688e5a9c209b12f01f77f7199dcdb239054e38e647b2a", - "js-flot-0.8.3-82b3fdcda1c968a819d98986fccd25796c9bb652009a1c8d4485fddc21d8b67c", - "js-jquery-3.3.1-6ccf83e1fcf35c10538d7b078b50f0a24e35d3c2f59f4b3dc986e97623cd3fa7", - "primitive-0.9.0.0-bc0c2448b8440c60b61e99817f56f8a29c732474dcb3b3eb6e60b5205ec26866", - "process-1.6.25.0-fc04a312692fedc50a172d6192170ec4a633510b6c1c2bab100f18a912e680d1", - "random-1.2.1.2-d21f8dc89e5e375f7ede7a3d6cf66aed822c1ff4db53e7ff85480216ef553814", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-bd52833566057036e5ff07d2a69cd3920b3b3f2cb2ae0b68102981056c709a38", - "unordered-containers-0.2.20-d0db237b38c0ca5cf61db54c12fbf86e3ab181365b559a8433893242182fbe13", - "utf8-string-1.0.2-bcba86e78380da694af9dd450a5a586805efe406278cb1aed67b0030404278cb" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-b48f9219aea1af5212f6c49378e958ceec17b1ac193260d2d26f3a46803b0778", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.3/shake-0.19.8-e-shake-8b755338b4487af129e51c3534ecee806997f0f4f3657a5aeb9e1f167d32562c/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.18.1.0", - "binary-0.8.9.1", - "bytestring-0.11.5.2", - "deepseq-1.4.8.1", - "directory-1.3.9.0-552b364a2773bca4847b229c5702e112c202d7fc892944a2f32395efe5dfa7f0", - "extra-1.8-470def05bf77ddac1e83d0f96cf6a6acba468c8b2c89a8da642a66ef7b9b5aea", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "filepattern-0.1.3-5c7503a6e1a58674131f113c4df11c2dfff3d9090229f9b20965a155e74e01e5", - "hashable-1.4.7.0-c6fe63b8e799b6945007dd039a3dbed00fdd3a777c0a5b732556bbf7a1e24197", - "heaps-0.4-306bf0b334e752fcfa1cee4fcb5e96873d2bbe70d4adf25a27e63e51e7a7c78d", - "js-dgtable-0.5.2-f1410094bf8ebc6046d688e5a9c209b12f01f77f7199dcdb239054e38e647b2a", - "js-flot-0.8.3-82b3fdcda1c968a819d98986fccd25796c9bb652009a1c8d4485fddc21d8b67c", - "js-jquery-3.3.1-6ccf83e1fcf35c10538d7b078b50f0a24e35d3c2f59f4b3dc986e97623cd3fa7", - "primitive-0.9.0.0-bc0c2448b8440c60b61e99817f56f8a29c732474dcb3b3eb6e60b5205ec26866", - "process-1.6.25.0-fc04a312692fedc50a172d6192170ec4a633510b6c1c2bab100f18a912e680d1", - "random-1.2.1.2-d21f8dc89e5e375f7ede7a3d6cf66aed822c1ff4db53e7ff85480216ef553814", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-bd52833566057036e5ff07d2a69cd3920b3b3f2cb2ae0b68102981056c709a38", - "unordered-containers-0.2.20-d0db237b38c0ca5cf61db54c12fbf86e3ab181365b559a8433893242182fbe13", - "utf8-string-1.0.2-bcba86e78380da694af9dd450a5a586805efe406278cb1aed67b0030404278cb" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-8b755338b4487af129e51c3534ecee806997f0f4f3657a5aeb9e1f167d32562c", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "deepseq-1.4.8.1" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-123b3f2acdfb5a81ee1a575c9b58f6a55b4d6eee1964abdbfbbc245336e33873", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.1.0" - ], - "id": "stm-2.5.1.0", - "pkg-name": "stm", - "pkg-version": "2.5.1.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.1.0", - "ghc-boot-th-9.6.3", - "ghc-prim-0.10.0", - "pretty-1.1.3.6" - ], - "id": "template-haskell-2.20.0.0", - "pkg-name": "template-haskell", - "pkg-version": "2.20.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.5.0", - "base-4.18.1.0", - "binary-0.8.9.1", - "bytestring-0.11.5.2", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "text-2.0.2", - "pkg-name": "text", - "pkg-version": "2.0.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.1.0", - "deepseq-1.4.8.1" - ], - "id": "time-1.12.2", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.1.0" - ], - "id": "transformers-0.6.1.0", - "pkg-name": "transformers", - "pkg-version": "0.6.1.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2", - "filepath-1.5.3.0-152b6f0c7d72eaf38e486f4527f6db24eadc6976206c55735c2b47be6f758f8c", - "os-string-2.0.6-7d3a79ff5431d4a0793adf512a13b1167460fbe533e55f6de0cf820e965bd641", - "time-1.12.2" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "unix-2.8.5.1-bd52833566057036e5ff07d2a69cd3920b3b3f2cb2ae0b68102981056c709a38", - "pkg-cabal-sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "pkg-name": "unix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "pkg-version": "2.8.5.1", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "deepseq-1.4.8.1", - "hashable-1.4.7.0-c6fe63b8e799b6945007dd039a3dbed00fdd3a777c0a5b732556bbf7a1e24197", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-d0db237b38c0ca5cf61db54c12fbf86e3ab181365b559a8433893242182fbe13", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.1.0", - "bytestring-0.11.5.2" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-bcba86e78380da694af9dd450a5a586805efe406278cb1aed67b0030404278cb", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-9_6_4.json b/hadrian/bootstrap/plan-9_6_4.json deleted file mode 100644 index 07d19084b5a1..000000000000 --- a/hadrian/bootstrap/plan-9_6_4.json +++ /dev/null @@ -1,1039 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.6.4", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-cbb6eb640fea4b061f671de4b633e0fdc26955fb73ec75f2dc686433d54cd79e", - "array-0.5.6.0", - "base-4.18.2.0", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "process-1.6.25.0-cd7d078cdf4cb1dd89c52ab9ebdd0f17343f10f2dfa34716f36182cf096292ce", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-4c7caaac718d42357a2eca08ca88571c5b9df754adc43604ed281b1a1f00baf6" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-b2887406f4be50fb1ec8d213ac06683df989f7cd9f169e2143f48dedcbd3e012", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.6.0", - "base-4.18.2.0", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-5aff57a458d3ce1b2f81f06bef0e52be5def50885c234170ad24213a3e7f1e8c" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-cbb6eb640fea4b061f671de4b633e0fdc26955fb73ec75f2dc686433d54cd79e", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.4/alex-3.5.1.0-e-alex-5aff57a458d3ce1b2f81f06bef0e52be5def50885c234170ad24213a3e7f1e8c/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.6.0", - "base-4.18.2.0", - "containers-0.6.7", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-5aff57a458d3ce1b2f81f06bef0e52be5def50885c234170ad24213a3e7f1e8c", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.0" - ], - "id": "array-0.5.6.0", - "pkg-name": "array", - "pkg-version": "0.5.6.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "rts-1.0.2" - ], - "id": "base-4.18.2.0", - "pkg-name": "base", - "pkg-version": "4.18.2.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-5367755b82b523ac8ab3e8915384aadcbef426df8aa2ea3a00fbc6b5ab6788e4", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.0", - "bytestring-0.11.5.3", - "containers-0.6.7" - ], - "id": "binary-0.8.9.1", - "pkg-name": "binary", - "pkg-version": "0.8.9.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "bytestring-0.11.5.3", - "pkg-name": "bytestring", - "pkg-version": "0.11.5.3", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-693007efe58b8fdca1c34a201008085eac9897f1b2f31c2d78f6f2ebac7bcf46", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.0", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0" - ], - "id": "containers-0.6.7", - "pkg-name": "containers", - "pkg-version": "0.6.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-197eb2443f8413452e75794fb467a74c91c9db474722ebb69c87dbf7f5ba80b3", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.0", - "ghc-prim-0.10.0" - ], - "id": "deepseq-1.4.8.1", - "pkg-name": "deepseq", - "pkg-version": "1.4.8.1", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.2.0", - "file-io-0.1.4-d959bd6789d1f9df7990e6ab24ff90ae177bc1b12e2be44d37e54670dc75eb64", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "os-string-2.0.6-a946d7e71885f2c918817f11258199f8bb3d0e1c3b5121554e1d66b89e67290f", - "time-1.12.2", - "unix-2.8.5.1-4c7caaac718d42357a2eca08ca88571c5b9df754adc43604ed281b1a1f00baf6" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.0", - "mtl-2.3.1", - "stm-2.5.1.0", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "id": "exceptions-0.10.7", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "clock-0.8.4-693007efe58b8fdca1c34a201008085eac9897f1b2f31c2d78f6f2ebac7bcf46", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "process-1.6.25.0-cd7d078cdf4cb1dd89c52ab9ebdd0f17343f10f2dfa34716f36182cf096292ce", - "time-1.12.2", - "unix-2.8.5.1-4c7caaac718d42357a2eca08ca88571c5b9df754adc43604ed281b1a1f00baf6" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-b2709fbe6bb0db88217c9ec9abcc8d3936464e97e0cb6f7e95b1128739c33d36", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "os-string-2.0.6-a946d7e71885f2c918817f11258199f8bb3d0e1c3b5121554e1d66b89e67290f", - "unix-2.8.5.1-4c7caaac718d42357a2eca08ca88571c5b9df754adc43604ed281b1a1f00baf6" - ], - "exe-depends": [], - "flags": { - "os-string": true - }, - "id": "file-io-0.1.4-d959bd6789d1f9df7990e6ab24ff90ae177bc1b12e2be44d37e54670dc75eb64", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "os-string-2.0.6-a946d7e71885f2c918817f11258199f8bb3d0e1c3b5121554e1d66b89e67290f", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "cpphs": false - }, - "id": "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "pkg-cabal-sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "pkg-name": "filepath", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "pkg-version": "1.5.3.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "extra-1.8-b2709fbe6bb0db88217c9ec9abcc8d3936464e97e0cb6f7e95b1128739c33d36", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-ca97895f2728c1f299df7b5250488ec8e5c4c04262998d1d6947d6c7da253e79", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.10.0" - ], - "id": "ghc-bignum-1.3", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.0" - ], - "id": "ghc-boot-th-9.6.4", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.6.4", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.4/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.2.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.4/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.10.0", - "pkg-name": "ghc-prim", - "pkg-version": "0.10.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.4/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-cd7d078cdf4cb1dd89c52ab9ebdd0f17343f10f2dfa34716f36182cf096292ce", - "text-2.0.2", - "transformers-0.6.1.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.4/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.4/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.4/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-b2887406f4be50fb1ec8d213ac06683df989f7cd9f169e2143f48dedcbd3e012", - "base-4.18.2.0", - "base16-bytestring-1.0.2.0-5367755b82b523ac8ab3e8915384aadcbef426df8aa2ea3a00fbc6b5ab6788e4", - "bytestring-0.11.5.3", - "containers-0.6.7", - "cryptohash-sha256-0.11.102.1-197eb2443f8413452e75794fb467a74c91c9db474722ebb69c87dbf7f5ba80b3", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "extra-1.8-b2709fbe6bb0db88217c9ec9abcc8d3936464e97e0cb6f7e95b1128739c33d36", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1", - "parsec-3.1.16.1", - "shake-0.19.8-56b20456a0eca6ed00e10d33bcdb2aa663d7052bb2ce4f94382d560155f989a0", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0", - "unordered-containers-0.2.20-0144bed65e0b66559a07fc66932004ed68dc0004ae579bff31841eda893c2c92" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.4/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "os-string-2.0.6-a946d7e71885f2c918817f11258199f8bb3d0e1c3b5121554e1d66b89e67290f", - "text-2.0.2" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "random-initial-seed": false - }, - "id": "hashable-1.5.0.0-fdcf629ce63d4968e6b501d8445b5c29739f0d773195e61acc4295a4220e0f66", - "pkg-cabal-sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "pkg-version": "1.5.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-3ccf6d116e676c6468b164a0a83229e07ee6b8e3197e0e499a497bbd7e2167a2", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-c314f59accf48d14d7f75e60f56d27300629932b28397596ea54daeaff59457d", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-46e3955c54252f0b7222adaf4bb89727f417cb7e6d93d78f2e3d16811f7099c6", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-cfa62fc90ac66fd36dccf1bb52564af00a0c5678a0f5b053da7bade5194ebfb2", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.0", - "transformers-0.6.1.0" - ], - "id": "mtl-2.3.1", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "os-string-2.0.6-a946d7e71885f2c918817f11258199f8bb3d0e1c3b5121554e1d66b89e67290f", - "pkg-cabal-sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "pkg-name": "os-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "pkg-version": "2.0.6", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3", - "mtl-2.3.1", - "text-2.0.2" - ], - "id": "parsec-3.1.16.1", - "pkg-name": "parsec", - "pkg-version": "3.1.16.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.0", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0" - ], - "id": "pretty-1.1.3.6", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-a0b4f68343d5cb2d57fc510d5e4ccf64e0b949920861fab52dffcc2c5568fcaa", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.2.0", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "unix-2.8.5.1-4c7caaac718d42357a2eca08ca88571c5b9df754adc43604ed281b1a1f00baf6" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-cd7d078cdf4cb1dd89c52ab9ebdd0f17343f10f2dfa34716f36182cf096292ce", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "mtl-2.3.1", - "splitmix-0.1.0.5-ab923304ab4ea4373ddac2146ebfdad8636e04900761a9faef4feec0cedba51c" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-ee9492352073a5224e8bfe0b28253fbf1a69f47aff735a8ab35235e8036b235d", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "extra-1.8-b2709fbe6bb0db88217c9ec9abcc8d3936464e97e0cb6f7e95b1128739c33d36", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "filepattern-0.1.3-ca97895f2728c1f299df7b5250488ec8e5c4c04262998d1d6947d6c7da253e79", - "hashable-1.5.0.0-fdcf629ce63d4968e6b501d8445b5c29739f0d773195e61acc4295a4220e0f66", - "heaps-0.4-3ccf6d116e676c6468b164a0a83229e07ee6b8e3197e0e499a497bbd7e2167a2", - "js-dgtable-0.5.2-c314f59accf48d14d7f75e60f56d27300629932b28397596ea54daeaff59457d", - "js-flot-0.8.3-46e3955c54252f0b7222adaf4bb89727f417cb7e6d93d78f2e3d16811f7099c6", - "js-jquery-3.3.1-cfa62fc90ac66fd36dccf1bb52564af00a0c5678a0f5b053da7bade5194ebfb2", - "primitive-0.9.0.0-a0b4f68343d5cb2d57fc510d5e4ccf64e0b949920861fab52dffcc2c5568fcaa", - "process-1.6.25.0-cd7d078cdf4cb1dd89c52ab9ebdd0f17343f10f2dfa34716f36182cf096292ce", - "random-1.2.1.2-ee9492352073a5224e8bfe0b28253fbf1a69f47aff735a8ab35235e8036b235d", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-4c7caaac718d42357a2eca08ca88571c5b9df754adc43604ed281b1a1f00baf6", - "unordered-containers-0.2.20-0144bed65e0b66559a07fc66932004ed68dc0004ae579bff31841eda893c2c92", - "utf8-string-1.0.2-632f5f15f6967b028c1e12cfc28bda20e1d3aa616b9ddbfc64531aa0eb3bec1d" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-56b20456a0eca6ed00e10d33bcdb2aa663d7052bb2ce4f94382d560155f989a0", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.4/shake-0.19.8-e-shake-fbaa46e24e2da46d8fc3fffca8a5be1ce01d2ae44e9d90bc334c6b47035c3216/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.18.2.0", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "directory-1.3.9.0-9480e3fc13afa228778cc9a4de3c200fea1de42037a43f10ab7a89a496a41aeb", - "extra-1.8-b2709fbe6bb0db88217c9ec9abcc8d3936464e97e0cb6f7e95b1128739c33d36", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "filepattern-0.1.3-ca97895f2728c1f299df7b5250488ec8e5c4c04262998d1d6947d6c7da253e79", - "hashable-1.5.0.0-fdcf629ce63d4968e6b501d8445b5c29739f0d773195e61acc4295a4220e0f66", - "heaps-0.4-3ccf6d116e676c6468b164a0a83229e07ee6b8e3197e0e499a497bbd7e2167a2", - "js-dgtable-0.5.2-c314f59accf48d14d7f75e60f56d27300629932b28397596ea54daeaff59457d", - "js-flot-0.8.3-46e3955c54252f0b7222adaf4bb89727f417cb7e6d93d78f2e3d16811f7099c6", - "js-jquery-3.3.1-cfa62fc90ac66fd36dccf1bb52564af00a0c5678a0f5b053da7bade5194ebfb2", - "primitive-0.9.0.0-a0b4f68343d5cb2d57fc510d5e4ccf64e0b949920861fab52dffcc2c5568fcaa", - "process-1.6.25.0-cd7d078cdf4cb1dd89c52ab9ebdd0f17343f10f2dfa34716f36182cf096292ce", - "random-1.2.1.2-ee9492352073a5224e8bfe0b28253fbf1a69f47aff735a8ab35235e8036b235d", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.5.1-4c7caaac718d42357a2eca08ca88571c5b9df754adc43604ed281b1a1f00baf6", - "unordered-containers-0.2.20-0144bed65e0b66559a07fc66932004ed68dc0004ae579bff31841eda893c2c92", - "utf8-string-1.0.2-632f5f15f6967b028c1e12cfc28bda20e1d3aa616b9ddbfc64531aa0eb3bec1d" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-fbaa46e24e2da46d8fc3fffca8a5be1ce01d2ae44e9d90bc334c6b47035c3216", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "deepseq-1.4.8.1" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-ab923304ab4ea4373ddac2146ebfdad8636e04900761a9faef4feec0cedba51c", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.0" - ], - "id": "stm-2.5.1.0", - "pkg-name": "stm", - "pkg-version": "2.5.1.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.0", - "ghc-boot-th-9.6.4", - "ghc-prim-0.10.0", - "pretty-1.1.3.6" - ], - "id": "template-haskell-2.20.0.0", - "pkg-name": "template-haskell", - "pkg-version": "2.20.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.0", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "text-2.0.2", - "pkg-name": "text", - "pkg-version": "2.0.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.0", - "deepseq-1.4.8.1" - ], - "id": "time-1.12.2", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.0" - ], - "id": "transformers-0.6.1.0", - "pkg-name": "transformers", - "pkg-version": "0.6.1.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3", - "filepath-1.5.3.0-24c96b202580c8843d24f3cfa665b341a28c770e8b039c055af4a3d889fe334e", - "os-string-2.0.6-a946d7e71885f2c918817f11258199f8bb3d0e1c3b5121554e1d66b89e67290f", - "time-1.12.2" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "unix-2.8.5.1-4c7caaac718d42357a2eca08ca88571c5b9df754adc43604ed281b1a1f00baf6", - "pkg-cabal-sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "pkg-name": "unix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "pkg-version": "2.8.5.1", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "deepseq-1.4.8.1", - "hashable-1.5.0.0-fdcf629ce63d4968e6b501d8445b5c29739f0d773195e61acc4295a4220e0f66", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-0144bed65e0b66559a07fc66932004ed68dc0004ae579bff31841eda893c2c92", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.0", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-632f5f15f6967b028c1e12cfc28bda20e1d3aa616b9ddbfc64531aa0eb3bec1d", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-9_6_5.json b/hadrian/bootstrap/plan-9_6_5.json deleted file mode 100644 index 8b901bbae818..000000000000 --- a/hadrian/bootstrap/plan-9_6_5.json +++ /dev/null @@ -1,1002 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.6.5", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-0f5d62492259cf9da2cc855cfc78be8abb301acb35e744fc4d471570ab50fb7a", - "array-0.5.6.0", - "base-4.18.2.1", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "filepath-1.4.300.1", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "process-1.6.25.0-d7f80653335d4c5bf43922e8773e984991cd2b552d9f61c75783d663cf3b516d", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.4.0" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-72f5a0c0f6ae8d86289b3abc6ebff0ca4dbe9b6acf4ea46fd775757dc6ada310", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "filepath-1.4.300.1", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-83905a72481fe4cb42194dcfa8e3d5ea0a5c5e448c8904e98674ab3e1aeafd84" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-0f5d62492259cf9da2cc855cfc78be8abb301acb35e744fc4d471570ab50fb7a", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.5/alex-3.5.1.0-e-alex-83905a72481fe4cb42194dcfa8e3d5ea0a5c5e448c8904e98674ab3e1aeafd84/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "containers-0.6.7", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-83905a72481fe4cb42194dcfa8e3d5ea0a5c5e448c8904e98674ab3e1aeafd84", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1" - ], - "id": "array-0.5.6.0", - "pkg-name": "array", - "pkg-version": "0.5.6.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "rts-1.0.2" - ], - "id": "base-4.18.2.1", - "pkg-name": "base", - "pkg-version": "4.18.2.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-4426637f8aa4b70fddbf72f94236f8a58b8af646266ea1bb63c0b169c6c8781c", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "bytestring-0.11.5.3", - "containers-0.6.7" - ], - "id": "binary-0.8.9.1", - "pkg-name": "binary", - "pkg-version": "0.8.9.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "bytestring-0.11.5.3", - "pkg-name": "bytestring", - "pkg-version": "0.11.5.3", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-3f050e8d2c5f9be96c6a99d627d3e81f404f3c7cfdfb25c7320cd2d6363c586e", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0" - ], - "id": "containers-0.6.7", - "pkg-name": "containers", - "pkg-version": "0.6.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-58a6e099384a42c956d29375b4a018fd1292e801c20958015eb15147b2a0eeb5", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "ghc-prim-0.10.0" - ], - "id": "deepseq-1.4.8.1", - "pkg-name": "deepseq", - "pkg-version": "1.4.8.1", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.2.1", - "file-io-0.1.4-1a8811ed9b9588d3163ef13bb6649176ba77084408122ba3027c3a4af38af328", - "filepath-1.4.300.1", - "time-1.12.2", - "unix-2.8.4.0" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": false - }, - "id": "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1", - "mtl-2.3.1", - "stm-2.5.1.0", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "id": "exceptions-0.10.7", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "clock-0.8.4-3f050e8d2c5f9be96c6a99d627d3e81f404f3c7cfdfb25c7320cd2d6363c586e", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "filepath-1.4.300.1", - "process-1.6.25.0-d7f80653335d4c5bf43922e8773e984991cd2b552d9f61c75783d663cf3b516d", - "time-1.12.2", - "unix-2.8.4.0" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-bd0a9b29680f902e81e6981eaf3f2ca89cc7acd7860edec9f85210281051a4e1", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "filepath-1.4.300.1", - "unix-2.8.4.0" - ], - "exe-depends": [], - "flags": { - "os-string": false - }, - "id": "file-io-0.1.4-1a8811ed9b9588d3163ef13bb6649176ba77084408122ba3027c3a4af38af328", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "template-haskell-2.20.0.0" - ], - "id": "filepath-1.4.300.1", - "pkg-name": "filepath", - "pkg-version": "1.4.300.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "extra-1.8-bd0a9b29680f902e81e6981eaf3f2ca89cc7acd7860edec9f85210281051a4e1", - "filepath-1.4.300.1" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-8fc52c60e670b4cc1a92332df74fc42be94b50457a7c82494fb9bd4eea0b5d7a", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.10.0" - ], - "id": "ghc-bignum-1.3", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1" - ], - "id": "ghc-boot-th-9.6.5", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.6.5", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.5/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.5/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.10.0", - "pkg-name": "ghc-prim", - "pkg-version": "0.10.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.5/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "filepath-1.4.300.1", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-d7f80653335d4c5bf43922e8773e984991cd2b552d9f61c75783d663cf3b516d", - "text-2.0.2", - "transformers-0.6.1.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.5/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.5/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.5/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-72f5a0c0f6ae8d86289b3abc6ebff0ca4dbe9b6acf4ea46fd775757dc6ada310", - "base-4.18.2.1", - "base16-bytestring-1.0.2.0-4426637f8aa4b70fddbf72f94236f8a58b8af646266ea1bb63c0b169c6c8781c", - "bytestring-0.11.5.3", - "containers-0.6.7", - "cryptohash-sha256-0.11.102.1-58a6e099384a42c956d29375b4a018fd1292e801c20958015eb15147b2a0eeb5", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "extra-1.8-bd0a9b29680f902e81e6981eaf3f2ca89cc7acd7860edec9f85210281051a4e1", - "filepath-1.4.300.1", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1", - "parsec-3.1.16.1", - "shake-0.19.8-a5d441b549873b0b0dcf204241992f771e8c00401dfabff43b9feaf2e1ea5c52", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0", - "unordered-containers-0.2.20-115dea85819f6a4ad97bc190a24b0639ba5ee1c145fc18caf76160f9a2fe5e3b" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.5/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "filepath-1.4.300.1", - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "os-string-2.0.6-74818f38a6ca1217793637ad552c28fc076e3d0032db6e6acc73facebda7dec0", - "text-2.0.2" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "random-initial-seed": false - }, - "id": "hashable-1.5.0.0-11c08a67ad5ceb14fd3bfe10515e47382fb2668cb8947fa585675d7c7c984681", - "pkg-cabal-sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "pkg-version": "1.5.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-22d518cac35316e6ca0e8ce61e312abdc5cb410f3ada1deabb2a120934edfc6d", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-a7a086d4561234dedac45c09af6abef289db1f91ed40f42a3f93ce8b3daa43a9", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-2b8f0d4539b12ee9de95aafe373adcb837324df2f82068b404b008ebdab121e8", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-2913d200c853191a3cb4917844f18fd09859008ecfff022a52aebfda451eba34", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1", - "transformers-0.6.1.0" - ], - "id": "mtl-2.3.1", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "os-string-2.0.6-74818f38a6ca1217793637ad552c28fc076e3d0032db6e6acc73facebda7dec0", - "pkg-cabal-sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "pkg-name": "os-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "pkg-version": "2.0.6", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "mtl-2.3.1", - "text-2.0.2" - ], - "id": "parsec-3.1.16.1", - "pkg-name": "parsec", - "pkg-version": "3.1.16.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0" - ], - "id": "pretty-1.1.3.6", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-cbc273db782b08453b326f4895c2fa30c4b7418b366e685582a8e83c6b4e01f0", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "filepath-1.4.300.1", - "unix-2.8.4.0" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-d7f80653335d4c5bf43922e8773e984991cd2b552d9f61c75783d663cf3b516d", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "mtl-2.3.1", - "splitmix-0.1.0.5-126dc22c8ac90de6d18ee09d989dd4c75f3823df86a0e8b1bca9733562717b15" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-d845edbd30b14412725cfbad29ee9f10927d5bc29ee701e317e4b6f883cb5e02", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "extra-1.8-bd0a9b29680f902e81e6981eaf3f2ca89cc7acd7860edec9f85210281051a4e1", - "filepath-1.4.300.1", - "filepattern-0.1.3-8fc52c60e670b4cc1a92332df74fc42be94b50457a7c82494fb9bd4eea0b5d7a", - "hashable-1.5.0.0-11c08a67ad5ceb14fd3bfe10515e47382fb2668cb8947fa585675d7c7c984681", - "heaps-0.4-22d518cac35316e6ca0e8ce61e312abdc5cb410f3ada1deabb2a120934edfc6d", - "js-dgtable-0.5.2-a7a086d4561234dedac45c09af6abef289db1f91ed40f42a3f93ce8b3daa43a9", - "js-flot-0.8.3-2b8f0d4539b12ee9de95aafe373adcb837324df2f82068b404b008ebdab121e8", - "js-jquery-3.3.1-2913d200c853191a3cb4917844f18fd09859008ecfff022a52aebfda451eba34", - "primitive-0.9.0.0-cbc273db782b08453b326f4895c2fa30c4b7418b366e685582a8e83c6b4e01f0", - "process-1.6.25.0-d7f80653335d4c5bf43922e8773e984991cd2b552d9f61c75783d663cf3b516d", - "random-1.2.1.2-d845edbd30b14412725cfbad29ee9f10927d5bc29ee701e317e4b6f883cb5e02", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.4.0", - "unordered-containers-0.2.20-115dea85819f6a4ad97bc190a24b0639ba5ee1c145fc18caf76160f9a2fe5e3b", - "utf8-string-1.0.2-d41f28448cf3953aa58c2f61873a9408dc4e2f9026d2d2fc6e063430a91cad45" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-a5d441b549873b0b0dcf204241992f771e8c00401dfabff43b9feaf2e1ea5c52", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.5/shake-0.19.8-e-shake-c72571406282601489e236ca03183e58db49904cc3cae05193ef82241d2bf100/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.18.2.1", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "directory-1.3.9.0-ac291f9f0e4c7e328ee5503c2b7109121322fbd8a6b4f825fc0cca5a2d06ed04", - "extra-1.8-bd0a9b29680f902e81e6981eaf3f2ca89cc7acd7860edec9f85210281051a4e1", - "filepath-1.4.300.1", - "filepattern-0.1.3-8fc52c60e670b4cc1a92332df74fc42be94b50457a7c82494fb9bd4eea0b5d7a", - "hashable-1.5.0.0-11c08a67ad5ceb14fd3bfe10515e47382fb2668cb8947fa585675d7c7c984681", - "heaps-0.4-22d518cac35316e6ca0e8ce61e312abdc5cb410f3ada1deabb2a120934edfc6d", - "js-dgtable-0.5.2-a7a086d4561234dedac45c09af6abef289db1f91ed40f42a3f93ce8b3daa43a9", - "js-flot-0.8.3-2b8f0d4539b12ee9de95aafe373adcb837324df2f82068b404b008ebdab121e8", - "js-jquery-3.3.1-2913d200c853191a3cb4917844f18fd09859008ecfff022a52aebfda451eba34", - "primitive-0.9.0.0-cbc273db782b08453b326f4895c2fa30c4b7418b366e685582a8e83c6b4e01f0", - "process-1.6.25.0-d7f80653335d4c5bf43922e8773e984991cd2b552d9f61c75783d663cf3b516d", - "random-1.2.1.2-d845edbd30b14412725cfbad29ee9f10927d5bc29ee701e317e4b6f883cb5e02", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.4.0", - "unordered-containers-0.2.20-115dea85819f6a4ad97bc190a24b0639ba5ee1c145fc18caf76160f9a2fe5e3b", - "utf8-string-1.0.2-d41f28448cf3953aa58c2f61873a9408dc4e2f9026d2d2fc6e063430a91cad45" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-c72571406282601489e236ca03183e58db49904cc3cae05193ef82241d2bf100", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-126dc22c8ac90de6d18ee09d989dd4c75f3823df86a0e8b1bca9733562717b15", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1" - ], - "id": "stm-2.5.1.0", - "pkg-name": "stm", - "pkg-version": "2.5.1.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "ghc-boot-th-9.6.5", - "ghc-prim-0.10.0", - "pretty-1.1.3.6" - ], - "id": "template-haskell-2.20.0.0", - "pkg-name": "template-haskell", - "pkg-version": "2.20.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "text-2.0.2", - "pkg-name": "text", - "pkg-version": "2.0.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1" - ], - "id": "time-1.12.2", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1" - ], - "id": "transformers-0.6.1.0", - "pkg-name": "transformers", - "pkg-version": "0.6.1.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "filepath-1.4.300.1", - "time-1.12.2" - ], - "id": "unix-2.8.4.0", - "pkg-name": "unix", - "pkg-version": "2.8.4.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "hashable-1.5.0.0-11c08a67ad5ceb14fd3bfe10515e47382fb2668cb8947fa585675d7c7c984681", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-115dea85819f6a4ad97bc190a24b0639ba5ee1c145fc18caf76160f9a2fe5e3b", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-d41f28448cf3953aa58c2f61873a9408dc4e2f9026d2d2fc6e063430a91cad45", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-9_6_6.json b/hadrian/bootstrap/plan-9_6_6.json deleted file mode 100644 index 37e6369f82b9..000000000000 --- a/hadrian/bootstrap/plan-9_6_6.json +++ /dev/null @@ -1,1002 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.6.6", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-a1b29d4a510d1239ad9e8ec8b296e89ad384f5f0db6dd0d0193659e5f4c8db26", - "array-0.5.6.0", - "base-4.18.2.1", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "filepath-1.4.300.1", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "process-1.6.25.0-f598bae8f6bd3b96c084eb888742964e713e3e7d97155d2574921cae7c06208e", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.4.0" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-c296c990e17be020b0053137dfaa8ad7e2fdf3211505d0ebeedde01ed8b499c8", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "filepath-1.4.300.1", - "mtl-2.3.1", - "parsec-3.1.16.1", - "pretty-1.1.3.6", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-7f35b1b725f6f2e9f23604a9509c011ca1e58ff85f0a685c6187816625230b3d" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-a1b29d4a510d1239ad9e8ec8b296e89ad384f5f0db6dd0d0193659e5f4c8db26", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.6/alex-3.5.1.0-e-alex-7f35b1b725f6f2e9f23604a9509c011ca1e58ff85f0a685c6187816625230b3d/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "containers-0.6.7", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-7f35b1b725f6f2e9f23604a9509c011ca1e58ff85f0a685c6187816625230b3d", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1" - ], - "id": "array-0.5.6.0", - "pkg-name": "array", - "pkg-version": "0.5.6.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "rts-1.0.2" - ], - "id": "base-4.18.2.1", - "pkg-name": "base", - "pkg-version": "4.18.2.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-8229cdc148c551b261343ff380eecb40f28d2e692598908dae29b1921156e16b", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "bytestring-0.11.5.3", - "containers-0.6.7" - ], - "id": "binary-0.8.9.1", - "pkg-name": "binary", - "pkg-version": "0.8.9.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "bytestring-0.11.5.3", - "pkg-name": "bytestring", - "pkg-version": "0.11.5.3", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-8ae7d0db55dbe447d1d6d60429c600d80c3588171a200a6556d7dbcad08c15ab", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0" - ], - "id": "containers-0.6.7", - "pkg-name": "containers", - "pkg-version": "0.6.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-9cdfaa8b2bebf72d43fdde538a8ecd034f06f3775271ab0084cf6469ac85f0ff", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "ghc-prim-0.10.0" - ], - "id": "deepseq-1.4.8.1", - "pkg-name": "deepseq", - "pkg-version": "1.4.8.1", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.2.1", - "file-io-0.1.4-3053aec3b874b9dee7a9386cb598c5eee95adec0e3bf705c83126ce88e00cac5", - "filepath-1.4.300.1", - "time-1.12.2", - "unix-2.8.4.0" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": false - }, - "id": "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1", - "mtl-2.3.1", - "stm-2.5.1.0", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "id": "exceptions-0.10.7", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "clock-0.8.4-8ae7d0db55dbe447d1d6d60429c600d80c3588171a200a6556d7dbcad08c15ab", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "filepath-1.4.300.1", - "process-1.6.25.0-f598bae8f6bd3b96c084eb888742964e713e3e7d97155d2574921cae7c06208e", - "time-1.12.2", - "unix-2.8.4.0" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-fb9b3192cd0f9858ee868bd2e50c1031d087f024f9584a2242f94da6038dfb40", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "filepath-1.4.300.1", - "unix-2.8.4.0" - ], - "exe-depends": [], - "flags": { - "os-string": false - }, - "id": "file-io-0.1.4-3053aec3b874b9dee7a9386cb598c5eee95adec0e3bf705c83126ce88e00cac5", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "template-haskell-2.20.0.0" - ], - "id": "filepath-1.4.300.1", - "pkg-name": "filepath", - "pkg-version": "1.4.300.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "extra-1.8-fb9b3192cd0f9858ee868bd2e50c1031d087f024f9584a2242f94da6038dfb40", - "filepath-1.4.300.1" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-72edc818ee45ada531a73d4ba6e2fced8595da147fdc1eeb0cba41d86ef8fe61", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.10.0" - ], - "id": "ghc-bignum-1.3", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1" - ], - "id": "ghc-boot-th-9.6.6", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.6.6", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.6/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.6/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.10.0", - "pkg-name": "ghc-prim", - "pkg-version": "0.10.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.6/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "filepath-1.4.300.1", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-f598bae8f6bd3b96c084eb888742964e713e3e7d97155d2574921cae7c06208e", - "text-2.0.2", - "transformers-0.6.1.0" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.6/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.6/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.6/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-c296c990e17be020b0053137dfaa8ad7e2fdf3211505d0ebeedde01ed8b499c8", - "base-4.18.2.1", - "base16-bytestring-1.0.2.0-8229cdc148c551b261343ff380eecb40f28d2e692598908dae29b1921156e16b", - "bytestring-0.11.5.3", - "containers-0.6.7", - "cryptohash-sha256-0.11.102.1-9cdfaa8b2bebf72d43fdde538a8ecd034f06f3775271ab0084cf6469ac85f0ff", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "extra-1.8-fb9b3192cd0f9858ee868bd2e50c1031d087f024f9584a2242f94da6038dfb40", - "filepath-1.4.300.1", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1", - "parsec-3.1.16.1", - "shake-0.19.8-f6d6206385b2e40ffeb58e1c69c5c9f63d0521d0e85e3e92b2b93ede9261c0a2", - "text-2.0.2", - "time-1.12.2", - "transformers-0.6.1.0", - "unordered-containers-0.2.20-54a8af39b57613df7e5b7fd0897e45b388ba0a17e61dbcdbe571ad226ae60dac" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.6.6/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "containers-0.6.7", - "deepseq-1.4.8.1", - "filepath-1.4.300.1", - "ghc-bignum-1.3", - "ghc-prim-0.10.0", - "os-string-2.0.6-6027d7cc3f1b3c7680b6aa4ae459df93dffff6a8c33a3a325c13a9b4d37dad2a", - "text-2.0.2" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "random-initial-seed": false - }, - "id": "hashable-1.5.0.0-27c6a96e07852fef19c2a3e9226c2dde5797c490c7474777789f7a160904e829", - "pkg-cabal-sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "pkg-version": "1.5.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-0314054152aed02efd5a33c8db00e1500da23191090cc228b67d54babb98db2d", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-c5cce08afefd9ef751d729e0c5611b3a7ece6c01ac6737be1a7806ad795bf17f", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-e4f9be697f35ec0d8e564dc1ceb0f0f59ccd91b4b7ec785a159e73ebd728d128", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-f3dc755de4c6f4e10b38cdbab2947098af48c9b041727639808bd8fc5c3a77d8", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1", - "transformers-0.6.1.0" - ], - "id": "mtl-2.3.1", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "exceptions-0.10.7", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": {}, - "id": "os-string-2.0.6-6027d7cc3f1b3c7680b6aa4ae459df93dffff6a8c33a3a325c13a9b4d37dad2a", - "pkg-cabal-sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "pkg-name": "os-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "pkg-version": "2.0.6", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "mtl-2.3.1", - "text-2.0.2" - ], - "id": "parsec-3.1.16.1", - "pkg-name": "parsec", - "pkg-version": "3.1.16.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0" - ], - "id": "pretty-1.1.3.6", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "template-haskell-2.20.0.0", - "transformers-0.6.1.0" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-d5cc7f4e5fe205a6b2c2a888a2e798716363ec34ae6e2d9f79a5d92fa960a485", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "filepath-1.4.300.1", - "unix-2.8.4.0" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-f598bae8f6bd3b96c084eb888742964e713e3e7d97155d2574921cae7c06208e", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "mtl-2.3.1", - "splitmix-0.1.0.5-34141adf9f3e566f420c47d256bafd7d2bd2410bcd2329ec6c41e492f61d654b" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-a8713c31efe320f4d066a043abb8efd036e30008080520277708130db35fe963", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.6.6/shake-0.19.8-e-shake-a4e2d33f1c257ce69199415b5dc054d59e8a7e64bf07d08af8eb93cf8e347fca/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.18.2.1", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "extra-1.8-fb9b3192cd0f9858ee868bd2e50c1031d087f024f9584a2242f94da6038dfb40", - "filepath-1.4.300.1", - "filepattern-0.1.3-72edc818ee45ada531a73d4ba6e2fced8595da147fdc1eeb0cba41d86ef8fe61", - "hashable-1.5.0.0-27c6a96e07852fef19c2a3e9226c2dde5797c490c7474777789f7a160904e829", - "heaps-0.4-0314054152aed02efd5a33c8db00e1500da23191090cc228b67d54babb98db2d", - "js-dgtable-0.5.2-c5cce08afefd9ef751d729e0c5611b3a7ece6c01ac6737be1a7806ad795bf17f", - "js-flot-0.8.3-e4f9be697f35ec0d8e564dc1ceb0f0f59ccd91b4b7ec785a159e73ebd728d128", - "js-jquery-3.3.1-f3dc755de4c6f4e10b38cdbab2947098af48c9b041727639808bd8fc5c3a77d8", - "primitive-0.9.0.0-d5cc7f4e5fe205a6b2c2a888a2e798716363ec34ae6e2d9f79a5d92fa960a485", - "process-1.6.25.0-f598bae8f6bd3b96c084eb888742964e713e3e7d97155d2574921cae7c06208e", - "random-1.2.1.2-a8713c31efe320f4d066a043abb8efd036e30008080520277708130db35fe963", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.4.0", - "unordered-containers-0.2.20-54a8af39b57613df7e5b7fd0897e45b388ba0a17e61dbcdbe571ad226ae60dac", - "utf8-string-1.0.2-c0d962e12911b4b081c4fcd51f0c809a53dc97a1ea9db2d0462227869c934efd" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-a4e2d33f1c257ce69199415b5dc054d59e8a7e64bf07d08af8eb93cf8e347fca", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "directory-1.3.9.0-06b19eb6cee128a331c24cd170face3aec6ed8931d2ec919dc9b6d99d244cbf1", - "extra-1.8-fb9b3192cd0f9858ee868bd2e50c1031d087f024f9584a2242f94da6038dfb40", - "filepath-1.4.300.1", - "filepattern-0.1.3-72edc818ee45ada531a73d4ba6e2fced8595da147fdc1eeb0cba41d86ef8fe61", - "hashable-1.5.0.0-27c6a96e07852fef19c2a3e9226c2dde5797c490c7474777789f7a160904e829", - "heaps-0.4-0314054152aed02efd5a33c8db00e1500da23191090cc228b67d54babb98db2d", - "js-dgtable-0.5.2-c5cce08afefd9ef751d729e0c5611b3a7ece6c01ac6737be1a7806ad795bf17f", - "js-flot-0.8.3-e4f9be697f35ec0d8e564dc1ceb0f0f59ccd91b4b7ec785a159e73ebd728d128", - "js-jquery-3.3.1-f3dc755de4c6f4e10b38cdbab2947098af48c9b041727639808bd8fc5c3a77d8", - "primitive-0.9.0.0-d5cc7f4e5fe205a6b2c2a888a2e798716363ec34ae6e2d9f79a5d92fa960a485", - "process-1.6.25.0-f598bae8f6bd3b96c084eb888742964e713e3e7d97155d2574921cae7c06208e", - "random-1.2.1.2-a8713c31efe320f4d066a043abb8efd036e30008080520277708130db35fe963", - "time-1.12.2", - "transformers-0.6.1.0", - "unix-2.8.4.0", - "unordered-containers-0.2.20-54a8af39b57613df7e5b7fd0897e45b388ba0a17e61dbcdbe571ad226ae60dac", - "utf8-string-1.0.2-c0d962e12911b4b081c4fcd51f0c809a53dc97a1ea9db2d0462227869c934efd" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-f6d6206385b2e40ffeb58e1c69c5c9f63d0521d0e85e3e92b2b93ede9261c0a2", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-34141adf9f3e566f420c47d256bafd7d2bd2410bcd2329ec6c41e492f61d654b", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1" - ], - "id": "stm-2.5.1.0", - "pkg-name": "stm", - "pkg-version": "2.5.1.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "ghc-boot-th-9.6.6", - "ghc-prim-0.10.0", - "pretty-1.1.3.6" - ], - "id": "template-haskell-2.20.0.0", - "pkg-name": "template-haskell", - "pkg-version": "2.20.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.6.0", - "base-4.18.2.1", - "binary-0.8.9.1", - "bytestring-0.11.5.3", - "deepseq-1.4.8.1", - "ghc-prim-0.10.0", - "template-haskell-2.20.0.0" - ], - "id": "text-2.0.2", - "pkg-name": "text", - "pkg-version": "2.0.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1" - ], - "id": "time-1.12.2", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1" - ], - "id": "transformers-0.6.1.0", - "pkg-name": "transformers", - "pkg-version": "0.6.1.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3", - "filepath-1.4.300.1", - "time-1.12.2" - ], - "id": "unix-2.8.4.0", - "pkg-name": "unix", - "pkg-version": "2.8.4.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "deepseq-1.4.8.1", - "hashable-1.5.0.0-27c6a96e07852fef19c2a3e9226c2dde5797c490c7474777789f7a160904e829", - "template-haskell-2.20.0.0" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-54a8af39b57613df7e5b7fd0897e45b388ba0a17e61dbcdbe571ad226ae60dac", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.18.2.1", - "bytestring-0.11.5.3" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-c0d962e12911b4b081c4fcd51f0c809a53dc97a1ea9db2d0462227869c934efd", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-9_8_1.json b/hadrian/bootstrap/plan-9_8_1.json deleted file mode 100644 index 90a661918da3..000000000000 --- a/hadrian/bootstrap/plan-9_8_1.json +++ /dev/null @@ -1,1039 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.8.1", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-07f481574450039df7d2cba876c3609272e0f09c78ae5ba50e42bd99967585f6", - "array-0.5.6.0-71f5", - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "containers-0.6.8-5582", - "deepseq-1.5.0.0-c95f", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "mtl-2.3.1-4a2f", - "parsec-3.1.17.0-53fa", - "pretty-1.1.3.6-da5d", - "process-1.6.25.0-059048d46790f22fe6c5d85177ea3cc0a42c5c4776dde771018fca762395a1d8", - "time-1.12.2-6806", - "transformers-0.6.1.0-ca30", - "unix-2.8.5.1-0873e9b02610edbf279beb92e77d5b690dedce1cb7ee32086cb8b3d10078d5ec" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-9c820cee13ca987575933d58ec3072eb9b76031b8bf9be7b5f9a43600a2315f6", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.6.0-71f5", - "base-4.19.0.0-6941", - "binary-0.8.9.1-dc44", - "bytestring-0.12.0.2-bcd5", - "containers-0.6.8-5582", - "deepseq-1.5.0.0-c95f", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "mtl-2.3.1-4a2f", - "parsec-3.1.17.0-53fa", - "pretty-1.1.3.6-da5d", - "text-2.1-6316", - "time-1.12.2-6806", - "transformers-0.6.1.0-ca30" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-e5a5758c749cb09465729a31b784fcb80cd21e39a2964743177e293927fcef9a" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-07f481574450039df7d2cba876c3609272e0f09c78ae5ba50e42bd99967585f6", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.8.1/alex-3.5.1.0-e-alex-e5a5758c749cb09465729a31b784fcb80cd21e39a2964743177e293927fcef9a/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.6.0-71f5", - "base-4.19.0.0-6941", - "containers-0.6.8-5582", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-e5a5758c749cb09465729a31b784fcb80cd21e39a2964743177e293927fcef9a", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.19.0.0-6941" - ], - "id": "array-0.5.6.0-71f5", - "pkg-name": "array", - "pkg-version": "0.5.6.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3-7e69", - "ghc-prim-0.11.0-59e0", - "rts-1.0.2" - ], - "id": "base-4.19.0.0-6941", - "pkg-name": "base", - "pkg-version": "4.19.0.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-f6f338f30ffcaaf609b4d94c3bc7c96031ebcb86cb6ae7a235b0b2215ce4f075", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0-71f5", - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "containers-0.6.8-5582" - ], - "id": "binary-0.8.9.1-dc44", - "pkg-name": "binary", - "pkg-version": "0.8.9.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.0.0-6941", - "deepseq-1.5.0.0-c95f", - "ghc-prim-0.11.0-59e0", - "template-haskell-2.21.0.0-183a" - ], - "id": "bytestring-0.12.0.2-bcd5", - "pkg-name": "bytestring", - "pkg-version": "0.12.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-7fc53c58718796ac27673f16883fabd7e751a3fda0f8567c730d9153f3676e41", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0-71f5", - "base-4.19.0.0-6941", - "deepseq-1.5.0.0-c95f", - "template-haskell-2.21.0.0-183a" - ], - "id": "containers-0.6.8-5582", - "pkg-name": "containers", - "pkg-version": "0.6.8", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-28e4385b75b881cc43f356dfd5d7a0c245850750f3f6e7aee39555a9f2df667c", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0-71f5", - "base-4.19.0.0-6941", - "ghc-prim-0.11.0-59e0" - ], - "id": "deepseq-1.5.0.0-c95f", - "pkg-name": "deepseq", - "pkg-version": "1.5.0.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.19.0.0-6941", - "file-io-0.1.4-22be4469998467d20153d5f7fc8affccd7d25b84645178cd80e5bbb6d489d3e2", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "os-string-2.0.6-fc3c6eebb11cf5d57bd9d5321187b826dff45c77282c4b3ba27069994798766e", - "time-1.12.2-6806", - "unix-2.8.5.1-0873e9b02610edbf279beb92e77d5b690dedce1cb7ee32086cb8b3d10078d5ec" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.19.0.0-6941", - "mtl-2.3.1-4a2f", - "stm-2.5.2.1-a112", - "template-haskell-2.21.0.0-183a", - "transformers-0.6.1.0-ca30" - ], - "id": "exceptions-0.10.7-af9c", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "clock-0.8.4-7fc53c58718796ac27673f16883fabd7e751a3fda0f8567c730d9153f3676e41", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "process-1.6.25.0-059048d46790f22fe6c5d85177ea3cc0a42c5c4776dde771018fca762395a1d8", - "time-1.12.2-6806", - "unix-2.8.5.1-0873e9b02610edbf279beb92e77d5b690dedce1cb7ee32086cb8b3d10078d5ec" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-5a260bf5b6e0c0fac92f7523caec82349e6378eb0a59cb7b260abf06dd1d165e", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "deepseq-1.5.0.0-c95f", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "os-string-2.0.6-fc3c6eebb11cf5d57bd9d5321187b826dff45c77282c4b3ba27069994798766e", - "unix-2.8.5.1-0873e9b02610edbf279beb92e77d5b690dedce1cb7ee32086cb8b3d10078d5ec" - ], - "exe-depends": [], - "flags": { - "os-string": true - }, - "id": "file-io-0.1.4-22be4469998467d20153d5f7fc8affccd7d25b84645178cd80e5bbb6d489d3e2", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "deepseq-1.5.0.0-c95f", - "exceptions-0.10.7-af9c", - "os-string-2.0.6-fc3c6eebb11cf5d57bd9d5321187b826dff45c77282c4b3ba27069994798766e", - "template-haskell-2.21.0.0-183a" - ], - "exe-depends": [], - "flags": { - "cpphs": false - }, - "id": "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "pkg-cabal-sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "pkg-name": "filepath", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "pkg-version": "1.5.3.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "extra-1.8-5a260bf5b6e0c0fac92f7523caec82349e6378eb0a59cb7b260abf06dd1d165e", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-278bfefb513b3c2e6276bf09f2ab6b7cd07a198d7f9387d50716a3c9337e67b3", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.11.0-59e0" - ], - "id": "ghc-bignum-1.3-7e69", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.0.0-6941" - ], - "id": "ghc-boot-th-9.8.1-1aaa", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.8.1", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.1/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.1/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.11.0-59e0", - "pkg-name": "ghc-prim", - "pkg-version": "0.11.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.1/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-059048d46790f22fe6c5d85177ea3cc0a42c5c4776dde771018fca762395a1d8", - "text-2.1-6316", - "transformers-0.6.1.0-ca30" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.1/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.1/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.1/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-9c820cee13ca987575933d58ec3072eb9b76031b8bf9be7b5f9a43600a2315f6", - "base-4.19.0.0-6941", - "base16-bytestring-1.0.2.0-f6f338f30ffcaaf609b4d94c3bc7c96031ebcb86cb6ae7a235b0b2215ce4f075", - "bytestring-0.12.0.2-bcd5", - "containers-0.6.8-5582", - "cryptohash-sha256-0.11.102.1-28e4385b75b881cc43f356dfd5d7a0c245850750f3f6e7aee39555a9f2df667c", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "extra-1.8-5a260bf5b6e0c0fac92f7523caec82349e6378eb0a59cb7b260abf06dd1d165e", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1-4a2f", - "parsec-3.1.17.0-53fa", - "shake-0.19.8-29fc1ed93ebf1d54873d10da2d44c25660185d887017bfebf58e7286860db679", - "text-2.1-6316", - "time-1.12.2-6806", - "transformers-0.6.1.0-ca30", - "unordered-containers-0.2.20-865e93695bef3263597ec141e0560eb2335f59af6faa50161713636d9c38da1d" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.1/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "containers-0.6.8-5582", - "deepseq-1.5.0.0-c95f", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "ghc-bignum-1.3-7e69", - "ghc-prim-0.11.0-59e0", - "os-string-2.0.6-fc3c6eebb11cf5d57bd9d5321187b826dff45c77282c4b3ba27069994798766e", - "text-2.1-6316" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "random-initial-seed": false - }, - "id": "hashable-1.5.0.0-57fc6cb0bede048837aac98d35cf6b8313744289f72065e6fc52e5fdbc80af55", - "pkg-cabal-sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "pkg-version": "1.5.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-97017a9d9bbeba61aac6911474a6f41b861647a1f4775c33e658383473e80236", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-c16febbbc72aec1e225ebb9c3a9e309f0b863c8c1daf526ed25eb973d00988b7", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-9bc6b525659d774c752b8f03bd181b5685083bbd721e0aae2453680b967f190a", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-0d3af46c4e96248ff224e166b7eeac00fb5c640031160c65aee2fbb62eae3a10", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.19.0.0-6941", - "transformers-0.6.1.0-ca30" - ], - "id": "mtl-2.3.1-4a2f", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "deepseq-1.5.0.0-c95f", - "exceptions-0.10.7-af9c", - "template-haskell-2.21.0.0-183a" - ], - "exe-depends": [], - "flags": {}, - "id": "os-string-2.0.6-fc3c6eebb11cf5d57bd9d5321187b826dff45c77282c4b3ba27069994798766e", - "pkg-cabal-sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "pkg-name": "os-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "pkg-version": "2.0.6", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "mtl-2.3.1-4a2f", - "text-2.1-6316" - ], - "id": "parsec-3.1.17.0-53fa", - "pkg-name": "parsec", - "pkg-version": "3.1.17.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.0.0-6941", - "deepseq-1.5.0.0-c95f", - "ghc-prim-0.11.0-59e0" - ], - "id": "pretty-1.1.3.6-da5d", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "deepseq-1.5.0.0-c95f", - "template-haskell-2.21.0.0-183a", - "transformers-0.6.1.0-ca30" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-7eaa2043d01d682aa8d36ebff20fec6151ca77111a09ae6ec97e3900e07857ea", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.19.0.0-6941", - "deepseq-1.5.0.0-c95f", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "unix-2.8.5.1-0873e9b02610edbf279beb92e77d5b690dedce1cb7ee32086cb8b3d10078d5ec" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-059048d46790f22fe6c5d85177ea3cc0a42c5c4776dde771018fca762395a1d8", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "deepseq-1.5.0.0-c95f", - "mtl-2.3.1-4a2f", - "splitmix-0.1.0.5-e2c554b21d2bee8ceb2a9674a2a139e583617903bea85de3df97fa23d45cb6a6" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-49549899284a493b064230683a3793b39d91161b7c55eddbcf4c250370e0c9de", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "binary-0.8.9.1-dc44", - "bytestring-0.12.0.2-bcd5", - "deepseq-1.5.0.0-c95f", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "extra-1.8-5a260bf5b6e0c0fac92f7523caec82349e6378eb0a59cb7b260abf06dd1d165e", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "filepattern-0.1.3-278bfefb513b3c2e6276bf09f2ab6b7cd07a198d7f9387d50716a3c9337e67b3", - "hashable-1.5.0.0-57fc6cb0bede048837aac98d35cf6b8313744289f72065e6fc52e5fdbc80af55", - "heaps-0.4-97017a9d9bbeba61aac6911474a6f41b861647a1f4775c33e658383473e80236", - "js-dgtable-0.5.2-c16febbbc72aec1e225ebb9c3a9e309f0b863c8c1daf526ed25eb973d00988b7", - "js-flot-0.8.3-9bc6b525659d774c752b8f03bd181b5685083bbd721e0aae2453680b967f190a", - "js-jquery-3.3.1-0d3af46c4e96248ff224e166b7eeac00fb5c640031160c65aee2fbb62eae3a10", - "primitive-0.9.0.0-7eaa2043d01d682aa8d36ebff20fec6151ca77111a09ae6ec97e3900e07857ea", - "process-1.6.25.0-059048d46790f22fe6c5d85177ea3cc0a42c5c4776dde771018fca762395a1d8", - "random-1.2.1.2-49549899284a493b064230683a3793b39d91161b7c55eddbcf4c250370e0c9de", - "time-1.12.2-6806", - "transformers-0.6.1.0-ca30", - "unix-2.8.5.1-0873e9b02610edbf279beb92e77d5b690dedce1cb7ee32086cb8b3d10078d5ec", - "unordered-containers-0.2.20-865e93695bef3263597ec141e0560eb2335f59af6faa50161713636d9c38da1d", - "utf8-string-1.0.2-2891cafc8564970b634c456aecd9e3a030926f0f43ace5c2f28d603525787523" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-29fc1ed93ebf1d54873d10da2d44c25660185d887017bfebf58e7286860db679", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.8.1/shake-0.19.8-e-shake-8b8380087603a87640611d915c880dfcd012ad5b7d17dfe06f16aab67b7c080f/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.19.0.0-6941", - "binary-0.8.9.1-dc44", - "bytestring-0.12.0.2-bcd5", - "deepseq-1.5.0.0-c95f", - "directory-1.3.9.0-d195e1ae6d7c46e50984279317a8ee65f0770030bd0ceee13d9dadb3e299c9f0", - "extra-1.8-5a260bf5b6e0c0fac92f7523caec82349e6378eb0a59cb7b260abf06dd1d165e", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "filepattern-0.1.3-278bfefb513b3c2e6276bf09f2ab6b7cd07a198d7f9387d50716a3c9337e67b3", - "hashable-1.5.0.0-57fc6cb0bede048837aac98d35cf6b8313744289f72065e6fc52e5fdbc80af55", - "heaps-0.4-97017a9d9bbeba61aac6911474a6f41b861647a1f4775c33e658383473e80236", - "js-dgtable-0.5.2-c16febbbc72aec1e225ebb9c3a9e309f0b863c8c1daf526ed25eb973d00988b7", - "js-flot-0.8.3-9bc6b525659d774c752b8f03bd181b5685083bbd721e0aae2453680b967f190a", - "js-jquery-3.3.1-0d3af46c4e96248ff224e166b7eeac00fb5c640031160c65aee2fbb62eae3a10", - "primitive-0.9.0.0-7eaa2043d01d682aa8d36ebff20fec6151ca77111a09ae6ec97e3900e07857ea", - "process-1.6.25.0-059048d46790f22fe6c5d85177ea3cc0a42c5c4776dde771018fca762395a1d8", - "random-1.2.1.2-49549899284a493b064230683a3793b39d91161b7c55eddbcf4c250370e0c9de", - "time-1.12.2-6806", - "transformers-0.6.1.0-ca30", - "unix-2.8.5.1-0873e9b02610edbf279beb92e77d5b690dedce1cb7ee32086cb8b3d10078d5ec", - "unordered-containers-0.2.20-865e93695bef3263597ec141e0560eb2335f59af6faa50161713636d9c38da1d", - "utf8-string-1.0.2-2891cafc8564970b634c456aecd9e3a030926f0f43ace5c2f28d603525787523" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-8b8380087603a87640611d915c880dfcd012ad5b7d17dfe06f16aab67b7c080f", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "deepseq-1.5.0.0-c95f" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-e2c554b21d2bee8ceb2a9674a2a139e583617903bea85de3df97fa23d45cb6a6", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0-71f5", - "base-4.19.0.0-6941" - ], - "id": "stm-2.5.2.1-a112", - "pkg-name": "stm", - "pkg-version": "2.5.2.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.0.0-6941", - "ghc-boot-th-9.8.1-1aaa", - "ghc-prim-0.11.0-59e0", - "pretty-1.1.3.6-da5d" - ], - "id": "template-haskell-2.21.0.0-183a", - "pkg-name": "template-haskell", - "pkg-version": "2.21.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.6.0-71f5", - "base-4.19.0.0-6941", - "binary-0.8.9.1-dc44", - "bytestring-0.12.0.2-bcd5", - "deepseq-1.5.0.0-c95f", - "ghc-prim-0.11.0-59e0", - "template-haskell-2.21.0.0-183a" - ], - "id": "text-2.1-6316", - "pkg-name": "text", - "pkg-version": "2.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.0.0-6941", - "deepseq-1.5.0.0-c95f" - ], - "id": "time-1.12.2-6806", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.0.0-6941" - ], - "id": "transformers-0.6.1.0-ca30", - "pkg-name": "transformers", - "pkg-version": "0.6.1.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5", - "filepath-1.5.3.0-ac62c6e411831fbb0b0f12bb49a1dea52aa40f0a06d00314cf6e09339fe879ea", - "os-string-2.0.6-fc3c6eebb11cf5d57bd9d5321187b826dff45c77282c4b3ba27069994798766e", - "time-1.12.2-6806" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "unix-2.8.5.1-0873e9b02610edbf279beb92e77d5b690dedce1cb7ee32086cb8b3d10078d5ec", - "pkg-cabal-sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "pkg-name": "unix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "pkg-version": "2.8.5.1", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "deepseq-1.5.0.0-c95f", - "hashable-1.5.0.0-57fc6cb0bede048837aac98d35cf6b8313744289f72065e6fc52e5fdbc80af55", - "template-haskell-2.21.0.0-183a" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-865e93695bef3263597ec141e0560eb2335f59af6faa50161713636d9c38da1d", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.0.0-6941", - "bytestring-0.12.0.2-bcd5" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-2891cafc8564970b634c456aecd9e3a030926f0f43ace5c2f28d603525787523", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-9_8_2.json b/hadrian/bootstrap/plan-9_8_2.json deleted file mode 100644 index 28d73c3f9fd5..000000000000 --- a/hadrian/bootstrap/plan-9_8_2.json +++ /dev/null @@ -1,1039 +0,0 @@ -{ - "arch": "x86_64", - "cabal-lib-version": "3.10.1.0", - "cabal-version": "3.10.2.1", - "compiler-id": "ghc-9.8.2", - "install-plan": [ - { - "component-name": "lib", - "depends": [ - "Cabal-syntax-3.14.0.0-863af134a2ff70594717e6bcb77b2138a9622328e71b270a7abcf953b44b2c8a", - "array-0.5.6.0-90bb", - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "containers-0.6.8-2b53", - "deepseq-1.5.0.0-d873", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "mtl-2.3.1-3d66", - "parsec-3.1.17.0-cd16", - "pretty-1.1.3.6-b1b7", - "process-1.6.25.0-6e51bd50085739ab967a40bd6f9922559cef5e26ea884280d4552bc9fb0b060c", - "time-1.12.2-cc0e", - "transformers-0.6.1.0-2d4d", - "unix-2.8.5.1-436fb3ee8116253a67952653e6a0a3d8bebe30606a3c55925b19bf3178c8a71f" - ], - "exe-depends": [], - "flags": {}, - "id": "Cabal-3.14.0.0-fdd9dcee8845d1badd01a481cc41f3d081a2d63ab41dfbcf3d7fe7519923908c", - "pkg-cabal-sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "pkg-name": "Cabal", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "array-0.5.6.0-90bb", - "base-4.19.1.0-862d", - "binary-0.8.9.1-36c9", - "bytestring-0.12.1.0-1789", - "containers-0.6.8-2b53", - "deepseq-1.5.0.0-d873", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "mtl-2.3.1-3d66", - "parsec-3.1.17.0-cd16", - "pretty-1.1.3.6-b1b7", - "text-2.1.1-50de", - "time-1.12.2-cc0e", - "transformers-0.6.1.0-2d4d" - ], - "exe-depends": [ - "alex-3.5.1.0-e-alex-4d53ed0c154f6e8a1dfb99e6c1760cd3711c51c3bc702f1c7856fa263d3cf6dd" - ], - "flags": {}, - "id": "Cabal-syntax-3.14.0.0-863af134a2ff70594717e6bcb77b2138a9622328e71b270a7abcf953b44b2c8a", - "pkg-cabal-sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "pkg-name": "Cabal-syntax", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "pkg-version": "3.14.0.0", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.8.2/alex-3.5.1.0-e-alex-4d53ed0c154f6e8a1dfb99e6c1760cd3711c51c3bc702f1c7856fa263d3cf6dd/bin/alex", - "component-name": "exe:alex", - "depends": [ - "array-0.5.6.0-90bb", - "base-4.19.1.0-862d", - "containers-0.6.8-2b53", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e" - ], - "exe-depends": [], - "flags": {}, - "id": "alex-3.5.1.0-e-alex-4d53ed0c154f6e8a1dfb99e6c1760cd3711c51c3bc702f1c7856fa263d3cf6dd", - "pkg-cabal-sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "pkg-name": "alex", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "pkg-version": "3.5.1.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.19.1.0-862d" - ], - "id": "array-0.5.6.0-90bb", - "pkg-name": "array", - "pkg-version": "0.5.6.0", - "type": "pre-existing" - }, - { - "depends": [ - "ghc-bignum-1.3-9fc4", - "ghc-prim-0.11.0-b1e3", - "rts-1.0.2" - ], - "id": "base-4.19.1.0-862d", - "pkg-name": "base", - "pkg-version": "4.19.1.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789" - ], - "exe-depends": [], - "flags": {}, - "id": "base16-bytestring-1.0.2.0-4f1a5c6fe8c25469038a6b3044fad43b7a2819e72a2da08355d9cfdcdfde8c12", - "pkg-cabal-sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "pkg-name": "base16-bytestring", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "pkg-version": "1.0.2.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0-90bb", - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "containers-0.6.8-2b53" - ], - "id": "binary-0.8.9.1-36c9", - "pkg-name": "binary", - "pkg-version": "0.8.9.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.1.0-862d", - "deepseq-1.5.0.0-d873", - "ghc-prim-0.11.0-b1e3", - "template-haskell-2.21.0.0-b192" - ], - "id": "bytestring-0.12.1.0-1789", - "pkg-name": "bytestring", - "pkg-version": "0.12.1.0", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d" - ], - "exe-depends": [], - "flags": { - "llvm": false - }, - "id": "clock-0.8.4-10b60a6cab6a1ec710e88674cb0fa4454a9ad7b691ac693d073169384fab921a", - "pkg-cabal-sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "pkg-name": "clock", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "pkg-version": "0.8.4", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0-90bb", - "base-4.19.1.0-862d", - "deepseq-1.5.0.0-d873", - "template-haskell-2.21.0.0-b192" - ], - "id": "containers-0.6.8-2b53", - "pkg-name": "containers", - "pkg-version": "0.6.8", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789" - ], - "exe-depends": [], - "flags": { - "exe": false, - "use-cbits": true - }, - "id": "cryptohash-sha256-0.11.102.1-b4ec36a5204345ff3c91a3ba59814d692ca5b5e6748b1e7b9ebedfbdd84d4808", - "pkg-cabal-sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "pkg-name": "cryptohash-sha256", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "pkg-version": "0.11.102.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0-90bb", - "base-4.19.1.0-862d", - "ghc-prim-0.11.0-b1e3" - ], - "id": "deepseq-1.5.0.0-d873", - "pkg-name": "deepseq", - "pkg-version": "1.5.0.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.19.1.0-862d", - "file-io-0.1.4-57212bfd631249f572fe052b4fde01c840a345652e59843d3aac0c6160fb767b", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "os-string-2.0.6-4328680afa00f06cb99325b9cc6accacdba97ded50e106f120795c7c7dd3b89d", - "time-1.12.2-cc0e", - "unix-2.8.5.1-436fb3ee8116253a67952653e6a0a3d8bebe30606a3c55925b19bf3178c8a71f" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "pkg-cabal-sha256": "ae73d4c39d18842f57d48649f4583347823ef7b1bc0bde786ca39141f7fd8c87", - "pkg-name": "directory", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "pkg-version": "1.3.9.0", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.19.1.0-862d", - "mtl-2.3.1-3d66", - "stm-2.5.2.1-391a", - "template-haskell-2.21.0.0-b192", - "transformers-0.6.1.0-2d4d" - ], - "id": "exceptions-0.10.7-e08a", - "pkg-name": "exceptions", - "pkg-version": "0.10.7", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "clock-0.8.4-10b60a6cab6a1ec710e88674cb0fa4454a9ad7b691ac693d073169384fab921a", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "process-1.6.25.0-6e51bd50085739ab967a40bd6f9922559cef5e26ea884280d4552bc9fb0b060c", - "time-1.12.2-cc0e", - "unix-2.8.5.1-436fb3ee8116253a67952653e6a0a3d8bebe30606a3c55925b19bf3178c8a71f" - ], - "exe-depends": [], - "flags": {}, - "id": "extra-1.8-ea122636b807380890371c8ce7820dda77d758d50467f6efc1f5770f75bb99dc", - "pkg-cabal-sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "pkg-name": "extra", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "pkg-version": "1.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "deepseq-1.5.0.0-d873", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "os-string-2.0.6-4328680afa00f06cb99325b9cc6accacdba97ded50e106f120795c7c7dd3b89d", - "unix-2.8.5.1-436fb3ee8116253a67952653e6a0a3d8bebe30606a3c55925b19bf3178c8a71f" - ], - "exe-depends": [], - "flags": { - "os-string": true - }, - "id": "file-io-0.1.4-57212bfd631249f572fe052b4fde01c840a345652e59843d3aac0c6160fb767b", - "pkg-cabal-sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "pkg-name": "file-io", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "pkg-version": "0.1.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "deepseq-1.5.0.0-d873", - "exceptions-0.10.7-e08a", - "os-string-2.0.6-4328680afa00f06cb99325b9cc6accacdba97ded50e106f120795c7c7dd3b89d", - "template-haskell-2.21.0.0-b192" - ], - "exe-depends": [], - "flags": { - "cpphs": false - }, - "id": "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "pkg-cabal-sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "pkg-name": "filepath", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "pkg-version": "1.5.3.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "extra-1.8-ea122636b807380890371c8ce7820dda77d758d50467f6efc1f5770f75bb99dc", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b" - ], - "exe-depends": [], - "flags": {}, - "id": "filepattern-0.1.3-88aaad27b1d8988771b3811f5a92fc3dde77e329845e21ce16c7132193ff2eae", - "pkg-cabal-sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "pkg-name": "filepattern", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "pkg-version": "0.1.3", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "ghc-prim-0.11.0-b1e3" - ], - "id": "ghc-bignum-1.3-9fc4", - "pkg-name": "ghc-bignum", - "pkg-version": "1.3", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.1.0-862d" - ], - "id": "ghc-boot-th-9.8.2-bff4", - "pkg-name": "ghc-boot-th", - "pkg-version": "9.8.2", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.2/ghc-platform-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.2/ghc-platform-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-platform-0.1.0.0-inplace", - "pkg-name": "ghc-platform", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../libraries/ghc-platform", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "depends": [ - "rts-1.0.2" - ], - "id": "ghc-prim-0.11.0-b1e3", - "pkg-name": "ghc-prim", - "pkg-version": "0.11.0", - "type": "pre-existing" - }, - { - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.2/ghc-toolchain-0.1.0.0/build-info.json", - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "ghc-platform-0.1.0.0-inplace", - "process-1.6.25.0-6e51bd50085739ab967a40bd6f9922559cef5e26ea884280d4552bc9fb0b060c", - "text-2.1.1-50de", - "transformers-0.6.1.0-2d4d" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.2/ghc-toolchain-0.1.0.0", - "exe-depends": [], - "flags": {}, - "id": "ghc-toolchain-0.1.0.0-inplace", - "pkg-name": "ghc-toolchain", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/../utils/ghc-toolchain", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "bin-file": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.2/hadrian-0.1.0.0/x/hadrian/build/hadrian/hadrian", - "build-info": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.2/hadrian-0.1.0.0/x/hadrian/build-info.json", - "component-name": "exe:hadrian", - "depends": [ - "Cabal-3.14.0.0-fdd9dcee8845d1badd01a481cc41f3d081a2d63ab41dfbcf3d7fe7519923908c", - "base-4.19.1.0-862d", - "base16-bytestring-1.0.2.0-4f1a5c6fe8c25469038a6b3044fad43b7a2819e72a2da08355d9cfdcdfde8c12", - "bytestring-0.12.1.0-1789", - "containers-0.6.8-2b53", - "cryptohash-sha256-0.11.102.1-b4ec36a5204345ff3c91a3ba59814d692ca5b5e6748b1e7b9ebedfbdd84d4808", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "extra-1.8-ea122636b807380890371c8ce7820dda77d758d50467f6efc1f5770f75bb99dc", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "ghc-platform-0.1.0.0-inplace", - "ghc-toolchain-0.1.0.0-inplace", - "mtl-2.3.1-3d66", - "parsec-3.1.17.0-cd16", - "shake-0.19.8-3185b13a28e87c1ccc4f1964a53fc11417f27f8e205db1ae7a852cf0da9cba8f", - "text-2.1.1-50de", - "time-1.12.2-cc0e", - "transformers-0.6.1.0-2d4d", - "unordered-containers-0.2.20-e18f3ad7370b626529529039cd7fa22659f7bd145a494976cef55b8aae03b016" - ], - "dist-dir": "/mnt/data/exp/ghc/ghc-landing/hadrian/dist-newstyle/build/x86_64-linux/ghc-9.8.2/hadrian-0.1.0.0/x/hadrian", - "exe-depends": [], - "flags": { - "selftest": false, - "threaded": true - }, - "id": "hadrian-0.1.0.0-inplace-hadrian", - "pkg-name": "hadrian", - "pkg-src": { - "path": "/mnt/data/exp/ghc/ghc-landing/hadrian/.", - "type": "local" - }, - "pkg-version": "0.1.0.0", - "style": "local", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "containers-0.6.8-2b53", - "deepseq-1.5.0.0-d873", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "ghc-bignum-1.3-9fc4", - "ghc-prim-0.11.0-b1e3", - "os-string-2.0.6-4328680afa00f06cb99325b9cc6accacdba97ded50e106f120795c7c7dd3b89d", - "text-2.1.1-50de" - ], - "exe-depends": [], - "flags": { - "arch-native": false, - "random-initial-seed": false - }, - "id": "hashable-1.5.0.0-63fcd9669e38234b06f7057ddca122971106916bb543112379e3a0c5bae2e3a6", - "pkg-cabal-sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "pkg-name": "hashable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "pkg-version": "1.5.0.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d" - ], - "exe-depends": [], - "flags": {}, - "id": "heaps-0.4-57f38faed0379d4b879fc89371250df434a889180c19939350b75804c7e227c5", - "pkg-cabal-sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "pkg-name": "heaps", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "pkg-version": "0.4", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d" - ], - "exe-depends": [], - "flags": {}, - "id": "js-dgtable-0.5.2-caeac9a40681890f7ad9665f722ca9aba5b1b018590928f470799766c48054b6", - "pkg-cabal-sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "pkg-name": "js-dgtable", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "pkg-version": "0.5.2", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d" - ], - "exe-depends": [], - "flags": {}, - "id": "js-flot-0.8.3-989f35eb0f18e34624b72b109096d27f9c429ab2b28657df7ce8bf6212c6d2e0", - "pkg-cabal-sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "pkg-name": "js-flot", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "pkg-version": "0.8.3", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d" - ], - "exe-depends": [], - "flags": {}, - "id": "js-jquery-3.3.1-1e0320b053717d3e4eb4b7bc86a662321a938f28e1320c7a54408f041a023da4", - "pkg-cabal-sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "pkg-name": "js-jquery", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "pkg-version": "3.3.1", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.19.1.0-862d", - "transformers-0.6.1.0-2d4d" - ], - "id": "mtl-2.3.1-3d66", - "pkg-name": "mtl", - "pkg-version": "2.3.1", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "deepseq-1.5.0.0-d873", - "exceptions-0.10.7-e08a", - "template-haskell-2.21.0.0-b192" - ], - "exe-depends": [], - "flags": {}, - "id": "os-string-2.0.6-4328680afa00f06cb99325b9cc6accacdba97ded50e106f120795c7c7dd3b89d", - "pkg-cabal-sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "pkg-name": "os-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "pkg-version": "2.0.6", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "mtl-2.3.1-3d66", - "text-2.1.1-50de" - ], - "id": "parsec-3.1.17.0-cd16", - "pkg-name": "parsec", - "pkg-version": "3.1.17.0", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.1.0-862d", - "deepseq-1.5.0.0-d873", - "ghc-prim-0.11.0-b1e3" - ], - "id": "pretty-1.1.3.6-b1b7", - "pkg-name": "pretty", - "pkg-version": "1.1.3.6", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "deepseq-1.5.0.0-d873", - "template-haskell-2.21.0.0-b192", - "transformers-0.6.1.0-2d4d" - ], - "exe-depends": [], - "flags": {}, - "id": "primitive-0.9.0.0-e67cc8174e1d1758a3fa78cb4a195607b3628bac4f1ab936820deeee55d44c90", - "pkg-cabal-sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "pkg-name": "primitive", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "pkg-version": "0.9.0.0", - "style": "global", - "type": "configured" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.19.1.0-862d", - "deepseq-1.5.0.0-d873", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "unix-2.8.5.1-436fb3ee8116253a67952653e6a0a3d8bebe30606a3c55925b19bf3178c8a71f" - ], - "exe-depends": [] - } - }, - "flags": {}, - "id": "process-1.6.25.0-6e51bd50085739ab967a40bd6f9922559cef5e26ea884280d4552bc9fb0b060c", - "pkg-cabal-sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "pkg-name": "process", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "pkg-version": "1.6.25.0", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "deepseq-1.5.0.0-d873", - "mtl-2.3.1-3d66", - "splitmix-0.1.0.5-b32d131f2beda024a71dda9915a2e3ac5cabe2374c49d7803ca28478f723dace" - ], - "exe-depends": [], - "flags": {}, - "id": "random-1.2.1.2-ba9313e35663fd89a1e79076bfc407cdd4059d0de33e69609bab47e10d1bd68f", - "pkg-cabal-sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "pkg-name": "random", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "pkg-version": "1.2.1.2", - "style": "global", - "type": "configured" - }, - { - "depends": [], - "id": "rts-1.0.2", - "pkg-name": "rts", - "pkg-version": "1.0.2", - "type": "pre-existing" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "binary-0.8.9.1-36c9", - "bytestring-0.12.1.0-1789", - "deepseq-1.5.0.0-d873", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "extra-1.8-ea122636b807380890371c8ce7820dda77d758d50467f6efc1f5770f75bb99dc", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "filepattern-0.1.3-88aaad27b1d8988771b3811f5a92fc3dde77e329845e21ce16c7132193ff2eae", - "hashable-1.5.0.0-63fcd9669e38234b06f7057ddca122971106916bb543112379e3a0c5bae2e3a6", - "heaps-0.4-57f38faed0379d4b879fc89371250df434a889180c19939350b75804c7e227c5", - "js-dgtable-0.5.2-caeac9a40681890f7ad9665f722ca9aba5b1b018590928f470799766c48054b6", - "js-flot-0.8.3-989f35eb0f18e34624b72b109096d27f9c429ab2b28657df7ce8bf6212c6d2e0", - "js-jquery-3.3.1-1e0320b053717d3e4eb4b7bc86a662321a938f28e1320c7a54408f041a023da4", - "primitive-0.9.0.0-e67cc8174e1d1758a3fa78cb4a195607b3628bac4f1ab936820deeee55d44c90", - "process-1.6.25.0-6e51bd50085739ab967a40bd6f9922559cef5e26ea884280d4552bc9fb0b060c", - "random-1.2.1.2-ba9313e35663fd89a1e79076bfc407cdd4059d0de33e69609bab47e10d1bd68f", - "time-1.12.2-cc0e", - "transformers-0.6.1.0-2d4d", - "unix-2.8.5.1-436fb3ee8116253a67952653e6a0a3d8bebe30606a3c55925b19bf3178c8a71f", - "unordered-containers-0.2.20-e18f3ad7370b626529529039cd7fa22659f7bd145a494976cef55b8aae03b016", - "utf8-string-1.0.2-2c319b13f676bd9444a7f639a7f5979c51266185d4f48e8a2f833c011fcf8c0e" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-3185b13a28e87c1ccc4f1964a53fc11417f27f8e205db1ae7a852cf0da9cba8f", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "bin-file": "/home/ben/.cabal/store/ghc-9.8.2/shake-0.19.8-e-shake-1182c34e52e113a54b22e0e4e9dcfecaf0bb56b3837961698f78a49985e45b0d/bin/shake", - "component-name": "exe:shake", - "depends": [ - "base-4.19.1.0-862d", - "binary-0.8.9.1-36c9", - "bytestring-0.12.1.0-1789", - "deepseq-1.5.0.0-d873", - "directory-1.3.9.0-f8f58d14abc808bc25fcccde2d0ab8df1739bfcf56e8629802157ff1f25daf9e", - "extra-1.8-ea122636b807380890371c8ce7820dda77d758d50467f6efc1f5770f75bb99dc", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "filepattern-0.1.3-88aaad27b1d8988771b3811f5a92fc3dde77e329845e21ce16c7132193ff2eae", - "hashable-1.5.0.0-63fcd9669e38234b06f7057ddca122971106916bb543112379e3a0c5bae2e3a6", - "heaps-0.4-57f38faed0379d4b879fc89371250df434a889180c19939350b75804c7e227c5", - "js-dgtable-0.5.2-caeac9a40681890f7ad9665f722ca9aba5b1b018590928f470799766c48054b6", - "js-flot-0.8.3-989f35eb0f18e34624b72b109096d27f9c429ab2b28657df7ce8bf6212c6d2e0", - "js-jquery-3.3.1-1e0320b053717d3e4eb4b7bc86a662321a938f28e1320c7a54408f041a023da4", - "primitive-0.9.0.0-e67cc8174e1d1758a3fa78cb4a195607b3628bac4f1ab936820deeee55d44c90", - "process-1.6.25.0-6e51bd50085739ab967a40bd6f9922559cef5e26ea884280d4552bc9fb0b060c", - "random-1.2.1.2-ba9313e35663fd89a1e79076bfc407cdd4059d0de33e69609bab47e10d1bd68f", - "time-1.12.2-cc0e", - "transformers-0.6.1.0-2d4d", - "unix-2.8.5.1-436fb3ee8116253a67952653e6a0a3d8bebe30606a3c55925b19bf3178c8a71f", - "unordered-containers-0.2.20-e18f3ad7370b626529529039cd7fa22659f7bd145a494976cef55b8aae03b016", - "utf8-string-1.0.2-2c319b13f676bd9444a7f639a7f5979c51266185d4f48e8a2f833c011fcf8c0e" - ], - "exe-depends": [], - "flags": { - "cloud": false, - "embed-files": false, - "portable": false, - "threaded": true - }, - "id": "shake-0.19.8-e-shake-1182c34e52e113a54b22e0e4e9dcfecaf0bb56b3837961698f78a49985e45b0d", - "pkg-cabal-sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "pkg-name": "shake", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "pkg-version": "0.19.8", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "deepseq-1.5.0.0-d873" - ], - "exe-depends": [], - "flags": { - "optimised-mixer": false - }, - "id": "splitmix-0.1.0.5-b32d131f2beda024a71dda9915a2e3ac5cabe2374c49d7803ca28478f723dace", - "pkg-cabal-sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "pkg-name": "splitmix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "pkg-version": "0.1.0.5", - "style": "global", - "type": "configured" - }, - { - "depends": [ - "array-0.5.6.0-90bb", - "base-4.19.1.0-862d" - ], - "id": "stm-2.5.2.1-391a", - "pkg-name": "stm", - "pkg-version": "2.5.2.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.1.0-862d", - "ghc-boot-th-9.8.2-bff4", - "ghc-prim-0.11.0-b1e3", - "pretty-1.1.3.6-b1b7" - ], - "id": "template-haskell-2.21.0.0-b192", - "pkg-name": "template-haskell", - "pkg-version": "2.21.0.0", - "type": "pre-existing" - }, - { - "depends": [ - "array-0.5.6.0-90bb", - "base-4.19.1.0-862d", - "binary-0.8.9.1-36c9", - "bytestring-0.12.1.0-1789", - "deepseq-1.5.0.0-d873", - "ghc-prim-0.11.0-b1e3", - "template-haskell-2.21.0.0-b192" - ], - "id": "text-2.1.1-50de", - "pkg-name": "text", - "pkg-version": "2.1.1", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.1.0-862d", - "deepseq-1.5.0.0-d873" - ], - "id": "time-1.12.2-cc0e", - "pkg-name": "time", - "pkg-version": "1.12.2", - "type": "pre-existing" - }, - { - "depends": [ - "base-4.19.1.0-862d" - ], - "id": "transformers-0.6.1.0-2d4d", - "pkg-name": "transformers", - "pkg-version": "0.6.1.0", - "type": "pre-existing" - }, - { - "components": { - "lib": { - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789", - "filepath-1.5.3.0-dd09a32c1411fbb00c1abe35accd9f23d46ba47d1dea574ab26ac12eeba2622b", - "os-string-2.0.6-4328680afa00f06cb99325b9cc6accacdba97ded50e106f120795c7c7dd3b89d", - "time-1.12.2-cc0e" - ], - "exe-depends": [] - } - }, - "flags": { - "os-string": true - }, - "id": "unix-2.8.5.1-436fb3ee8116253a67952653e6a0a3d8bebe30606a3c55925b19bf3178c8a71f", - "pkg-cabal-sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "pkg-name": "unix", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "pkg-version": "2.8.5.1", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "deepseq-1.5.0.0-d873", - "hashable-1.5.0.0-63fcd9669e38234b06f7057ddca122971106916bb543112379e3a0c5bae2e3a6", - "template-haskell-2.21.0.0-b192" - ], - "exe-depends": [], - "flags": { - "debug": false - }, - "id": "unordered-containers-0.2.20-e18f3ad7370b626529529039cd7fa22659f7bd145a494976cef55b8aae03b016", - "pkg-cabal-sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "pkg-name": "unordered-containers", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "pkg-version": "0.2.20", - "style": "global", - "type": "configured" - }, - { - "component-name": "lib", - "depends": [ - "base-4.19.1.0-862d", - "bytestring-0.12.1.0-1789" - ], - "exe-depends": [], - "flags": {}, - "id": "utf8-string-1.0.2-2c319b13f676bd9444a7f639a7f5979c51266185d4f48e8a2f833c011fcf8c0e", - "pkg-cabal-sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "pkg-name": "utf8-string", - "pkg-src": { - "repo": { - "type": "secure-repo", - "uri": "http://hackage.haskell.org/" - }, - "type": "repo-tar" - }, - "pkg-src-sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "pkg-version": "1.0.2", - "style": "global", - "type": "configured" - } - ], - "os": "linux" -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_10_1.json b/hadrian/bootstrap/plan-bootstrap-9_10_1.json deleted file mode 100644 index 025a0b72de0b..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_10_1.json +++ /dev/null @@ -1,372 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.11.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "ghc-internal", - "version": "9.1001.0" - }, - { - "package": "base", - "version": "4.20.0.0" - }, - { - "package": "array", - "version": "0.5.7.0" - }, - { - "package": "deepseq", - "version": "1.5.0.0" - }, - { - "package": "ghc-boot-th", - "version": "9.10.1" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.22.0.0" - }, - { - "package": "containers", - "version": "0.7" - }, - { - "package": "bytestring", - "version": "0.12.1.0" - }, - { - "package": "transformers", - "version": "0.6.1.1" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.3.1" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "os-string", - "version": "2.0.2" - }, - { - "package": "filepath", - "version": "1.5.2.0" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "unix", - "version": "2.8.5.1" - }, - { - "package": "binary", - "version": "0.8.9.2" - }, - { - "package": "text", - "version": "2.1.1" - }, - { - "package": "parsec", - "version": "3.1.17.0" - } - ], - "dependencies": [ - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "+os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "+os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "version": "1.5.0.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_6_1.json b/hadrian/bootstrap/plan-bootstrap-9_6_1.json deleted file mode 100644 index 82871c2f7db1..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_6_1.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.10.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "base", - "version": "4.18.0.0" - }, - { - "package": "array", - "version": "0.5.5.0" - }, - { - "package": "deepseq", - "version": "1.4.8.1" - }, - { - "package": "ghc-boot-th", - "version": "9.6.1" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.20.0.0" - }, - { - "package": "containers", - "version": "0.6.7" - }, - { - "package": "bytestring", - "version": "0.11.4.0" - }, - { - "package": "transformers", - "version": "0.6.1.0" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.1.0" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "binary", - "version": "0.8.9.1" - }, - { - "package": "text", - "version": "2.0.2" - }, - { - "package": "parsec", - "version": "3.1.16.1" - } - ], - "dependencies": [ - { - "cabal_sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "component": "lib:os-string", - "flags": [], - "package": "os-string", - "revision": 0, - "source": "hackage", - "src_sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "version": "2.0.6" - }, - { - "cabal_sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "component": "lib:filepath", - "flags": [ - "-cpphs" - ], - "package": "filepath", - "revision": 0, - "source": "hackage", - "src_sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "version": "1.5.3.0" - }, - { - "cabal_sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "component": "lib:unix", - "flags": [ - "+os-string" - ], - "package": "unix", - "revision": 0, - "source": "hackage", - "src_sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "version": "2.8.5.1" - }, - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "+os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "+os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "573f3ab242f75465a0d67ce9d84202650a1606575e6dbd6d31ffcf4767a9a379", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "+integer-gmp", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "3baee4c9027a08830d148ec524cbc0471de645e1e8426d46780ef2758df0e8da", - "version": "1.4.7.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_6_2.json b/hadrian/bootstrap/plan-bootstrap-9_6_2.json deleted file mode 100644 index 78d46becbc02..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_6_2.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.10.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "base", - "version": "4.18.0.0" - }, - { - "package": "array", - "version": "0.5.5.0" - }, - { - "package": "deepseq", - "version": "1.4.8.1" - }, - { - "package": "ghc-boot-th", - "version": "9.6.2" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.20.0.0" - }, - { - "package": "containers", - "version": "0.6.7" - }, - { - "package": "bytestring", - "version": "0.11.4.0" - }, - { - "package": "transformers", - "version": "0.6.1.0" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.1.0" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "binary", - "version": "0.8.9.1" - }, - { - "package": "text", - "version": "2.0.2" - }, - { - "package": "parsec", - "version": "3.1.16.1" - } - ], - "dependencies": [ - { - "cabal_sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "component": "lib:os-string", - "flags": [], - "package": "os-string", - "revision": 0, - "source": "hackage", - "src_sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "version": "2.0.6" - }, - { - "cabal_sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "component": "lib:filepath", - "flags": [ - "-cpphs" - ], - "package": "filepath", - "revision": 0, - "source": "hackage", - "src_sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "version": "1.5.3.0" - }, - { - "cabal_sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "component": "lib:unix", - "flags": [ - "+os-string" - ], - "package": "unix", - "revision": 0, - "source": "hackage", - "src_sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "version": "2.8.5.1" - }, - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "+os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "+os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "573f3ab242f75465a0d67ce9d84202650a1606575e6dbd6d31ffcf4767a9a379", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "+integer-gmp", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "3baee4c9027a08830d148ec524cbc0471de645e1e8426d46780ef2758df0e8da", - "version": "1.4.7.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_6_3.json b/hadrian/bootstrap/plan-bootstrap-9_6_3.json deleted file mode 100644 index 06e1e067cbc0..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_6_3.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.10.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "base", - "version": "4.18.1.0" - }, - { - "package": "array", - "version": "0.5.5.0" - }, - { - "package": "deepseq", - "version": "1.4.8.1" - }, - { - "package": "ghc-boot-th", - "version": "9.6.3" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.20.0.0" - }, - { - "package": "containers", - "version": "0.6.7" - }, - { - "package": "bytestring", - "version": "0.11.5.2" - }, - { - "package": "transformers", - "version": "0.6.1.0" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.1.0" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "binary", - "version": "0.8.9.1" - }, - { - "package": "text", - "version": "2.0.2" - }, - { - "package": "parsec", - "version": "3.1.16.1" - } - ], - "dependencies": [ - { - "cabal_sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "component": "lib:os-string", - "flags": [], - "package": "os-string", - "revision": 0, - "source": "hackage", - "src_sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "version": "2.0.6" - }, - { - "cabal_sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "component": "lib:filepath", - "flags": [ - "-cpphs" - ], - "package": "filepath", - "revision": 0, - "source": "hackage", - "src_sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "version": "1.5.3.0" - }, - { - "cabal_sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "component": "lib:unix", - "flags": [ - "+os-string" - ], - "package": "unix", - "revision": 0, - "source": "hackage", - "src_sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "version": "2.8.5.1" - }, - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "+os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "+os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "573f3ab242f75465a0d67ce9d84202650a1606575e6dbd6d31ffcf4767a9a379", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "+integer-gmp", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "3baee4c9027a08830d148ec524cbc0471de645e1e8426d46780ef2758df0e8da", - "version": "1.4.7.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_6_4.json b/hadrian/bootstrap/plan-bootstrap-9_6_4.json deleted file mode 100644 index 6a1449bc2d8c..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_6_4.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.10.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "base", - "version": "4.18.2.0" - }, - { - "package": "array", - "version": "0.5.6.0" - }, - { - "package": "deepseq", - "version": "1.4.8.1" - }, - { - "package": "ghc-boot-th", - "version": "9.6.4" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.20.0.0" - }, - { - "package": "containers", - "version": "0.6.7" - }, - { - "package": "bytestring", - "version": "0.11.5.3" - }, - { - "package": "transformers", - "version": "0.6.1.0" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.1.0" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "binary", - "version": "0.8.9.1" - }, - { - "package": "text", - "version": "2.0.2" - }, - { - "package": "parsec", - "version": "3.1.16.1" - } - ], - "dependencies": [ - { - "cabal_sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "component": "lib:os-string", - "flags": [], - "package": "os-string", - "revision": 0, - "source": "hackage", - "src_sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "version": "2.0.6" - }, - { - "cabal_sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "component": "lib:filepath", - "flags": [ - "-cpphs" - ], - "package": "filepath", - "revision": 0, - "source": "hackage", - "src_sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "version": "1.5.3.0" - }, - { - "cabal_sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "component": "lib:unix", - "flags": [ - "+os-string" - ], - "package": "unix", - "revision": 0, - "source": "hackage", - "src_sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "version": "2.8.5.1" - }, - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "+os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "+os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "version": "1.5.0.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_6_5.json b/hadrian/bootstrap/plan-bootstrap-9_6_5.json deleted file mode 100644 index 2e00a4e9bcfb..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_6_5.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.10.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "base", - "version": "4.18.2.1" - }, - { - "package": "array", - "version": "0.5.6.0" - }, - { - "package": "deepseq", - "version": "1.4.8.1" - }, - { - "package": "ghc-boot-th", - "version": "9.6.5" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.20.0.0" - }, - { - "package": "containers", - "version": "0.6.7" - }, - { - "package": "bytestring", - "version": "0.11.5.3" - }, - { - "package": "transformers", - "version": "0.6.1.0" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.1.0" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "filepath", - "version": "1.4.300.1" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "unix", - "version": "2.8.4.0" - }, - { - "package": "binary", - "version": "0.8.9.1" - }, - { - "package": "text", - "version": "2.0.2" - }, - { - "package": "parsec", - "version": "3.1.16.1" - } - ], - "dependencies": [ - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "-os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "-os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "component": "lib:os-string", - "flags": [], - "package": "os-string", - "revision": 0, - "source": "hackage", - "src_sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "version": "2.0.6" - }, - { - "cabal_sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "version": "1.5.0.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_6_6.json b/hadrian/bootstrap/plan-bootstrap-9_6_6.json deleted file mode 100644 index 05c89cdf264d..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_6_6.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.10.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "base", - "version": "4.18.2.1" - }, - { - "package": "array", - "version": "0.5.6.0" - }, - { - "package": "deepseq", - "version": "1.4.8.1" - }, - { - "package": "ghc-boot-th", - "version": "9.6.6" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.20.0.0" - }, - { - "package": "containers", - "version": "0.6.7" - }, - { - "package": "bytestring", - "version": "0.11.5.3" - }, - { - "package": "transformers", - "version": "0.6.1.0" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.1.0" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "filepath", - "version": "1.4.300.1" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "unix", - "version": "2.8.4.0" - }, - { - "package": "binary", - "version": "0.8.9.1" - }, - { - "package": "text", - "version": "2.0.2" - }, - { - "package": "parsec", - "version": "3.1.16.1" - } - ], - "dependencies": [ - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "-os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "-os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "component": "lib:os-string", - "flags": [], - "package": "os-string", - "revision": 0, - "source": "hackage", - "src_sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "version": "2.0.6" - }, - { - "cabal_sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "version": "1.5.0.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_8_1.json b/hadrian/bootstrap/plan-bootstrap-9_8_1.json deleted file mode 100644 index 904e8c0b853a..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_8_1.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.11.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "base", - "version": "4.19.0.0" - }, - { - "package": "array", - "version": "0.5.6.0" - }, - { - "package": "deepseq", - "version": "1.5.0.0" - }, - { - "package": "ghc-boot-th", - "version": "9.8.1" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.21.0.0" - }, - { - "package": "containers", - "version": "0.6.8" - }, - { - "package": "bytestring", - "version": "0.12.0.2" - }, - { - "package": "transformers", - "version": "0.6.1.0" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.2.1" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "binary", - "version": "0.8.9.1" - }, - { - "package": "text", - "version": "2.1" - }, - { - "package": "parsec", - "version": "3.1.17.0" - } - ], - "dependencies": [ - { - "cabal_sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "component": "lib:os-string", - "flags": [], - "package": "os-string", - "revision": 0, - "source": "hackage", - "src_sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "version": "2.0.6" - }, - { - "cabal_sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "component": "lib:filepath", - "flags": [ - "-cpphs" - ], - "package": "filepath", - "revision": 0, - "source": "hackage", - "src_sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "version": "1.5.3.0" - }, - { - "cabal_sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "component": "lib:unix", - "flags": [ - "+os-string" - ], - "package": "unix", - "revision": 0, - "source": "hackage", - "src_sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "version": "2.8.5.1" - }, - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "+os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "+os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "version": "1.5.0.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/plan-bootstrap-9_8_2.json b/hadrian/bootstrap/plan-bootstrap-9_8_2.json deleted file mode 100644 index 35c8699fd1b3..000000000000 --- a/hadrian/bootstrap/plan-bootstrap-9_8_2.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "builtin": [ - { - "package": "rts", - "version": "1.0.2" - }, - { - "package": "ghc-prim", - "version": "0.11.0" - }, - { - "package": "ghc-bignum", - "version": "1.3" - }, - { - "package": "base", - "version": "4.19.1.0" - }, - { - "package": "array", - "version": "0.5.6.0" - }, - { - "package": "deepseq", - "version": "1.5.0.0" - }, - { - "package": "ghc-boot-th", - "version": "9.8.2" - }, - { - "package": "pretty", - "version": "1.1.3.6" - }, - { - "package": "template-haskell", - "version": "2.21.0.0" - }, - { - "package": "containers", - "version": "0.6.8" - }, - { - "package": "bytestring", - "version": "0.12.1.0" - }, - { - "package": "transformers", - "version": "0.6.1.0" - }, - { - "package": "mtl", - "version": "2.3.1" - }, - { - "package": "stm", - "version": "2.5.2.1" - }, - { - "package": "exceptions", - "version": "0.10.7" - }, - { - "package": "time", - "version": "1.12.2" - }, - { - "package": "binary", - "version": "0.8.9.1" - }, - { - "package": "text", - "version": "2.1.1" - }, - { - "package": "parsec", - "version": "3.1.17.0" - } - ], - "dependencies": [ - { - "cabal_sha256": "7699e7ae9bf74d056a62f384ceef8dfb2aa660f3f7c8016e9703f3b995e5e030", - "component": "lib:os-string", - "flags": [], - "package": "os-string", - "revision": 0, - "source": "hackage", - "src_sha256": "22fcc7d5fc66676b5dfc57b714d2caf93cce2d5a79d242168352f9eb0fe2f18a", - "version": "2.0.6" - }, - { - "cabal_sha256": "0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8", - "component": "lib:filepath", - "flags": [ - "-cpphs" - ], - "package": "filepath", - "revision": 0, - "source": "hackage", - "src_sha256": "d807ec44fe53de7c7e0eeb41c9ee9185a09163821cf50549d73d875197931a5a", - "version": "1.5.3.0" - }, - { - "cabal_sha256": "3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06", - "component": "lib:unix", - "flags": [ - "+os-string" - ], - "package": "unix", - "revision": 0, - "source": "hackage", - "src_sha256": "5ab6c346aef2eb9bf80b4d29ca7e22063fc23e52fd69fbc4d18a9f98b154e424", - "version": "2.8.5.1" - }, - { - "cabal_sha256": "e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc", - "component": "lib:file-io", - "flags": [ - "+os-string" - ], - "package": "file-io", - "revision": 0, - "source": "hackage", - "src_sha256": "e3d9113a015c57e3d8c2294550c41544f84a265291fed96cca697f91b6e86f52", - "version": "0.1.4" - }, - { - "cabal_sha256": "2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917", - "component": "lib:directory", - "flags": [ - "+os-string" - ], - "package": "directory", - "revision": 1, - "source": "hackage", - "src_sha256": "20a24846117fc5f8751d974b7de07210a161989410467e9adca525381b8e64cc", - "version": "1.3.9.0" - }, - { - "cabal_sha256": "de553eefe0b6548a560e9d8100486310548470a403c1fa21108dd03713da5fc7", - "component": "exe:alex", - "flags": [], - "package": "alex", - "revision": 0, - "source": "hackage", - "src_sha256": "c92efe86f8eb959ee03be6c04ee57ebc7e4abc75a6c4b26551215d7443e92a07", - "version": "3.5.1.0" - }, - { - "cabal_sha256": "6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd", - "component": "lib:Cabal-syntax", - "flags": [], - "package": "Cabal-syntax", - "revision": 0, - "source": "hackage", - "src_sha256": "bd449bbf9a645bb9c7c44410c6afc88264c399fb8f0abc78de7f04f553e52f31", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345", - "component": "lib:process", - "flags": [], - "package": "process", - "revision": 0, - "source": "hackage", - "src_sha256": "496fe0566c3915b112e9772ac9c967dfeb8d5ca04895e54ae0160522bee76e65", - "version": "1.6.25.0" - }, - { - "cabal_sha256": "604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f", - "component": "lib:Cabal", - "flags": [], - "package": "Cabal", - "revision": 0, - "source": "hackage", - "src_sha256": "24557b9a73fdc9a1cf75b64f35f62b59bc81c441e95f32c9d0d1b64e32e1db5d", - "version": "3.14.0.0" - }, - { - "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd", - "component": "lib:base16-bytestring", - "flags": [], - "package": "base16-bytestring", - "revision": 1, - "source": "hackage", - "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784", - "version": "1.0.2.0" - }, - { - "cabal_sha256": "b938655b00cf204ce69abfff946021bed111d2609a9f7a9c22e28a1a202e9115", - "component": "lib:clock", - "flags": [ - "-llvm" - ], - "package": "clock", - "revision": 0, - "source": "hackage", - "src_sha256": "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e", - "version": "0.8.4" - }, - { - "cabal_sha256": "acb64f2af52d81b0bb92c266f11d43def726a7a7b74a2c23d219e160b54edec7", - "component": "lib:cryptohash-sha256", - "flags": [ - "-exe", - "+use-cbits" - ], - "package": "cryptohash-sha256", - "revision": 5, - "source": "hackage", - "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6", - "version": "0.11.102.1" - }, - { - "cabal_sha256": "57d9200fbea2e88e05e0be35925511764827b1c86d3214106b0b610f331fc40c", - "component": "lib:extra", - "flags": [], - "package": "extra", - "revision": 0, - "source": "hackage", - "src_sha256": "2fa4ce5eae50560bba80f1883913cf2ed52b3d87fd290dae27d838c94f5389a1", - "version": "1.8" - }, - { - "cabal_sha256": "372c1733d83b90045eb29da9f010fed79bfef8771ce65eb126a1d83ecc54a9a2", - "component": "lib:filepattern", - "flags": [], - "package": "filepattern", - "revision": 0, - "source": "hackage", - "src_sha256": "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636", - "version": "0.1.3" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-platform", - "flags": [], - "package": "ghc-platform", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": null, - "component": "lib:ghc-toolchain", - "flags": [], - "package": "ghc-toolchain", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - }, - { - "cabal_sha256": "fc68b07d957ade5a0a0beadd560a8d093ceac30b2f35c85eed3bcf7889a25975", - "component": "lib:hashable", - "flags": [ - "-arch-native", - "-random-initial-seed" - ], - "package": "hashable", - "revision": 0, - "source": "hackage", - "src_sha256": "e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a", - "version": "1.5.0.0" - }, - { - "cabal_sha256": "66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8", - "component": "lib:heaps", - "flags": [], - "package": "heaps", - "revision": 0, - "source": "hackage", - "src_sha256": "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd", - "version": "0.4" - }, - { - "cabal_sha256": "f75cb4fa53c88c65794becdd48eb0d3b2b8abd89a3d5c19e87af91f5225c15e4", - "component": "lib:js-dgtable", - "flags": [], - "package": "js-dgtable", - "revision": 0, - "source": "hackage", - "src_sha256": "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac", - "version": "0.5.2" - }, - { - "cabal_sha256": "4c1c447a9a2fba0adba6d30678302a30c32b9dfde9e7aa9e9156483e1545096d", - "component": "lib:js-flot", - "flags": [], - "package": "js-flot", - "revision": 0, - "source": "hackage", - "src_sha256": "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a", - "version": "0.8.3" - }, - { - "cabal_sha256": "59ab6c79159549ef94b584abce8e6d3b336014c2cce1337b59a8f637e2856df5", - "component": "lib:js-jquery", - "flags": [], - "package": "js-jquery", - "revision": 0, - "source": "hackage", - "src_sha256": "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b", - "version": "3.3.1" - }, - { - "cabal_sha256": "de20bf4eff1f972088854c8efda6eaca2d3147aff62232c3707f059152638759", - "component": "lib:primitive", - "flags": [], - "package": "primitive", - "revision": 2, - "source": "hackage", - "src_sha256": "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7", - "version": "0.9.0.0" - }, - { - "cabal_sha256": "caa9b4a92abf1496c7f6a3c0f4e357426a54880077cb9f04e260a8bfa034b77b", - "component": "lib:splitmix", - "flags": [ - "-optimised-mixer" - ], - "package": "splitmix", - "revision": 1, - "source": "hackage", - "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002", - "version": "0.1.0.5" - }, - { - "cabal_sha256": "32397de181e20ccaacf806ec70de9308cf044f089a2be37c936f3f8967bde867", - "component": "lib:random", - "flags": [], - "package": "random", - "revision": 0, - "source": "hackage", - "src_sha256": "790f4dc2d2327c453ff6aac7bf15399fd123d55e927935f68f84b5df42d9a4b4", - "version": "1.2.1.2" - }, - { - "cabal_sha256": "c7fe9cba405ed9905e12d89c7add3b3eb9868dfba7975e70ba0cdd64b7b11abc", - "component": "lib:unordered-containers", - "flags": [ - "-debug" - ], - "package": "unordered-containers", - "revision": 3, - "source": "hackage", - "src_sha256": "d9cfb287cf00592d39dc9c3cac8b99627ea08f2c01798e70130fc39f7c90f11d", - "version": "0.2.20" - }, - { - "cabal_sha256": "79416292186feeaf1f60e49ac5a1ffae9bf1b120e040a74bf0e81ca7f1d31d3f", - "component": "lib:utf8-string", - "flags": [], - "package": "utf8-string", - "revision": 0, - "source": "hackage", - "src_sha256": "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a", - "version": "1.0.2" - }, - { - "cabal_sha256": "03c8f06de478e07ad6fde95984c9206920106d0d8432ecb7ab825ef108d45382", - "component": "lib:shake", - "flags": [ - "-cloud", - "-embed-files", - "-portable", - "+threaded" - ], - "package": "shake", - "revision": 0, - "source": "hackage", - "src_sha256": "6384e33a26a2590bf33719e88881076b899ac4b5340c1c9271e4caa37e9d6535", - "version": "0.19.8" - }, - { - "cabal_sha256": null, - "component": "exe:hadrian", - "flags": [ - "-selftest", - "+threaded" - ], - "package": "hadrian", - "revision": null, - "source": "local", - "src_sha256": null, - "version": "0.1.0.0" - } - ] -} diff --git a/hadrian/bootstrap/src/Main.hs b/hadrian/bootstrap/src/Main.hs deleted file mode 100644 index 2d4b282c3d7a..000000000000 --- a/hadrian/bootstrap/src/Main.hs +++ /dev/null @@ -1,232 +0,0 @@ -module Main (main) where - -import Data.Either (partitionEithers) -import Data.Foldable (for_) -import Data.Maybe (listToMaybe) -import Data.String (fromString) -import Data.Traversable (for) -import System.Environment (getArgs) -import System.Exit (exitFailure) -import System.IO (hPutStrLn, stderr) - -import qualified Data.Text as T -import qualified Cabal.Index as I -import qualified Cabal.Plan as P -import qualified Data.Aeson as A -import qualified Data.ByteString.Lazy as LBS -import qualified Data.Map.Strict as Map -import qualified Data.Set as Set -import qualified Distribution.Types.PackageName as C -import qualified Distribution.Types.Version as C -import qualified Topograph as TG - -------------------------------------------------------------------------------- --- Main -------------------------------------------------------------------------------- - -main :: IO () -main = do - args <- getArgs - case args of - [fp] -> main1 fp - _ -> die "Usage: hadrian-bootstrap-gen plan.json" - -main1 :: FilePath -> IO () -main1 planPath = do - meta <- I.cachedHackageMetadata - plan <- P.decodePlanJson planPath - main2 (snd meta) plan - -main2 :: Map.Map C.PackageName I.PackageInfo -> P.PlanJson -> IO () -main2 meta plan = do - info $ show $ Map.keys $ P.pjUnits plan - - -- find hadrian-install:exe:hadrian unit - (hadrianUid, hadrianUnit) <- case findHadrianExe plan of - Just x -> return x - Nothing -> die "Cannot find hadrian:exe unit" - - info $ "hadrian:exe unit " ++ show hadrianUid - - -- BFS from hadrian unit, getting all dependencies - units <- bfs plan hadrianUnit - - info $ "Unit order:" - for_ units $ \unit -> do - info $ " - " ++ show (P.uId unit) - - (builtin, deps) <- fmap partitionEithers $ for units $ \unit -> do - let P.PkgId pkgname@(P.PkgName tpkgname) ver@(P.Ver verdigits) = P.uPId unit - - let uid = P.uId unit - - let cpkgname :: C.PackageName - cpkgname = C.mkPackageName (T.unpack tpkgname) - - let cversion :: C.Version - cversion = C.mkVersion verdigits - - case P.uType unit of - P.UnitTypeBuiltin -> - return $ Left Builtin - { builtinPackageName = pkgname - , builtinVersion = ver - } - - _ -> do - (src, rev, revhash) <- case P.uSha256 unit of - Just _ -> do - pkgInfo <- maybe (die $ "Cannot find " ++ show uid ++ " package metadata") return $ - Map.lookup cpkgname meta - relInfo <- maybe (die $ "Cannot find " ++ show uid ++ " version metadata") return $ - Map.lookup cversion $ I.piVersions pkgInfo - - return - ( Hackage - , Just $ fromIntegral (I.riRevision relInfo) - , P.sha256FromByteString $ I.getSHA256 $ I.riCabal relInfo - ) - - Nothing -> case P.uType unit of - P.UnitTypeLocal -> return (Local, Nothing, Nothing) - t -> die $ "Unit of wrong type " ++ show uid ++ " " ++ show t - - - let component = case Map.keys (P.uComps unit) of - [c] -> Just (P.dispCompNameTarget pkgname c) - _ -> Nothing - - return $ Right Dep - { depPackageName = pkgname - , depVersion = ver - , depSource = src - , depSrcHash = P.uSha256 unit - , depRevision = rev - , depRevHash = revhash - , depFlags = - [ (if fval then "+" else "-") ++ T.unpack fname - | (P.FlagName fname, fval) <- Map.toList (P.uFlags unit) - ] - , depComponent = component - } - - LBS.putStr $ A.encode Result - { resBuiltin = builtin - , resDependencies = deps - } - -bfs :: P.PlanJson -> P.Unit -> IO [P.Unit] -bfs plan unit0 = do - uids <- either (\loop -> die $ "Loop in install-plan " ++ show loop) id $ TG.runG am $ \g -> do - v <- maybe (die "Cannot find hadrian-install unit in topograph") return $ - TG.gToVertex g $ P.uId unit0 - - let t = TG.dfs g v - - return $ map (TG.gFromVertex g) $ - -- nub and sort - reverse $ Set.toList $ Set.fromList $ concat t - - for uids $ \uid -> do - unit <- lookupUnit units uid - case Map.toList (P.uComps unit) of - [_] -> return () - _ -> die $ "Unit with multiple components " ++ show uid - return unit - - where - am :: Map.Map P.UnitId (Set.Set P.UnitId) - am = fmap (foldMap (Set.union <$> P.ciLibDeps <*> P.ciExeDeps) . P.uComps) units - - units = P.pjUnits plan - -lookupUnit :: Map.Map P.UnitId P.Unit -> P.UnitId -> IO P.Unit -lookupUnit units uid - = maybe (die $ "Cannot find unit " ++ show uid) return - $ Map.lookup uid units - -------------------------------------------------------------------------------- --- Data -------------------------------------------------------------------------------- - -data Result = Result - { resBuiltin :: [Builtin] - , resDependencies :: [Dep] - } - deriving (Show) - -data Builtin = Builtin - { builtinPackageName :: P.PkgName - , builtinVersion :: P.Ver - } - deriving (Show) - -data Dep = Dep - { depPackageName :: P.PkgName - , depVersion :: P.Ver - , depSource :: SrcType - , depSrcHash :: Maybe P.Sha256 - , depRevision :: Maybe Int - , depRevHash :: Maybe P.Sha256 - , depFlags :: [String] - , depComponent :: Maybe T.Text - } - deriving (Show) - -data SrcType - = Hackage - | Local - deriving (Show) - -instance A.ToJSON Result where - toJSON res = A.object - [ fromString "builtin" A..= resBuiltin res - , fromString "dependencies" A..= resDependencies res - ] - -instance A.ToJSON Builtin where - toJSON b = A.object - [ fromString "package" A..= builtinPackageName b - , fromString "version" A..= builtinVersion b - ] - -instance A.ToJSON Dep where - toJSON dep = A.object - [ fromString "package" A..= depPackageName dep - , fromString "version" A..= depVersion dep - , fromString "source" A..= depSource dep - , fromString "src_sha256" A..= depSrcHash dep - , fromString "revision" A..= depRevision dep - , fromString "cabal_sha256" A..= depRevHash dep - , fromString "flags" A..= depFlags dep - , fromString "component" A..= depComponent dep - ] - -instance A.ToJSON SrcType where - toJSON Hackage = fromString "hackage" - toJSON Local = fromString "local" - -------------------------------------------------------------------------------- --- Utilities -------------------------------------------------------------------------------- - -info :: String -> IO () -info msg = hPutStrLn stderr $ "INFO: " ++ msg - -die :: String -> IO a -die msg = do - hPutStrLn stderr msg - exitFailure - -------------------------------------------------------------------------------- --- Pure bits -------------------------------------------------------------------------------- - -findHadrianExe :: P.PlanJson -> Maybe (P.UnitId, P.Unit) -findHadrianExe plan = listToMaybe - [ (uid, unit) - | (uid, unit) <- Map.toList (P.pjUnits plan) - , let P.PkgId pkgname _ = P.uPId unit - , pkgname == P.PkgName (fromString "hadrian") - , Map.keys (P.uComps unit) == [P.CompNameExe (fromString "hadrian")] - ] diff --git a/hadrian/build b/hadrian/build deleted file mode 100755 index 01e050360f04..000000000000 --- a/hadrian/build +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# By default on Linux/MacOS we build Hadrian using Cabal -(. "hadrian/build-cabal" "$@") diff --git a/hadrian/build-cabal b/hadrian/build-cabal deleted file mode 100755 index 905aa904fbd4..000000000000 --- a/hadrian/build-cabal +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -CABAL="${CABAL:-cabal}" -GHC="${GHC:-ghc}" -CABFLAGS=("--with-compiler=$GHC" "--disable-documentation" "--disable-profiling" "--disable-library-profiling" $CABFLAGS) -( $GHC --info | grep -s '("Support SMP","YES")' > /dev/null ) || CABFLAGS+=("--constraint=hadrian -threaded") - -# It is currently more robust to pass Cabal an absolute path to the project file. -PROJ="$PWD/hadrian/cabal.project" - -set -euo pipefail - -if ! [ -f "$PROJ" ]; then - echo "Current working directory must be GHC's top-level folder" - exit 2 -fi - -if ! type "$CABAL" > /dev/null; then - echo "Please make sure 'cabal' is in your PATH" - exit 2 -fi - -CABVERSTR=$("$CABAL" --numeric-version) -CABVER=( ${CABVERSTR//./ } ) - -if [ "${CABVER[0]}" -gt 2 -o "${CABVER[0]}" -eq 2 -a "${CABVER[1]}" -ge 2 ]; -then - "$CABAL" --project-file="$PROJ" new-build "${CABFLAGS[@]}" -j exe:hadrian - # use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH - "$CABAL" --project-file="$PROJ" new-exec "${CABFLAGS[@]}" hadrian -- \ - --directory "$PWD" \ - "$@" -else - echo "Cabal version is too old; you need at least cabal-install 3.0" - exit 2 -fi diff --git a/hadrian/build-cabal.bat b/hadrian/build-cabal.bat deleted file mode 100644 index 1d5d8ecd0e72..000000000000 --- a/hadrian/build-cabal.bat +++ /dev/null @@ -1,51 +0,0 @@ -@echo off - -if "%CABAL%"=="" ( - set CABAL=cabal -) - -if "%GHC%"=="" ( - set GHC=ghc -) - -if "%CABFLAGS%"=="" ( - set CABFLAGS=--with-compiler=%GHC% --disable-documentation --disable-profiling --disable-library-profiling -) - -rem It is currently more robust to pass Cabal an absolute path to the project file. -set PROJ="%CD%/hadrian/cabal.project" - -if not exist %PROJ% ( - echo Current working directory must be GHC's top-level folder - exit /B 2 -) - -"%CABAL%" 2> NUL -if not %ERRORLEVEL% equ 1 ( - echo Please make sure 'cabal' is in your PATH - exit /B 2 -) - -for /F "tokens=*" %%a in ('%CABAL% --numeric-version') do set CABVERSTR=%%a -for /F "delims=. tokens=1,2,3,4" %%a in ("%CABVERSTR%") do ( - set CABMAJOR=%%a - set CABMINOR=%%b - set CABREV=%%c - set CABPATCH=%%d -) - -set "_cabal_ok=0" -if %CABMAJOR% gtr 2 set _cabal_ok=1 -if %CABMAJOR% equ 2 ( - if %CABMINOR% geq 2 set _cabal_ok=1 -) -if %_cabal_ok% equ 1 ( - "%CABAL%" --project-file=%PROJ% new-build %CABFLAGS% -j exe:hadrian - rem use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH - "%CABAL%" --project-file=%PROJ% new-exec %CABFLAGS% hadrian -- ^ - --directory "%CD%" ^ - %* -) else ( - echo Cabal version is too old; you need at least cabal-install 2.2 - exit /B 2 -) diff --git a/hadrian/build-stack b/hadrian/build-stack deleted file mode 100755 index 68f2e311276e..000000000000 --- a/hadrian/build-stack +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# Make sure that the script exits if Hadrian fails to build -set -euo pipefail - -STACK="${STACK:-stack}" - -# Make sure Hadrian is up-to-date -cd hadrian -$STACK build --no-library-profiling "${HADRIAN_NIX:+--nix}" - -# Run Hadrian in the top-level GHC directory -$STACK exec hadrian "${HADRIAN_NIX:+--nix}" -- \ - --directory ".." \ - "$@" diff --git a/hadrian/build-stack-nix b/hadrian/build-stack-nix deleted file mode 100755 index a3ac6e6ae048..000000000000 --- a/hadrian/build-stack-nix +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -HADRIAN_NIX=YES hadrian/build-stack diff --git a/hadrian/build-stack.bat b/hadrian/build-stack.bat deleted file mode 100644 index 4ed26a703a4c..000000000000 --- a/hadrian/build-stack.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -setlocal -rem Change the current directory to the one containing this script -cd %~dp0 - -if "%STACK%"=="" ( - set STACK=stack -) - -rem Build and run Hadrian in GHC top directory forwarding additional user arguments -%STACK% run hadrian --cwd=.. -- %* diff --git a/hadrian/build.bat b/hadrian/build.bat deleted file mode 100644 index 06b5b0039568..000000000000 --- a/hadrian/build.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off - -rem By default on Windows we build Hadrian using Cabal -hadrian/build-cabal.bat %* diff --git a/hadrian/cabal.project b/hadrian/cabal.project deleted file mode 100644 index 4b1ac64f77a0..000000000000 --- a/hadrian/cabal.project +++ /dev/null @@ -1,20 +0,0 @@ -packages: ./ - ../utils/ghc-toolchain/ - ../libraries/ghc-platform/ - --- This essentially freezes the build plan for hadrian --- It would be wise to keep this up to date with the state set in .gitlab/ci.sh. -index-state: 2025-01-27T17:45:32Z - --- unordered-containers-0.2.20-r1 requires template-haskell < 2.22 --- ghc-9.10 has template-haskell-2.22.0.0 -allow-newer: unordered-containers:template-haskell - --- N.B. Compile with -O0 since this is not a performance-critical executable --- and the Cabal takes nearly twice as long to build with -O1. See #16817. -package Cabal - optimization: False - --- Build static linked, vanilla libraries to reduce build time. -shared: False -executable-dynamic: False diff --git a/hadrian/cfg/default.host.target.in b/hadrian/cfg/default.host.target.in deleted file mode 100644 index 30282ec82b7a..000000000000 --- a/hadrian/cfg/default.host.target.in +++ /dev/null @@ -1,47 +0,0 @@ -Target -{ tgtArchOs = ArchOS {archOS_arch = @HaskellHostArch@, archOS_OS = @HaskellHostOs@} -, tgtVendor = @HostVendor_CPPMaybeStr@ -, tgtLocallyExecutable = True -, tgtSupportsGnuNonexecStack = False -, tgtSupportsSubsectionsViaSymbols = False -, tgtSupportsIdentDirective = False -, tgtWordSize = WS8 -, tgtEndianness = LittleEndian -, tgtSymbolsHaveLeadingUnderscore = False -, tgtLlvmTarget = "@HostPlatform@" -, tgtUnregisterised = False -, tgtTablesNextToCode = True -, tgtUseLibffiForAdjustors = True -, tgtCCompiler = Cc {ccProgram = Program {prgPath = "@CC_STAGE0@", prgFlags = @CONF_CC_OPTS_STAGE0List@}} -, tgtCxxCompiler = Cxx {cxxProgram = Program {prgPath = "@CC_STAGE0@", prgFlags = @CONF_CXX_OPTS_STAGE0List@}} -, tgtCPreprocessor = Cpp {cppProgram = Program {prgPath = "@CPPCmd_STAGE0@", prgFlags = @CONF_CPP_OPTS_STAGE0List@}} -, tgtHsCPreprocessor = HsCpp {hsCppProgram = Program {prgPath = "@CC_STAGE0@", prgFlags = @HaskellCPPArgsList@}} -, tgtJsCPreprocessor = Nothing -, tgtCmmCPreprocessor = CmmCpp {cmmCppProgram = Program {prgPath = "@CmmCPPCmd_STAGE0@", prgFlags = @CmmCPPArgs_STAGE0List@}, cmmCppSupportsG0 = @CmmCPPSupportsG0_STAGE0@} -, tgtCCompilerLink = CcLink -{ ccLinkProgram = Program {prgPath = "@CC_STAGE0@", prgFlags = @CONF_GCC_LINKER_OPTS_STAGE0List@} -, ccLinkSupportsNoPie = False -, ccLinkSupportsCompactUnwind = False -, ccLinkSupportsFilelist = False -, ccLinkSupportsSingleModule = True -, ccLinkIsGnu = False -} - -, tgtAr = Ar -{ arMkArchive = Program {prgPath = "@AR_STAGE0@", prgFlags = @AR_OPTS_STAGE0List@} -, arIsGnu = False -, arSupportsAtFile = @ArSupportsAtFile_STAGE0Bool@ -, arSupportsDashL = @ArSupportsDashL_STAGE0Bool@ -, arNeedsRanlib = True -} - -, tgtRanlib = Nothing -, tgtNm = Nm {nmProgram = Program {prgPath = "", prgFlags = []}} -, tgtMergeObjs = Just (MergeObjs {mergeObjsProgram = Program {prgPath = "@LD_STAGE0@", prgFlags = ["-r"]}, mergeObjsSupportsResponseFiles = False}) -, tgtLlc = Nothing -, tgtOpt = Nothing -, tgtLlvmAs = Nothing -, tgtWindres = Nothing -, tgtOtool = Nothing -, tgtInstallNameTool = Nothing -} diff --git a/hadrian/cfg/default.target.in b/hadrian/cfg/default.target.in deleted file mode 100644 index 20d5111e2629..000000000000 --- a/hadrian/cfg/default.target.in +++ /dev/null @@ -1,47 +0,0 @@ -Target -{ tgtArchOs = ArchOS {archOS_arch = @HaskellTargetArch@, archOS_OS = @HaskellTargetOs@} -, tgtVendor = @TargetVendor_CPPMaybeStr@ -, tgtLocallyExecutable = @NotCrossCompilingBool@ -, tgtSupportsGnuNonexecStack = @TargetHasGnuNonexecStackBool@ -, tgtSupportsSubsectionsViaSymbols = @TargetHasSubsectionsViaSymbolsBool@ -, tgtSupportsIdentDirective = @TargetHasIdentDirectiveBool@ -, tgtWordSize = WS@TargetWordSize@ -, tgtEndianness = @TargetEndianness@ -, tgtSymbolsHaveLeadingUnderscore = @LeadingUnderscoreBool@ -, tgtLlvmTarget = "@LlvmTarget@" -, tgtUnregisterised = @UnregisterisedBool@ -, tgtTablesNextToCode = @TablesNextToCodeBool@ -, tgtUseLibffiForAdjustors = @UseLibffiForAdjustorsBool@ -, tgtCCompiler = Cc {ccProgram = Program {prgPath = "@CC@", prgFlags = @CONF_CC_OPTS_STAGE2List@}} -, tgtCxxCompiler = Cxx {cxxProgram = Program {prgPath = "@CXX@", prgFlags = @CONF_CXX_OPTS_STAGE2List@}} -, tgtCPreprocessor = Cpp {cppProgram = Program {prgPath = "@CPPCmd@", prgFlags = @CONF_CPP_OPTS_STAGE2List@}} -, tgtHsCPreprocessor = HsCpp {hsCppProgram = Program {prgPath = "@HaskellCPPCmd@", prgFlags = @HaskellCPPArgsList@}} -, tgtJsCPreprocessor = Just (JsCpp {jsCppProgram = Program {prgPath = "@JavaScriptCPPCmd@", prgFlags = @JavaScriptCPPArgsList@}}) -, tgtCmmCPreprocessor = CmmCpp {cmmCppProgram = Program {prgPath = "@CmmCPPCmd@", prgFlags = @CmmCPPArgsList@}, cmmCppSupportsG0 = @CmmCPPSupportsG0@} -, tgtCCompilerLink = CcLink -{ ccLinkProgram = Program {prgPath = "@CC@", prgFlags = @CONF_GCC_LINKER_OPTS_STAGE2List@} -, ccLinkSupportsNoPie = @CONF_GCC_SUPPORTS_NO_PIEBool@ -, ccLinkSupportsCompactUnwind = @LdHasNoCompactUnwindBool@ -, ccLinkSupportsFilelist = @LdHasFilelistBool@ -, ccLinkSupportsSingleModule = @LdHasSingleModuleBool@ -, ccLinkIsGnu = @LdIsGNULdBool@ -} - -, tgtAr = Ar -{ arMkArchive = Program {prgPath = "@ArCmd@", prgFlags = @ArArgsList@} -, arIsGnu = @ArIsGNUArBool@ -, arSupportsAtFile = @ArSupportsAtFileBool@ -, arSupportsDashL = @ArSupportsDashLBool@ -, arNeedsRanlib = @ArNeedsRanLibBool@ -} - -, tgtRanlib = Just (Ranlib {ranlibProgram = Program {prgPath = "@RanlibCmd@", prgFlags = []}}) -, tgtNm = Nm {nmProgram = Program {prgPath = "@NmCmd@", prgFlags = []}} -, tgtMergeObjs = @MergeObjsCmdMaybe@ -, tgtLlc = @LlcCmdMaybeProg@ -, tgtOpt = @OptCmdMaybeProg@ -, tgtLlvmAs = @LlvmAsCmdMaybeProg@ -, tgtWindres = @WindresCmdMaybeProg@ -, tgtOtool = @OtoolCmdMaybeProg@ -, tgtInstallNameTool = @InstallNameToolCmdMaybeProg@ -} diff --git a/hadrian/cfg/system.config.in b/hadrian/cfg/system.config.in deleted file mode 100644 index ad31f0617422..000000000000 --- a/hadrian/cfg/system.config.in +++ /dev/null @@ -1,127 +0,0 @@ -# This file is processed by the configure script. -# See hadrian/src/UserSettings.hs for user-defined settings. -#=========================================================== - -# Paths to builders: -#=================== - -# ROMES:TODO: Drop CC - -alex = @AlexCmd@ -autoreconf = @AutoreconfCmd@ -cc = @CC@ -happy = @HappyCmd@ -make = @MakeCmd@ -objdump = @ObjdumpCmd@ -sphinx-build = @SPHINXBUILD@ -system-ghc = @WithGhc@ -system-ghc-pkg = @GhcPkgCmd@ -tar = @TarCmd@ -xelatex = @XELATEX@ -makeindex = @MAKEINDEX@ -makeinfo = @MAKEINFO@ -bourne-shell = @SH@ -git = @GIT@ -cabal = @CABAL@ - -# Python 3 is required to run test driver. -# See: https://github.com/ghc/ghc/blob/master/testsuite/mk/boilerplate.mk#L220 -python = @PythonCmd@ - -# Information about builders: -#============================ - -cc-llvm-backend = @CcLlvmBackend@ - -llvm-min-version = @LlvmMinVersion@ -llvm-max-version = @LlvmMaxVersion@ - -# Build options: -#=============== - -ghc-source-path = @hardtop@ -use-ghc-toolchain = @EnableGhcToolchain@ - -# Information about build, host and target systems: -#================================================== - -# Q: Is the *-platform information available in the target? -# A: Yes, it is. We pass @BuildPlatform@ and @HostPlatform@ and @TargetPlatform@ to ghc-toolchain using --target=that -# And we can reconstruct the platform info using targetPlatformTriple -# Q: What is TargetPlatformFull? -target-platform-full = @TargetPlatformFull@ - -cross-compiling = @CrossCompiling@ - -dynamic-extension = @soext_target@ - -ghc-version = @GhcVersion@ -ghc-major-version = @GhcMajVersion@ -ghc-minor-version = @GhcMinVersion@ -ghc-patch-level = @GhcPatchLevel@ - -bootstrap-threaded-rts = @GhcThreadedRts@ - -project-name = @ProjectName@ -project-version = @ProjectVersion@ -project-version-munged = @ProjectVersionMunged@ -project-version-for-lib = @ProjectVersionForLib@ -project-version-int = @ProjectVersionInt@ -project-patch-level = @ProjectPatchLevel@ -project-patch-level1 = @ProjectPatchLevel1@ -project-patch-level2 = @ProjectPatchLevel2@ -project-git-commit-id = @ProjectGitCommitId@ - -# Settings: -#========== - -# We are in the process of moving the settings file from being entirely -# generated by configure, to generated being by the build system. Many of these -# might become redundant. -# See Note [tooldir: How GHC finds mingw on Windows] -settings-use-distro-mingw = @SettingsUseDistroMINGW@ - -target-has-libm = @TargetHasLibm@ - -# Include and library directories: -#================================= - -curses-lib-dir = @CURSES_LIB_DIRS@ -curses-include-dir = @CURSES_INCLUDE_DIRS@ - -iconv-include-dir = @ICONV_INCLUDE_DIRS@ -iconv-lib-dir = @ICONV_LIB_DIRS@ - -intree-gmp = @GMP_FORCE_INTREE@ -gmp-framework-preferred = @GMP_PREFER_FRAMEWORK@ -gmp-include-dir = @GMP_INCLUDE_DIRS@ -gmp-lib-dir = @GMP_LIB_DIRS@ - -use-system-ffi = @UseSystemLibFFI@ -ffi-include-dir = @FFIIncludeDir@ -ffi-lib-dir = @FFILibDir@ - -libdw-include-dir = @LibdwIncludeDir@ -libdw-lib-dir = @LibdwLibDir@ - -libnuma-include-dir = @LibNumaIncludeDir@ -libnuma-lib-dir = @LibNumaLibDir@ - -libzstd-include-dir = @LibZstdIncludeDir@ -libzstd-lib-dir = @LibZstdLibDir@ - -# Optional Dependencies: -#======================= - -use-lib-dw = @UseLibdw@ -use-lib-zstd = @UseLibZstd@ -static-lib-zstd = @UseStaticLibZstd@ -use-lib-numa = @UseLibNuma@ -use-lib-m = @UseLibm@ -use-lib-rt = @UseLibrt@ -use-lib-dl = @UseLibdl@ -use-lib-bfd = @UseLibbfd@ -use-lib-pthread = @UseLibpthread@ -need-libatomic = @NeedLibatomic@ - -emsdk-version = @ConfiguredEmsdkVersion@ diff --git a/hadrian/ci.project b/hadrian/ci.project deleted file mode 100644 index e68743a53087..000000000000 --- a/hadrian/ci.project +++ /dev/null @@ -1,4 +0,0 @@ -packages: ./ - -package hadrian - ghc-options: -Werror diff --git a/hadrian/completion.sh b/hadrian/completion.sh deleted file mode 100755 index 2f31123c5b8a..000000000000 --- a/hadrian/completion.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -hadrian=$(cd hadrian; cabal new-exec which hadrian; cd ..) -all_settings=$($hadrian autocomplete --complete-setting="$@" --quiet) - -complete -W "$all_settings" hadrian/build -complete -W "$all_settings" hadrian/build-cabal diff --git a/hadrian/doc/cross-compile.md b/hadrian/doc/cross-compile.md deleted file mode 100644 index 6bd4fe8ef8ab..000000000000 --- a/hadrian/doc/cross-compile.md +++ /dev/null @@ -1,58 +0,0 @@ -## Build a cross-compiling GHC - -In this example, our host machine is "Ubuntu 16.04.2 LTS, Linux ubuntu 4.4.0-79-generic 86_64". - -We need to download necessary tools, including: - -- [LLVM-4.0 source](http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz), you need to build it yourself. Remember to choose release channel and use gold linker (`cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=gold ..`) -- `sudo apt-get install gcc-arm-linux-gnueabihf` to install the GCC cross-compiler -- Download and install [Haskell Platform 8.0.2](https://haskell.org/platform/download/8.0.2/haskell-platform-8.0.2-unknown-posix--full-x86_64.tar.gz). Install it according to [instructions here](https://www.haskell.org/platform/linux.html#linux-generic) - -After all the dependencies are in place: - -- `git clone https://github.com/ghc/ghc` -- `cd ghc` -- `git clone https://github.com/snowleopard/hadrian` -- `git submodule update --init` -- `./configure --target=arm-linux-gnueabihf` -- `cd hadrian` -- Build the compiler by e.g. `./build.sh --flavour=quickest --integer-simple -V -j` - -After that, you should have built `inplace/bin/ghc-stage1` cross compiler. We will go to the next section to validate this. - -**NOTE**: Use of `-c` to configure the target is currently not supported. Please manually run `./configure` like above. - -## Test run - -Write a simple hello world haskell program: - -```haskell -module Main where -main = putStrLn "Hello, world!" -``` -Compile it with cross-compiling GHC: `/inplace/bin/ghc-stage1 -static Main`. Note that we created a static version of it which packs together all depending libraries. - -- Install QEMU: `sudo apt-get install qemu-system-arm` -- Download `vmlinuz` (kernel) and `initrd.gz` (initial ramdisk), e.g. from [this mirror](https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/dists/xenial/main/installer-armhf/current/images/generic-lpae/cdrom/). -- Add the ARM Linux executable `Main` to the initial ramdisk so we can load it directly into memory. No need for real installation - + `gunzip initrd.gz` to get `initrd` - + `mkdir tmp2; cd tmp2; sudo cpio -id < ../initrd` to get a file system - + `cp /PATH/TO/Main usr/bin` - + `find . | cpio --create --format='newc' > /tmp/newinitrd` to pack back the `initrd` - + `gzip /tmp/newinitrd` - + Move `newinitrd` to where `vmlinuz` is, rename it to `newinitrd.img` - + Run the following configured QEMU: - -```bash -#!/bin/sh -qemu-system-arm \ - -kernel vmlinuz \ - -initrd newinitrd.img \ - -append "root=/dev/vda2 rootfstype=ext4" \ - -no-reboot \ - -nographic \ - -m 1024 \ - -M virt -``` - -This will lead you to a installer interface. But we don't need to do that, so we can save ourself from the hassle of setting up networks etc. We just keep `Go Back`, until see a line `Execute a shell`, and select it. Now you get a shell, go find `/usr/bin/Main` and run it! diff --git a/hadrian/doc/debugging.md b/hadrian/doc/debugging.md deleted file mode 100644 index 304e9c6097a2..000000000000 --- a/hadrian/doc/debugging.md +++ /dev/null @@ -1,109 +0,0 @@ -## General tips on debugging Haskell - -https://wiki.haskell.org/Debugging - -## General tips on debugging shake - -http://shakebuild.com/debugging - -## Make-based old system - -1. `make show! VALUE=$(NAME)$` to check the value of variable `NAME` - -## Debugging Hadrian - -### General thoughts - -1. If a build command with some flags doesn't work, will that work on the Make-based old system? (Note that the directory structure is different, so we need to do some conversion) -2. If you delete something, but run top-level target again doesn't produce that, then it must be that this things is not correctly registered as tracked output - -### Verbosity - -Adding `-V`, `-VV`, `-VVV` can output more information from Shake and Hadrian for debugging purpose. For example, to print out the complete commands, you can use `-V`. - -### Common pitfalls - -- Out-of-date `UserSetting.hs`? (may cause compilation errors while building hadrian itself) -- Path: absolute? relative? platform-dependent? -- Missing environment variables? -- The upstream GHC/Cabal/... has updated - -### How to read exception message - -#### Type 1: `openFile: does not exist` - -**Example:** `hadrian: _build/stage1/ghc/GHCi/UI.o: openFile: does not exist (No such file or directory)` - -**Cause:** The build system tries to execute some *raw* I/O operation, which is not captured properly by shake build or any other handling mechanism. - -**Solution:** Use shake-provided or `Util`-provided I/O actions which can automatically make input files *dependencies*, and throw better exception (like below) when no rule for building these files exists. - -#### Type 2: `Error when running Shake build system:` - -Example: - -> TODO -> -> Make a new example because `ghc-cabal` no longer exists. -> New developers will not know what it is and thus find the example below more confusing. - -``` -Error when running Shake build system: -* OracleQ (PackageDataKey ("_build/stage1/libraries/unix/package-data.mk","COMPONENT_ID")) -* _build/stage1/libraries/unix/package-data.mk -* OracleQ (PackageDataKey ("_build/stage1/libraries/base/package-data.mk","COMPONENT_ID")) -* _build/stage1/libraries/base/package-data.mk -* OracleQ (PackageDataKey ("_build/stage1/libraries/ghc-prim/package-data.mk","COMPONENT_ID")) -* _build/stage1/libraries/ghc-prim/package-data.mk -* _build/stage1/libraries/ghc-prim/GHC/Prim.hs -* inplace/bin/genprimopcode -* OracleQ (PackageDataKey ("_build/stage0/utils/genprimopcode/package-data.mk","C_SRCS")) -* _build/stage0/utils/genprimopcode/package-data.mk -user error (Development.Shake.cmd, system command failed -Command: _build/stage0/utils/ghc-cabal/ghc-cabal configure utils/genprimopcode /Users/zz/Repos/ghc2/_build/stage0/utils/genprimopcode '' --with-ghc=/usr/local/bin/ghc --with-ghc-pkg=/usr/local/bin/ghc-pkg --package-db=_build/stage0/bootstrapping.conf --enable-library-vanilla --enable-library-for-ghci --disable-library-profiling --disable-shared --with-hscolour=/Users/zz/Library/Haskell/bin/HsColour '--configure-option=CFLAGS=-fno-stack-protector -I/Users/zz/Repos/ghc2/_build/generated' --configure-option=CPPFLAGS=-I_build/generated '--gcc-options=-fno-stack-protector -I/Users/zz/Repos/ghc2/_build/generated' --configure-option=--with-cc=/usr/bin/gcc --constraint 'Cabal == 2.0.0.0' --constraint 'binary == 0.8.4.1' --constraint 'ghc-boot == 8.3' --constraint 'ghc-boot-th == 8.3' --constraint 'ghci == 8.3' --constraint 'hoopl == 3.10.2.2' --constraint 'hpc == 0.6.0.3' --constraint 'template-haskell == 2.12.0.0' --constraint 'terminfo == 0.4.1.0' --constraint 'transformers == 0.5.2.0' --with-gcc=/usr/bin/gcc --with-ar=/usr/bin/ar --with-alex=/Users/zz/Library/Haskell/bin/alex --with-happy=/Users/zz/Library/Haskell/bin/happy -v0 --configure-option=--quiet --configure-option=--disable-option-checking -Exit code: 1 -Stderr: -ghc-cabal: ghc-pkg dump failed: dieVerbatim: user error (ghc-cabal: -'/usr/local/bin/ghc-pkg' exited with an error: -ghc-pkg: _build/stage0/bootstrapping.conf: getDirectoryContents: does not -exist (No such file or directory) -) -) -``` - -First, the list of `OracleQ`s is similar to a call trace. Each `OracleQ` line specifies the *target*, and lines without `OracleQ` after it specify dependencies. Each dependency is the *target* of the next level. - -The last level's target in the above example is `_build/stage0/utils/genprimopcode/package-data.mk`. Build system tries to build it with the command as shown in `Command` line (this is very useful -- since you can copy & paste and tweak with it directly when trying find the right rule). - -The error dumped after the `Command` line can help you identify the potential bug quickly. - -### Run some snippets - -Sometimes it is useful to run a few lines of code for debugging purpose, for example, print out the dependencies of `cabal`. The fastest way to do this is to modify the `Main.hs`, comment out the heavy-lifting rules, add insert the code you'd like to run. - -```haskell - Rules.Clean.cleanRules - Rules.Oracles.oracleRules - -- Rules.SourceDist.sourceDistRules - -- Rules.Selftest.selftestRules - -- Rules.Test.testRules - -- Rules.buildRules - -- Rules.topLevelTargets - rulesToTest -``` - -## How to enable stack trace - -first, build shake with profile support: - -``` -# inside shake source directory -cabal install --enable-profiling -``` - -``` -# for an example source file -cabal exec -- ghc -prof -fprof-auto examples/Main.hs -``` - -and a work-in-progress [traced fork of shake](https://github.com/monad-systems/shake/tree/traced) diff --git a/hadrian/doc/expressions.md b/hadrian/doc/expressions.md deleted file mode 100644 index 1831bcce966a..000000000000 --- a/hadrian/doc/expressions.md +++ /dev/null @@ -1,329 +0,0 @@ -# Expressions - -`Expr c b a` is a computation that produces a value of type `Action a` and can -read parameters of the current build `Target c b`, but what does that mean -exactly? Here's its definition from `hadrian/src/Hadrian/Expression.hs`: - -```haskell -newtype Expr c b a = Expr (ReaderT (Target c b) Action a) - deriving (Applicative, Functor, Monad) -``` - -So `Expr c b a` is a `newtype` wrapper around a `ReaderT (Target c b) Action a`. -In practice within Hadrian `c` is always `Context` and `b` is always `Builder`. -The extra parameterisation is there so that hopefully one day the general -functionality of Hadrian (eg. compiling a Haskell library) will be available -to Shake users via a library. - -A type synonym from `hadrian/src/Expression/Type.hs` is often used to avoid -writing `Context` and `Builder` everywhere: - -```haskell -type Expr a = H.Expr Context Builder a -``` - -Where `H.Expr` is the `Expr c b a` defined above. The following references to -`Expr` will generally refer to this type synonym unless there is extra -parameterisation. - -Let's break down the type a bit, working from the outside in, left to right. - -## ReaderT - -Put simply, `ReaderT (Target c b) Action a` adds a read-only environment -`Target c b` (in the case of Hadrian: `Target Context Builder`) to values of -type `Action a`. It's the equivalent of threading through a `Target c b` -parameter to all our functions, but we only have to worry about it when we need -it, using `ask :: Monad m => ReaderT r m r` (where `r` is `Target c b` and `m` -is `Action` in this case) or other functions based on it. `ReaderT` and `ask` -are defined in [`Control.Monad.Trans.Reader`](https://hackage.haskell.org/package/transformers-0.5.6.2/docs/Control-Monad-Trans-Reader.html). - -So, instead of: - -```haskell -foo :: Target Context Builder -> Action () -foo target = do - liftIO $ putStrLn "Some message" - bar target - -bar :: Target Context Builder -> Action () -bar target' = do - liftIO $ putStrLn "Some other message" - baz target' - -baz :: Target Context Builder -> Action () -baz target'' = do - liftIO $ putStrLn "Yet another message" - liftIO $ print target -``` - -We can write: - -```haskell -foo :: ReaderT (Target Context Builder) Action () -foo = do - liftIO $ putStrLn "Some message" - bar - -bar :: ReaderT (Target Context Builder) Action () -bar = do - liftIO $ putStrLn "Some other message" - baz - -baz :: ReaderT (Target Context Builder) Action () -baz = do - liftIO $ putStrLn "Yet another message" - target <- ask - liftIO $ print target -``` - -And to make those into Hadrian Expressions all we have to do is change the type -and add the constructor: - -```haskell -foo :: Expr () -foo = Expr $ do - liftIO $ putStrLn "Some message" - bar - -bar :: Expr () -bar = Expr $ do - liftIO $ putStrLn "Some other message" - baz - -baz :: Expr () -baz = Expr $ do - liftIO $ putStrLn "Yet another message" - target <- ask - liftIO $ print target -``` - -## Target - -From `hadrian/src/Hadrian/Target.hs`: - -> Each invocation of a builder is fully described by a `Target`, which -> comprises a build context (type variable `c`), a builder (type variable `b`), -> a list of input files and a list of output files. For example: -> -> ```haskell -> preludeTarget = Target (GHC.Context) (GHC.Builder) -> { context = Context Stage1 base profiling -> , builder = Ghc Stage1 -> , inputs = ["libraries/base/Prelude.hs"] -> , outputs = ["build/stage1/libraries/base/Prelude.p_o"] } -> ``` - -The data type is as follows and is fairly self-explanatory: - -```haskell -data Target c b = Target - { context :: c -- ^ Current build context - , builder :: b -- ^ Builder to be invoked - , inputs :: [FilePath] -- ^ Input files for the builder - , outputs :: [FilePath] -- ^ Files to be produced - } deriving (Eq, Generic, Show) -``` - -So we have some `inputs` to our target, some `outputs` that it will produce, a -context for the build (in Hadrian: `Context`), and the builder (in Hadrian: -`Builder`). - -### Context - -From `hadrian/src/Context/Type.hs`: - -```haskell -data Context = Context - { stage :: Stage -- ^ Currently build Stage - , package :: Package -- ^ Currently build Package - , way :: Way -- ^ Currently build Way (usually 'vanilla') - } deriving (Eq, Generic, Show) -``` - -So Context is a data type that stores a Stage, Package, and a Way, i.e. the -context for some particular `Target`. - -#### Stage - -From `hadrian/src/Stage.hs`: - -```haskell -data Stage = Stage0 | Stage1 | Stage2 | Stage3 - deriving (Show, Eq, Ord, Enum, Generic, Bounded) -``` - -#### Package - -From `hadrian/src/Hadrian/Package.hs`: - -```haskell -data Package = Package { - -- | The package type. 'Library' and 'Program' packages are supported. - pkgType :: PackageType, - -- | The package name. We assume that all packages have different names, - -- hence two packages with the same name are considered equal. - pkgName :: PackageName, - -- | The path to the package source code relative to the root of the build - -- system. For example, @libraries/Cabal/Cabal@ and @ghc@ are paths to the - -- @Cabal@ and @ghc-bin@ packages in GHC. - pkgPath :: FilePath - } deriving (Eq, Generic, Ord, Show) -``` - -`PackageType` is simply defined as: - -```haskell -data PackageType = Library | Program deriving (Eq, Generic, Ord, Show) -``` - -This doesn't quite reflect how Cabal packages are actually structured, as -discussed in https://github.com/snowleopard/hadrian/issues/12, but Hadrian can -still function treating packages as either libraries or programs. - -Both `PackageName` and `FilePath` are just type synonyms of `String`. - -#### Way - -From `hadrian/src/Way/Type.hs`: - -```haskell -newtype Way = Way IntSet -``` - -Where `Way` is a set of enumerated `WayUnit`s wrapped in a `newtype`. - -`WayUnit` is defined as: - -```haskell -data WayUnit = Threaded - | Debug - | Profiling - | Logging - | Dynamic - deriving (Bounded, Enum, Eq, Ord) -``` - -There are also some helper functions in this module to abstract away this -complexity. For example: - -```haskell -import qualified Data.IntSet as Set - -wayFromUnits :: [WayUnit] -> Way -wayFromUnits = Way . Set.fromList . map fromEnum -``` - -`wayFromUnits` converts the `[WayUnit]` into `[Int]` using `map fromEnum`, -creates an `IntSet` from them using `Set.fromList`, and then wraps the `IntSet` -with the `Way` constructor. So we can use `wayFromUnits` to create a `Way` that -builds Hadrian with both multi-threading and profiling by simply writing -`wayFromUnits [Threaded, Profiling]`. - -We can also check if a `Way` contains a particular `WayUnit` by using -`wayUnit :: WayUnit -> Way -> Bool`. This is useful if we need to do something -when we're building with a particular `WayUnit`, but not otherwise. - -For example, using `getWay :: Expr Context b Way` from `hadrian/src/Context.hs`: - -```haskell -foo :: Expr () -foo = do - w <- getWay - if wayUnit Profiling w - then liftIO $ putStrLn "We're building this target with profiling" - else liftIO $ putStrLn "We're not building this target with profiling" -``` - -### Builder - -From `hadrian/src/Builder.hs`: - -> A `Builder` is a (usually external) command invoked in a separate process -> via `cmd`. Here are some examples: -> * `Alex` is a lexical analyser generator that builds `Lexer.hs` from `Lexer.x`. -> * `Ghc` `Stage0` is the bootstrapping Haskell compiler used in `Stage0`. -> * `Ghc` `StageN` (N > 0) is the GHC built in stage (N - 1) and used in `StageN`. -> -> The `Cabal` builder is unusual in that it does not correspond to an external -> program but instead relies on the Cabal library for package configuration. - -The data type itself is simply a long set of constructors that may or may not -be parameterised: - -```haskell -data Builder = Alex - | Ar ArMode Stage - | Autoreconf FilePath - | DeriveConstants - | Cabal ConfigurationInfo Stage - ... - | Ghc GhcMode Stage - ... etc. - deriving (Eq, Generic, Show) -``` - -## Action - -`Action` comes from Shake, the library underlying Hadrian. It can perform `IO` -using `liftIO` and keeps track of the dependencies for a rule. For more -information on `Action`, see the Shake docs: -https://hackage.haskell.org/package/shake-0.18.3/docs/Development-Shake.html - -# Predicates - -One useful kind of Hadrian expression is `Predicate`, which is just a type -synonym for `Expr Bool`. These expressions can read from the `Target` and -possibly perform `IO` or any other `Action` to return a `Bool`. - -A particularly useful operator for using `Predicate`s is `?`. Its real type and -implementation can be found in `hadrian/src/Hadrian/Expression.hs`, but for the -sake of illustrating how it works in most cases, imagine it's defined like -this: - -```haskell -(?) :: Monoid a => Predicate -> Expr a -> Expr a -predicate ? expr = do - bool <- predicate - if bool then expr else return mempty -``` - -If the `Predicate` returns `True`, we return the `Expr` we give it, otherwise -we return `mempty` (which is why we need the `Monoid` type constraint). In fact -thanks to some added type class complexity in the real definition, we can -give `?` a `Bool` instead of a `Predicate` and it works the same way. - -To show how we might use `Predicate`s and `?` in practice, say we want to -compile all the Haskell modules in `compiler/` with `-O0` during stage 0. We can -do that by going to `UserSettings.hs` (see -[the user settings docs](user-settings.md)) and changing `userArgs` to: - -```haskell -userArgs :: Args -userArgs = package compiler ? builder (Ghc CompileHs stage0) ? arg "-O0" -``` - -`Args` is just a type synonym for `Expr [String]` and `arg` just lifts a -`String` into an `Args`. - -`package :: Package -> Predicate` from `hadrian/src/Expression.hs` takes a -`Package` and returns a `Predicate` that will return `True` if the current -`Target` is part of that package and `False` otherwise. In this case we give -it `compiler` which is defined in `hadrian/src/Packages.hs` along with many -other convenient `Package` definitions. - -`builder` comes from `hadrian/src/Expression.hs`: - -> This type class allows the user to construct both precise builder -> predicates, such as `builder (Ghc CompileHs Stage1)`, as well as predicates -> covering a set of similar builders. For example, `builder (Ghc CompileHs)` -> matches any stage, and `builder Ghc` matches any stage and any GHC mode. - -```haskell -class BuilderPredicate a where - -- | Is a particular builder being used? - builder :: a -> Predicate -``` - -Other useful `Predicate` functions can be found in `hadrian/src/Expression.hs` -and `hadrian/src/Hadrian/Expression.hs`. diff --git a/hadrian/doc/flavours.md b/hadrian/doc/flavours.md deleted file mode 100644 index 1290bca0c42d..000000000000 --- a/hadrian/doc/flavours.md +++ /dev/null @@ -1,405 +0,0 @@ -# Build flavours - -Hadrian supports a few predefined _build flavours_, i.e. collections of build -settings that fully define a GHC build (see `src/Flavour.hs`). Users can add their -own build flavours if need be, as described -[here](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/user-settings.md#build-flavour). - -## Arguments - -The following table summarises extra arguments passed to GHC in different build flavours. -There are four groups of arguments: arguments in `hsDefault` are passed to GHC for all Haskell -source files, `hsLibrary` arguments are added when compiling libraries, `hsCompiler` -when compiling the `compiler` library, and `hsGhc` when compiling/linking the GHC program. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FlavourSplit SectionsExtra arguments
hsDefault - hsLibrary - hsCompiler - hsGhc -
stage0 - stage1+ - stage0 - stage1+ - stage0 - stage1+ - stage0 - stage1+ -
default
-
-O
-H32m
-O2
-H32m
-haddock
quick - -O0
-H64m
-O0
-H64m
-O-O2-O-O
quick-validate - -O0
-H64m
-Werror
-O0
-H64m
-Werror
-O-O2-O-O
quick-debug - -O0
-H64m
-O0
-H64m
-O-O2-O-O-debug (link)
quickest - -O0
-H64m
-O0
-H64m
-O-O
perf - Yes (on supported platforms) -O
-H64m
-O
-H64m
-O2-O2-O2-O-O2
release (same as perf with -haddock and +no_self_recomp+hash_unit_ids) - -O
-H64m
-O
-H64m
-O2-O2-O2-O-O2
bench - -O
-H64m
-O
-H64m
-O2-O2-O0-O2-O2
devel1 - -O
-H64m
-O
-H64m
-dcore-lint-O0
-DDEBUG
-O0
-DDEBUG
devel2 - -O
-H64m
-O
-H64m
-dcore-lint-O2-O0
-DDEBUG
-O0
-DDEBUG
validate - -O0
-H64m
-fllvm-fill-undef-with-garbage
-fcheck-prim-bounds
-O
-dcore-lint
-dno-debug-output
-O2
-DDEBUG
-O
-dcore-lint
-dno-debug-output
-O-O
slow-validate - -O0
-H64m
-fllvm-fill-undef-with-garbage-O
-dcore-lint
-dno-debug-output
-O2
-DDEBUG
-O
-DDEBUG
-dcore-lint
-dno-debug-output
-O-O
static - -O
-H64m
-fPIC -static
-O
-H64m
-fPIC -static
-O2-O2-O2-O
-optl -static
-O2
-optl -static
- -## Flavour transformers - -Each of the flavours described above is intended as a starting-point for -configuring your GHC build. In addition, Hadrian supports a number of "flavour -transformers" which modify the configuration in various ways. - -These can be appended to the flavour name passed via the `--flavour` -command-line flag, separated by the `+` character. For instance, - -``` -hadrian --flavour=perf+thread_sanitizer -``` - -The supported transformers are listed below: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Transformer nameEffect
werrorUse the `-Werror` flag for all stage1+ compilation.
debug_infoEnable production of native debugging information (via GHC/GCC's `-g3`) - during stage1+ compilations.
ticky_ghcCompile the GHC executable with Ticky-Ticky profiler support.
split_sectionsEnable section splitting for all libraries (except for the GHC - library due to the long linking times that this causes).
no_split_sectionsDisable section splitting for all libraries.
thread_sanitizerBuild the runtime system with ThreadSanitizer support
llvmUse GHC's LLVM backend (`-fllvm`) for all stage1+ compilation.
profiled_ghcBuild the GHC executable with cost-centre profiling support. - It is recommended that you use this in conjunction with `no_dynamic_ghc` since - GHC does not support loading of profiled libraries with the - dynamic linker. You should use a flavour that builds profiling libs and rts, - i.e. not quick.
- This flag adds cost centres with the -fprof-late flag.
no_dynamic_ghcLinked GHC against the statically-linked RTS. This causes GHC to - default to loading static rather than dynamic library when, - e.g., loading libraries during TemplateHaskell evaluations.
no_dynamic_libsJust like `no_dynamic_ghc`, this transformer ensures statically-linked libraries -
native_bignumUse the native ghc-bignum backend.
text_simdutfEnable building the text package with simdutf support.
no_profiled_libsDisables building of libraries in profiled build ways.
omit_pragmasBuild the stage2 compiler with -fomit-interface-pragmas to reduce - recompilation.
ipeBuild the stage2 libraries with IPE debugging information for use with -hi profiling.
debug_ghcBuild the stage2 compiler linked against the debug rts
debug_stage1_ghcBuild the stage1 compiler linked against the debug rts
assertionsBuild the stage2 compiler with assertions enabled.
fully_staticProduce fully statically-linked executables and build libraries suitable for static linking.
host_fully_staticEnsure host executables are fully static, while still permitting shared target libraries.
collect_timingsCollects timings while building the stage2+ compiler by adding the - flags -ddump-to-file -ddump-timings.
lintEnable Core, STG, and C-- linting in all compilation with the stage1 - compiler.
haddockEmit haddock documentation into the interface files via -haddock.
hi_coreEmit whole Core bindings into the interface files via -fwrite-if-simplified-core.
late_ccsEnable -fprof-late in profiled libraries. Enabled in perf and release flavours.
dump_stgDump STG of all modules compiled by a stage1 compiler to a file
no_self_recompDisable including self-recompilation information in interface files via -fno-write-if-self-recomp. If you are building a distribution you can enable this flag to produce more deterministic interface files.hash_unit_idsInclude a package hash in the unit id of built packageshie_filesProduce hie files for stage1 libraries
- -### Static - -The `static` flavour does not strictly follow the groupings in the table -above because it links all the executables statically, not just GHC -itself, and because it passes `-optc -static` when delegating to a C -compiler. It also turns off dynamic linking at runtime by by adding the -`-dynamic-system-linker` cabal flag to the `ghc` package build because -`musl` doesn't allow dynamic linking in executables that were statically -linked against `libc`. Static flags are only added when building in a -non-dynamic _way_. Some of the considerations for a static build aren't -a great fit for the flavour system, so it's a little bit hacky. - -## Ways - -Libraries and GHC can be built in different _ways_, e.g. with or without profiling -information. The following table lists ways that are built in different flavours. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FlavourLibrary waysRTS ways
stage0stage1+stage0stage1+stage0stage1+
default
perf
prof
devel1
devel2 -
vanillavanilla
profiling
dynamic
debug
threaded
threadedDebug
debugDynamic
threadedDynamic
threadedDebugDynamic
debug
threaded
threadedDebug
threadedProfiling
debugDynamic
threadedDynamic
threadedDebugDynamic
static - vanillavanilla
profiling
debug
threaded
threadedDebug
- debug
threaded
threadedDebug
threadedProfiling -
Only in
prof
flavour
Only in
prof
flavour
quick
quick-validate
quick-debug
vanillavanilla
dynamic
debug
threaded
threadedDebug
debugDynamic
threadedDynamic
threadedDebugDynamic
debug
threaded
threadedDebug
debugDynamic
threadedDynamic
threadedDebugDynamic
quickest
bench
vanillavanillavanilla
threaded
vanilla
threaded
diff --git a/hadrian/doc/make.md b/hadrian/doc/make.md deleted file mode 100644 index 82e5ab792919..000000000000 --- a/hadrian/doc/make.md +++ /dev/null @@ -1,211 +0,0 @@ -# Hadrian for Make users - -This is a cheatsheet-style document meant to succinctly show how to use -Hadrian for any GHC developer familiar with the Make build system, by showing -the Make command(s) to achieve some goal and then the Hadrian equivalent. If you -are looking for a more verbose and comprehensive document, you should head to -[Hadrian's README](../README.md). - -## tl;dr - -For GHC hackers already used to the Make build system, here is what you need to -know: - -- You still need to `boot` and `configure` yourself. -- Use `hadrian/build.{sh, bat}` instead of `make`. It supports `-j`. This build - script will from now on be referred to as simply `build`. -- Build products are not in `inplace` anymore, but `_build` by default. Your - stage 2 GHC would then be at `_build/stage1/bin/ghc` (because it's built by - the stage 1 compiler). -- The build root is configurable with `--build-root` or `-o`. -- You can pick the build flavour with `--flavour=X` where X is `perf`, `prof`, - etc. -- You can run tests with `build test`, and specific ones by adding - `--only="T12345 T11223"` for example. -- GHCs built by Hadrian are relocatable on Windows, Linux, OS X and FreeBSD. - This means you can move the `/stage1/{lib, bin}` directories - around and GHC will still happily work, as long as both directories stay next - to each other. - -Of particular interest is the `--build-root/-o` option, which is often useful to -work on different things or build GHC in different ways, from the same -directory/GHC checkout, without having to sacrifice the build artifacts every -time you fire up a build. This is not possible with the Make build system. - -## Equivalent commands - -- Building a complete stage 2 compiler with its libraries, default flavour - - ``` sh - # Make - make - - # Hadrian - build - ``` - -- Building with many cores - - ``` sh - # Make - make -j8 - - # Hadrian - build -j8 - ``` - -- Building a stage 1 or 2 GHC executable - - ``` sh - # Make - make inplace/bin/ghc-stage1 - make inplace/bin/ghc-stage2 - - # Hadrian - build stage1:exe:ghc-bin # using the simple target name - build _build/stage0/bin/ghc # OR using the actual path - - build stage2:exe:ghc-bin # simple target - build _build/stage1/bin/ghc # OR actual path - ``` - -- Building and registering a library with the stage 2 compiler - - ``` sh - # Make - make inplace/lib/package.conf.d/text-1.2.3.0.conf - - # Hadrian - build stage2:lib:text # simple target - build _build/stage1/lib/package.conf.d/text-1.2.3.0.conf # OR actual path - ``` - -- Building with a particular flavour (e.g `quickest`) - - ``` sh - # Make - echo "BuildFlavour=quickest" >> mk/build.mk - make - - # Hadrian - build --flavour=quickest - ``` - See [flavours documentation](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/flavours.md) for info on flavours. - -- Freezing the stage 1 GHC compiler - - ``` sh - # Make - echo "stage=2" >> mk/build.mk - make - - # Hadrian - build --freeze1 - ``` - -- Running the testsuite - - ``` sh - # Make - make test # (1) - make test TEST=plugins01 # (2) - make test TEST="plugins01 plugins02" # (3) - make accept # (4) - PLATFORM=YES OS=YES make accept # (5) - - - # Hadrian - build test # equivalent to (1) - - build test --only=plugins01 # equivalent to (2) - TEST=plugins01 build test # equivalent to (2) - - build test --only="plugins01 plugins02" # equivalent to (3) - TEST="plugins01 plugins02" build test # equivalent to (3) - TEST=plugins01 build test --only=plugins02 # equivalent to (3) - - build test -a # equivalent to (4) - build test --test-accept # equivalent to (4) - - PLATFORM=YES OS=YES build test -a # equivalent to (5) - PLATFORM=YES OS=YES build test --test-accept # equivalent to (5) - ``` - - As illustrated in the examples above, you can use the `TEST` environment - variable, the `--only=...` flag or even both to restrict your testsuite run - to some (usually small) subset of the testsuite. - - See [the docs for the test rules](./testsuite.md) if you want to know about - all the options that hadrian supports and what they correspond to in the Make - build system. - -- Generate the `settings` file to be used for stage 1/2 GHC - - ``` sh - # Make - make inplace/lib/settings - - # Hadrian - build _build/stage0/lib/settings - build _build/stage1/lib/settings - ``` - -- Build a static library for base with the stage 1 compiler - - ``` sh - # Make - make libraries/base/dist-install/build/libHSbase-4.12.0.0.a - - # Hadrian - build _build/stage1/libraries/base/build/libHSbase-4.12.0.0.a - ``` - -- Generate haddocks, user guide, etc - - ``` sh - # Make - make docs - - # Hadrian - build docs - ``` - -- Build documentation, but without haddocks (resp. without HTML or PDF manuals) - - ``` sh - # Make - echo 'HADDOCKS_DOCS = NO' > mk/build.mk - # For HTML manuals: BUILD_SPHINX_HTML = NO - # For PDF manuals: BUILD_SPHINX_PDF = NO - make - - # Hadrian - build docs --docs=no-haddocks - # Append --docs=no-sphinx-pdfs, --docs=no-sphinx-html or - # --docs=no-sphinx-man (or --docs=no-sphinx to encompass them all) - # to further reduce or even completely disable documentation targets. - ``` - -- Running nofib - - ``` sh - # Make - cd nofib; make clean; make boot; make 2>&1 | tee nofib-log - - # Hadrian - build nofib # builds the compiler and everything we need if necessary, too - ``` - -- `make FAST=YES` - - Partially supported in hadrian with the `--skip-depends` argument. Since - hadrian is not directory aware some of the features of `FAST=YES` are not - replicated. - - ```sh - # Make - make FAST=YES - - # Hadrian - build --skip-depends - ``` diff --git a/hadrian/doc/staged-compilation.svg b/hadrian/doc/staged-compilation.svg deleted file mode 100644 index f80094facc4c..000000000000 --- a/hadrian/doc/staged-compilation.svg +++ /dev/null @@ -1,1161 +0,0 @@ - - - - - Staged Compilation in Hadrian - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - Staged Compilation in Hadrian - - - Ben Gamari - - - - - - - - - - - - - - - - - ghcstage 0 - - - - ghcstage 1 - ghcstage 1 - - - - ghcstage 2 - - - - - - - basestage 0 - - - - integer-*stage 0 - - - - - - - basestage 1 - - - - integer-*stage 1 - - - - - - - - basestage 2 - - - - ghcstage 3 - - - Hadrianpath - _build/stage0 - /usr/... - _build/stage1 - _build/stage2 - - - - - GHC build dependencies provided by system - - Produced during GHC build - - Optionally produced during GHC build - - "x produces y" - x - y - - "x is linked against y" - x - y - - - - - - hadrian - - - - everything below - ghcruns on - build - build - target - target - producescode for - build - target - target - target - - diff --git a/hadrian/doc/testsuite.md b/hadrian/doc/testsuite.md deleted file mode 100644 index 19c5ee6bdde9..000000000000 --- a/hadrian/doc/testsuite.md +++ /dev/null @@ -1,217 +0,0 @@ -# Running the testsuite - -## Quickstart - -The simplest way to run the testsuite is - -``` sh -# assuming 'build' is the build script you're using -# (hadrian/build, hadrian/build.bat, ...) -build test -``` - -This is the equivalent of running `make test` with the -Make build system: it will run the entire testsuite in -normal mode (as opposed to slow or fast). If you have not -built GHC before, this will also build a stage 2 GHC in -the default flavour along with many libraries and programs -needed by the tests. - -NOTE: The only build flavours which are expected to pass the testsuite are those -tested in CI. If you use an untested flavour such as "Quick" then you run the -risk that not all tests will pass. In particular you can rely on the `validate` -and `perf` flavours being tested but no others. - -## Building just the dependencies needed for the testsuite - -By default the testsuite is queried to work out what specific dependencies need to -be built for tests. For example, some linter tests don't require anything to be built. -If you wish to build all the targets for the testsuite before running any tests there is -a special meta-target which builds all the dependencies you might need when running the testsuite. - -``` -build test:all_deps -``` - - - -## Running only a subset of the testsuite - -### Specific tests - -You can use the `TEST` environment variable, like with the -Make build system, or the `--only=...` command line argument. -This is best illustrated with examples: - -``` sh -# only run the test named 'sometest' -build test --only=sometest - -# only run 'test1' and 'test2' -build test --only="test1 test2" - -# only run 'sometest' -TEST=sometest build test - -# only run 'test1' and 'test2' -TEST="test1 test2" build test - -# only run 'test1', 'test2', 'test3' and 'test4' -TEST="test1 test2" build test --only="test3 test4" -``` - -### Whole directories of tests - -You can also ask Hadrian to run all the tests that live under one or -more directories, under which the testsuite driver will be looking for -`.T` files (usually called `all.T`), where our tests are declared. - -By default, the `test` rule tries to run all the tests available (the ones -under `testsuite/tests/` as well as all the tests of the boot libraries -or programs (`base`, `haddock`, etc)). - -To restrict the testsuite driver to only run a specific directory of tests, -e.g `testsuite/tests/th`, you can simply do: - -``` sh -$ build -j test --test-root-dirs=testsuite/tests/th -``` - -If you want to run several directories of tests, you can either -use several `--test-root-dirs` arguments or just one but separating -the various directories with `:`: - -``` sh -# first approach -build -j test --test-root-dirs=testsuite/tests/th --test-root-dirs=testsuite/tests/gadt - -# second approach -build -j test --test-root-dirs=testsuite/tests/th:testsuite/tests/gadt -``` - -## Accepting new output - -You can use the `-a` or `--test-accept` flag to "accept" the new -output of your tests. This has the effect of updating the expected -output of all the tests that fail due to mismatching output, so as to -consider the new output the correct one. - -When the `PLATFORM` environment variable is set to `YES`, passing this flag has -the effect of accepting the new output for the current platform. - -When the `OS` environment variable is set to `YES`, passing this flag has the -effect of accepting the new output for all word sizes on the current OS. - -``` sh -# accept new output for all tests -build test -a - -# just run and accept new output for 'test123' and 'test456' -build test -a --only="test123 test456" - -# accept new output for current platform and all word sizes for -# the current OS, for all tests -PLATFORM=YES OS=YES build test -a -``` - -## Performance tests - -You can use the `--only-perf` and `--skip-perf` flags to -respectively run only the performance tests or everything -but the performance tests. - -``` sh -# just performance tests, equivalent to: -# make test ONLY_PERF_TESTS=YES -build test --only-perf - -# skip performance tests, equivalent to: -# make test SKIP_PERF_TESTS=YES -build test --skip-perf -``` - -The testsuite driver will produce a summary of the observed performance metrics -if `hadrian` is passed the `--summary-metrics=` flag. - -## Test speed - -You can run the tests in `slow`, `normal` (default) or `fast` -mode using `--test-speed={slow, normal, fast}`. - -``` sh -# equivalent to: make slowtest -build test --test-speed=slow - -# equivalent to: make test -build test --test-speed=normal - -# equivalent to: make fasttest -build test --test-speed=fast -``` - -## Considering tests to be broken - -Sometimes it is necessary to mark tests as broken in a particular test -environment (e.g. a particular Linux distribution). While usually one would -want to declare this in the test definition using the `expect_broken` modifier, -this is sometimes not possible. - -For these cases one can use Hadrian's `--broken-test` flag to tell the -testsuite driver to consider a test to be broken during the testsuite run. - -## Test ways - -You can specify which test ways to use using `--test-way=`, -once per way that you want to run. - -``` sh -# equivalent to: make test WAY=ghci -build test --test-way=ghci - -# equivalent to: make test WAY=ghci WAY=hpc -build test --test-way=ghci --test-way=hpc -``` - -## Misc. - -``` - --summary[=TEST_SUMMARY] -``` -Where to output the test summary file. - ---- - -``` - --test-verbose[=TEST_VERBOSE] -``` -A verbosity value between 0 and 5. 0 is silent, 4 and higher -activates extra output. - ---- - -``` - --test-compiler[=TEST_COMPILER] -``` -Use given compiler [Default=stage2]. - ---- - -``` - --test-config-file[=CONFIG_FILE] -``` -Configuration file for testsuite. Default is -`testsuite/config/ghc` - ---- - -``` - --config[=EXTRA_TEST_CONFIG] -``` -Configurations to run test, in `key=value` format. - ---- - -``` - --summary-junit[=TEST_SUMMARY_JUNIT] -``` -Output testsuite summary in JUnit format. diff --git a/hadrian/doc/user-settings.md b/hadrian/doc/user-settings.md deleted file mode 100644 index e269b2d9be08..000000000000 --- a/hadrian/doc/user-settings.md +++ /dev/null @@ -1,447 +0,0 @@ -# Settings - -You can customise Hadrian in two ways: - -- By selecting a flavour, flavour transformers and using - key-value settings, either in the command line - or by modifying the `hadrian.settings` file in the build directory. - -- By overriding the default build settings in the source code, - by copying the file `hadrian/src/UserSettings.hs` to `hadrian/UserSettings.hs` - and making modifications (if you don't copy the file, your changes will be tracked by `git` - and you can accidentally commit them). - -## Build flavours - -A build _flavour_ is a collection of build settings that fully define a GHC build -(see `src/Flavour.hs`): -```haskell -data Flavour = Flavour { - -- | Flavour name, to select this flavour from command line. - name :: String, - -- | Use these command line arguments. - args :: Args, - -- | Build these packages. - packages :: Stage -> Action [Package], - -- | Bignum backend: 'native', 'gmp', 'ffi', etc. - bignumBackend :: String, - -- | Check selected bignum backend against native backend - bignumCheck :: Bool, - -- | Build libraries these ways. - libraryWays :: Ways, - -- | Build RTS these ways. - rtsWays :: Ways, - -- | Build dynamic GHC programs. - dynamicGhcPrograms :: Action Bool, - -- | Build profiled GHC. - ghcProfiled :: Stage -- ^ stage of the /built/ compiler - -> Bool, - -- | Build GHC with the debug RTS. - ghcDebugged :: Stage -- ^ stage of the /built/ compiler - -> Bool, - -- | Build GHC with debug assertions (-DDEBUG). - ghcDebugAssertions :: Stage -- ^ stage of the /built/ compiler - -> Bool, - -- | Build the GHC executable against the threaded runtime system. - ghcThreaded :: Stage -- ^ stage of the /built/ compiler - -> Bool, - -- | Whether to build docs and which ones - -- (haddocks, user manual, haddock manual) - ghcDocs :: Action DocTargets, - -- | Whether to generate .hie files - ghcHieFiles :: Stage -> Bool - } -``` -Hadrian provides several built-in flavours (`default`, `quick`, and a few -others; see `hadrian/doc/flavours.md`), which can be activated from the command line, -e.g. by passing `--flavour=quick`. - -## Flavour transformers - -Flavours can be customised using [flavour transformers](flavours.md#flavour-transformers). - -For example, it is useful to enable `-Werror` when building GHC as this setting is -used in the CI to ensure a warning-free build. The `+werror` flavour transformer -can be used to easily modify a flavour to turn this setting on: - -``` -hadrian/build --flavour=validate+werror -``` - -## `key = value` and `key += value` style settings - -One can supply settings from the command line or a -`/hadrian.settings` file. Hadrian currently supports -the following "families" of settings: - -- `{stage0, ..., stage3, *}.( or *).ghc.{c, hs, link, deps, toolargs, *}.opts` -- `{stage0, ..., stage3, *}.( or *).cc.{c, deps, *}.opts` -- `{stage0, ..., stage3, *}.( or *).cabal.configure.opts` -- `{stage0, ..., stage3, *}.( or *).hsc2hs.run.opts` - -For example, putting the following in a file at `_build/hadrian.settings`: - -``` make -stage1.ghc-bin.ghc.link.opts += -debug -*.base.ghc.*.opts += -v3 -``` - -and running hadrian with the default build root (`_build`), would respectively -link the stage 2 GHC executable (using the stage 1 GHC) with the `-debug` -flag and use `-v3` on all GHC commands used to build anything related to -`base`, whatever the stage. - -We could equivalently specify those settings on the command-line: - -``` sh -$ hadrian/build "stage1.ghc-bin.ghc.link.opts += -eventlog" \ - "*.base.ghc.*.opts += -v3" -``` - -or specify some in `hadrian.settings` and some on the command-line. - -Here is an overview of the supported settings and how you can figure out -the right names for them: - -- the stage slot, which comes first, can be filled with any of `stage0`, - `stage1`, `stage2`, `stage3` or `*`; any value but `*` will restrict the - setting update to targets built during the given stage, while `*` is taken - to mean "for any stage". For instance, the above example will affect - the linking of the `_build/stage1/bin/ghc` executable. -- the package slot, which comes second, can be filled with any package name - that Hadrian knows about (all packages that are part of a GHC checkout), - or `*`, to respectively mean that the builder options are going to be updated - only when building the given package, or that the said options should be used - when building all known packages, if the Hadrian command ever gets them to be - built; -- the remaining slots specify the builder and how it was invoked, - - * `ghc` refers to GHC commands; the final slot refers to how GHC is invoked: - - * `c.opts` for commands that build C files with GHC - * `cpp.opts` for commands that build C++ files with GHC - * `hs.opts` for commands that compile Haskell modules with GHC - * `link.opts` for GHC linking command - * `deps.opts` for commands that figure out dependencies between Haskell modules - (with `ghc -M`) - * `toolargs.opts` for GHC commands that are used to generate the right ghci - argument for `hadrian/ghci` to work - - * `cc` refers to C/C++ compiler commands - - * `c.opts` for commands that call the C compiler on some C/C++ files - * `deps.opts` for commands that call the C compiler for figuring out - dependencies between C files. Note that this doesn't work for C++ files yet. - - * `cabal.configure.opts` refers to Cabal configure command line. Note that - package flags can be given by adding `--flags=...` arguments. Also, for packages with `build-type: Configure`, you can pass additional arguments to the `configure` script like this: `stage1.rts.cabal.configure.opts+=--configure-option=--enable-asserts-all-ways` - - * `hsc2hs.run.opts` allows passing options to `Hsc2Hs` invocations. - - * `runtest.opts` defines extra arguments passed to `runtest.py` when - invoked via the `hadrian test` target. - - * `haddock.build-package.opts` defines arguments to be passed to Haddock - when building documentation. - -- using a wildcard (`*`) ranges over all possible values for a given "slot"; -- `=` entirely overrides the arguments for a given builder in a given context, - with the value specified on the right hand side of `=`, while `+=` merely - extends the arguments that are to be emitted in the said context, with - the values supplied on the right hand side of `+=`. - -See `Note [Hadrian settings]` in `hadrian/src/Settings.hs` for explanations -about the implementation and how the set of supported settings can be -extended. - -## Directly modifying Hadrian configuration - -If the existing configuration options aren't enough for your needs, -you can directly add new configurations to Hadrian. - -### Defining new flavours - -Users can define new build flavours by adding them to the `userFlavours` list: -```haskell --- | User-defined build flavours. See 'userFlavour' as an example. -userFlavours :: [Flavour] -userFlavours = [userFlavour] -- Add more build flavours if need be. - --- | This is an example user-defined build flavour. Feel free to modify it and --- use by passing @--flavour=user@ from the command line. -userFlavour :: Flavour -userFlavour = defaultFlavour { name = "user" } -- Modify other settings here. -``` -Now `--flavour=user` will run Hadrian with `userFlavour` settings. - -When no `--flavour` argument is passed to hadrian, it will use the -`default` one. You can however change this, and for example make -the "fallback" flavour be `user`, by changing `userDefaultFlavour`: - -``` haskell -userDefaultFlavour :: String --- before: --- userDefaultFlavour = "default" --- now: -userDefaultFlavour = "user" -``` - -This saves you from having to type `build --flavour=user [...]` -every time, allowing you to _persist_ the choice of flavour. - -In the -following sections we look at specific fields of the `Flavour` record in -more detail. Note: `defaultFlavour`, as well as its individual fields such -as `defaultArgs`, `defaultPackages`, etc. that we use below, are defined in module -`Settings.Default`. - -### Passing command line arguments to builders - -One of the key features of Hadrian is that users can easily modify any build command. -The build system will detect the change and will rerun all affected build rules during -the next build, without requiring a full rebuild. - -For example, here is how to pass an extra argument `-O0` to all invocations of -GHC when compiling package `cabal`: -```haskell -userFlavour :: Flavour -userFlavour = defaultFlavour { name = "user", args = defaultArgs <> userArgs } - -userArgs :: Args -userArgs = builder Ghc ? package cabal ? arg "-O0" -``` -Builders such as `Ghc` are defined in `src/Builder.hs`, and all packages that -are currently built as part of the GHC are defined in `src/Packages.hs`. - -You can combine several custom command line settings using `mconcat`: -```haskell -userArgs :: Args -userArgs = mconcat - [ builder Ghc ? package cabal ? arg "-O0" - , package rts ? input "**/PrimOps.c" ? pure ["-fno-PIC", "-static"] ] -``` -You can match any combination of the `builder`, `stage`, `package`, `way`, `input` -and `output` predicates when specifying custom command line arguments. File -patterns such as `"**/Prelude.*"` can be used when matching input and output files, -where `**` matches an arbitrary number of path components, but not absolute path -prefixes, and `*` matches an entire path component, excluding any separators. - -#### Linking GHC against the debugged RTS - -What was previously achieved by having `GhcDebugged=YES` in `mk/build.mk` can -be done by defining a custom flavour in the user settings file, one that -sets the `ghcDebugged` field of `Flavour` to `const True`, e.g: - -``` haskell -quickDebug :: Flavour -quickDebug = quickFlavour { name = "dbg", ghcDebugged = const True } -``` - -Running `build --flavour=dbg` will build a `quick`-flavoured GHC and link -GHC, iserv, iserv-proxy and remote-iserv against the debugged RTS, by passing -`-debug` to the commands that link those executables. - -More generally, a predicate on `Stage` can be provided to specify which stages should be built debugged. For example, setting `ghcDebugged = (>= Stage2)` will build a debugged compiler at stage 2 or higher, but not stage 1. - -Finally, the `debug_ghc` and `debug_stage1_ghc` [flavour transformers](#flavour-transformers) provide a convenient way to enable `ghcDebugged` on the command line without the need to define a separate custom flavour. - -### Packages - -Users can add and remove packages from particular build stages. As an example, -below we add package `base` to Stage0 and remove package `haskeline` from Stage1: -```haskell -... -import Packages -... - -userFlavour :: Flavour -userFlavour = defaultFlavour { name = "user", packages = modifiedPackages } - -modifiedPackages :: Stage -> Action [Package] -modifiedPackages stage = do - packages <- defaultPackages stage - return $ case stage of - Stage0 -> packages ++ [base] - Stage1 -> packages \\ [haskeline] - _ -> packages -``` -If you are working on a new GHC package you need to let Hadrian know about it -by adding it to `userPackages`: -```haskell -userPackages :: [Package] -userPackages = [userPackage] - --- An example package that lives in "libraries/user-package" directory. -userPackage :: Package -userPackage = library "user-package" -``` -You will also need to add `userPackage` to a specific build stage by modifying -the `packages` setting of the user flavour as otherwise it will not be built. - -You can choose which Bignum backend to use when buidling GHC using the -`bignumBackend` setting of the build flavour. Possible values are: `gmp` -(default), `native` or `ffi`. -```haskell -userFlavour :: Flavour -userFlavour = defaultFlavour { name = "user", bignumBackend = "native" } -``` - -#### Specifying the final stage to build - -The `finalStage` variable can be set to indicate after which stage we should -stop the compilation pipeline. By default it is set to `Stage2` which indicates -that we will build everything which uses the `Stage1` `ghc` and then stop. - -``` -finalStage :: Stage -finalStage = Stage2 -``` - -Using this mechanism we can also build a `Stage3` compiler by setting -`finalStage = Stage3` or just a `Stage1` compiler by setting -`finalStage = Stage1`. - -### Build ways - -Packages can be built in a number of ways, such as `vanilla`, `profiling` (with -profiling information enabled), and many others as defined in `src/Way.hs`. You -can change the default build ways by modifying `libraryWays` and `rtsWays` fields -of the `Flavour` record as required. As an example, below we remove `profiling` -from the list of library ways: -```haskell -noProfilingFlavour :: Flavour -noProfilingFlavour = defaultFlavour - { name = "no-profiling" - , libraryWays = remove [profiling] defaultLibraryWays - , ghcProfiled = False } -- Can't build profiled GHC without profiled libraries -``` -Note that `rtsWays` is computed from `libraryWays` by default, therefore the above -change will lead to the removal of `threadedProfiling` way from `rtsWays`. To -change this behaviour, you can override the default `rtsWays` setting. - -Similarly, if we want to completely turn off dynamic linking, we can define a custom -`Flavour` to this effect: -``` haskell -noDynamicFlavour :: Flavour -noDynamicFlavour = defaultFlavour - { name = "no-dynamic" - , libraryWays = remove [dynamic] defaultLibraryWays } -``` - -### Documentation - -`Flavour`'s `ghcDocs :: Action DocTargets` field lets you -customize the "groups" of documentation targets that should -run when running `build docs` (or, transitively, -`build binary-dist`). - -```haskell -type DocTargets = Set DocTarget -data DocTarget = Haddocks | SphinxHTML | SphinxPDFs | SphinxMan -``` - -By default, `ghcDocs` contains all of them and `build docs` would -therefore attempt to build all the haddocks, manuals and manpages. -If, for some reason (e.g no easy way to install `sphinx-build` or -`xelatex` on your system), you're just interested in building the -haddocks, you could define a custom flavour as follows: - -```haskell -justHaddocksFlavour :: Flavour -justHaddocksFlavour = defaultFlavour - { name = "default-haddocks" - , ghcDocs = Set.singleton Haddocks } -``` - -and then run `build --flavour=default-haddocks`. Alternatively, -you can use the `--docs` CLI flag to selectively disable some or -all of the documentation targets: - -- `--docs=none`: don't build any docs -- `--docs=no-haddocks`: don't build haddocks -- `--docs=no-sphinx`: don't build any user manual or manpage -- `--docs=no-sphinx-html`: don't build HTML versions of manuals -- `--docs=no-sphinx-pdfs`: don't build PDF versions of manuals -- `--docs=no-sphinx-man`: don't build the manpage - -You can pass several `--docs=...` flags, Hadrian will combine -their effects. - -### HIE files - -The `ghcHieFiles` field controls whether `.hie` files are generated -for source files built with the stage1 compiler. - -For most flavours `.hie` files wil be generated by default. - -### Split sections - -You can build all or just a few packages with -[`-split-sections`][split-sections] by tweaking an existing -flavour (whichever matches your needs) using -`splitSections` or `splitSectionsIf`: - -``` haskell -splitSections :: Flavour -> Flavour -splitSectionsIf :: (Package -> Bool) -> Flavour -> Flavour -``` - -For example, you can easily start with the `quick` flavour and -additionally build all Haskell packages with `-split-sections` by defining a new -flavour as -`(splitSectionsIf (const True) quickFlavour) { name = "quick-split" }`. -You can then start a build with this flavour with `build --flavour=quick-split`. - -Changing `(const True)` to `(== base)` would only build `base` with -`-split-sections`, not all Haskell packages as with `quick-split` above. - -`splitSections` is simply `splitSectionsIf` applied to the predicate -`(/=ghc)`, i.e it builds all Haskell packages but the `ghc` -library with `-split-sections` (it is usually not worth using that -option with the `ghc` library). - -### Miscellaneous - -Hadrian prints various progress info during the build. You can change the colours -used by default by overriding `buildProgressColour` and `successColour`: -```haskell --- | Set colour for build progress messages (e.g. executing a build command). -buildProgressColour :: BuildProgressColour -buildProgressColour = mkBuildProgressColour (Dull Magenta) - --- | Set colour for success messages (e.g. a package is built successfully). -successColour :: SuccessColour -successColour = mkSuccessColour (Dull Green) -``` - -Your options are `Dull Colour`, `Vivid Colour`, or `Extended Code`. `Dull` -colours are the ANSI 8-bit colours, `Vivid` correspond to the 16-bit codes that -end with ";1", and `Extended` let's you enter a manual code for the 256 colour -set. E.g. - -``` -Dull Blue -Vivid Cyan -Extended "203" -``` - -### Tab completion - -Hadrian supports tab-completion for the key-value settings. This is implemented -in `Rules.SimpleTargets.completionRule`, by exporting an `autocomplete` target -that takes an (optional) argument, `--complete-setting=`, and -prints on stdout all the setting keys that have the given string as a prefix. - -There is a `hadrian/completion.sh` script that makes use of this rule to -install Bash completions for `hadrian/build` and `hadrian/build-cabal`. -You can try it out by doing: - -``` sh -$ source hadrian/completion.sh -$ hadrian/build -$ hadrian/build stage1.ba -$ hadrian/build "stage1.base.ghc. -$ hadrian/build "*.*.ghc.*.opts += -v3" "stage0.ghc-bin.ghc.lin -``` - -[split-sections]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/phases.html#ghc-flag--split-sections diff --git a/hadrian/doc/windows.md b/hadrian/doc/windows.md deleted file mode 100644 index 213bcc86c84c..000000000000 --- a/hadrian/doc/windows.md +++ /dev/null @@ -1,70 +0,0 @@ -# Building GHC on Windows - -Here is how you can build GHC, from source, on Windows with minimal requirements. -We only assume that `git` and `stack` are installed (see -[prerequisites](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/windows.md#prerequisites)). - -``` -# Get GHC sources; git core.autocrlf should be set to false (see Prerequisites section) -git clone --recursive git@gitlab.haskell.org:ghc/ghc.git -cd ghc - -# Download and install the bootstrapping GHC and MSYS2 -cd hadrian -stack setup - -# Install utilities required during the GHC build process -stack exec -- pacman -S autoconf automake-wrapper make patch python tar --noconfirm - -# Build Hadrian and dependencies (including GHC dependencies Alex and Happy) -stack build - -# Build GHC -stack exec hadrian -- --directory ".." -j --flavour=quickest - -# Test GHC -cd .. -_build\stage1\bin\ghc -e 1+2 -``` - -The entire process should take about 20 minutes. Note, this will build GHC -without optimisations. If you need an optimised GHC, drop the `--flavour=quickest` -flag from the build command line (this will slow down the build to about an hour). - -These are currently not the -[official GHC building instructions](https://gitlab.haskell.org/ghc/ghc/wikis/building/preparation/windows), -but are much simpler and may also be more robust. - -The `stack build` and `stack exec hadrian` commands can be replaced by an -invocation of Hadrian's Stack-based build script: -`build-stack.bat -j --flavour=quickest`. Use this script if you plan to work on -Hadrian and/or rebuild GHC often. - -## Prerequisites - -The above works on a clean machine with `git` and `stack` installed (tested with -default installation settings), which you can get from -https://git-scm.com/download/win and -https://www.stackage.org/stack/windows-x86_64-installer. - -Note that `git` should be configured to check out Unix-style line endings. The -default behaviour of `git` on Windows is to check out Windows-style line endings -which can cause issues during the build. This can be changed using the following -command: - - git config --global core.autocrlf false - -If you would like to restore the default behaviour later run: - - git config --global core.autocrlf true - -## Testing - -These instructions have been tested on a clean Windows 10 machine using the -[free VirtualBox image](https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/). - -**TODO:** It would be useful to test the instructions routinely on CI. - -## Notes - -Beware of the [current limitations of Hadrian](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md#current-limitations). diff --git a/hadrian/ghci b/hadrian/ghci deleted file mode 100755 index 707e87059de8..000000000000 --- a/hadrian/ghci +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# By default on Linux/MacOS we build Hadrian using Cabal -(. "hadrian/ghci-cabal" $@) diff --git a/hadrian/ghci-cabal.in b/hadrian/ghci-cabal.in deleted file mode 100755 index 760d3247f83c..000000000000 --- a/hadrian/ghci-cabal.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh - -# This file is generated by configure from ghci-cabal.in - -set -e -export TOOL_OUTPUT=.hadrian_ghci/ghci_args -# Replace newlines with spaces, as these otherwise break the ghci invocation on windows. -CABFLAGS="-v0 $CABFLAGS" "hadrian/build-cabal" tool:compiler/GHC.hs --build-root=.hadrian_ghci --flavour=ghc-in-ghci $HADRIAN_ARGS -GHC_FLAGS="$GHC_FLAGS $(cat $TOOL_OUTPUT | tr '\n\r' ' ')" -@WithGhc@ --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 +RTS -A128m diff --git a/hadrian/ghci-multi b/hadrian/ghci-multi deleted file mode 100755 index 72c89f96b234..000000000000 --- a/hadrian/ghci-multi +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# By default on Linux/MacOS we build Hadrian using Cabal -(. "hadrian/ghci-multi-cabal" $@) diff --git a/hadrian/ghci-multi-cabal.in b/hadrian/ghci-multi-cabal.in deleted file mode 100755 index e2d46533786a..000000000000 --- a/hadrian/ghci-multi-cabal.in +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -RUN_GHC=@WithGhc@ -if [[ $(printf "9.8.1\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.8.1" ]]; then echo "Multi-repl needs at least GHC-9.8.1"; exit 1; fi - -# This file is generated by configure from ghci-multi.in - -set -e -export TOOL_OUTPUT=.hadrian_ghci_multi/ghci_args -# Replace newlines with spaces, as these otherwise break the ghci invocation on windows. -CABFLAGS=-v0 "hadrian/build-cabal" multi --build-root=.hadrian_ghci_multi --flavour=ghc-in-ghci $HADRIAN_ARGS -GHC_FLAGS="$GHC_FLAGS $(cat $TOOL_OUTPUT | tr '\n\r' ' ')" -$RUN_GHC --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -O0 +RTS -A128m diff --git a/hadrian/ghci-stack.in b/hadrian/ghci-stack.in deleted file mode 100755 index 12f388820590..000000000000 --- a/hadrian/ghci-stack.in +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh - -# This file is generated by configure from ghci-stack.in - -set -e - -export TOOL_OUTPUT=.hadrian_ghci/ghci_args -TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool:compiler/GHC.hs -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci $HADRIAN_ARGS - -# Replace newlines with spaces, as these otherwise break the ghci invocation on windows. -GHC_FLAGS="$GHC_FLAGS $(cat $TOOL_OUTPUT | tr '\n\r' ' ')" -stack exec -- @WithGhc@ --interactive $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 +RTS -A128m diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal deleted file mode 100644 index 5c042a37ad51..000000000000 --- a/hadrian/hadrian.cabal +++ /dev/null @@ -1,195 +0,0 @@ -cabal-version: 1.18 -name: hadrian -version: 0.1.0.0 -synopsis: GHC build system -license: BSD3 -license-file: LICENSE -author: Andrey Mokhov , github: @snowleopard -maintainer: Andrey Mokhov , github: @snowleopard -copyright: Andrey Mokhov 2014-2017 -category: Development -build-type: Simple -extra-doc-files: README.md - -source-repository head - type: git - location: https://gitlab.haskell.org/ghc/ghc - --- To accommodate #16873 -flag threaded - manual: True - default: True - description: Build with the threaded runtime for improved - performance. Users with bootstrap compilers - which don't support the threaded runtime should - disable this flag. - --- See also #21913 -flag selftest - manual: True - default: False - description: Enables the hadrian selftest rules which require - QuickCheck. Disabling it thus saves on a few dependencies - which can be problematic when bootstrapping. - -executable hadrian - main-is: Main.hs - hs-source-dirs: . - , src - other-modules: Base - , Builder - , CommandLine - , Context - , Context.Path - , Context.Type - , Environment - , Expression - , Expression.Type - , Flavour - , Flavour.Type - , Hadrian.Builder - , Hadrian.Builder.Ar - , Hadrian.Builder.Sphinx - , Hadrian.Builder.Tar - , Hadrian.Builder.Git - , Hadrian.BuildPath - , Hadrian.Expression - , Hadrian.Haskell.Cabal - , Hadrian.Haskell.Hash - , Hadrian.Haskell.Cabal.Type - , Hadrian.Haskell.Cabal.Parse - , Hadrian.Oracles.ArgsHash - , Hadrian.Oracles.Cabal - , Hadrian.Oracles.Cabal.Rules - , Hadrian.Oracles.Cabal.Type - , Hadrian.Oracles.DirectoryContents - , Hadrian.Oracles.Path - , Hadrian.Oracles.TextFile - , Hadrian.Package - , Hadrian.Target - , Hadrian.Utilities - , Oracles.Flag - , Oracles.Flavour - , Oracles.Setting - , Oracles.ModuleFiles - , Oracles.TestSettings - , Packages - , Progress - , Rules - , Rules.BinaryDist - , Rules.CabalReinstall - , Rules.Clean - , Rules.Codes - , Rules.Compile - , Rules.Dependencies - , Rules.Docspec - , Rules.Documentation - , Rules.Generate - , Rules.Gmp - , Rules.Libffi - , Rules.Library - , Rules.Lint - , Rules.Nofib - , Rules.Program - , Rules.Register - , Rules.Rts - , Rules.SimpleTargets - , Rules.SourceDist - , Rules.Test - , Rules.ToolArgs - , Settings - , Settings.Builders.Alex - , Settings.Builders.Cabal - , Settings.Builders.Common - , Settings.Builders.Cc - , Settings.Builders.Configure - , Settings.Builders.DeriveConstants - , Settings.Builders.GenApply - , Settings.Builders.GenPrimopCode - , Settings.Builders.Ghc - , Settings.Builders.GhcPkg - , Settings.Builders.Haddock - , Settings.Builders.Happy - , Settings.Builders.Hsc2Hs - , Settings.Builders.HsCpp - , Settings.Builders.Ar - , Settings.Builders.Ld - , Settings.Builders.Make - , Settings.Builders.MergeObjects - , Settings.Builders.SplitSections - , Settings.Builders.RunTest - , Settings.Builders.Win32Tarballs - , Settings.Builders.Xelatex - , Settings.Default - , Settings.Flavours.Benchmark - , Settings.Flavours.Development - , Settings.Flavours.GhcInGhci - , Settings.Flavours.Performance - , Settings.Flavours.Quick - , Settings.Flavours.QuickCross - , Settings.Flavours.Quickest - , Settings.Flavours.Validate - , Settings.Flavours.Release - , Settings.Packages - , Settings.Parser - , Settings.Program - , Settings.Warnings - , Stage - , Target - , UserSettings - , Utilities - , Way - , Way.Type - default-language: Haskell2010 - default-extensions: DeriveFunctor - , DeriveGeneric - , FlexibleInstances - , GeneralizedNewtypeDeriving - , LambdaCase - , RecordWildCards - , ScopedTypeVariables - , TupleSections - , BangPatterns - , TypeOperators - other-extensions: MultiParamTypeClasses - , TypeFamilies - build-depends: Cabal >= 3.13 && < 3.17 - , base >= 4.11 && < 5 - , bytestring >= 0.10 && < 0.13 - , containers >= 0.5 && < 0.9 - -- N.B. directory >=1.3.9 as earlier versions are - -- afflicted by #24382. - , directory >= 1.3.9.0 && < 1.4 - , extra >= 1.4.7 - , filepath - , time - , mtl >= 2.2 && < 2.4 - , parsec >= 3.1 && < 3.2 - , shake >= 0.18.3 && < 0.20 - , transformers >= 0.4 && < 0.7 - , unordered-containers >= 0.2.1 && < 0.3 - , text >= 1.2 && < 3 - , cryptohash-sha256 >= 0.11 && < 0.12 - , base16-bytestring >= 0.1.1 && < 1.1.0.0 - , ghc-platform - , ghc-toolchain - ghc-options: -Wall - -Wincomplete-record-updates - -Wredundant-constraints - -fno-warn-name-shadowing - -rtsopts - -fno-ignore-asserts - - if flag(threaded) - ghc-options: - -- * -I0: Disable idle GC to avoid redundant GCs while - -- waiting for external processes - -- * -qg: Don't use parallel GC as the synchronization - -- time tends to eat any benefit. - "-with-rtsopts=-I0 -qg" - -threaded - - if flag(selftest) - other-modules: Rules.Selftest - cpp-options: -DHADRIAN_ENABLE_SELFTEST - build-depends: QuickCheck >= 2.6 && < 2.15 diff --git a/hadrian/hie-bios b/hadrian/hie-bios deleted file mode 100755 index aa0982769dc6..000000000000 --- a/hadrian/hie-bios +++ /dev/null @@ -1,6 +0,0 @@ -#! /usr/bin/env bash - -# When run, this program will output a list of arguments which are necessary to -# load the GHC library component into GHCi. The program is used by `ghcide` in -# order to automatically set up the correct GHC API session for a project. -TERM=dumb CABFLAGS=-v0 TOOL_OUTPUT=$HIE_BIOS_OUTPUT $PWD/hadrian/build-cabal tool:$1 -q --build-root=.hie-bios --flavour=ghc-in-ghci -j diff --git a/hadrian/hie-bios.bat b/hadrian/hie-bios.bat deleted file mode 100644 index dce803e64640..000000000000 --- a/hadrian/hie-bios.bat +++ /dev/null @@ -1,4 +0,0 @@ -set TERM=dumb -set CABFLAGS=-v0 -set TOOL_OUTPUT=%HIE_BIOS_OUTPUT% -%CD%\hadrian\build-cabal.bat tool:%1 --build-root=.hie-bios --flavour=ghc-in-ghci -j diff --git a/hadrian/hie.yaml b/hadrian/hie.yaml deleted file mode 100644 index e9d68d43186f..000000000000 --- a/hadrian/hie.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# This is a IDE configuration file which tells IDEs such as `ghcide` how -# to set up a GHC API session for this project. -# -# The format is documented here - https://github.com/mpickering/hie-bios -cradle: {cabal: {component: "exe:hadrian"}} diff --git a/hadrian/lint b/hadrian/lint deleted file mode 100755 index d0348532f9d9..000000000000 --- a/hadrian/lint +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -"hadrian/build" "$@" test --test-root-dirs="testsuite/tests/linters" lint:compiler lint:base diff --git a/hadrian/src/Base.hs b/hadrian/src/Base.hs deleted file mode 100644 index 83d9bfc549e1..000000000000 --- a/hadrian/src/Base.hs +++ /dev/null @@ -1,223 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE GADTs #-} -{-# LANGUAGE DeriveTraversable #-} -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE StandaloneDeriving #-} -{-# LANGUAGE StandaloneKindSignatures #-} -{-# LANGUAGE TypeOperators #-} - -module Base ( - -- * General utilities - module Control.Applicative, - module Control.Monad.Extra, - module Data.List.Extra, - module Data.Maybe, - module Data.Semigroup, - module Hadrian.Utilities, - - -- * Shake - module Development.Shake, - module Development.Shake.Classes, - module Development.Shake.FilePath, - module Development.Shake.Util, - - Vec(..), (&%>), - - -- * Basic data types - module Hadrian.Package, - module Stage, - module Way, - - -- * Paths - hadrianPath, configPath, configFile, sourcePath, shakeFilesDir, - stageBinPath, stageLibPath, templateHscPath, - buildTargetFile, hostTargetFile, targetTargetFile, - ghcLibDeps, haddockDeps, - relativePackageDbPath, packageDbPath, packageDbStamp, mingwStamp, - systemCxxStdLibConf, systemCxxStdLibConfPath - , PackageDbLoc(..), Inplace(..) - - ) where - -import Control.Applicative -import Control.Monad.Extra -import Control.Monad.Reader -import Control.Monad.State ( State ) -import qualified Control.Monad.State as State -import Data.Foldable (toList) -import Data.Kind -import Data.List.Extra -import Data.Maybe -import Data.Semigroup -#if MIN_VERSION_shake(0,19,0) -import Development.Shake hiding (unit, (&%>), Normal) -#else -import Development.Shake hiding (unit, (&%>), (*>), Normal) -#endif -import qualified Development.Shake as Shake -import Development.Shake.Classes -import Development.Shake.FilePath -import Development.Shake.Util -import Hadrian.Oracles.DirectoryContents -import Hadrian.Utilities -import Hadrian.Package - -import GHC.Stack ( HasCallStack ) - -import Stage -import Way - --- | Hadrian lives in the 'hadrianPath' directory of the GHC tree. -hadrianPath :: FilePath -hadrianPath = "hadrian" - --- TODO: Move this to build directory? --- | Path to system configuration files, such as 'configFile'. -configPath :: FilePath -configPath = hadrianPath -/- "cfg" - --- | Path to the system configuration file generated by the @configure@ script. -configFile :: FilePath -configFile = configPath -/- "system.config" - --- | The target configuration file generated by ghc-toolchain for the --- compilation build platform -buildTargetFile :: FilePath -buildTargetFile = configPath -/- "default.host.target" - --- | The target configuration file generated by ghc-toolchain for the --- compilation host platform --- --- Currently, GHC requires that BUILD=HOST, so, for now, the host target file --- is really just the build target file. -hostTargetFile :: FilePath -hostTargetFile = buildTargetFile - --- | The target configuration file generated by ghc-toolchain for the --- compilation target platform -targetTargetFile :: FilePath -targetTargetFile = configPath -/- "default.target" - --- | Path to source files of the build system, e.g. this file is located at --- @sourcePath -/- "Base.hs"@. We use this to track some of the source files. -sourcePath :: FilePath -sourcePath = hadrianPath -/- "src" - --- | The directory in 'buildRoot' containing the Shake database and other --- auxiliary files generated by Hadrian. -shakeFilesDir :: FilePath -shakeFilesDir = "hadrian" - --- | Path to the package database for a given build stage, relative to the build --- root. -relativePackageDbPath :: PackageDbLoc -> FilePath -relativePackageDbPath (PackageDbLoc stage Final) = stageString stage-/- "lib/package.conf.d" -relativePackageDbPath (PackageDbLoc stage Inplace) = stageString stage -/- "inplace/package.conf.d" - --- See Note [Inplace vs Final package databases] -data PackageDbLoc = PackageDbLoc { db_stage :: Stage, db_inplace :: Inplace } - --- | Path to the package database used in a given 'Stage', including --- the build root. -packageDbPath :: PackageDbLoc -> Action FilePath -packageDbPath db_loc = buildRoot <&> (-/- relativePackageDbPath db_loc) - --- | We use a stamp file to track the existence of a package database. -packageDbStamp :: FilePath -packageDbStamp = ".stamp" - -systemCxxStdLibConf :: FilePath -systemCxxStdLibConf = "system-cxx-std-lib-1.0.conf" - --- | The name of the generated @system-cxx-std-lib-1.0.conf@ package database --- entry. -systemCxxStdLibConfPath :: PackageDbLoc -> Action FilePath -systemCxxStdLibConfPath stage = - packageDbPath stage <&> (-/- systemCxxStdLibConf) - --- | @bin@ directory for the given 'Stage' (including the build root) -stageBinPath :: Stage -> Action FilePath -stageBinPath stage = buildRoot <&> (-/- stageString stage -/- "bin") - --- | @lib@ directory for the given 'Stage' (including the build root) -stageLibPath :: Stage -> Action FilePath -stageLibPath stage = buildRoot <&> (-/- stageString stage -/- "lib") - --- | Files the GHC library depends on -ghcLibDeps :: Stage -> Inplace -> Action [FilePath] -ghcLibDeps stage iplace = do - ps <- mapM (\f -> stageLibPath stage <&> (-/- f)) - [ "llvm-targets" - , "llvm-passes" - , "ghc-interp.js" - , "settings" - , "ghc-usage.txt" - , "ghci-usage.txt" - , "dyld.mjs" - , "post-link.mjs" - , "prelude.mjs" - ] - cxxStdLib <- systemCxxStdLibConfPath (PackageDbLoc stage iplace) - return (cxxStdLib : ps) - --- | Files the `haddock` binary depends on -haddockDeps :: Stage -> Action [FilePath] -haddockDeps stage = do - let resdir = "utils/haddock/haddock-api/resources" - latexResources <- directoryContents matchAll (resdir -/- "latex") - htmlResources <- directoryContents matchAll (resdir -/- "html") - - haddockLib <- stageLibPath stage - return $ [ haddockLib -/- makeRelative resdir f - | f <- latexResources ++ htmlResources ] - --- ref: utils/hsc2hs/ghc.mk --- | Path to 'hsc2hs' template. -templateHscPath :: Stage -> Action FilePath -templateHscPath stage = stageLibPath stage <&> (-/- "template-hsc.h") - --- | We use this stamp file to track whether we've moved the mingw toolchain --- under the build root (to make it accessible to the GHCs we build on --- Windows). See "Rules.Program". -mingwStamp :: FilePath -mingwStamp = "mingw" -/- ".stamp" - --- | Same as @'Development.Shake.&%>'@ except that it works with an arbitrary --- traversable structure of 'FilePattern's, which avoids running into incomplete --- pattern match warnings (see #22430). -(&%>) :: (HasCallStack, Traversable t, Show (t FilePath)) - => t FilePattern -> (t FilePath -> Action ()) -> Rules () -ps &%> f = toList ps Shake.&%> ( \ fs -> f (fromListWithShape ps fs) ) - --- | Utility function that fills in the values of a traversable shape --- with the elements of the provided list. -fromListWithShape :: forall t a b - . ( HasCallStack, Show (t a), Show b, Traversable t ) - => t a -> [b] -> t b -fromListWithShape shape elts = - traverse (const getElt) shape `State.evalState` elts - where - getElt :: State [b] b - getElt = do { s <- State.get - ; case s of - { [] -> error $ "fromListWithShape: not enough elements to fill this shape\n" - ++ "elements: " ++ show elts ++"\n" - ++ "shape: " ++ show shape - ; b:bs -> - do { State.put bs - ; return b } } } - -infixr 5 :& -data Nat = Zero | Succ Nat - --- | A traversable vector type, defined for convenient use with '(&%>)'. -type Vec :: Nat -> Type -> Type -data Vec n a where - Nil :: Vec Zero a - (:&) :: a -> Vec n a -> Vec (Succ n) a - -deriving instance Functor (Vec n) -deriving instance Foldable (Vec n) -deriving instance Traversable (Vec n) -instance Show a => Show (Vec n a) where - showsPrec p v = showsPrec p (toList v) diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs deleted file mode 100644 index f566f57e3fcc..000000000000 --- a/hadrian/src/Builder.hs +++ /dev/null @@ -1,635 +0,0 @@ -{-# LANGUAGE InstanceSigs, TypeOperators #-} -module Builder ( - -- * Data types - ArMode (..), CcMode (..), ConfigurationInfo (..), DependencyType (..), - GhcMode (..), GhcPkgMode (..), HaddockMode (..), TestMode(..), SphinxMode (..), - TarMode (..), GitMode (..), Builder (..), Win32TarballsMode(..), - - -- * Builder properties - builderProvenance, systemBuilderPath, builderPath, isSpecified, needBuilders, - runBuilder, runBuilderWith, runBuilderWithCmdOptions, getBuilderPath, - builderEnvironment - ) where - -import Control.Exception.Extra (Partial) -import qualified Data.ByteString.Lazy.Char8 as BSL -import Development.Shake.Classes -import Development.Shake.Command -import Development.Shake.FilePath -import GHC.Generics -import GHC.Platform.ArchOS (ArchOS(..), Arch(..)) -import qualified Hadrian.Builder as H -import Hadrian.Builder hiding (Builder) -import Hadrian.Builder.Ar -import Hadrian.Builder.Sphinx -import Hadrian.Builder.Tar -import Hadrian.Oracles.Path -import Hadrian.Oracles.TextFile -import Hadrian.Utilities -import Oracles.Setting (bashPath, targetStage) -import System.Exit -import System.IO (stderr) - -import Base -import Context -import Oracles.Flag -import Oracles.Setting (setting, Setting(..)) -import Packages - -import GHC.IO.Encoding (getFileSystemEncoding) -import qualified Data.ByteString as BS -import qualified GHC.Foreign as GHC -import GHC.ResponseFile - -import GHC.Toolchain (Target(..)) -import qualified GHC.Toolchain as Toolchain -import GHC.Toolchain.Program - --- | C compiler can be used in two different modes: --- * Compile or preprocess a source file. --- * Extract source dependencies by passing @-MM@ command line argument. -data CcMode = CompileC | FindCDependencies DependencyType deriving (Eq, Generic, Show) -data DependencyType = CDep | CxxDep deriving (Eq, Generic, Show) - -instance Binary CcMode -instance Hashable CcMode -instance NFData CcMode - -instance Binary DependencyType -instance Hashable DependencyType -instance NFData DependencyType - --- | GHC can be used in four different modes: --- * Compile a Haskell source file. --- * Compile a C source file. --- * Extract source dependencies by passing @-M@ command line argument. --- * Link object files & static libraries into an executable. -data GhcMode = CompileHs - | CompileCWithGhc - | CompileCppWithGhc - | FindHsDependencies - | LinkHs - | ToolArgs - deriving (Eq, Generic, Show) - -instance Binary GhcMode -instance Hashable GhcMode -instance NFData GhcMode - --- | To configure a package we need two pieces of information, which we choose --- to record separately for convenience. --- --- * Command line arguments to be passed to the setup script. --- --- * Package configuration flags that enable/disable certain package features. --- Here is an example from "Settings.Packages": --- --- > package rts --- > ? builder (Cabal Flags) --- > ? any (wayUnit Profiling) rtsWays --- > ? arg "profiling" --- --- This instructs package configuration functions (such as 'configurePackage') --- to enable the @profiling@ Cabal flag when processing @rts.cabal@ and --- building RTS with profiling information. -data ConfigurationInfo - = Setup - | Flags - | Install - deriving (Eq, Generic, Show) - -instance Binary ConfigurationInfo -instance Hashable ConfigurationInfo -instance NFData ConfigurationInfo - --- TODO: Do we really need all these modes? Why do we need 'Dependencies'? We --- can extract dependencies using the Cabal library. --- | 'GhcPkg' can initialise a package database and register packages in it. -data GhcPkgMode = Recache -- ^ Recache a package database - | Copy -- ^ Copy a package from one database to another. - | Dependencies -- ^ Compute package dependencies. - | Unregister -- ^ Unregister a package. - | Update -- ^ Update a package. - deriving (Eq, Generic, Show) - -instance Binary GhcPkgMode -instance Hashable GhcPkgMode -instance NFData GhcPkgMode - --- | Haddock can be used in two different modes: --- * Generate documentation for a single package --- * Generate an index page for a collection of packages -data HaddockMode = BuildPackage | BuildIndex deriving (Eq, Generic, Show) - -instance Binary HaddockMode -instance Hashable HaddockMode -instance NFData HaddockMode - --- | The testsuite driver can be called in two different modes: --- * Actually run the tests --- * Get all the hadrian targets needed for the current test configuration -data TestMode = RunTest | GetExtraDeps deriving (Eq, Generic, Show) - -instance Binary TestMode -instance Hashable TestMode -instance NFData TestMode - --- | Git is used to create source distributions -data GitMode = ListFiles deriving (Eq, Generic, Show) - -instance Binary GitMode -instance Hashable GitMode -instance NFData GitMode - -data Win32TarballsMode = ListTarballs | VerifyTarballs | DownloadTarballs deriving (Eq, Generic, Show) - -instance Binary Win32TarballsMode -instance Hashable Win32TarballsMode -instance NFData Win32TarballsMode - - - --- | A 'Builder' is a (usually external) command invoked in a separate process --- via 'cmd'. Here are some examples: --- * 'Alex' is a lexical analyser generator that builds @Lexer.hs@ from @Lexer.x@. --- * 'Ghc' 'Stage0' is the bootstrapping Haskell compiler used in 'Stage0'. --- * 'Ghc' @StageN@ (N > 0) is the GHC built in stage (N - 1) and used in @StageN@. --- --- The 'Cabal' builder is unusual in that it does not correspond to an external --- program but instead relies on the Cabal library for package configuration. -data Builder = Alex - | Ar ArMode Stage - | Autoreconf FilePath - | Cabal ConfigurationInfo Stage - | Cc CcMode Stage - | Configure FilePath - | DeriveConstants - | GenApply (Maybe Int) -- ^ vector size, or Nothing for non-vectors - | GenPrimopCode - | Ghc GhcMode Stage - | GhcPkg GhcPkgMode Stage - | Haddock HaddockMode - | Happy - | Hp2Ps - | Hpc - | HsCpp - | JsCpp - | Hsc2Hs Stage - | Ld Stage --- ^ linker - | Make FilePath - | Makeinfo - | MergeObjects Stage -- ^ linker to be used to merge object files. - | Nm - | Objdump - | Python - | Ranlib - | Testsuite TestMode - | Sphinx SphinxMode - | Tar TarMode - | Unlit - | Xelatex - | Makeindex -- ^ from xelatex - | Git GitMode - | Win32Tarballs Win32TarballsMode - deriving (Eq, Generic, Show) - -instance Binary Builder -instance Hashable Builder -instance NFData Builder - --- | Some builders are built by this very build system, in which case --- 'builderProvenance' returns the corresponding build 'Context' (which includes --- 'Stage' and GHC 'Package'). -builderProvenance :: Builder -> Maybe Context -builderProvenance = \case - DeriveConstants -> context stage0Boot deriveConstants - GenApply {} -> context stage0Boot genapply - GenPrimopCode -> context stage0Boot genprimopcode - Ghc _ (Stage0 {})-> Nothing - Ghc _ stage -> context (predStage stage) ghc - GhcPkg _ (Stage0 {}) -> Nothing - GhcPkg _ s -> context (predStage s) ghcPkg - Haddock _ -> context Stage1 haddock - Hsc2Hs _ -> context stage0Boot hsc2hs - Unlit -> context stage0Boot unlit - - -- Never used - Hpc -> context Stage1 hpcBin - Hp2Ps -> context stage0Boot hp2ps - _ -> Nothing - where - context s p = Just $ vanillaContext s p - -instance H.Builder Builder where - builderPath :: Builder -> Action FilePath - builderPath builder = case builderProvenance builder of - Nothing -> systemBuilderPath builder - Just context -> programPath context - - runtimeDependencies :: Builder -> Action [FilePath] - runtimeDependencies = \case - Autoreconf dir -> return [dir -/- "configure.ac"] - Configure dir -> return [dir -/- "configure"] - - Ghc _ (Stage0 {}) -> do - -- Read the boot GHC version here to make sure we rebuild when it - -- changes (#18001). - _bootGhcVersion <- setting GhcVersion - pure [] - Ghc _ st -> do - root <- buildRoot - unlitPath <- builderPath Unlit - distro_mingw <- lookupSystemConfig "settings-use-distro-mingw" - libffi_adjustors <- useLibffiForAdjustors - use_system_ffi <- flag UseSystemFfi - - return $ [ unlitPath ] - ++ [ root -/- mingwStamp | windowsHost, distro_mingw == "NO" ] - -- proxy for the entire mingw toolchain that - -- we have in inplace/mingw initially, and then at - -- root -/- mingw. - -- ffi.h needed by the compiler when using libffi_adjustors (#24864) - -- It would be nicer to not duplicate this logic between here - -- and needRtsLibffiTargets and libffiHeaderFiles but this doesn't change - -- very often. - ++ [ root -/- buildDir (rtsContext st) -/- "include" -/- header - | header <- ["ffi.h", "ffitarget.h"] - , libffi_adjustors && not use_system_ffi ] - - Hsc2Hs stage -> (\p -> [p]) <$> templateHscPath stage - Make dir -> return [dir -/- "Makefile"] - Haddock _ -> haddockDeps Stage1 -- Haddock currently runs in Stage1 - _ -> return [] - - -- query the builder for some information. - -- contrast this with runBuilderWith, which returns @Action ()@ - -- this returns the @stdout@ from running the builder. - -- For now this only implements asking @ghc-pkg@ about package - -- dependencies and asking the testsuite driver about hadrian - -- dependencies for tests. - askBuilderWith :: Builder -> BuildInfo -> Action String - askBuilderWith builder BuildInfo {..} = case builder of - GhcPkg Dependencies _ -> do - let input = fromSingleton msgIn buildInputs - msgIn = "[askBuilder] Exactly one input file expected." - needBuilders [builder] - path <- H.builderPath builder - -- we do not depend on bare builders. E.g. we won't depend on `clang` - -- or `ld` or `ar`. Unless they are provided with fully qualified paths - -- this is the job of the person invoking ./configure to pass e.g. - -- CC=$(which clang) if they want the fully qualified clang path! - when (path /= takeFileName path) $ - need [path] - Stdout stdout <- cmd' [path] ["--no-user-package-db", "field", input, "depends"] - return stdout - Testsuite GetExtraDeps -> do - path <- builderPath builder - withResources buildResources $ - withTempFile $ \temp -> do - () <- cmd' [path] (buildArgs ++ ["--only-report-hadrian-deps", temp]) - readFile' temp - Git ListFiles -> do - path <- builderPath builder - withResources buildResources $ do - -- NUL separated list of files - -- We need to read this in the filesystem encoding - enc <- liftIO getFileSystemEncoding - Stdout stdout <- cmd' BinaryPipes [path] buildArgs - liftIO $ BS.useAsCStringLen stdout $ \fp -> GHC.peekCStringLen enc fp - Win32Tarballs ListTarballs -> do - path <- builderPath builder - withResources buildResources $ do - Stdout stdout <- cmd' [path] buildArgs - pure stdout - _ -> error $ "Builder " ++ show builder ++ " can not be asked!" - - runBuilderWith :: Builder -> BuildInfo -> Action () - runBuilderWith builder BuildInfo {..} = do - path <- builderPath builder - withResources buildResources $ do - verbosity <- getVerbosity - let input = fromSingleton msgIn buildInputs - msgIn = "[runBuilderWith] Exactly one input file expected." - output = fromSingleton msgOut buildOutputs - msgOut = "[runBuilderWith] Exactly one output file expected." - -- Capture stdout and write it to the output file. - captureStdout = do - Stdout stdout <- cmd' [path] buildArgs buildOptions - -- see Note [Capture stdout as a ByteString] - writeFileChangedBS output stdout - case builder of - Ar Pack stg -> do - useTempFile <- arSupportsAtFile stg - if useTempFile then runAr path buildArgs buildInputs buildOptions - else runArWithoutTempFile path buildArgs buildInputs buildOptions - - Ar Unpack _ -> cmd' [Cwd output] [path] buildArgs buildOptions - - Autoreconf dir -> do - bash <- bashPath - cmd' [Cwd dir] [bash, path] buildArgs buildOptions - - Configure dir -> do - -- Inject /bin/bash into `libtool`, instead of /bin/sh, - -- otherwise Windows breaks. TODO: Figure out why. - bash <- bashPath - let env = AddEnv "CONFIG_SHELL" bash - cmd' env [Cwd dir] ["sh", path] buildOptions buildArgs - - GenApply {} -> captureStdout - - GenPrimopCode -> do - need [input] - Stdout stdout <- cmd' (FileStdin input) [path] buildArgs buildOptions - -- see Note [Capture stdout as a ByteString] - writeFileChangedBS output stdout - - GhcPkg Copy _ -> do - Stdout pkgDesc <- cmd' [path] - [ "--expand-pkgroot" - , "--no-user-package-db" - , "describe" - , input -- the package name - ] - cmd' (Stdin pkgDesc) [path] (buildArgs ++ ["-"]) buildOptions - - GhcPkg Unregister _ -> do - -- unregistering is allowed to fail (e.g. when a package - -- isn't already present) - Exit _ <- cmd' [path] (buildArgs ++ [input]) buildOptions - return () - - Haddock BuildPackage -> runHaddock path buildArgs buildInputs - - HsCpp -> captureStdout - - Make dir -> cmd' buildOptions path ["-C", dir] buildArgs - - Makeinfo -> do - cmd' [path] "--no-split" [ "-o", output] [input] buildOptions - - Xelatex -> - -- xelatex produces an incredible amount of output, almost - -- all of which is useless. Suppress it unless user - -- requests a loud build. - if verbosity >= Diagnostic - then cmd' [Cwd output] [path] buildArgs buildOptions - else do (Stdouterr out, Exit code) <- cmd' [Cwd output] [path] buildArgs buildOptions - when (code /= ExitSuccess) $ do - liftIO $ BSL.hPutStrLn stderr out - putFailure "xelatex failed!" - fail "xelatex failed" - - Makeindex -> unit $ cmd' [Cwd output] [path] (buildArgs ++ [input]) buildOptions - - Tar _ -> cmd' buildOptions [path] buildArgs - - -- RunTest produces a very large amount of (colorised) output; - -- Don't attempt to capture it. - Testsuite RunTest -> do - Exit code <- cmd [path] buildArgs buildOptions - when (code /= ExitSuccess) $ do - fail "tests failed" - - _ -> cmd' [path] buildArgs buildOptions - --- | Invoke @haddock@ given a path to it and a list of arguments. The arguments --- are passed in a response file. -runHaddock :: FilePath -- ^ path to @haddock@ - -> [String] - -> [FilePath] -- ^ input file paths - -> Action () -runHaddock haddockPath flagArgs fileInputs = withTempFile $ \tmp -> do - writeFile' tmp $ escapeArgs fileInputs - cmd [haddockPath] flagArgs ('@' : tmp) - --- TODO: Some builders are required only on certain platforms. For example, --- 'Objdump' is only required on OpenBSD and AIX. Add support for platform --- specific optional builders as soon as we can reliably test this feature. --- See https://github.com/snowleopard/hadrian/issues/211. -isOptional :: Toolchain.Target -- ^ Some builders are optional depending on the target - -> Builder - -> Bool -isOptional target = \case - Objdump -> True - -- alex and happy are not required when building source distributions - -- and ./configure will complain if they are not available when building in-tree - Happy -> True - Alex -> True - -- Most ar implemententions no longer need ranlib, but some still do - Ranlib -> not $ Toolchain.arNeedsRanlib (tgtAr target) - JsCpp -> not $ (archOS_arch . tgtArchOs) target == ArchJavaScript -- ArchWasm32 too? - _ -> False - --- | Determine the location of a system 'Builder'. -systemBuilderPath :: Builder -> Action FilePath -systemBuilderPath builder = case builder of - Alex -> fromKey "alex" - Ar _ stage -> fromStageTC stage "ar" (Toolchain.arMkArchive . tgtAr) - Autoreconf _ -> stripExe =<< fromKey "autoreconf" - Cc _ stage -> fromStageTC stage "cc" (Toolchain.ccProgram . tgtCCompiler) - -- We can't ask configure for the path to configure! - Configure _ -> return "configure" - Ghc _ (Stage0 {}) -> fromKey "system-ghc" - GhcPkg _ (Stage0 {}) -> fromKey "system-ghc-pkg" - Happy -> fromKey "happy" - HsCpp -> fromTargetTC "hs-cpp" (Toolchain.hsCppProgram . tgtHsCPreprocessor) - JsCpp -> fromTargetTC "js-cpp" (maybeProg Toolchain.jsCppProgram . tgtJsCPreprocessor) - Ld _ -> fromTargetTC "ld" (Toolchain.ccLinkProgram . tgtCCompilerLink) - -- MergeObjects Stage0 is a special case in case of - -- cross-compiling. We're building stage1, e.g. code which will be - -- executed on the host and hence we need to use host's merge - -- objects tool and not the target merge object tool. - -- Note, merge object tool is usually platform linker with some - -- parameters. E.g. building a cross-compiler on and for x86_64 - -- which will target ppc64 means that MergeObjects Stage0 will use - -- x86_64 linker and MergeObject _ will use ppc64 linker. - MergeObjects st -> fromStageTC st "merge-objects" (maybeProg Toolchain.mergeObjsProgram . tgtMergeObjs) - Make _ -> fromKey "make" - Makeinfo -> fromKey "makeinfo" - Nm -> fromTargetTC "nm" (Toolchain.nmProgram . tgtNm) - Objdump -> fromKey "objdump" - Python -> fromKey "python" - Ranlib -> fromTargetTC "ranlib" (maybeProg Toolchain.ranlibProgram . tgtRanlib) - Testsuite _ -> fromKey "python" - Sphinx _ -> fromKey "sphinx-build" - Tar _ -> fromKey "tar" - Git _ -> fromKey "git" - Xelatex -> fromKey "xelatex" - Makeindex -> fromKey "makeindex" - Win32Tarballs _ -> fromKey "python" - Cabal _ _ -> fromKey "cabal" - _ -> error $ "No entry for " ++ show builder ++ inCfg - where - inCfg = " in " ++ quote configFile ++ " file." - fromKey key = do - let unpack = fromMaybe . error $ "Cannot find path to builder " - ++ quote key ++ inCfg ++ " Did you skip configure?" - path <- unpack <$> lookupValue configFile key - validate key path - - -- Get program from a certain stage's target configuration - fromStageTC stage keyname key = do - path <- prgPath . key <$> targetStage stage - validate keyname path - - -- Get program from the target's target configuration - fromTargetTC keyname key = do - path <- queryTargetTarget (prgPath . key) - validate keyname path - - validate keyname path = do - target <- getTargetTarget - if null path - then do - unless (isOptional target builder) . error $ "Non optional builder " - ++ quote keyname ++ " is not specified" ++ inCfg - return "" -- TODO: Use a safe interface. - else do - -- angerman: I find this lookupInPath rather questionable. - -- if we specify CC, LD, ... *without* a path, that is intentional - -- lookupInPath should be done by the person invoking the configure - -- script iif they want to have that full path, if they just want - -- some generic tool name (on purpose!) the build system should not - -- go behind their backs to add a path they likely never wanted. - fullPath <- lookupInPath path - case (windowsHost, hasExtension fullPath) of - (False, _ ) -> return path - (True , True ) -> fixAbsolutePathOnWindows fullPath - (True , False) -> fixAbsolutePathOnWindows fullPath <&> (<.> exe) - - -- Without this function, on Windows we can observe a bad builder path - -- for 'autoreconf'. If the relevant system.config field is set to - -- /usr/bin/autoreconf in the file, the path that we read - -- is C:/msys64/usr/bin/autoreconf.exe. A standard msys2 set up happens - -- to have an executable named 'autoreconf' there, without the 'exe' - -- extension. Hence this function. - stripExe s = do - let sNoExt = dropExtension s - exists <- doesFileExist s - if exists then return s else return sNoExt - - maybeProg = maybe (Program "" []) - - --- | Was the path to a given system 'Builder' specified in configuration files? -isSpecified :: Builder -> Action Bool -isSpecified = fmap (not . null) . systemBuilderPath - --- Note [cmd wrapper] --- ~~~~~~~~~~~~~~~~~~ --- `cmd'` is a wrapper for Shake's `cmd` that allows us to customize what is --- output in the terminal in case of failure. --- --- However `cmd` is quite a complex function because: --- --- 1) it relies on a CmdArguments type class to be variadic -- it can be called --- with any number of arguments, as long as they are valid arguments -- and to --- return either "Action r" or "IO r". --- --- 2) its behavior depends on the returned "r" type! In particular, if it has --- to return a value of type Exit or ExitCode, then it doesn't raise an --- exception if the exit code isn't 0! It also doesn't echo the command --- stdout/stderr if it is requested in a Stdout/Stderr/Stdouterr result. Result --- types are handled via CmdResult type class. --- --- To wrap `cmd` while keeping its behavior, we need to replicate some of these --- type classes. --- --- 1) CmdWrap corresponds to CmdArguments except that we do our own stuff in --- the base case (i.e. in the instance for `Action r`). --- --- 2) Sadly CmdResult internals aren't exposed by Shake, so when we get a --- `CmdResult r => r` we can't tell anything about `r`. In particular, we can't --- tell if an Exit or ExitCode value is returned in `r`. So we use our own --- HasExit type class to provide the `hasExit` predicate that tells us if we --- should throw an exception as `cmd` would do in case of failure or not. --- --- Note [Capture stdout as a ByteString] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- As of shake-0.19.6, capturing a process stdout as a `String` using `Stdout` --- mangles the encoding if it some other use of `Stdout` also captures it as a --- `ByteString`; see . This --- can cause us real problems, since `cmd'` (see Note [cmd wrapper]) *always* --- captures stdout as a `ByteString`. --- --- Fortunately, a simple workaround is to avoid capturing stdout as a `String` --- in the first place. It’s usually unnecessary (and is in fact pointless work), --- as most of the time the captured output is immediately written to a file, so --- we can just treat it as an opaque binary stream. - - --- | Wrapper for Shake's 'cmd' --- --- See Note [cmd wrapper] -cmd' :: (Partial, CmdWrap args) => args :-> Action r -cmd' = cmdArgs mempty - - --- See Note [cmd wrapper] -class HasExit a where - -- | Indicate if `a` is Exit or ExitCode - -- See Note [cmd wrapper] - hasExit :: a -> Bool - -instance HasExit ExitCode where hasExit = const True -instance HasExit Exit where hasExit = const True -instance HasExit () where hasExit = const False -instance HasExit (Stdouterr a) where hasExit = const False -instance HasExit (Stdout a) where hasExit = const False - -instance (HasExit a, HasExit b) => HasExit (a,b) where - hasExit (a,b) = hasExit a || hasExit b -instance (HasExit a, HasExit b, HasExit c) => HasExit (a,b,c) where - hasExit (a,b,c) = hasExit a || hasExit b || hasExit c - -class CmdWrap t where - cmdArgs :: Partial => CmdArgument -> t - -instance (IsCmdArgument a, CmdWrap r) => CmdWrap (a -> r) where - cmdArgs xs x = cmdArgs $ xs `mappend` toCmdArgument x - -instance CmdWrap CmdArgument where - cmdArgs = id - -instance (HasExit r, CmdResult r) => CmdWrap (Action r) where - cmdArgs (CmdArgument x) = do - verbosity <- getVerbosity - - let real_args = mconcat - [ -- don't print stderr and stdout in command failure exception - toCmdArgument (WithStderr False) - , toCmdArgument (WithStdout False) - -- caller specified arguments come last to allow them to overload - -- the previous ones. - , CmdArgument x - ] - (Stdout out, Stderr err, cmdline :: CmdLine, Exit code, r :: r) <- cmd real_args - - if hasExit r - -- if the caller queries the exit code of the command, we don't do - -- anything here. In particular we don't throw an exception. - -- (this is used e.g. to allow ghc-pkg to fail to unregister) - -- See Note [cmd wrapper] - then pure r - else do - -- In every case, we only print both command outputs (stdout/stderr) - -- onto Hadrian's stderr because Hadrian's stdout may be piped into - -- another process and we don't want random command output to break - -- this. - -- - -- For example, the result of "hadrian tool:ghc/Main.hs --flavour=ghc-in-ghci" - -- is directly passed as arguments for ghc in "hadrian/ghci-cabal" script. - let dump x = liftIO (BSL.hPutStr stderr x) - case code of - ExitSuccess -> do - -- Suppress stdout/stderr depending on Shake's verbosity setting - when (verbosity > Silent) (dump err) - when (verbosity >= Verbose) (dump out) - pure r - ExitFailure i -> do - putError ("Command line: " ++ fromCmdLine cmdline) - putError ("===> Command failed with error code: " ++ show i) - dump err - dump out - error "Command failed" diff --git a/hadrian/src/CommandLine.hs b/hadrian/src/CommandLine.hs deleted file mode 100644 index 67b8a212eccf..000000000000 --- a/hadrian/src/CommandLine.hs +++ /dev/null @@ -1,405 +0,0 @@ -module CommandLine ( - optDescrs, cmdLineArgsMap, cmdFlavour, lookupFreeze1, lookupFreeze2, lookupSkipDepends, - cmdBignum, cmdBignumCheck, cmdProgressInfo, cmdCompleteSetting, - cmdDocsArgs, cmdUnitIdHash, lookupBuildRoot, TestArgs(..), TestSpeed(..), defaultTestArgs, - cmdPrefix, DocArgs(..), defaultDocArgs - ) where - -import Data.Either -import qualified Data.HashMap.Strict as Map -import Data.List.Extra -import Development.Shake hiding (Normal) -import Flavour (DocTargets, DocTarget(..)) -import Hadrian.Utilities hiding (buildRoot) -import Settings.Parser -import System.Console.GetOpt -import System.Environment -import qualified System.Directory as Directory -import Debug.Trace ( trace ) - -import qualified Data.Set as Set - -data TestSpeed = TestSlow | TestNormal | TestFast deriving (Show, Eq) - --- | All arguments that can be passed to Hadrian via the command line. -data CommandLineArgs = CommandLineArgs - { configure :: Bool - , flavour :: Maybe String - , freeze1 :: Bool - , freeze2 :: Bool - , skipDepends :: Bool - , unitIdHash :: Bool - , bignum :: Maybe String - , bignumCheck :: Bool - , progressInfo :: ProgressInfo - , buildRoot :: BuildRoot - , testArgs :: TestArgs - , docsArgs :: DocArgs - , docTargets :: DocTargets - , prefix :: Maybe FilePath - , completeStg :: Maybe String } - deriving (Eq, Show) - --- | Default values for 'CommandLineArgs'. -defaultCommandLineArgs :: CommandLineArgs -defaultCommandLineArgs = CommandLineArgs - { configure = False - , flavour = Nothing - , freeze1 = False - , freeze2 = False - , skipDepends = False - , unitIdHash = False - , bignum = Nothing - , bignumCheck = False - , progressInfo = Brief - , buildRoot = BuildRoot "_build" - , testArgs = defaultTestArgs - , docsArgs = defaultDocArgs - , docTargets = Set.fromList [minBound..maxBound] - , prefix = Nothing - , completeStg = Nothing } - --- | These arguments are used by the `test` target. -data TestArgs = TestArgs - { testKeepFiles :: Bool - , testCompiler :: String - , testConfigFile :: String - , testConfigs :: [String] - , testJUnit :: Maybe FilePath - , testMetricsFile:: Maybe FilePath - , testOnly :: [String] - , testOnlyPerf :: Bool - , testSkipPerf :: Bool - , testRootDirs :: [FilePath] - , testSpeed :: TestSpeed - , testSummary :: Maybe FilePath - , testVerbosity :: Maybe String - , testWays :: [String] - , brokenTests :: [String] - , testAccept :: Bool - , testHasInTreeFiles :: Bool - -- ^ This is used to signal that we have access to in-tree files like - -- the rts sources and the haddock stats directory even if the test - -- compiler is not in-tree - -- If this flag is set, then those tests will also be run. - -- This is useful when we want to test the bindist, but we still - -- have access to the build directory - } - deriving (Eq, Show) - --- | Default value for `TestArgs`. -defaultTestArgs :: TestArgs -defaultTestArgs = TestArgs - { testKeepFiles = False - , testCompiler = "stage2" - , testConfigFile = "testsuite/config/ghc" - , testConfigs = [] - , testJUnit = Nothing - , testMetricsFile= Nothing - , testOnly = [] - , testOnlyPerf = False - , testSkipPerf = False - , testRootDirs = [] - , testSpeed = TestNormal - , testSummary = Nothing - , testVerbosity = Nothing - , testWays = [] - , brokenTests = [] - , testAccept = False - , testHasInTreeFiles = False - } - -data DocArgs = DocArgs - { docsBaseUrl :: String - } deriving (Eq, Show) - -defaultDocArgs :: DocArgs -defaultDocArgs = DocArgs { docsBaseUrl = "../%pkgid%" } - -readConfigure :: Either String (CommandLineArgs -> CommandLineArgs) -readConfigure = Left "hadrian --configure has been deprecated (see #20167). Please run ./boot; ./configure manually" - -readFlavour :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readFlavour ms = Right $ \flags -> flags { flavour = lower <$> ms } - -readBignum :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readBignum Nothing = Right id -readBignum (Just ms) = Right $ \flags -> case break (== '-') (lower ms) of - (backend,"") -> flags { bignum = Just backend } - ("check",'-':backend) -> flags { bignum = Just backend, bignumCheck = True } - _ -> flags { bignum = Just (lower ms) } - -readBuildRoot :: FilePath -> Either String (CommandLineArgs -> CommandLineArgs) -readBuildRoot ms = - Right $ \flags -> flags { buildRoot = BuildRoot ms } - -readFreeze1, readFreeze2, readSkipDepends :: Either String (CommandLineArgs -> CommandLineArgs) -readFreeze1 = Right $ \flags -> flags { freeze1 = True } -readFreeze2 = Right $ \flags -> flags { freeze1 = True, freeze2 = True } -readSkipDepends = Right $ \flags -> flags { skipDepends = True } - -readUnitIdHash :: Either String (CommandLineArgs -> CommandLineArgs) -readUnitIdHash = Right $ \flags -> - trace "--hash-unit-ids is deprecated. It is enabled by release flavour or +hash_unit_ids flavour transformer" $ - flags { unitIdHash = True } - -readProgressInfo :: String -> Either String (CommandLineArgs -> CommandLineArgs) -readProgressInfo ms = - case lower ms of - "none" -> set None - "brief" -> set Brief - "normal" -> set Normal - "unicorn" -> set Unicorn - _ -> Left "Cannot parse progress-info" - where - set :: ProgressInfo -> Either String (CommandLineArgs -> CommandLineArgs) - set flag = Right $ \flags -> flags { progressInfo = flag } - -readTestKeepFiles :: Either String (CommandLineArgs -> CommandLineArgs) -readTestKeepFiles = Right $ \flags -> flags { testArgs = (testArgs flags) { testKeepFiles = True } } - -readTestAccept :: Either String (CommandLineArgs -> CommandLineArgs) -readTestAccept = Right $ \flags -> flags { testArgs = (testArgs flags) { testAccept = True } } - -readTestHasInTreeFiles :: Either String (CommandLineArgs -> CommandLineArgs) -readTestHasInTreeFiles = Right $ \flags -> flags { testArgs = (testArgs flags) { testHasInTreeFiles = True } } - -readTestCompiler :: String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestCompiler compiler = Right $ \flags -> flags { testArgs = (testArgs flags) { testCompiler = compiler } } - -readTestConfig :: String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestConfig conf = Right $ \flags -> - let configs = conf : testConfigs (testArgs flags) - in flags { testArgs = (testArgs flags) { testConfigs = configs } } - -readTestConfigFile :: String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestConfigFile filepath = Right $ \flags -> flags { testArgs = (testArgs flags) { testConfigFile = filepath } } - -readTestJUnit :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestJUnit filepath = Right $ \flags -> flags { testArgs = (testArgs flags) { testJUnit = filepath } } - -readTestMetrics :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestMetrics filepath = Right $ \flags -> flags { testArgs = (testArgs flags) { testMetricsFile = filepath } } - -readTestOnly :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestOnly tests = Right $ \flags -> - flags { testArgs = (testArgs flags) { testOnly = tests'' flags } } - - where tests' = maybe [] words tests - tests'' flags = testOnly (testArgs flags) ++ tests' - -readTestOnlyPerf :: Either String (CommandLineArgs -> CommandLineArgs) -readTestOnlyPerf = Right $ \flags -> flags { testArgs = (testArgs flags) { testOnlyPerf = True } } - -readTestSkipPerf :: Either String (CommandLineArgs -> CommandLineArgs) -readTestSkipPerf = Right $ \flags -> flags { testArgs = (testArgs flags) { testSkipPerf = True } } - -readHaddockBaseUrl :: Either String (CommandLineArgs -> CommandLineArgs) -readHaddockBaseUrl = Right $ \flags -> - flags { docsArgs = (docsArgs flags) { docsBaseUrl = base_url } } - - where base_url = "/package/%pkg%/docs" - - -readTestRootDirs :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestRootDirs rootdirs = Right $ \flags -> - flags { testArgs = (testArgs flags) { testRootDirs = rootdirs'' flags } } - - where rootdirs' = maybe [] (splitOn ":") rootdirs - rootdirs'' flags = testRootDirs (testArgs flags) ++ rootdirs' - -readTestSpeed :: String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestSpeed ms = - case lower ms of - "fast" -> set TestFast - "slow" -> set TestSlow - "normal" -> set TestNormal - _ -> Left "Cannot parse test-speed" - where - set :: TestSpeed -> Either String (CommandLineArgs -> CommandLineArgs) - set flag = Right $ \flags -> flags { testArgs = (testArgs flags) {testSpeed = flag} } - -readTestSummary :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestSummary filepath = Right $ \flags -> flags { testArgs = (testArgs flags) { testSummary = filepath } } - -readTestVerbose :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestVerbose verbose = Right $ \flags -> flags { testArgs = (testArgs flags) { testVerbosity = verbose } } - -readTestWay :: String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestWay way = - Right $ \flags -> - let newWays = way : testWays (testArgs flags) - in flags { testArgs = (testArgs flags) {testWays = newWays} } - -readBrokenTests :: String -> Either String (CommandLineArgs -> CommandLineArgs) -readBrokenTests tests = - Right $ \flags -> - let newTests = words tests ++ brokenTests (testArgs flags) - in flags { testArgs = (testArgs flags) {brokenTests = newTests} } - -readPrefix :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readPrefix ms = Right $ \flags -> flags { prefix = ms } - -readCompleteStg :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readCompleteStg ms = Right $ \flags -> flags { completeStg = ms } - -readDocsArg :: String -> Either String (CommandLineArgs -> CommandLineArgs) -readDocsArg ms = - case ms of - "none" -> set (const Set.empty) - "no-haddocks" -> set (Set.delete Haddocks) - "no-sphinx-html" -> set (Set.delete SphinxHTML) - "no-sphinx-pdfs" -> set (Set.delete SphinxPDFs) - "no-sphinx-man" -> set (Set.delete SphinxMan) - "no-sphinx-info" -> set (Set.delete SphinxInfo) - "no-sphinx" -> set (Set.delete SphinxHTML - . Set.delete SphinxPDFs - . Set.delete SphinxMan - . Set.delete SphinxInfo) - _ -> Left "Cannot parse docs argument" - - where - set :: (DocTargets -> DocTargets) -> Either String (CommandLineArgs -> CommandLineArgs) - set tweakTargets = Right $ \flags -> - flags { docTargets = tweakTargets (docTargets flags) } - --- | Standard 'OptDescr' descriptions of Hadrian's command line arguments. -optDescrs :: [OptDescr (Either String (CommandLineArgs -> CommandLineArgs))] -optDescrs = - [ Option ['c'] ["configure"] (NoArg readConfigure) - "Deprecated: Run the boot and configure scripts." - , Option ['o'] ["build-root"] (ReqArg readBuildRoot "BUILD_ROOT") - "Where to store build artifacts. (Default _build)." - , Option [] ["flavour"] (OptArg readFlavour "FLAVOUR") - "Build flavour (Default, Devel1, Devel2, Perf, Prof, Quick or Quickest)." - , Option [] ["freeze1"] (NoArg readFreeze1) - "Freeze Stage1 GHC." - , Option [] ["freeze2"] (NoArg readFreeze2) - "Freeze Stage2 GHC." - , Option [] ["hash-unit-ids"] (NoArg readUnitIdHash) - "Include package hashes in unit ids." - , Option [] ["skip-depends"] (NoArg readSkipDepends) - "Skip rebuilding dependency information." - , Option [] ["bignum"] (OptArg readBignum "BACKEND") - "Select bignum backend: native, gmp (default), check-gmp (gmp compared to native), ffi." - , Option [] ["progress-info"] (ReqArg readProgressInfo "STYLE") - "Progress info style (None, Brief, Normal or Unicorn)." - , Option [] ["docs"] (ReqArg readDocsArg "TARGET") - "Strip down docs targets (none, no-haddocks, no-sphinx[-{html, pdfs, man}]." - , Option ['k'] ["keep-test-files"] (NoArg readTestKeepFiles) - "Keep all the files generated when running the testsuite." - , Option [] ["test-compiler"] (ReqArg readTestCompiler "TEST_COMPILER") - "Use given compiler [Default=stage2]." - , Option [] ["test-config-file"] (ReqArg readTestConfigFile "CONFIG_FILE") - "configuration file for testsuite. Default=testsuite/config/ghc" - , Option [] ["config"] (ReqArg readTestConfig "EXTRA_TEST_CONFIG") - "Configurations to run test, in key=value format." - , Option [] ["summary-junit"] (OptArg readTestJUnit "TEST_SUMMARY_JUNIT") - "Output testsuite summary in JUnit format." - , Option [] ["summary-metrics"] (OptArg readTestMetrics "METRICS_FILE") - "Output testsuite performance metrics summary." - , Option [] ["only"] (OptArg readTestOnly "TESTS") - "Test cases to run." - , Option [] ["only-perf"] (NoArg readTestOnlyPerf) - "Only run performance tests." - , Option [] ["skip-perf"] (NoArg readTestSkipPerf) - "Skip performance tests." - , Option [] ["test-root-dirs"] (OptArg readTestRootDirs "DIR1:[DIR2:...:DIRn]") - "Test root directories to look at (all by default)." - , Option [] ["test-speed"] (ReqArg readTestSpeed "SPEED") - "fast, slow or normal. Normal by default" - , Option [] ["summary"] (OptArg readTestSummary "TEST_SUMMARY") - "Where to output the test summary file." - , Option [] ["test-verbose"] (OptArg readTestVerbose "TEST_VERBOSE") - "A verbosity value between 0 and 5. 0 is silent, 4 and higher activates extra output." - , Option [] ["test-way"] (ReqArg readTestWay "TEST_WAY") - "only run these ways" - , Option [] ["broken-test"] (ReqArg readBrokenTests "TEST_NAME") - "consider these tests to be broken" - , Option ['a'] ["test-accept"] (NoArg readTestAccept) "Accept new output of tests" - , Option [] ["test-have-intree-files"] (NoArg readTestHasInTreeFiles) "Run the in-tree tests even with an out of tree compiler" - , Option [] ["prefix"] (OptArg readPrefix "PATH") - "Destination path for the bindist 'install' rule" - , Option [] ["complete-setting"] (OptArg readCompleteStg "SETTING") - "Setting key to autocomplete, for the 'autocomplete' target." - , Option [] ["haddock-for-hackage"] (NoArg readHaddockBaseUrl) - "Generate documentation suitable for upload to a hackage server." - ] - --- | A type-indexed map containing Hadrian command line arguments to be passed --- to Shake via 'shakeExtra'. -cmdLineArgsMap :: IO (Map.HashMap TypeRep Dynamic) -cmdLineArgsMap = do - xs <- getArgs - let -- We split the arguments between the ones that look like - -- "k = v" or "k += v", in cliSettings, and the rest in - -- optArgs. - (optsArgs, cliSettings) = partitionKVs xs - - -- We only use the arguments that don't look like setting - -- updates for parsing Hadrian and Shake flags/options. - (opts, _, _) = getOpt Permute optDescrs optsArgs - args = foldl (flip id) defaultCommandLineArgs (rights opts) - - BuildRoot root = buildRoot args - settingsFile = root -/- "hadrian.settings" - - -- We try to look at /hadrian.settings, and if it exists - -- we read as many settings as we can from it, combining - -- them with the ones we got on the command line, in allSettings. - -- We then insert all those settings in the dynamic map, so that - -- the 'Settings.flavour' action can look them up and apply - -- all the relevant updates to the flavour that Hadrian is set - -- to run with. - settingsFileExists <- Directory.doesFileExist settingsFile - fileSettings <- - if settingsFileExists - then parseJustKVs . lines <$> readFile settingsFile - else return [] - let allSettings = cliSettings ++ fileSettings - - return $ insertExtra (progressInfo args) -- Accessed by Hadrian.Utilities - $ insertExtra (buildRoot args) -- Accessed by Hadrian.Utilities - $ insertExtra (testArgs args) -- Accessed by Settings.Builders.RunTest - $ insertExtra (docsArgs args) -- Accessed by Rules.Documentation - $ insertExtra allSettings -- Accessed by Settings - $ insertExtra args Map.empty - -cmdLineArgs :: Action CommandLineArgs -cmdLineArgs = userSetting defaultCommandLineArgs - -cmdFlavour :: Action (Maybe String) -cmdFlavour = flavour <$> cmdLineArgs - -cmdPrefix :: Action (Maybe String) -cmdPrefix = prefix <$> cmdLineArgs - -cmdCompleteSetting :: Action (Maybe String) -cmdCompleteSetting = completeStg <$> cmdLineArgs - -lookupBuildRoot :: Map.HashMap TypeRep Dynamic -> BuildRoot -lookupBuildRoot = buildRoot . lookupExtra defaultCommandLineArgs - -lookupFreeze1 :: Map.HashMap TypeRep Dynamic -> Bool -lookupFreeze1 = freeze1 . lookupExtra defaultCommandLineArgs - -lookupFreeze2 :: Map.HashMap TypeRep Dynamic -> Bool -lookupFreeze2 = freeze2 . lookupExtra defaultCommandLineArgs - -lookupSkipDepends :: Map.HashMap TypeRep Dynamic -> Bool -lookupSkipDepends = skipDepends . lookupExtra defaultCommandLineArgs - -cmdUnitIdHash :: Action Bool -cmdUnitIdHash = unitIdHash <$> cmdLineArgs - -cmdBignum :: Action (Maybe String) -cmdBignum = bignum <$> cmdLineArgs - -cmdBignumCheck :: Action Bool -cmdBignumCheck = bignumCheck <$> cmdLineArgs - -cmdProgressInfo :: Action ProgressInfo -cmdProgressInfo = progressInfo <$> cmdLineArgs - -cmdDocsArgs :: Action DocTargets -cmdDocsArgs = docTargets <$> cmdLineArgs diff --git a/hadrian/src/Context.hs b/hadrian/src/Context.hs deleted file mode 100644 index f921929b3d1d..000000000000 --- a/hadrian/src/Context.hs +++ /dev/null @@ -1,200 +0,0 @@ -module Context ( - -- * Context - Context (..), vanillaContext, stageContext, - - -- * Expressions - getStage, getPackage, getWay, getBuildPath, getHieBuildPath, getPackageDbLoc, getStagedTarget, - - -- * Paths - contextDir, buildPath, buildDir, pkgInplaceConfig, pkgSetupConfigFile, pkgSetupConfigDir, - pkgHaddockFile, pkgRegisteredLibraryFile, pkgRegisteredLibraryFileName, - pkgLibraryFile, pkgGhciLibraryFile, - pkgConfFile, pkgStampFile, resourcePath, objectPath, contextPath, getContextPath, libPath, distDir, - distDynDir, - haddockStatsFilesDir, ensureConfigured, autogenPath, rtsContext, rtsBuildPath, libffiBuildPath - ) where - -import Base -import Context.Path -import Context.Type -import Hadrian.Expression -import Hadrian.Haskell.Cabal -import Oracles.Setting -import Hadrian.Oracles.Cabal -import GHC.Toolchain.Target (Target(..)) -import Packages -import Hadrian.Haskell.Cabal.Type - --- | Get the 'Stage' of the current 'Context'. -getStage :: Expr Context b Stage -getStage = stage <$> getContext - -getInplace :: Expr Context b Inplace -getInplace = iplace <$> getContext - -getPackageDbLoc :: Expr Context b PackageDbLoc -getPackageDbLoc = PackageDbLoc <$> getStage <*> getInplace - --- | Get the 'Package' of the current 'Context'. -getPackage :: Expr Context b Package -getPackage = package <$> getContext - --- | Get the 'Way' of the current 'Context'. -getWay :: Expr Context b Way -getWay = way <$> getContext - --- | Get the 'Target' configuration of the current stage -getStagedTarget :: Expr Context b Target -getStagedTarget = expr . targetStage =<< getStage - --- | Path to the directory containing the final artifact in a given 'Context'. -libPath :: Context -> Action FilePath -libPath Context {..} = buildRoot <&> (-/- (stageString stage -/- "lib")) - --- | Get the directory name for binary distribution files -distDir :: Context -> Action FilePath -distDir c = do - cd <- readContextData c - return (contextLibdir cd) - -distDynDir :: Context -> Action FilePath -distDynDir c = do - cd <- readContextData c - return (contextDynLibdir cd) - --- | Make sure a given context has already been fully configured. The --- implementation simply calls 'need' on the context's @autogen/cabal_macros.h@ --- file, which triggers 'configurePackage' and 'buildAutogenFiles'. Why this --- indirection? Going via @autogen/cabal_macros.h@ allows us to cache the --- configuration steps, i.e. not to repeat them if they have already been done. -ensureConfigured :: Context -> Action () -ensureConfigured context = do - autogen <- autogenPath context - need [autogen -/- "cabal_macros.h"] - --- TODO: Combine this with 'programName'. --- | Path to the @autogen@ directory generated by 'buildAutogenFiles'. -autogenPath :: Context -> Action FilePath -autogenPath context@Context {..} - | isLibrary package = autogen "build" - | package == ghc = autogen "build/ghc" - | package == hpcBin = autogen "build/hpc" - | package == ghciWrapper = autogen "build/ghci" - -- See Note [Hadrian's ghci-wrapper package] - | otherwise = autogen $ "build" -/- pkgName package - where - autogen dir = contextPath context <&> (-/- dir -/- "autogen") - --- | RTS is considered a Stage1 package. This determines RTS build directory. -rtsContext :: Stage -> Context -rtsContext stage = vanillaContext stage rts - --- | Path to the RTS build directory. -rtsBuildPath :: Stage -> Action FilePath -rtsBuildPath stage = buildPath (rtsContext stage) - --- | Build directory for in-tree 'libffi' library. -libffiBuildPath :: Stage -> Action FilePath -libffiBuildPath stage = buildPath $ Context - stage - libffi - (error "libffiBuildPath: way not set.") - (error "libffiBuildPath: inplace not set.") - -pkgFileName :: Context -> Package -> String -> String -> Action FilePath -pkgFileName context package prefix suffix = do - pid <- pkgUnitId (stage context) package - return $ prefix ++ pid ++ suffix - -pkgFile :: Context -> String -> String -> Action FilePath -pkgFile context@Context {..} prefix suffix = do - path <- buildPath context - fileName <- pkgFileName context package prefix suffix - return $ path -/- fileName - --- | Path to inplace package configuration file of a given 'Context'. -pkgInplaceConfig :: Context -> Action FilePath -pkgInplaceConfig context = contextPath context <&> (-/- "inplace-pkg-config") - -pkgSetupConfigDir :: Context -> Action FilePath -pkgSetupConfigDir context = contextPath context - --- | Path to the @setup-config@ of a given 'Context'. -pkgSetupConfigFile :: Context -> Action FilePath -pkgSetupConfigFile context = pkgSetupConfigDir context <&> (-/- "setup-config") - --- | Path to the haddock file of a given 'Context', e.g.: --- @_build/stage1/libraries/array/doc/html/array/array.haddock@. -pkgHaddockFile :: Context -> Action FilePath -pkgHaddockFile Context {..} = do - root <- buildRoot - version <- pkgUnitId stage package - return $ root -/- "doc/html/libraries" -/- version -/- pkgName package <.> "haddock" - --- | Path to the registered ghc-pkg library file of a given 'Context', e.g.: --- @_build/stage1/lib/x86_64-linux-ghc-8.9.0/libHSarray-0.5.1.0-ghc8.9.0.so@ --- @_build/stage1/lib/x86_64-linux-ghc-8.9.0/array-0.5.1.0/libHSarray-0.5.4.0.a@ -pkgRegisteredLibraryFile :: Context -> Action FilePath -pkgRegisteredLibraryFile context = do - fileName <- pkgRegisteredLibraryFileName context - if Dynamic `wayUnit` (way context) - then (-/-) <$> distDynDir context <*> pure fileName - else (-/-) <$> distDir context <*> pure fileName - --- | Just the final filename portion of pkgRegisteredLibraryFile -pkgRegisteredLibraryFileName :: Context -> Action FilePath -pkgRegisteredLibraryFileName context@Context{..} = do - extension <- libsuf stage way - pkgFileName context package "libHS" extension - - --- | Path to the library file of a given 'Context', e.g.: --- @_build/stage1/libraries/array/build/libHSarray-0.5.1.0.a@. -pkgLibraryFile :: Context -> Action FilePath -pkgLibraryFile context@Context {..} = do - extension <- libsuf stage way - pkgFile context "libHS" extension - --- | Path to the GHCi library file of a given 'Context', e.g.: --- @_build/stage1/libraries/array/build/HSarray-0.5.1.0.o@. -pkgGhciLibraryFile :: Context -> Action FilePath -pkgGhciLibraryFile context@Context {..} = do - let extension = "" <.> osuf way - pkgFile context "HS" extension - --- | Path to the configuration file of a given 'Context'. -pkgConfFile :: Context -> Action FilePath -pkgConfFile Context {..} = do - pid <- pkgUnitId stage package - dbPath <- packageDbPath (PackageDbLoc stage iplace) - return $ dbPath -/- pid <.> "conf" - --- | Path to the stamp file for a given 'Context'. The stamp file records if --- we have built all the objects necessary for a certain way or not. -pkgStampFile :: Context -> Action FilePath -pkgStampFile c@Context{..} = do - let extension = waySuffix way - pkgFile c "stamp-" extension - - --- | Given a 'Context' and a 'FilePath' to a source file, compute the 'FilePath' --- to its object file. For example: --- * "Task.c" -> "_build/stage1/rts/Task.thr_o" --- * "_build/stage1/rts/cmm/AutoApply.cmm" -> "_build/stage1/rts/cmm/AutoApply.o" -objectPath :: Context -> FilePath -> Action FilePath -objectPath context@Context {..} src = do - isGenerated <- isGeneratedSource src - path <- buildPath context - let extension = drop 1 $ takeExtension src - obj = src -<.> osuf way - result | isGenerated = obj - | "*hs*" ?== extension = path -/- obj - | otherwise = path -/- extension -/- obj - return result - - -resourcePath :: Context -> FilePath -> Action FilePath -resourcePath context src = do - path <- buildPath context - let extension = drop 1 $ takeExtension src - return (path -/- extension -/- src) diff --git a/hadrian/src/Context/Path.hs b/hadrian/src/Context/Path.hs deleted file mode 100644 index 6795b2089c3f..000000000000 --- a/hadrian/src/Context/Path.hs +++ /dev/null @@ -1,52 +0,0 @@ -module Context.Path where - -import Base -import Context.Type -import Hadrian.Expression - --- | The build directory of the current 'Stage'. -stageDir :: Context -> FilePath -stageDir Context {..} = stageString stage - --- | The build path of the current 'Stage'. -stagePath :: Context -> Action FilePath -stagePath context = buildRoot <&> (-/- stageDir context) - --- | The expression that evaluates to the build path of the current 'Stage'. -getStagePath :: Expr Context b FilePath -getStagePath = expr . stagePath =<< getContext - --- | The directory in 'buildRoot' containing build artifacts of a given 'Context'. -contextDir :: Context -> FilePath -contextDir Context {..} = stageString stage -/- pkgPath package - --- | The path to the directory in 'buildRoot' containing build artifacts of a --- given 'Context'. -contextPath :: Context -> Action FilePath -contextPath context = buildRoot <&> (-/- contextDir context) - --- | The expression that evaluates to the path to the directory in 'buildRoot' --- containing build artifacts of a given 'Context'. -getContextPath :: Expr Context b FilePath -getContextPath = expr . contextPath =<< getContext - --- | The directory in 'buildRoot' containing the object artifacts. -buildDir :: Context -> FilePath -buildDir context = contextDir context -/- "build" - --- | Path to the directory containing build artifacts of a given 'Context'. -buildPath :: Context -> Action FilePath -buildPath context = buildRoot <&> (-/- buildDir context) - --- | The expression that evaluates to the build path of the current 'Context'. -getBuildPath :: Expr Context b FilePath -getBuildPath = expr . buildPath =<< getContext - --- | The output directory for hie files -getHieBuildPath :: Expr Context b FilePath -getHieBuildPath = (-/- "extra-compilation-artifacts" -/- "hie") <$> getBuildPath - --- | Path to the directory containing haddock timing files, used by --- the haddock perf tests. -haddockStatsFilesDir :: Action FilePath -haddockStatsFilesDir = (-/- "stage1" -/- "haddock-timing-files") <$> buildRoot diff --git a/hadrian/src/Context/Type.hs b/hadrian/src/Context/Type.hs deleted file mode 100644 index e6348116c172..000000000000 --- a/hadrian/src/Context/Type.hs +++ /dev/null @@ -1,31 +0,0 @@ -module Context.Type where - -import Development.Shake.Classes -import GHC.Generics -import Hadrian.Package - -import Stage -import Way.Type -import Way - --- | Build context for a currently built 'Target'. We generate potentially --- different build rules for each 'Context'. -data Context = Context - { stage :: Stage -- ^ Currently build Stage - , package :: Package -- ^ Currently build Package - , way :: Way -- ^ Currently build Way (usually 'vanilla') - , iplace :: Inplace -- ^ Whether to use the inplace or final package database - } deriving (Eq, Generic, Show) - -instance Binary Context -instance Hashable Context -instance NFData Context - --- | Most targets are built only one way, hence the notion of 'vanillaContext'. -vanillaContext :: Stage -> Package -> Context -vanillaContext s p = Context s p vanilla Final - --- | Partial context with undefined 'Package' field. Useful for 'Packages' --- expressions that only read the environment and current 'Stage'. -stageContext :: Stage -> Context -stageContext s = vanillaContext s $ error "stageContext: package not set" diff --git a/hadrian/src/Environment.hs b/hadrian/src/Environment.hs deleted file mode 100644 index ef98bb100bac..000000000000 --- a/hadrian/src/Environment.hs +++ /dev/null @@ -1,20 +0,0 @@ -module Environment (setupEnvironment) where - -import System.Environment - --- | The build system invokes many external builders whose behaviour is --- influenced by the environment variables. We need to modify some of them --- for better robustness of the build system. -setupEnvironment :: IO () -setupEnvironment = do - -- Cabal refuses to work when GHC_PACKAGE_PATH is set (e.g. by Stack) - unsetEnv "GHC_PACKAGE_PATH" - - -- cabal new-exec sets GHC_ENVIRONMENT, it needs to be unset for GHC - -- invocations to work properly - unsetEnv "GHC_ENVIRONMENT" - - -- in MinGW if PWD is set to a Windows "C:\\" style path then configure - -- `pwd` will return the Windows path, and then modifying $PATH will fail. - -- See https://github.com/snowleopard/hadrian/issues/189 for details. - unsetEnv "PWD" diff --git a/hadrian/src/Expression.hs b/hadrian/src/Expression.hs deleted file mode 100644 index 0b9c50ef3a07..000000000000 --- a/hadrian/src/Expression.hs +++ /dev/null @@ -1,170 +0,0 @@ -{-# LANGUAGE FlexibleContexts #-} - -module Expression ( - -- * Expressions - Expr, Predicate, Args, Ways, - - -- ** Construction and modification - expr, exprIO, arg, remove, cabalFlag, - - -- ** Predicates - (?), stage, stage0, stage1, stage2, notStage0, buildingCompilerStage, - buildingCompilerStage', threadedBootstrapper, - package, notPackage, packageOneOf, cross, notCross, - libraryPackage, builder, way, input, inputs, output, outputs, - - -- ** Evaluation - interpret, interpretInContext, - - -- * Convenient accessors - getBuildRoot, getContext, getOutputs, getInputs, - getInput, getOutput, getContextData, - - -- * Re-exports - module Base, - module Builder, - module Context, - ) where - -import Base -import Builder -import Context hiding (stage, package, way) -import Expression.Type -import Oracles.Flag -import Hadrian.Expression hiding (Expr, Predicate, Args) -import Hadrian.Haskell.Cabal.Type -import Hadrian.Oracles.Cabal - --- | Get values from a configured cabal stage. -getContextData :: (ContextData -> a) -> Expr a -getContextData key = do - contextData <- expr . readContextData =<< getContext - return $ key contextData - --- | Is the build currently in the provided stage? -stage :: Stage -> Predicate -stage s = (s ==) <$> getStage - --- | Is a particular package being built? -package :: Package -> Predicate -package p = (p ==) <$> getPackage - -packageOneOf :: [Package] -> Predicate -packageOneOf ps = (`elem` ps) <$> getPackage - --- | This type class allows the user to construct both precise builder --- predicates, such as @builder (Ghc CompileHs Stage1)@, as well as predicates --- covering a set of similar builders. For example, @builder (Ghc CompileHs)@ --- matches any stage, and @builder Ghc@ matches any stage and any GHC mode. -class BuilderPredicate a where - -- | Is a particular builder being used? - builder :: a -> Predicate - -instance BuilderPredicate Builder where - builder b = (b ==) <$> getBuilder - -instance BuilderPredicate a => BuilderPredicate (Stage -> a) where - builder f = builder . f =<< getStage - -instance BuilderPredicate a => BuilderPredicate (CcMode -> a) where - builder f = do - b <- getBuilder - case b of - Cc c _ -> builder (f c) - _ -> return False - -instance BuilderPredicate a => BuilderPredicate (GhcMode -> a) where - builder f = do - b <- getBuilder - case b of - Ghc c _ -> builder (f c) - _ -> return False - -instance BuilderPredicate a => BuilderPredicate (FilePath -> a) where - builder f = do - b <- getBuilder - case b of - Configure path -> builder (f path) - _ -> return False - -instance BuilderPredicate a => BuilderPredicate (TestMode -> a) where - builder f = do - b <- getBuilder - case b of - Testsuite mode -> builder (f mode) - _ -> return False - --- | Is the current build 'Way' equal to a certain value? -way :: Way -> Predicate -way w = (w ==) <$> getWay - -{- -Note [Stage Names] -~~~~~~~~~~~~~~~~~~ -Code referring to specific stages can be a bit tricky. In Hadrian, the stages -have the same names they carried in the autoconf build system, but they are -often referred to by the stage used to construct them. For example, the stage 1 -artifacts will be placed in _build/stage0, because they are constructed by the -stage 0 compiler. The stage predicates in this module behave the same way, -'stage0' will return 'True' while stage 0 is being used to build the stage 1 -compiler. --} - --- | Is the build currently in stage 0? -stage0 :: Predicate -stage0 = p <$> getStage - where - p (Stage0 {}) = True - p _ = False - --- | Is the build currently in stage 1? -stage1 :: Predicate -stage1 = stage Stage1 - --- | Is the build currently in stage 2? -stage2 :: Predicate -stage2 = stage Stage2 - --- | Is the build /not/ in stage 0 right now? -notStage0 :: Predicate -notStage0 = notM Expression.stage0 - --- | Are we currently building a compiler for a particular stage? -buildingCompilerStage :: Stage -> Predicate -buildingCompilerStage s = buildingCompilerStage' (== s) - --- | Like 'buildingCompilerStage', but lifts an arbitrary predicate on 'Stage', --- which is useful for checking flavour fields like 'ghcProfiled' and --- 'ghcDebugged'. -buildingCompilerStage' :: (Stage -> Bool) -> Predicate -buildingCompilerStage' f = f . succStage <$> getStage - - --- | Whether or not the bootstrapping compiler provides a threaded RTS. We need --- to know this when building stage 1, since stage 1 links against the --- compiler's RTS ways. See Note [Linking ghc-bin against threaded stage0 RTS] --- in Settings.Packages for details. -threadedBootstrapper :: Predicate -threadedBootstrapper = expr (flag BootstrapThreadedRts) - --- | Is a certain package /not/ built right now? -notPackage :: Package -> Predicate -notPackage = notM . package - --- | Is a library package currently being built? -libraryPackage :: Predicate -libraryPackage = isLibrary <$> getPackage - --- | Either @-flagName@ or @flagName@, depending upon a predicate. --- For use in @Cabal Flags@ argument lists. -cabalFlag :: ToPredicate p Context Builder => p -> String -> Args -cabalFlag pred flagName = do - ifM (toPredicate pred) (arg flagName) (arg $ "-"<>flagName) - -infixr 3 `cabalFlag` - -cross :: Predicate -cross = expr (flag CrossCompiling) - -notCross :: Predicate -notCross = notM cross diff --git a/hadrian/src/Expression/Type.hs b/hadrian/src/Expression/Type.hs deleted file mode 100644 index cf6eec212946..000000000000 --- a/hadrian/src/Expression/Type.hs +++ /dev/null @@ -1,19 +0,0 @@ -module Expression.Type where - -import Data.Set (Set) -import Context.Type -import Way.Type - -import Builder -import qualified Hadrian.Expression as H - --- | @Expr a@ is a computation that produces a value of type @Action a@ and can --- read parameters of the current build 'Target'. -type Expr a = H.Expr Context Builder a - --- | The following expressions are used throughout the build system for --- specifying conditions ('Predicate'), lists of arguments ('Args'), 'Ways' --- and 'Packages'. -type Predicate = H.Predicate Context Builder -type Args = H.Args Context Builder -type Ways = Expr (Set Way) diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs deleted file mode 100644 index 0067adaff92d..000000000000 --- a/hadrian/src/Flavour.hs +++ /dev/null @@ -1,657 +0,0 @@ -module Flavour - ( Flavour (..), werror - , DocTargets, DocTarget(..) - , parseFlavour - -- * Flavour transformers - , flavourTransformers - , addArgs - , splitSections - , enableThreadSanitizer - , enableLateCCS - , enableHashUnitIds - , enableDebugInfo, enableTickyGhc - , viaLlvmBackend - , enableProfiledGhc - , disableDynamicGhcPrograms - , disableDynamicLibs - , disableProfiledLibs - , enableLinting - , enableHaddock - , disableSelfRecompInfo - , enableHiCore - , useNativeBignum - , enableTextWithSIMDUTF - , enableHieFiles - , omitPragmas - - , completeSetting - , applySettings - ) where - -import Expression -import Data.Either -import Data.Map (Map) -import qualified Data.Map as M -import qualified Data.Set as Set -import Packages -import Flavour.Type -import Settings.Parser - -import Text.Parsec.Prim as P -import Text.Parsec.Combinator as P -import Text.Parsec.Char as P -import Control.Monad.Except -import UserSettings - - -flavourTransformers :: Map String (Flavour -> Flavour) -flavourTransformers = M.fromList - [ "werror" =: werror - , "debug_info" =: enableDebugInfo - , "ticky_ghc" =: enableTickyGhc - , "split_sections" =: splitSections - , "no_split_sections" =: noSplitSections - , "thread_sanitizer" =: enableThreadSanitizer False - , "thread_sanitizer_cmm" =: enableThreadSanitizer True - , "llvm" =: viaLlvmBackend - , "profiled_ghc" =: enableProfiledGhc - , "no_dynamic_ghc" =: disableDynamicGhcPrograms - , "no_dynamic_libs" =: disableDynamicLibs - , "native_bignum" =: useNativeBignum - , "text_simdutf" =: enableTextWithSIMDUTF - , "no_profiled_libs" =: disableProfiledLibs - , "omit_pragmas" =: omitPragmas - , "ipe" =: enableIPE - , "fully_static" =: fullyStatic - , "host_fully_static" =: hostFullyStatic - , "collect_timings" =: collectTimings - , "assertions" =: enableAssertions - , "debug_ghc" =: debugGhc Stage2 - , "debug_stage1_ghc" =: debugGhc Stage1 - , "lint" =: enableLinting - , "haddock" =: enableHaddock - , "no_self_recomp" =: disableSelfRecompInfo - , "hi_core" =: enableHiCore - , "late_ccs" =: enableLateCCS - , "boot_nonmoving_gc" =: enableBootNonmovingGc - , "dump_stg" =: enableDumpStg - , "hash_unit_ids" =: enableHashUnitIds - , "hie_files" =: enableHieFiles - ] - where (=:) = (,) - -type Parser = Parsec String () - -parseFlavour :: [Flavour] -- ^ base flavours - -> Map String (Flavour -> Flavour) -- ^ modifiers - -> String - -> Either String Flavour -parseFlavour baseFlavours transformers str = - case P.runParser parser () "" str of - Left perr -> Left $ unlines $ - [ "error parsing flavour specifier: " ++ show perr - , "" - , "known flavours:" - ] ++ - [ " " ++ name f | f <- baseFlavours ] ++ - [ "" - , "known flavour transformers:" - ] ++ - [ " " ++ nm | nm <- M.keys transformers ] - Right f -> Right f - where - parser :: Parser Flavour - parser = do - base <- baseFlavour - transs <- P.many flavourTrans - P.eof - return $ foldr ($) base transs - - baseFlavour :: Parser Flavour - baseFlavour = - P.choice [ f <$ P.try (P.string (name f)) - | f <- reverse (sortOn name baseFlavours) - ] -- reverse&sort needed to parse e.g. "quick-debug" before "quick" - - flavourTrans :: Parser (Flavour -> Flavour) - flavourTrans = do - void $ P.char '+' - P.choice [ trans <$ P.try (P.string nm) - | (nm, trans) <- reverse $ sortOn fst $ M.toList transformers - -- reverse&sort needed to parse e.g. "ticky_ghc0" before "ticky_ghc" - ] - --- | Add arguments to the 'args' of a 'Flavour'. -addArgs :: Args -> Flavour -> Flavour -addArgs args' fl = fl { extraArgs = extraArgs fl <> args' } - --- | Turn on -Werror for packages built with the stage1 compiler. --- It mimics the CI settings so is useful to turn on when developing. - --- TODO: the -Wwarn flags are added to make validation flavour works --- for cross-compiling unix-2.8.0.0. There needs to be further fixes --- in unix and/or hsc2hs to make cross-compiling unix completely free --- from warnings. -werror :: Flavour -> Flavour -werror = - addArgs $ mconcat - [ builder Ghc - ? notStage0 - ? mconcat - [ arg "-Werror" - , arg "-Wno-error=pattern-namespace-specifier" -- not until the boot compiler is >=9.14 - -- unix has many unused imports - , package unix - ? mconcat [arg "-Wwarn=unused-imports", arg "-Wwarn=unused-top-binds"] - -- semaphore-compat relies on sem_getvalue as provided by unix, which is - -- not implemented on Darwin and therefore throws a deprecation warning - , package semaphoreCompat - ? mconcat [arg "-Wwarn=deprecations"] - ] - , builder Ghc - ? package rts - ? mconcat - [ arg "-optc-Werror" - -- clang complains about #pragma GCC pragmas - , arg "-optc-Wno-error=unknown-pragmas" - -- rejected inlinings are highly dependent upon toolchain and way - , arg "-optc-Wno-error=inline" - ] - -- N.B. We currently don't build the boot libraries' C sources with -Werror - -- as this tends to be a portability nightmare. - ] - --- | Build C and Haskell objects with debugging information. -enableDebugInfo :: Flavour -> Flavour -enableDebugInfo = addArgs $ notStage0 ? mconcat - [ builder (Ghc CompileHs) ? pure ["-g3"] - , builder (Ghc CompileCWithGhc) ? pure ["-optc-g3"] - , builder (Cc CompileC) ? arg "-g3" - , builder (Cabal Setup) ? arg "--disable-library-stripping" - , builder (Cabal Setup) ? arg "--disable-executable-stripping" - ] - --- | Enable the ticky-ticky profiler in stage2 GHC -enableTickyGhc :: Flavour -> Flavour -enableTickyGhc f = - (addArgs (orM [stage1, cross] ? mconcat - [ builder (Ghc CompileHs) ? tickyArgs - , builder (Ghc LinkHs) ? tickyArgs - ]) f) { ghcThreaded = (< Stage2) } - -- Build single-threaded ghc because ticky profiling is racy with threaded - -- RTS and the C counters are disabled. (See #23439) - -tickyArgs :: Args -tickyArgs = mconcat - [ arg "-ticky" - , arg "-ticky-allocd" - , arg "-ticky-dyn-thunk" - ] - -enableDumpStg :: Flavour -> Flavour -enableDumpStg = - addArgs $ stage1 ? - builder (Ghc CompileHs) ? mconcat [ arg "-ddump-to-file", arg "-ddump-stg-final" ] - --- | Enable Core, STG, and (not C--) linting in all compilations with the stage1 compiler. -enableLinting :: Flavour -> Flavour -enableLinting = - addArgs $ stage1 ? mconcat - [ builder (Ghc CompileHs) ? lint - ] - where - lint = mconcat - [ arg "-dlint" - ] - --- | Enable Haddock documentation. -enableHaddock :: Flavour -> Flavour -enableHaddock = - addArgs $ stage1 ? mconcat - [ builder (Ghc CompileHs) ? haddock - ] - where - haddock = mconcat - [ arg "-haddock" - ] - --- | Disable self recompilation information in interface files -disableSelfRecompInfo :: Flavour -> Flavour -disableSelfRecompInfo = - addArgs $ stage1 ? mconcat - [ builder (Ghc CompileHs) ? selfRecomp - ] - where - selfRecomp = mconcat - [ arg "-fno-write-if-self-recomp" - ] - --- | Build stage2 dependencies with options to emit Core into --- interface files which is sufficient to restart code generation. -enableHiCore :: Flavour -> Flavour -enableHiCore = addArgs - $ notStage0 ? builder (Ghc CompileHs) - ? pure ["-fwrite-if-simplified-core"] - --- | Transform the input 'Flavour' so as to build with --- @-split-sections@ whenever appropriate. --- Note that this transformer doesn't do anything --- on darwin because on darwin platforms we always enable subsections --- via symbols. -splitSections, noSplitSections :: Flavour -> Flavour -splitSections f = f { ghcSplitSections = True } -noSplitSections f = f { ghcSplitSections = False } - --- | Build GHC and libraries with ThreadSanitizer support. You likely want to --- configure with @--disable-large-address-space@ when using this. -enableThreadSanitizer :: Bool -> Flavour -> Flavour -enableThreadSanitizer instrumentCmm = addArgs $ notStage0 ? mconcat - [ instrumentCmm ? builder (Ghc CompileCWithGhc) ? arg "-optc-fsanitize=thread" - - , builder (Ghc LinkHs) ? (arg "-optc-fsanitize=thread" <> arg "-optl-fsanitize=thread") - , builder Cc ? arg "-fsanitize=thread" - , builder (Cabal Flags) ? arg "thread-sanitizer" - , builder Testsuite ? arg "--config=have_thread_sanitizer=True" - , builder (Ghc CompileHs) ? mconcat - [ package pkg ? (arg "-optc-fsanitize=thread" <> arg "-fcmm-thread-sanitizer") - | pkg <- [base, ghcInternal, array, rts] - ] - ] - --- | Use the LLVM backend in stages 1 and later. -viaLlvmBackend :: Flavour -> Flavour -viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm" - --- | Build the GHC executable with profiling enabled in stages 2 and later. It --- is also recommended that you use this with @'dynamicGhcPrograms' = False@ --- since GHC does not support loading of profiled libraries with the --- dynamically-linker. -enableProfiledGhc :: Flavour -> Flavour -enableProfiledGhc flavour = - enableLateCCS flavour - { rtsWays = do - ws <- rtsWays flavour - mconcat - [ pure ws - , buildingCompilerStage' (>= Stage2) ? pure (foldMap profiled_ways ws) - ] - , libraryWays = mconcat - [ libraryWays flavour - , buildingCompilerStage' (>= Stage2) ? pure (Set.singleton profiling) - ] - , ghcProfiled = (>= Stage2) - } - where - profiled_ways w - | wayUnit Dynamic w = Set.empty - | otherwise = Set.singleton (w <> profiling) - --- | Disable 'dynamicGhcPrograms'. -disableDynamicGhcPrograms :: Flavour -> Flavour -disableDynamicGhcPrograms flavour = flavour { dynamicGhcPrograms = pure False } - --- | Don't build libraries in dynamic 'Way's. -disableDynamicLibs :: Flavour -> Flavour -disableDynamicLibs flavour = - flavour { libraryWays = prune $ libraryWays flavour, - rtsWays = prune $ rtsWays flavour, - dynamicGhcPrograms = pure False - } - where - prune :: Ways -> Ways - prune = fmap $ Set.filter (not . wayUnit Dynamic) - - --- | Don't build libraries in profiled 'Way's. -disableProfiledLibs :: Flavour -> Flavour -disableProfiledLibs flavour = - flavour { libraryWays = prune $ libraryWays flavour - , rtsWays = prune $ rtsWays flavour - } - where - prune :: Ways -> Ways - prune = fmap $ Set.filter (not . wayUnit Profiling) - -useNativeBignum :: Flavour -> Flavour -useNativeBignum flavour = - flavour { bignumBackend = "native" - } - --- | Enable building the @text@ package with @simdutf@ support. -enableTextWithSIMDUTF :: Flavour -> Flavour -enableTextWithSIMDUTF flavour = flavour { - textWithSIMDUTF = True -} - -enableHashUnitIds :: Flavour -> Flavour -enableHashUnitIds flavour = flavour { hashUnitIds = True } - -enableHieFiles :: Flavour -> Flavour -enableHieFiles flavour = flavour { ghcHieFiles = (>= Stage1) } - --- | Build stage2 compiler with -fomit-interface-pragmas to reduce --- recompilation. -omitPragmas :: Flavour -> Flavour -omitPragmas = addArgs - $ notStage0 ? builder (Ghc CompileHs) ? package compiler - ? arg "-fomit-interface-pragmas" - --- | Build stage2 dependencies with options to enable IPE debugging --- information. -enableIPE :: Flavour -> Flavour -enableIPE = addArgs - $ notStage0 ? builder (Ghc CompileHs) - ? pure ["-finfo-table-map", "-fdistinct-constructor-tables"] - -enableLateCCS :: Flavour -> Flavour -enableLateCCS = addArgs - $ notStage0 ? builder (Ghc CompileHs) - ? ((Profiling `wayUnit`) <$> getWay) - ? arg "-fprof-late" - --- | Enable assertions for the stage2 compiler -enableAssertions :: Flavour -> Flavour -enableAssertions flav = flav { ghcDebugAssertions = f } - where - f Stage2 = True - f st = ghcDebugAssertions flav st - --- | Build the stage3 compiler using the non-moving GC. -enableBootNonmovingGc :: Flavour -> Flavour -enableBootNonmovingGc = addArgs $ mconcat - [ stage Stage2 ? builder Ghc - ? pure ["+RTS", "--nonmoving-gc", "-RTS"] - ] - --- | Produce fully statically-linked executables and build libraries suitable --- for static linking. -fullyStatic :: Flavour -> Flavour -fullyStatic flavour = - addArgs staticExec $ disableDynamicLibs flavour - where - staticExec :: Args - {- Some packages, especially iserv, seem to force a set of build ways, - - including some that are dynamic (in Rules.BinaryDist). Trying to - - build statically and dynamically at the same time breaks the build, - - so we respect that overriding of the Ways. Any code that overrides - - the Ways will need to include a Way that's not explicitly dynamic - - (like "vanilla"). - -} - staticExec = mconcat - {- - - Disable dynamic linking by the built ghc executable because the - - statically-linked musl doesn't support dynamic linking, but will - - try and fail. - -} - [ package compiler ? builder (Cabal Flags) ? arg "-dynamic-system-linker" - {- - - The final executables don't work unless the libraries linked into - - it are compiled with "-fPIC." The PI stands for "position - - independent" and generates libraries that work when inlined into - - an executable (where their position is not at the beginning of - - the file). - -} - , builder (Ghc CompileHs) ? pure [ "-fPIC", "-static" ] - , builder (Ghc CompileCWithGhc) ? pure [ "-fPIC", "-optc", "-static"] - , builder (Ghc LinkHs) ? pure [ "-optl", "-static" ] - ] - --- | Ensure stage0 executables and libraries are fully static. Useful --- for building cross GHC bindists that still contain shared target --- libraries. -hostFullyStatic :: Flavour -> Flavour -hostFullyStatic flavour = - addArgs staticExec $ disableDynamicGhcPrograms flavour - where - -- Unlike 'fullyStatic', we need to ensure these flags are only - -- applied to host code. - staticExec :: Args - staticExec = stage0 ? mconcat - [ - builder (Ghc CompileHs) ? pure [ "-fPIC", "-static" ] - , builder (Ghc CompileCWithGhc) ? pure [ "-fPIC", "-optc", "-static"] - , builder (Ghc LinkHs) ? pure [ "-optl", "-static" ] - ] - --- | Build stage2 dependencies with options to enable collection of compiler --- stats. -collectTimings :: Flavour -> Flavour -collectTimings = - -- Why both -ddump-timings *and* -v? - -- In contrast to -ddump-timings, -v will seq the whole CoreProgram and - -- produce less missleading information; otherwise, due to laziness some - -- allocations might be attributed to a subsequent pass instead of the pass - -- that has been causing the allocation. So we want -v. - -- On the other hand, -v doesn't work with -ddump-to-file, so we need - -- -ddump-timings. - addArgs $ notStage0 ? builder (Ghc CompileHs) ? - pure ["-ddump-to-file", "-ddump-timings", "-v"] - --- | Build ghc with debug rts (i.e. -debug) in and after this stage -debugGhc :: Stage -> Flavour -> Flavour -debugGhc ghcStage f = f - { ghcDebugged = (>= ghcStage) - , rtsWays = do - ws <- rtsWays f - mconcat - [ pure ws - , buildingCompilerStage' (>= ghcStage) ? pure (Set.map (<> debug) ws) - ] - } - --- * CLI and /hadrian.settings options - -{- -Note [Hadrian settings] -~~~~~~~~~~~~~~~~~~~~~~~ -Hadrian lets one customize GHC builds through the UserSettings module, -where Hadrian users can override existing 'Flavour's or create entirely -new ones, overriding/extending the options passed to some builder -building the RTS in more ways and much more. - -It now also offers a more "old-school" interface, in the form of -@foo.bar.baz = v@ or @foo.bar.baz += v@ expressions, that one can -pass on the command line that invokes hadrian: - -> $ hadrian/build --flavour=quickest -j "stage1.ghc-bin.ghc.link.opts += -v3" - -or in a file at /hadrian.settings, where -is the build root to be used for the build, which is _build by default. -For example, you could create a file at _build/hadrian.settings with the -following contents: - -> stage1.ghc-bin.ghc.link.opts += -v3 -> stage1.base.ghc.hs.opts += -ddump-timings - -and issue: - -> $ hadrian/build - -Hadrian would pick up the settings given in _build/hadrian.settings (as well as -any settings that you may additionally be passing on the command line) and -update the relevant flavour accordingly, to issue the additional arguments -specified by the user. - -The supported settings are described by 'builderSetting' below, using -operations from Applicative + two new primitives, 'matchString' and -'matchOneOf', that come as members of the 'Match' class. This gives us -a simple but powerful vocabulary to describe settings and parse them -into values that we can use to compute interesting things, like a 'Predicate' -that we can use to emit additional arguments, or a list of possible completions. - -> fmap, (<$>) :: Functor f => (a -> b) -> f a -> f b -> pure :: Applicative f => a -> f a -> (<*>) :: Applicative f => f (a -> b) -> f a -> f b -> (*>) :: Applicative f => f a -> f b -> f b -> (<*) :: Applicative f => f a -> f b -> f a -> (<$) :: Functor f => a -> f b -> f a -> -> str :: Match f => String -> f () -> val :: Match f => String -> a -> f a -> oneOf :: Match f => [f a] -> f a -> choose :: Match f => [(String, a)] -> f a -> wild :: Match f => [(String, a)] -> f (Wildcard a) - -For instance, to describe possible settings: - foo.bar.{x, y} - foo.baz.{a, b}.c - -we could write: - -> str "foo" *> oneOf [ str "bar" *> choose [ ("x", "x"), ("y", "y") ] -> , str "baz" *> choose [ ("a", "ac"), ("b", "bc") <* str "c" ] -> ] - -'builderSetting' uses these combinators to describe the setting keys that -Hadrian supports. A user-oriented description of this mechanism is available -in hadrian/doc/user-settings.md. - --} - --- | Try to interpret all the 'KeyVal' as flavour updates, keeping --- a list of errors for the ones which don't match known --- settings. -applySettings :: [KeyVal] -> ([SettingError], Flavour -> Flavour) -applySettings kvs = case partitionEithers (map applySetting kvs) of - (errs, fs) -> (errs, foldr (flip (.)) id fs) - -- we need to compose the reverse way to have the following settings - -- x = -b - -- x += -c - -- produce the final x = "-b -c" value. With just (.) we would apply - -- the x = -b assignment last, which would silently drop the -c addition. - -- - -- foldr (.) id [f, g, h] = f . g . h - -- -- first function (f) is applied last, we're applying them in - -- -- the wrong order! - -- - -- foldr (flip (.)) id [f, g, h] = h . g . f - -- -- last function (f) is applied last, as desired - - --- | Try to interpret the given 'KeyVal' as a flavour update --- function, returning an error if it doesn't match a known --- setting. -applySetting :: KeyVal -> Either SettingError (Flavour -> Flavour) -applySetting (KeyVal ks op v) = case runSettingsM ks builderPredicate of - Left err -> throwError $ - "error while setting `" ++ intercalate "`." ks ++ ": " ++ err - Right pred -> Right $ \flav -> flav - { extraArgs = update (extraArgs flav) pred } - - where override arguments predicate = do - holds <- predicate - if holds then pure (words v) else arguments - - augment arguments predicate = - mconcat [arguments, predicate ? pure (words v)] - - update - | op == Equal = override - | otherwise = augment - --- | Try to auto-complete the given @Key@ using --- all known settings, as described by 'builderSetting'. --- --- > completeSetting ["stage1","base", "ghc"] --- > -- returns [ ["stage1","base","ghc","c","opts"] --- > -- , ["stage1","base","ghc","hs","opts"] --- > -- , ["stage1","base","ghc","link","opts"] --- > -- , ["stage1","base","ghc","deps","opts"] --- > -- , ["stage1","base","ghc","toolargs","opts"] --- > -- ] -completeSetting :: Key -> [Key] -completeSetting ks = map snd (complete ks builderSetting) - --- | Interpret a 'builderSetting' as a 'Predicate' that --- potentially constrains on the stage, package or --- (ghc or cc) builder mode. --- --- For example, @stage1.base.ghc.link.opts@ gets mapped to --- a predicate that applies @'stage' 'Stage1'@, --- @'package' 'base'@ and @'builder' ('Ghc' 'LinkHs')@. -builderPredicate :: SettingsM Predicate -builderPredicate = builderSetting <&> (\(wstg, wpkg, builderMode) -> - wildcard (pure True) stage wstg <&&> - wildcard (pure True) package wpkg <&&> - (case builderMode of - BM_Ghc ghcMode -> wildcard (builder Ghc) (builder . Ghc) ghcMode - BM_Cc ccMode -> wildcard (builder Cc) (builder . Cc) ccMode - BM_CabalConfigure -> builder (Cabal Setup) - BM_RunTest -> builder Testsuite - BM_Hsc2HsRun -> builder Hsc2Hs - BM_Haddock -> builder (Haddock BuildPackage) - ) - ) - - where (<&&>) = liftA2 (&&) - --- | Which builder a setting should apply to -data BuilderMode = BM_Ghc (Wildcard GhcMode) - | BM_Cc (Wildcard CcMode) - | BM_CabalConfigure - | BM_Hsc2HsRun - | BM_RunTest - | BM_Haddock - --- | Interpretation-agnostic description of the builder settings --- supported by Hadrian. --- --- Supported settings (to be kept in sync with the code): --- --- > ( or *).( or *).ghc.( or *).opts --- > ( or *).( or *).cc.( or *).opts --- > ( or *).( or *).cabal.configure.opts --- > ( or *).( or *).hsc2hs.run.opts --- > runtest.opts --- --- where: --- - @@ is one of @stage0@, @stage1@, @stage2@ or @stage3@; --- - @@ is the (Cabal) name of a package (@base@, --- @template-haskell@, ...); --- - @@ is one of @c@ (building C files), @hs@ (building Haskell --- modules), @link@ (linking object files), @deps@ (finding Haskell --- dependencies with @ghc -M@) or @toolargs@ (getting necessary flags to --- make hadrian/ghci work; --- - @@ is one of @c@ (building C files) or @deps@ (finding C --- dependencies); --- - locations that support a wildcard (@*@) entry are here to avoid --- repetition, a wildcard entry being equivalent to writing all the --- settings that the wildcard matches over; in our case, we can --- apply GHC or C compiler options uniformly over all stages, packages --- and compiler modes, if we so desire, by using a wildcard in the --- appropriate spot. -builderSetting :: Match f - => f (Wildcard Stage, Wildcard Package, BuilderMode) -builderSetting = - matchOneOf - [ (,,) - <$> wild stages - <*> wild pkgs - <*> matchOneOf - [ str "ghc" *> fmap BM_Ghc (wild ghcBuilder) <* str "opts" - , str "cc" *> fmap BM_Cc (wild ccBuilder) <* str "opts" - , BM_CabalConfigure <$ str "cabal" <* str "configure" <* str "opts" - , BM_Hsc2HsRun <$ str "hsc2hs" <* str "run" <* str "opts" - , BM_Haddock <$ str "haddock" <* str "build-package" <* str "opts" - ] - , (Wildcard, Wildcard, BM_RunTest) - <$ str "runtest" <* str "opts" - ] - where ghcBuilder = - [ ("c", CompileCWithGhc) - , ("cpp", CompileCppWithGhc) - , ("deps", FindHsDependencies) - , ("hs", CompileHs) - , ("link", LinkHs) - , ("toolargs", ToolArgs) - ] - - ccBuilder = - [ ("c", CompileC) - -- Not sure how to handle the FindCDependencies CxxDep case - , ("deps", FindCDependencies CDep) - ] - - stages = map (\stg -> (stageString stg, stg)) allStages - - pkgs = map (\pkg -> (pkgName pkg, pkg)) (ghcPackages ++ userPackages) diff --git a/hadrian/src/Flavour/Type.hs b/hadrian/src/Flavour/Type.hs deleted file mode 100644 index 18f631fdd0cb..000000000000 --- a/hadrian/src/Flavour/Type.hs +++ /dev/null @@ -1,80 +0,0 @@ -module Flavour.Type where - -import Expression -import Data.Set (Set) - - --- Please update doc/{flavours.md, user-settings.md} when changing this file. --- | 'Flavour' is a collection of build settings that fully define a GHC build. --- Note the following type semantics: --- * @Bool@: a plain Boolean flag whose value is known at compile time. --- * @Action Bool@: a flag whose value can depend on the build environment. --- * @Predicate@: a flag whose value can depend on the build environment and --- on the current build target. -data Flavour = Flavour { - -- | Flavour name, to select this flavour from command line. - name :: String, - -- | Use these extra command line arguments. - -- This can't depend on the result of configuring a package (ie, using readContextData) - extraArgs :: Args, - -- | Build these packages. - packages :: Stage -> Action [Package], - -- | Bignum backend: 'native', 'gmp', 'ffi', etc. - bignumBackend :: String, - -- | Check selected bignum backend against native backend - bignumCheck :: Bool, - -- | Build the @text@ package with @simdutf@ support. Disabled by - -- default due to packaging difficulties described in #20724. - textWithSIMDUTF :: Bool, - -- | Build libraries these ways. - libraryWays :: Ways, - -- | Build RTS these ways. - rtsWays :: Ways, - -- | Build dynamic GHC programs. - dynamicGhcPrograms :: Action Bool, - -- | Build profiled GHC. - ghcProfiled :: Stage -- ^ stage of the /built/ compiler - -> Bool, - -- | Build GHC with the debug RTS. - ghcDebugged :: Stage -- ^ stage of the /built/ compiler - -> Bool, - -- | Build GHC with debug assertions (-DDEBUG). - ghcDebugAssertions :: Stage -- ^ stage of the /built/ compiler - -> Bool, - -- | Build the GHC executable against the threaded runtime system. - ghcThreaded :: Stage -- ^ stage of the /built/ compiler - -> Bool, - - ghcSplitSections :: Bool, -- ^ Whether to enable split sections - -- | Whether to build docs and which ones - -- (haddocks, user manual, haddock manual) - ghcDocs :: Action DocTargets, - - -- | Whether to uses hashes or inplace for unit ids - hashUnitIds :: Bool, - - -- | Whether to generate .hie files - ghcHieFiles :: Stage -> Bool - - } - --- | A set of documentation targets -type DocTargets = Set DocTarget - --- | Documentation targets --- --- While we can't reasonably expose settings or CLI options --- to selectively disable, say, base's haddocks, we can offer --- a less fine-grained choice: --- --- - haddocks for libraries --- - non-haddock html pages (e.g GHC's user manual) --- - PDF documents (e.g haddock's manual) --- - man pages (GHC's) --- --- The main goal being to have easy ways to do away with the need --- for e.g @sphinx-build@ or @xelatex@ and associated packages --- while still being able to build a(n almost) complete binary --- distribution. -data DocTarget = Haddocks | SphinxHTML | SphinxPDFs | SphinxMan | SphinxInfo - deriving (Eq, Ord, Show, Bounded, Enum) diff --git a/hadrian/src/Hadrian/BuildPath.hs b/hadrian/src/Hadrian/BuildPath.hs deleted file mode 100644 index 342a2ca7eb35..000000000000 --- a/hadrian/src/Hadrian/BuildPath.hs +++ /dev/null @@ -1,167 +0,0 @@ -module Hadrian.BuildPath where - -import Base - -import Data.Functor -import qualified Text.Parsec as Parsec - --- | A path of the form --- --- > /stage//build/ --- --- where @something@ describes a library or object file or ... to be built --- for the given package. --- --- @a@, which represents that @something@, is instantiated with library-related --- data types in @Rules.Library@ and with object/interface files related types --- in @Rules.Compile@. -data BuildPath a = BuildPath - { _buildPathRoot :: FilePath -- ^ @/@ - , _buildPathStage :: Stage -- ^ @stage/@ - , _buildPathPkgPath :: FilePath -- ^ @/build/@ - , _buildPathTarget :: a -- ^ whatever comes after @build/@ - } deriving (Eq, Show) - --- | Parse a build path under the given build root. -parseBuildPath - :: FilePath -- ^ build root - -> Parsec.Parsec String () a -- ^ what to parse after @build/@ - -> Parsec.Parsec String () (BuildPath a) -parseBuildPath root afterBuild = do - _ <- Parsec.string root *> Parsec.optional (Parsec.char '/') - stage <- parseStage - _ <- Parsec.char '/' - pkgpath <- Parsec.manyTill Parsec.anyChar - (Parsec.try $ Parsec.string "/build/") - a <- afterBuild - return (BuildPath root stage pkgpath a) - --- | A path of the form --- --- > /stage/lib/--ghc-/ --- --- where @something@ describes a library or object file or ... to be registered --- for the given package. These are files registered into a ghc-pkg database. --- --- @a@, which represents that @something@, is instantiated with library-related --- data types in @Rules.Library@ and with object/interface files related types --- in @Rules.Compile@. -data GhcPkgPath a = GhcPkgPath - { _ghcpkgPathRoot :: FilePath -- ^ @/@ - , _ghcpkgPathStage :: Stage -- ^ @stage/@ - , _ghcpkgRegPath :: FilePath -- ^ @lib/--ghc-/@ - , _ghcPkgObject :: a -- ^ whatever comes after - } deriving (Eq, Show) - --- | Parse a registered ghc-pkg path under the given build root. -parseGhcPkgPath - :: FilePath -- ^ build root - -> Parsec.Parsec String () a -- ^ what to parse after @build/@ - -> Parsec.Parsec String () (GhcPkgPath a) -parseGhcPkgPath root after = do - _ <- Parsec.string root *> Parsec.optional (Parsec.char '/') - stage <- parseStage - _ <- Parsec.char '/' - regPath <- Parsec.string "lib/" - <> Parsec.manyTill Parsec.anyChar (Parsec.try $ Parsec.string "/") - a <- after - return (GhcPkgPath root stage regPath a) - - - --- To be kept in sync with Stage.hs's stageString function --- | Parse @"stageX"@ into a 'Stage'. -parseStage :: Parsec.Parsec String () Stage -parseStage = Parsec.choice - [ n <$ Parsec.try (Parsec.string (stageString n)) - | n <- allStages - ] Parsec. "stage string" - --- To be kept in sync with the show instances in 'Way.Type', until we perhaps --- use some bidirectional parsing/pretty printing approach or library. --- | Parse a way suffix, returning the argument when no suffix is found (the --- argument will be vanilla in most cases, but dynamic when we parse the way --- suffix out of a shared library file name). -parseWaySuffix :: Way -> Parsec.Parsec String () Way -parseWaySuffix w = Parsec.choice - [ Parsec.char '_' *> - (wayFromUnits <$> Parsec.sepBy1 parseWayUnit (Parsec.char '_')) - , pure w - ] Parsec. "way suffix (e.g _thr_p, or none for vanilla)" - --- | Same as 'parseWaySuffix', but for parsing e.g @thr_p_@ --- instead of @_thr_p@, like 'parseWaySuffix' does. --- --- This is used to parse paths to object files, --- in Rules.Compile. -parseWayPrefix :: Way -> Parsec.Parsec String () Way -parseWayPrefix w = Parsec.choice - [ wayFromUnits <$> Parsec.endBy1 parseWayUnit (Parsec.char '_') - , pure w - ] Parsec. "way prefix (e.g thr_p_, or none for vanilla)" - -parseWayUnit :: Parsec.Parsec String () WayUnit -parseWayUnit = Parsec.choice - [ Parsec.string "thr" *> pure Threaded - , Parsec.char 'd' *> - (Parsec.choice [ Parsec.string "ebug" *> pure Debug - , Parsec.string "yn" *> pure Dynamic ]) - , Parsec.char 'p' *> pure Profiling - , Parsec.char 'l' *> pure Logging - ] Parsec. "way unit (thr, debug, dyn, p, l)" - --- | Parse a @"pkgname-pkgversion-pkghash"@ string into the package name and the --- integers that make up the package version. --- --- If no hash was assigned, an empty string is returned in its place. -parsePkgId :: Parsec.Parsec String () (String, [Integer], String) -parsePkgId = parsePkgId' "" Parsec. "package identifier (-(-?))" - where - parsePkgId' currName = do - s <- Parsec.many1 Parsec.alphaNum - _ <- Parsec.char '-' - let newName = if null currName then s else currName ++ "-" ++ s - Parsec.choice - [ (,,) newName <$> parsePkgVersion - <*> Parsec.option "" (Parsec.try $ do - _ <- Parsec.char '-' - -- Ensure we're not parsing a libDynName as a hash - _ <- Parsec.notFollowedBy (Parsec.string "ghc" *> parsePkgVersion) - parsePkgHash) - , parsePkgId' newName ] - -parsePkgHash :: Parsec.Parsec String () String -parsePkgHash = Parsec.many1 Parsec.alphaNum - --- | Parse "."-separated integers that describe a package's version. -parsePkgVersion :: Parsec.Parsec String () [Integer] -parsePkgVersion = fmap reverse (parsePkgVersion' []) - Parsec. "package version" - where - parsePkgVersion' xs = do - n <- parseNatural - Parsec.choice - [ Parsec.try - (Parsec.lookAhead (Parsec.char '.' *> - (Parsec.letter <|> Parsec.char '_') - ) - ) - $> (n:xs) - , Parsec.char '.' *> parsePkgVersion' (n:xs) - , pure $ (n:xs) ] - --- | Parse a natural number. -parseNatural :: Parsec.Parsec String () Integer -parseNatural = (read <$> Parsec.many1 Parsec.digit) Parsec. "natural number" - --- | Runs the given parser against the given path, erroring out when the parser --- fails (because it shouldn't if the code from this module is correct). -parsePath - :: Parsec.Parsec String () a -- ^ parser to run - -> String -- ^ string describing the input source - -> FilePath -- ^ path to parse - -> Action a -parsePath p inp path = case Parsec.parse p inp path of - Left err -> fail $ "Hadrian.BuildPath.parsePath: path=" - ++ path ++ ", error:\n" ++ show err - Right a -> pure a diff --git a/hadrian/src/Hadrian/Builder.hs b/hadrian/src/Hadrian/Builder.hs deleted file mode 100644 index 682ac4d06b4e..000000000000 --- a/hadrian/src/Hadrian/Builder.hs +++ /dev/null @@ -1,164 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Builder --- Copyright : (c) Andrey Mokhov 2014-2017 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- A typical build system invokes several build tools, or /builders/, such as --- compilers, linkers, etc., some of which may be built by the build system --- itself. This module defines the 'Builder' type class and a few associated --- functions that can be used to invoke builders. ------------------------------------------------------------------------------ -module Hadrian.Builder ( - Builder (..), BuildInfo (..), needBuilders, runBuilder, - runBuilderWithCmdOptions, build, buildWithResources, buildWithCmdOptions, - getBuilderPath, builderEnvironment, askWithResources - ) where - -import Data.List -import Development.Shake -import Development.Shake.FilePath - -import Hadrian.Expression hiding (inputs, outputs) -import Hadrian.Oracles.ArgsHash -import Hadrian.Target -import Hadrian.Utilities - - --- | This data structure captures all information relevant to invoking a builder. -data BuildInfo = BuildInfo { - -- | Command line arguments. - buildArgs :: [String], - -- | Input files. - buildInputs :: [FilePath], - -- | Output files. - buildOutputs :: [FilePath], - -- | Options to be passed to Shake's 'cmd' function. - buildOptions :: [CmdOption], - -- | Resources to be acquired. - buildResources :: [(Resource, Int)] } - -class ShakeValue b => Builder b where - -- | The path to a builder. - builderPath :: b -> Action FilePath - - -- | Ask the builder for information. - -- E.g. ask @ghc-pkg@ for package dependencies - -- capture the @stdout@ result and return it. - askBuilderWith :: b -> BuildInfo -> Action String - - -- | Runtime dependencies of a builder. For example, GHC requires the - -- utility @unlit@ to be available on a specific path. - runtimeDependencies :: b -> Action [FilePath] - runtimeDependencies _ = return [] - - -- | Run a builder with a given 'BuildInfo'. Also see 'runBuilder'. - runBuilderWith :: b -> BuildInfo -> Action () - runBuilderWith builder buildInfo = do - let args = buildArgs buildInfo - needBuilders [builder] - path <- builderPath builder - let msg = if null args then "" else " (" ++ intercalate ", " args ++ ")" - putBuild $ "| Run " ++ show builder ++ msg - quietly $ cmd (buildOptions buildInfo) [path] args - -needBuilders :: Builder b => [b] -> Action () -needBuilders bs = do - paths <- mapM builderPath bs - deps <- mapM runtimeDependencies bs - -- so `path` might be just `gcc`, in which case we won't issue a "need" on - -- it. If someone really wants the full qualified path, he ought to pass - -- CC=$(which gcc) to the configure script. If CC=gcc was passed, we should - -- respect that choice and not resolve that via $PATH into a fully qualified - -- path. We can only `need` fully qualified path's though, hence we won't - -- `need` bare tool names. - need (concat $ [path | path <- paths, path /= takeFileName path] : deps) - --- | Run a builder with a specified list of command line arguments, reading a --- list of input files and writing a list of output files. A lightweight version --- of 'runBuilderWith'. -runBuilder :: Builder b => b -> [String] -> [FilePath] -> [FilePath] -> Action () -runBuilder = runBuilderWithCmdOptions [] - --- | Like 'runBuilder' but passes given options to Shake's 'cmd'. -runBuilderWithCmdOptions :: Builder b => [CmdOption] -> b -> [String] -> [FilePath] -> [FilePath] -> Action () -runBuilderWithCmdOptions opts builder args inputs outputs = - runBuilderWith builder $ BuildInfo { buildArgs = args - , buildInputs = inputs - , buildOutputs = outputs - , buildOptions = opts - , buildResources = [] } - --- | Build a 'Target' using the list of command line arguments computed from a --- given 'Args' expression. Force a rebuild if the argument list has changed --- since the last build. -build :: (Builder b, ShakeValue c) => Target c b -> Args c b -> Action () -build = buildWith [] [] - --- | Like 'build' but acquires necessary resources. -buildWithResources :: (Builder b, ShakeValue c) => [(Resource, Int)] -> Target c b -> Args c b -> Action () -buildWithResources rs = buildWith rs [] - -askWithResources :: (Builder b, ShakeValue c) => [(Resource, Int)] -> Target c b -> Args c b -> Action String -askWithResources rs = askWith rs [] - --- | Like 'build' but passes given options to Shake's 'cmd'. -buildWithCmdOptions :: (Builder b, ShakeValue c) => [CmdOption] -> Target c b -> Args c b -> Action () -buildWithCmdOptions = buildWith [] - -doWith :: (Builder b, ShakeValue c) - => (b -> BuildInfo -> Action a) - -> (Target c b -> Action ()) - -> [(Resource, Int)] -> [CmdOption] -> Target c b -> Args c b -> Action a -doWith f info rs opts target args = do - needBuilders [builder target] - argList <- interpret target args - trackArgsHash target -- Rerun the rule if the hash of argList has changed. - info target - verbose <- getVerbosity - let quietlyUnlessVerbose = if verbose >= Diagnostic then withVerbosity Diagnostic else quietly - quietlyUnlessVerbose $ f (builder target) $ - BuildInfo { buildArgs = argList - , buildInputs = inputs target - , buildOutputs = outputs target - , buildOptions = opts - , buildResources = rs } - -buildWith :: (Builder b, ShakeValue c) => [(Resource, Int)] -> [CmdOption] -> Target c b -> Args c b -> Action () -buildWith = doWith runBuilderWith runInfo - -askWith :: (Builder b, ShakeValue c) => [(Resource, Int)] -> [CmdOption] -> Target c b -> Args c b -> Action String -askWith = doWith askBuilderWith askInfo - --- | Print out information about the command being executed. -runInfo :: Show b => Target c b -> Action () -runInfo t = putProgressInfo =<< renderAction - ("Run " ++ show (builder t)) -- TODO: Bring back contextInfo. - (digest $ inputs t) - (digest $ outputs t) - where - digest [] = "none" - digest [x] = x - digest (x:xs) = x ++ " (and " ++ show (length xs) ++ " more)" - -askInfo :: Show b => Target c b -> Action () -askInfo t = putProgressInfo =<< renderActionNoOutput - ("Run " ++ show (builder t)) -- TODO: Bring back contextInfo. - (digest $ inputs t) - where - digest [] = "none" - digest [x] = x - digest (x:xs) = x ++ " (and " ++ show (length xs) ++ " more)" - --- | Get the path to the current builder. -getBuilderPath :: Builder b => b -> Expr c b FilePath -getBuilderPath = expr . builderPath - --- | Write a builder path into a given environment variable. -builderEnvironment :: Builder b => String -> b -> Action CmdOption -builderEnvironment variable builder = do - needBuilders [builder] - path <- builderPath builder - return $ AddEnv variable path diff --git a/hadrian/src/Hadrian/Builder/Ar.hs b/hadrian/src/Hadrian/Builder/Ar.hs deleted file mode 100644 index 2e4c995351b4..000000000000 --- a/hadrian/src/Hadrian/Builder/Ar.hs +++ /dev/null @@ -1,58 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Builder.Ar --- Copyright : (c) Andrey Mokhov 2014-2017 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- Support for invoking the archiving utility @ar@. We take care not to exceed --- the limit on command line length, which differs across supported operating --- systems (see 'cmdLineLengthLimit'). We need to handle @ar@ in a special way --- because we sometimes archive __a lot__ of files (in the Cabal library, for --- example, command line length can reach 2MB!). To work around the limit on the --- command line length we pass the list of files to be archived via a temporary --- file (see 'runAr'), or alternatively, we split the argument list into chunks --- and call @ar@ multiple times, e.g. when passing arguments via a temporary --- file is not supported (see 'runArWithoutTempFile'). ------------------------------------------------------------------------------ -module Hadrian.Builder.Ar (ArMode (..), runAr, runArWithoutTempFile) where - -import Control.Monad -import Development.Shake -import Development.Shake.Classes -import GHC.Generics -import Hadrian.Utilities - --- | We support packing and unpacking archives with @ar@. -data ArMode = Pack | Unpack deriving (Eq, Generic, Show) - -instance Binary ArMode -instance Hashable ArMode -instance NFData ArMode - --- | Invoke @ar@ given a path to it and a list of arguments. The list of files --- to be archived is passed via a temporary response file. Passing arguments --- via a response file is not supported by some versions of @ar@, in which --- case you should use 'runArWithoutTempFile' instead. -runAr :: FilePath -- ^ path to @ar@ - -> [String] -- ^ other arguments - -> [FilePath] -- ^ input file paths - -> [CmdOption] -- ^ Additional options - -> Action () -runAr arPath flagArgs fileArgs buildOptions = withTempFile $ \tmp -> do - writeFile' tmp $ unwords fileArgs - cmd [arPath] flagArgs ('@' : tmp) buildOptions - --- | Invoke @ar@ given a path to it and a list of arguments. Note that @ar@ --- will be called multiple times if the list of files to be archived is too --- long and doesn't fit into the command line length limit. This function is --- typically much slower than 'runAr'. -runArWithoutTempFile :: FilePath -- ^ path to @ar@ - -> [String] -- ^ other arguments - -> [FilePath] -- ^ input file paths - -> [CmdOption] -- ^ Additional options - -> Action () -runArWithoutTempFile arPath flagArgs fileArgs buildOptions = - forM_ (chunksOfSize cmdLineLengthLimit fileArgs) $ \argsChunk -> - unit (cmd [arPath] (flagArgs ++ argsChunk) buildOptions) diff --git a/hadrian/src/Hadrian/Builder/Git.hs b/hadrian/src/Hadrian/Builder/Git.hs deleted file mode 100644 index 0f073ac4634f..000000000000 --- a/hadrian/src/Hadrian/Builder/Git.hs +++ /dev/null @@ -1,14 +0,0 @@ -module Hadrian.Builder.Git (gitArgs) where - -import Expression - --- | Default command line arguments for invoking the archiving utility @git@. -gitArgs :: Args -gitArgs = mconcat - [ builder (Git ListFiles) ? mconcat - [ arg "ls-files" - , arg "--recurse-submodules" - , arg "-z" - , getInputs - ] - ] diff --git a/hadrian/src/Hadrian/Builder/Sphinx.hs b/hadrian/src/Hadrian/Builder/Sphinx.hs deleted file mode 100644 index f9e8990f5910..000000000000 --- a/hadrian/src/Hadrian/Builder/Sphinx.hs +++ /dev/null @@ -1,42 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Builder.Sphinx --- Copyright : (c) Andrey Mokhov 2014-2017 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- Support for invoking the documentation utility Sphinx. ------------------------------------------------------------------------------ -module Hadrian.Builder.Sphinx (SphinxMode (..), args) where - -import Development.Shake -import Development.Shake.Classes -import GHC.Generics -import Hadrian.Expression -import Hadrian.Utilities - --- | Sphinx can be used in three different modes to convert reStructuredText --- documents into HTML, LaTeX or Man pages. -data SphinxMode = InfoMode | HtmlMode | LatexMode | ManMode deriving (Eq, Generic, Show) - -instance Binary SphinxMode -instance Hashable SphinxMode -instance NFData SphinxMode - --- | Default command line arguments for invoking the archiving utility @tar@. -args :: (ShakeValue c, ShakeValue b) => SphinxMode -> Args c b -args mode = do - outPath <- getOutput - mconcat [ arg "-b", arg modeString - , arg "-d", arg $ outPath -/- (".doctrees-" ++ modeString) - , arg "-n" -- nit-picky mode to ensure missing references are caught - , arg "-w", arg $ outPath -/- ".log" -- dump warnings to log file - , arg =<< getInput - , arg outPath ] - where - modeString = case mode of - InfoMode -> "texinfo" - HtmlMode -> "html" - LatexMode -> "latex" - ManMode -> "man" diff --git a/hadrian/src/Hadrian/Builder/Tar.hs b/hadrian/src/Hadrian/Builder/Tar.hs deleted file mode 100644 index 5b145a7127cb..000000000000 --- a/hadrian/src/Hadrian/Builder/Tar.hs +++ /dev/null @@ -1,43 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Builder.Tar --- Copyright : (c) Andrey Mokhov 2014-2017 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- Support for invoking the archiving utility @tar@. ------------------------------------------------------------------------------ -module Hadrian.Builder.Tar (TarMode (..), args) where - -import Development.Shake -import Development.Shake.Classes -import GHC.Generics -import Hadrian.Expression -import Hadrian.Utilities - --- | Tar can be used to 'Create' an archive or 'Extract' from it. -data TarMode = Create | Extract deriving (Eq, Generic, Show) - -instance Binary TarMode -instance Hashable TarMode -instance NFData TarMode - - --- | Default command line arguments for invoking the archiving utility @tar@. -args :: (ShakeValue c, ShakeValue b) => TarMode -> Args c b -args Create = mconcat - [ arg "-c" - , output "//*.gz" ? arg "--gzip" - , output "//*.bz2" ? arg "--bzip2" - , output "//*.xz" ? arg "--xz" - , arg "-f", arg =<< getOutput - , getInputs ] -args Extract = mconcat - [ arg "-x" - , windowsHost ? arg "--force-local" - , input "*.gz" ? arg "--gzip" - , input "*.bz2" ? arg "--bzip2" - , input "*.xz" ? arg "--xz" - , arg "-f", arg =<< getInput - , arg "-C", arg =<< getOutput ] diff --git a/hadrian/src/Hadrian/Expression.hs b/hadrian/src/Hadrian/Expression.hs deleted file mode 100644 index ad0f25ea5c04..000000000000 --- a/hadrian/src/Hadrian/Expression.hs +++ /dev/null @@ -1,144 +0,0 @@ -{-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-} -module Hadrian.Expression ( - -- * Expressions - Expr, Predicate, Args, - - -- ** Construction and modification - expr, exprIO, arg, remove, - - -- ** Predicates - (?), input, inputs, output, outputs, - ToPredicate(..), - - -- ** Evaluation - interpret, interpretInContext, - - -- * Convenient accessors - getBuildRoot, getContext, getBuilder, getOutputs, getInputs, getInput, getOutput - ) where - -import Control.Monad.Extra -import Control.Monad.Trans -import Control.Monad.Trans.Reader -import Development.Shake - -import qualified Hadrian.Target as Target -import Hadrian.Target (Target, target) -import Hadrian.Utilities - --- | 'Expr' @c b a@ is a computation that produces a value of type 'Action' @a@ --- and can read parameters of the current build 'Target' @c b@. -newtype Expr c b a = Expr (ReaderT (Target c b) Action a) - deriving (Applicative, Functor, Monad) - -instance Semigroup a => Semigroup (Expr c b a) where - Expr x <> Expr y = Expr $ (<>) <$> x <*> y - -instance Monoid a => Monoid (Expr c b a) where - mempty = pure mempty - --- | Expressions that compute a Boolean value. -type Predicate c b = Expr c b Bool - --- | Expressions that compute lists of arguments to be passed to builders. -type Args c b = Expr c b [String] - --- | Lift actions independent from the current build 'Target' into the 'Expr' --- monad. -expr :: Action a -> Expr c b a -expr = Expr . lift - --- | Lift IO computations independent from the current build 'Target' into the --- 'Expr' monad. -exprIO :: IO a -> Expr c b a -exprIO = Expr . liftIO - --- | Remove given elements from a list expression. -remove :: Eq a => [a] -> Expr c b [a] -> Expr c b [a] -remove xs e = filter (`notElem` xs) <$> e - --- | Add a single argument to 'Args'. -arg :: String -> Args c b -arg = pure . pure - --- | Values that can be converted to a 'Predicate'. -class ToPredicate p c b where - toPredicate :: p -> Predicate c b - -infixr 3 ? - --- | Apply a predicate to an expression. -(?) :: (Monoid a, ToPredicate p c b) => p -> Expr c b a -> Expr c b a -p ? e = do - bool <- toPredicate p - if bool then e else mempty - -instance ToPredicate Bool c b where - toPredicate = pure - -instance ToPredicate p c b => ToPredicate (Action p) c b where - toPredicate = toPredicate . expr - -instance (c ~ c', b ~ b', ToPredicate p c' b') => ToPredicate (Expr c b p) c' b' where - toPredicate p = toPredicate =<< p - --- | Interpret a given expression according to the given 'Target'. -interpret :: Target c b -> Expr c b a -> Action a -interpret target (Expr e) = runReaderT e target - --- | Interpret a given expression by looking only at the given 'Context'. -interpretInContext :: c -> Expr c b a -> Action a -interpretInContext c = interpret $ target c - (error "contextOnlyTarget: builder not set") - (error "contextOnlyTarget: inputs not set" ) - (error "contextOnlyTarget: outputs not set") - --- | Get the directory of build results. -getBuildRoot :: Expr c b FilePath -getBuildRoot = expr buildRoot - --- | Get the current build 'Context'. -getContext :: Expr c b c -getContext = Expr $ asks Target.context - --- | Get the 'Builder' for the current 'Target'. -getBuilder :: Expr c b b -getBuilder = Expr $ asks Target.builder - --- | Get the input files of the current 'Target'. -getInputs :: Expr c b [FilePath] -getInputs = Expr $ asks Target.inputs - --- | Run 'getInputs' and check that the result contains one input file only. -getInput :: (Show b, Show c) => Expr c b FilePath -getInput = Expr $ do - target <- ask - fromSingleton ("Exactly one input file expected in " ++ show target) <$> - asks Target.inputs - --- | Get the files produced by the current 'Target'. -getOutputs :: Expr c b [FilePath] -getOutputs = Expr $ asks Target.outputs - --- | Run 'getOutputs' and check that the result contains one output file only. -getOutput :: (Show b, Show c) => Expr c b FilePath -getOutput = Expr $ do - target <- ask - fromSingleton ("Exactly one output file expected in " ++ show target) <$> - asks Target.outputs - --- | Does any of the input files match a given pattern? -input :: FilePattern -> Predicate c b -input f = any (f ?==) <$> getInputs - --- | Does any of the input files match any of the given patterns? -inputs :: [FilePattern] -> Predicate c b -inputs = anyM input - --- | Does any of the output files match a given pattern? -output :: FilePattern -> Predicate c b -output f = any (f ?==) <$> getOutputs - --- | Does any of the output files match any of the given patterns? -outputs :: [FilePattern] -> Predicate c b -outputs = anyM output diff --git a/hadrian/src/Hadrian/Haskell/Cabal.hs b/hadrian/src/Hadrian/Haskell/Cabal.hs deleted file mode 100644 index 17249efd79fc..000000000000 --- a/hadrian/src/Hadrian/Haskell/Cabal.hs +++ /dev/null @@ -1,88 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Haskell.Cabal --- Copyright : (c) Andrey Mokhov 2014-2018 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- Basic functionality for extracting Haskell package metadata stored in --- Cabal files. ------------------------------------------------------------------------------ -module Hadrian.Haskell.Cabal ( - pkgPackageName, pkgVersion, pkgUnitId, - pkgSynopsis, pkgDescription, pkgSimpleIdentifier, - pkgDependencies, pkgGenericDescription, cabalArchString, cabalOsString - ) where - -import Development.Shake -import Distribution.PackageDescription (GenericPackageDescription, unPackageName, PackageDescription (package)) -import qualified Distribution.Types.PackageId as Cabal -import qualified Distribution.Types.GenericPackageDescription as Cabal - -import Hadrian.Haskell.Cabal.Type -import Hadrian.Oracles.Cabal -import Hadrian.Package -import {-# SOURCE #-} Hadrian.Haskell.Hash (pkgUnitId) - --- | The name of the package as written in the package's cabal file. -pkgPackageName :: Package -> Action String -pkgPackageName = - fmap (unPackageName . Cabal.pkgName . package . Cabal.packageDescription) . pkgGenericDescription - --- | Read a Cabal file and return the package version. The Cabal file is tracked. -pkgVersion :: Package -> Action String -pkgVersion = fmap version . readPackageData - --- | Read a Cabal file and return the package identifier without a hash, e.g. @base-4.10.0.0@. --- The Cabal file is tracked. --- --- For an identifier complete with the hash use 'pkgUnitId' -pkgSimpleIdentifier :: Package -> Action String -pkgSimpleIdentifier package = do - cabal <- readPackageData package - return $ if null (version cabal) - then name cabal - else name cabal ++ "-" ++ version cabal - --- | Read a Cabal file and return the package synopsis. The Cabal file is tracked. -pkgSynopsis :: Package -> Action String -pkgSynopsis = fmap synopsis . readPackageData - --- | Read a Cabal file and return the package description. The Cabal file is --- tracked. -pkgDescription :: Package -> Action String -pkgDescription = fmap description . readPackageData - --- | Read a Cabal file and return the sorted list of the package dependencies. --- The current version does not take care of Cabal conditionals and therefore --- returns a crude overapproximation of actual dependencies. The Cabal file is --- tracked. -pkgDependencies :: Package -> Action [PackageName] -pkgDependencies = - fmap (map Hadrian.Package.pkgName . packageDependencies) . readPackageData - --- | Read a Cabal file and return the 'GenericPackageDescription'. The Cabal --- file is tracked. -pkgGenericDescription :: Package -> Action GenericPackageDescription -pkgGenericDescription = fmap genericPackageDescription . readPackageData - --- | Cabal's rendering of an architecture as used in its directory structure. --- --- Inverse of 'Cabal.Distribution.Simple.GHC.ghcArchString'. -cabalArchString :: String -> String -cabalArchString "powerpc" = "ppc" -cabalArchString "powerpc64" = "ppc64" -cabalArchString "powerpc64le" = "ppc64" -cabalArchString other = other - --- | Cabal's rendering of an OS as used in its directory structure. --- --- Inverse of 'Cabal.Distribution.Simple.GHC.ghcOsString'. -cabalOsString :: String -> String -cabalOsString "mingw32" = "windows" -cabalOsString "darwin" = "osx" -cabalOsString "solaris2" = "solaris" -cabalOsString "gnu" = "hurd" -cabalOsString other = other - diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs deleted file mode 100644 index 1a0177d8cfc5..000000000000 --- a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs +++ /dev/null @@ -1,472 +0,0 @@ -{-# LANGUAGE MultiWayIf #-} ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Haskell.Cabal.Parse --- Copyright : (c) Andrey Mokhov 2014-2017 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- Extracting Haskell package metadata stored in Cabal files. ------------------------------------------------------------------------------ -module Hadrian.Haskell.Cabal.Parse ( - parsePackageData, resolveContextData, parseCabalPkgId, configurePackage, - buildAutogenFiles, copyPackage, writeInplacePkgConf, registerPackage - ) where - -import Data.Bifunctor -import Data.List.Extra -import Development.Shake -import qualified Distribution.Compat.Graph as Graph -import qualified Distribution.Compat.Lens as CL -import qualified Distribution.ModuleName as C -import qualified Distribution.Package as C -import qualified Distribution.PackageDescription as C -import qualified Distribution.PackageDescription.Configuration as C -import qualified Distribution.Simple.PackageDescription as C -import qualified Distribution.Simple.Compiler as C -import qualified Distribution.Simple.Program.Db as C -import qualified Distribution.Simple as C -import qualified Distribution.Simple.GHC as GHC -import qualified Distribution.Simple.Program.Builtin as C -import qualified Distribution.Simple.Utils as C -import qualified Distribution.Simple.Program.Types as C -import qualified Distribution.Simple.Configure as C (getPersistBuildConfig) -import qualified Distribution.Simple.Build as C -import qualified Distribution.Types.BuildInfo.Lens as CL (HasBuildInfo(..), traverseBuildInfos) -import qualified Distribution.Types.ComponentLocalBuildInfo as C -import qualified Distribution.Simple.LocalBuildInfo as C -import qualified Distribution.InstalledPackageInfo as Installed -import qualified Distribution.Simple.PackageIndex as C -import qualified Distribution.Text as C -import qualified Distribution.Types.MungedPackageId as C -import qualified Distribution.Utils.Path as C -import qualified Distribution.Utils.ShortText as C -import qualified Distribution.Verbosity as C -import Hadrian.Expression -import Hadrian.Haskell.Cabal -import Hadrian.Haskell.Cabal.Type -import Hadrian.Oracles.Cabal -import Hadrian.Oracles.ArgsHash -import Hadrian.Target - -import Base -import Builder -import Context -import Settings -import Distribution.Simple.LocalBuildInfo -import qualified Distribution.Simple.Register as C -import System.Directory (getCurrentDirectory) -import qualified Distribution.InstalledPackageInfo as CP -import Distribution.Simple.Utils (writeUTF8File) -import Utilities -import Packages - - --- | Parse the Cabal file of a given 'Package'. This operation is cached by the --- "Hadrian.Oracles.TextFile.readPackageData" oracle. -parsePackageData :: Package -> Action PackageData -parsePackageData pkg = do - gpd' <- traced "cabal-read" $ - C.readGenericPackageDescription C.verbose Nothing (C.makeSymbolicPath (pkgCabalFile pkg)) - -- We need to make the data dir relative to the package path so that cabal can actually find it - let gpd = gpd' { C.packageDescription = (C.packageDescription gpd') { C.dataDir = C.makeSymbolicPath (pkgPath pkg) C. C.makeRelativePathEx (C.interpretSymbolicPathCWD (C.dataDir (C.packageDescription gpd'))) } } - let pd = C.packageDescription gpd - pkgId = C.package pd - name = C.unPackageName (C.pkgName pkgId) - version = C.display (C.pkgVersion pkgId) - libDeps = collectDeps (C.condLibrary gpd) - exeDeps = map (collectDeps . Just . snd) (C.condExecutables gpd) - allDeps = concat (libDeps : exeDeps) - sorted = sort [ C.unPackageName p | C.Dependency p _ _ <- allDeps ] - deps = nubOrd sorted \\ [name] - depPkgs = mapMaybe findPackageByName deps - return $ PackageData name version - (C.fromShortText (C.synopsis pd)) - (C.fromShortText (C.description pd)) - depPkgs gpd - where - -- Collect an overapproximation of dependencies by ignoring conditionals - collectDeps :: Maybe (C.CondTree v [C.Dependency] a) -> [C.Dependency] - collectDeps Nothing = [] - collectDeps (Just (C.CondNode _ deps ifs)) = deps ++ concatMap f ifs - where - f (C.CondBranch _ t mt) = collectDeps (Just t) ++ collectDeps mt - --- | Parse the package identifier from a Cabal file. -parseCabalPkgId :: FilePath -> IO String -parseCabalPkgId file = C.display . C.package . C.packageDescription <$> C.readGenericPackageDescription C.silent Nothing (C.makeSymbolicPath file) - -biModules :: C.PackageDescription -> (C.BuildInfo, [C.ModuleName], Maybe [C.ModuleName], Maybe (C.ModuleName, String)) -biModules pd = go [ comp | comp@(bi,_,_,_) <- - (map libBiModules . maybeToList $ C.library pd) ++ - (map exeBiModules $ C.executables pd) - , C.buildable bi ] - where - libBiModules lib = (C.libBuildInfo lib, C.explicitLibModules lib, Just (map C.moduleReexportName (C.reexportedModules lib)), Nothing) - exeBiModules exe = (C.buildInfo exe, - -- If "main-is: ..." is not a .hs or .lhs file, do not - -- inject "Main" into the modules. This does not respect - -- "-main-is" ghc-arguments! See Cabal's - -- Distribution.Simple.GHC for the glory details. - if takeExtension (C.getSymbolicPath (C.modulePath exe)) `elem` [".hs", ".lhs"] - then C.main : C.exeModules exe - -- The module `Main` still need to be kept in `modules` of PD. - else C.exeModules exe, Nothing, - Just (C.main, C.getSymbolicPath (C.modulePath exe))) - go [] = error "No buildable component found." - go [x] = x - go _ = error "Cannot handle more than one buildinfo yet." - --- Extra files needed prior to configuring. --- --- These should be "static" source files: ones whose contents do not --- change based on the build configuration, and ones which are therefore --- also safe to include in sdists for package-level builds. --- --- Put another way, while Hadrian knows these are generated, Cabal --- should just think they are regular source files. -extraPreConfigureDeps :: [String] -extraPreConfigureDeps = ["compiler/GHC/CmmToLlvm/Version/Bounds.hs"] - --- TODO: Track command line arguments and package configuration flags. --- | Configure a package using the Cabal library by collecting all the command --- line arguments (to be passed to the setup script) and package configuration --- flags. The function 'need's package database entries for the dependencies of --- the package the 'Context' points to. -configurePackage :: Context -> Action () -configurePackage context@Context {..} = do - putProgressInfo $ "| Configure package " ++ quote (pkgName package) - gpd <- pkgGenericDescription package - depPkgs <- packageDependencies <$> readPackageData package - - -- Stage packages are those we have in this stage. - stagePkgs <- stagePackages stage - - - -- Normally we will depend on Inplace package databases which enables - -- cross-package parallelism, but see #24436 for why we lineariese the build - -- of base and ghc-internal. - let forceBaseAfterGhcInternal dep = - if dep == ghcInternal && package == base - then Final - else iplace - - - - -- We'll need those packages in our package database. - deps <- sequence [ pkgConfFile (context { package = pkg, iplace = forceBaseAfterGhcInternal pkg }) - | pkg <- depPkgs, pkg `elem` stagePkgs ] - need $ extraPreConfigureDeps ++ deps - - -- Figure out what hooks we need. - let configureFile = replaceFileName (pkgCabalFile package) "configure" - -- induce dependency on the file - autoconfUserHooks = do - need [configureFile] - pure C.autoconfUserHooks - hooks <- case C.buildType (C.flattenPackageDescription gpd) of - C.Configure -> autoconfUserHooks - C.Simple -> pure C.simpleUserHooks - C.Make -> fail "build-type: Make is not supported" - C.Hooks -> fail "build-type: Hooks is not supported" - -- The 'time' package has a 'C.Custom' Setup.hs, but it's actually - -- 'C.Configure' plus a @./Setup test@ hook. However, Cabal is also - -- 'C.Custom', but doesn't have a configure script. - C.Custom -> do - configureExists <- doesFileExist configureFile - if configureExists then autoconfUserHooks else pure C.simpleUserHooks - - -- Compute the list of flags, and the Cabal configuration arguments - flagList <- interpret (target context (Cabal Flags stage) [] []) getArgs - argList <- interpret (target context (Cabal Setup stage) [] []) getArgs - trackArgsHash (target context (Cabal Flags stage) [] []) - trackArgsHash (target context (Cabal Setup stage) [] []) - verbosity <- getVerbosity - let v = shakeVerbosityToCabalFlag verbosity - argList' = argList ++ ["--flags=" ++ unwords flagList, v] - - when (verbosity >= Verbose) $ - putProgressInfo $ "| Package " ++ quote (pkgName package) ++ " configuration flags: " ++ unwords argList' - - -- See #24826 for why this workaround exists - -- In future `Cabal` versions we should pass the `--ignore-build-tools` flag when - -- calling configure. - -- See https://github.com/haskell/cabal/pull/10128 - let gpdWithoutBuildTools = - CL.set (CL.traverseBuildInfos . CL.buildToolDepends) [] - . CL.set (CL.traverseBuildInfos . CL.buildTools) [] - $ gpd - - traced "cabal-configure" $ - C.defaultMainWithHooksNoReadArgs hooks gpdWithoutBuildTools argList' - - dir <- Context.buildPath context - files <- liftIO $ getDirectoryFilesIO "." [ dir -/- "include" -/- "**" - , dir -/- "*.buildinfo" - , dir -/- "lib" -/- "**" - , dir -/- "config.*" ] - produces files - --- | Copy the 'Package' of a given 'Context' into the package database --- corresponding to the 'Stage' of the 'Context'. -copyPackage :: Context -> Action () -copyPackage context@Context {..} = do - putProgressInfo $ "| Copy package " ++ quote (pkgName package) - gpd <- pkgGenericDescription package - ctxPath <- Context.contextPath context - pkgDbPath <- packageDbPath (PackageDbLoc stage iplace) - verbosity <- getVerbosity - let v = shakeVerbosityToCabalFlag verbosity - traced "cabal-copy" $ - C.defaultMainWithHooksNoReadArgs C.autoconfUserHooks gpd - [ "copy", "--builddir", ctxPath, "--target-package-db", pkgDbPath, v ] - -shakeVerbosityToCabalFlag :: Verbosity -> String -shakeVerbosityToCabalFlag = \case - Diagnostic -> "-v2" - Verbose -> "-v1" - -- Normal levels should not produce output to stdout - Silent -> "-v0" - _ -> "-v1" - --- | What type of file is Main -data MainSourceType = HsMain | CppMain | CMain - --- | Parse the 'ContextData' of a given 'Context'. -resolveContextData :: Context -> Action ContextData -resolveContextData context@Context {..} = do - setupConfig <- pkgSetupConfigFile context - need [setupConfig] -- This triggers 'configurePackage' which generates LBI - cPath <- Context.contextPath context - lbi <- liftIO $ C.getPersistBuildConfig Nothing (C.makeSymbolicPath cPath) - - -- Note: the @cPath@ is ignored. The path that's used is the 'buildDir' path - -- from the local build info @lbi@. - pdi <- liftIO $ getHookedBuildInfo [pkgPath package, cPath -/- "build"] - - pkgDbPath <- packageDbPath (PackageDbLoc stage iplace) - let pd' = C.updatePackageDescription pdi (C.localPkgDescr lbi) - lbi' = lbi { C.localPkgDescr = pd' } - - -- TODO: Get rid of deprecated 'externalPackageDeps' and drop -Wno-deprecations - -- See: https://github.com/snowleopard/hadrian/issues/548 - let extDeps = externalPackageDeps lbi' - deps = map (C.display . snd) extDeps - depDirect = map (fromMaybe (error "resolveContextData: depDirect failed") - . C.lookupUnitId (C.installedPkgs lbi') . fst) extDeps - depIds = map (C.display . Installed.installedUnitId) depDirect - ghcProg = - case C.lookupProgram C.ghcProgram (C.withPrograms lbi') of - Just ghc -> ghc - Nothing -> error "resolveContextData: failed to look up 'ghc'" - - depPkgs = C.topologicalOrder (packageHacks (C.installedPkgs lbi')) - forDeps f = concatMap f depPkgs - - -- Copied from Distribution.Simple.PreProcess.ppHsc2Hs - packageHacks = case C.compilerFlavor (C.compiler lbi') of - C.GHC | C.pkgName (C.package pd') /= (C.mkPackageName "rts") -> hackRtsPackage - _ -> id - - -- TODO: Get rid of this hack. - -- We don't link in the actual Haskell libraries of our dependencies, so - -- the "-u" flags in @ldOptions@ of the @rts@ package mean linking fails - -- on OS X (its @ld@ is a tad stricter than GNU @ld@). Thus we remove - -- @ldOptions@ for the @rts@ package. With one exception (see below). - hackRtsPackage index | null (C.allPackages index) = index - -- ^ do not hack the empty index - hackRtsPackage index = case C.lookupPackageName index (C.mkPackageName "rts") of - [(_, [rts])] -> C.insert rts { - Installed.ldOptions = [], - Installed.libraryDirs = filter (not . ("gcc-lib" `isSuffixOf`)) - (Installed.libraryDirs rts)} index - -- GHC <= 6.12 had @$topdir/gcc-lib@ in their @library-dirs@ for the - -- 'rts' package, which causes problems when we try to use the - -- in-tree @mingw@, due to accidentally picking up the incompatible - -- libraries there. So we filter out @gcc-lib@ from the RTS's - -- @library-dirs@ here. - _ -> error "No (or multiple) GHC rts package is registered!" - - (buildInfo, modules, rexport_modules, mainIs) = biModules (C.localPkgDescr lbi') - - classifyMain :: FilePath -> MainSourceType - classifyMain fp - | takeExtension fp `elem` [".hs", ".lhs"] = HsMain - | takeExtension fp `elem` [".cpp", ".cxx", ".c++"]= CppMain - | otherwise = CMain - - install_dirs = absoluteInstallDirs pd' lbi' (CopyToDb pkgDbPath) - main_src = fmap (first C.display) mainIs - cdata = ContextData - { dependencies = deps - , componentId = C.localCompatPackageKey lbi' - , mainIs = main_src - , modules = map C.display modules - , otherModules = map C.display $ C.otherModules buildInfo - , reexportModules = map C.display (concat rexport_modules) - , srcDirs = - map C.getSymbolicPath - (C.hsSourceDirs buildInfo) - , depIds = depIds - , depNames = map (C.display . C.mungedName . snd) extDeps - , includeDirs = map C.getSymbolicPath (C.includeDirs buildInfo) - , includes = map C.getSymbolicPath (C.includes buildInfo) - , installIncludes = map C.getSymbolicPath (C.installIncludes buildInfo) - , extraLibs = C.extraLibs buildInfo - , extraLibDirs = map C.getSymbolicPath (C.extraLibDirs buildInfo) - , asmSrcs = map C.getSymbolicPath (C.asmSources buildInfo) - , cSrcs = map C.getSymbolicPath (C.cSources buildInfo) ++ [ ms | Just (_,ms) <- pure main_src, CMain <- pure (classifyMain ms)] - , cxxSrcs = map C.getSymbolicPath (C.cxxSources buildInfo) ++ [ ms | Just (_,ms) <- pure main_src, CppMain <- pure (classifyMain ms)] - , cmmSrcs = map C.getSymbolicPath (C.cmmSources buildInfo) - , jsSrcs = map C.getSymbolicPath (C.jsSources buildInfo) - , hcOpts = C.programDefaultArgs ghcProg - ++ C.hcOptions C.GHC buildInfo - ++ C.languageToFlags (C.compiler lbi') (C.defaultLanguage buildInfo) - ++ C.extensionsToFlags (C.compiler lbi') (C.usedExtensions buildInfo) - ++ C.programOverrideArgs ghcProg - , asmOpts = C.asmOptions buildInfo - , ccOpts = C.ccOptions buildInfo - , cxxOpts = C.cxxOptions buildInfo - , cmmOpts = C.cmmOptions buildInfo - , cppOpts = C.cppOptions buildInfo - , ldOpts = C.ldOptions buildInfo - , depIncludeDirs = forDeps Installed.includeDirs - , depCcOpts = forDeps Installed.ccOptions - , depLdOpts = forDeps Installed.ldOptions - , buildGhciLib = C.withGHCiLib lbi' - , frameworks = map C.getSymbolicPath (C.frameworks buildInfo) - , packageDescription = pd' - , contextLibdir = libdir install_dirs - , contextDynLibdir = dynlibdir install_dirs } - - in return cdata - --- Writes a .conf file which points directly into the build directory of a package --- so the artefacts can be used as they are produced. -write_inplace_conf :: FilePath -> FilePath -> C.PackageDescription -> LocalBuildInfo -> IO () -write_inplace_conf pkg_path res_path pd lbi = do - withLibLBI pd lbi $ \lib clbi -> - do cwd <- getCurrentDirectory - let fixupIncludeDir dir | cwd `isPrefixOf` dir = [prefix ++ drop (length cwd) dir] - | otherwise = [dir] - where - prefix = "${pkgroot}/../../../" - let installedPkgInfo = - - C.inplaceInstalledPackageInfo (C.AbsolutePath $ C.makeSymbolicPath $ cwd pkg_path) (C.makeSymbolicPath build_dir) pd (C.mkAbiHash "inplace") lib lbi clbi - - build_dir = "${pkgroot}/../" ++ pkg_path ++ "/build" - pkg_name = C.display (C.pkgName (CP.sourcePackageId installedPkgInfo)) - final_ipi = installedPkgInfo { - Installed.includeDirs = concatMap fixupIncludeDir (Installed.includeDirs installedPkgInfo), - Installed.libraryDirs = build_dir: (concatMap fixupIncludeDir (Installed.libraryDirs installedPkgInfo)) , - Installed.libraryDirsStatic = build_dir: (concatMap fixupIncludeDir (Installed.libraryDirsStatic installedPkgInfo)) , - Installed.libraryDynDirs = build_dir : (concatMap fixupIncludeDir (Installed.libraryDynDirs installedPkgInfo)) , - Installed.dataDir = "${pkgroot}/../../../../" ++ pkg_path, - Installed.haddockHTMLs = [build_dir ++ "/doc/html/" ++ C.display (CP.sourcePackageId installedPkgInfo)], - Installed.haddockInterfaces = [build_dir ++ "/doc/html/" ++ pkg_name ++ "/" ++ pkg_name ++ ".haddock"], - Installed.importDirs = [build_dir] - - } - - content = Installed.showInstalledPackageInfo final_ipi ++ "\n" - C.writeFileAtomic res_path - (C.toUTF8LBS content) - --- This uses the API directly because no way to register into a different package db which is --- configured. See the use of C.SpecificPackageDB -registerPackage :: [(Resource, Int)] -> Context -> Action () -registerPackage rs context = do - cPath <- Context.contextPath context - setupConfig <- pkgSetupConfigFile context - need [setupConfig] -- This triggers 'configurePackage' - pd <- packageDescription <$> readContextData context - db_path <- packageDbPath (PackageDbLoc (stage context) (iplace context)) - pid <- pkgUnitId (stage context) (package context) - -- Note: the @cPath@ is ignored. The path that's used is the 'buildDir' path - -- from the local build info @lbi@. - lbi <- liftIO $ C.getPersistBuildConfig Nothing (C.makeSymbolicPath cPath) - liftIO $ register db_path pid pd lbi - -- Then after the register, which just writes the .conf file, do the recache step. - buildWithResources rs $ - target context (GhcPkg Recache (stage context)) [] [] - --- This is copied and simplified from Cabal, because we want to install the package --- into a different package database to the one it was configured against. -register :: FilePath - -> String -- ^ Package Identifier - -> C.PackageDescription - -> LocalBuildInfo - -> IO () -register pkg_db pid pd lbi - = withLibLBI pd lbi $ \lib clbi -> do - - when reloc $ error "register does not support reloc" - installedPkgInfo <- generateRegistrationInfo pd lbi lib clbi - writeRegistrationFile installedPkgInfo - - where - regFile = pkg_db pid <.> "conf" - reloc = relocatable lbi - - generateRegistrationInfo pkg lbi lib clbi = do - abi_hash <- C.mkAbiHash <$> GHC.libAbiHash C.silent pkg lbi lib clbi - return (C.absoluteInstalledPackageInfo pkg abi_hash lib lbi clbi) - - writeRegistrationFile installedPkgInfo = do - writeUTF8File regFile (CP.showInstalledPackageInfo installedPkgInfo) - - --- | Build autogenerated files @autogen/cabal_macros.h@ and @autogen/Paths_*.hs@. -buildAutogenFiles :: Context -> Action () -buildAutogenFiles context = do - cPath <- Context.contextPath context - setupConfig <- pkgSetupConfigFile context - need [setupConfig] -- This triggers 'configurePackage' - pd <- packageDescription <$> readContextData context - -- Note: the @cPath@ is ignored. The path that's used is the 'buildDir' path - -- from the local build info @lbi@. - traced "cabal-autogen" $ do - lbi <- C.getPersistBuildConfig Nothing (C.makeSymbolicPath cPath) - let lbi' = lbi { C.localPkgDescr = pd } - C.withAllComponentsInBuildOrder pd lbi' $ \_comp clbi -> do - C.createDirectoryIfMissingVerbose C.silent True (C.getSymbolicPath (componentBuildDir lbi' clbi)) - C.writeBuiltinAutogenFiles C.silent pd lbi' clbi - --- | Write a .conf file for the inplace package database which points into the --- build directories rather than the final install locations. -writeInplacePkgConf :: Context -> Action () -writeInplacePkgConf context = do - cPath <- Context.contextPath context - setupConfig <- pkgSetupConfigFile context - need [setupConfig] -- This triggers 'configurePackage' - pd <- packageDescription <$> readContextData context - conf <- pkgInplaceConfig context - -- Note: the @cPath@ is ignored. The path that's used is the 'buildDir' path - -- from the local build info @lbi@. - lbi <- liftIO $ C.getPersistBuildConfig Nothing (C.makeSymbolicPath cPath) - liftIO $ write_inplace_conf (pkgPath (package context)) conf pd (lbi { C.localPkgDescr = pd }) - - --- | Look for a @.buildinfo@ in all of the specified directories, stopping on --- the first one we find. -getHookedBuildInfo :: [FilePath] -> IO C.HookedBuildInfo -getHookedBuildInfo [] = return C.emptyHookedBuildInfo -getHookedBuildInfo (baseDir:baseDirs) = do - maybeInfoFile <- C.findHookedPackageDesc C.normal Nothing (C.makeSymbolicPath baseDir) - case maybeInfoFile of - Nothing -> getHookedBuildInfo baseDirs - Just infoFile -> C.readHookedBuildInfo C.silent Nothing infoFile - -externalPackageDeps :: C.LocalBuildInfo -> [(C.UnitId, C.MungedPackageId)] -externalPackageDeps lbi = - -- TODO: what about non-buildable components? - nub [ (ipkgid, pkgid) - | clbi <- Graph.toList (C.componentGraph lbi) - , (ipkgid, pkgid) <- C.componentPackageDeps clbi - , not (internal ipkgid) ] - where - -- True if this dependency is an internal one (depends on the library - -- defined in the same package). - internal ipkgid = any ((==ipkgid) . C.componentUnitId) (Graph.toList (C.componentGraph lbi)) diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Type.hs b/hadrian/src/Hadrian/Haskell/Cabal/Type.hs deleted file mode 100644 index f78b08c0eb1a..000000000000 --- a/hadrian/src/Hadrian/Haskell/Cabal/Type.hs +++ /dev/null @@ -1,86 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Haskell.Cabal.Type --- Copyright : (c) Andrey Mokhov 2014-2018 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- Data types for storing basic Haskell package metadata, such as package name, --- version and dependencies, extracted from a Cabal file. ------------------------------------------------------------------------------ -module Hadrian.Haskell.Cabal.Type where - -import Development.Shake.Classes -import Distribution.PackageDescription -import GHC.Generics - -import Hadrian.Package as Hadrian - --- | Haskell package metadata extracted from a Cabal file without performing --- the resolution of package configuration flags and associated conditionals, --- which are build context specific. Note that 'packageDependencies' is an --- overappoximation of actual package dependencies; for example, both @unix@ and --- @win32@ packages may be included even if only one of them is required on the --- target OS. See 'ContextData' for metadata obtained after resolving package --- configuration flags and conditionals according to the current build context. -data PackageData = PackageData - { name :: Hadrian.PackageName - , version :: String - , synopsis :: String - , description :: String - , packageDependencies :: [Package] - , genericPackageDescription :: GenericPackageDescription - } deriving (Eq, Generic, Show, Typeable) - --- | Haskell package metadata obtained after resolving package configuration --- flags and associated conditionals according to the current build context. --- See 'PackageData' for metadata that can be obtained without resolving package --- configuration flags and conditionals. -data ContextData = ContextData - { dependencies :: [Hadrian.PackageName] - , componentId :: String - , mainIs :: Maybe (String, FilePath) -- ("Main", filepath) - , modules :: [String] - , otherModules :: [String] - , reexportModules :: [String] - , srcDirs :: [String] - , depIds :: [String] - , depNames :: [String] - , includeDirs :: [String] - , includes :: [String] - , installIncludes :: [String] - , extraLibs :: [String] - , extraLibDirs :: [String] - , asmSrcs :: [String] - , cSrcs :: [String] - , cxxSrcs :: [String] - , cmmSrcs :: [String] - , jsSrcs :: [String] - , hcOpts :: [String] - , asmOpts :: [String] - , ccOpts :: [String] - , cxxOpts :: [String] - , cmmOpts :: [String] - , cppOpts :: [String] - , ldOpts :: [String] - , depIncludeDirs :: [String] - , depCcOpts :: [String] - , depLdOpts :: [String] - , buildGhciLib :: Bool - , frameworks :: [String] - , packageDescription :: PackageDescription - - -- The location where normal library files go - , contextLibdir :: FilePath - -- The location where dynamic libraries go - , contextDynLibdir :: FilePath - } deriving (Eq, Generic, Show, Typeable) - -instance Binary PackageData -instance Hashable PackageData where hashWithSalt salt = hashWithSalt salt . show -instance NFData PackageData - -instance Binary ContextData -instance Hashable ContextData where hashWithSalt salt = hashWithSalt salt . show -instance NFData ContextData diff --git a/hadrian/src/Hadrian/Haskell/Hash.hs b/hadrian/src/Hadrian/Haskell/Hash.hs deleted file mode 100644 index c7633ef41771..000000000000 --- a/hadrian/src/Hadrian/Haskell/Hash.hs +++ /dev/null @@ -1,254 +0,0 @@ -{-# LANGUAGE DuplicateRecordFields #-} -{-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE TypeFamilies #-} -module Hadrian.Haskell.Hash (pkgUnitId, pkgHashOracle) where - -import Development.Shake - -import Hadrian.Haskell.Cabal.Type -import Hadrian.Haskell.Cabal -import Hadrian.Oracles.Cabal -import Hadrian.Package - -import qualified Crypto.Hash.SHA256 as SHA256 -import qualified Data.ByteString.Base16 as Base16 -import qualified Data.ByteString.Char8 as BS -import Data.ByteString as BS (readFile) -import Data.Map (Map) -import qualified Data.Map as Map -import qualified Data.Set as Set -import Data.Maybe -import Data.List -import Context.Type -import Oracles.Setting -import Hadrian.Target -import Hadrian.Expression -import Builder -import Flavour.Type -import Settings -import Way -import Packages -import Development.Shake.Classes -import Control.Monad -import Base -import System.Directory.Extra (listFilesRecursive) -import Control.Arrow (first) - - --- | Read a Cabal file and return the package identifier, e.g. @base-4.10.0.0-abcd@. --- This needs to be an oracle so it's cached -pkgUnitId :: Stage -> Package -> Action String -pkgUnitId stg pkg = do - pid <- pkgSimpleIdentifier pkg - use_hash <- hashUnitIds <$> flavour - if pkgName pkg == "rts" - -- The unit-id will change depending on the way, we need to treat the rts separately - then pure pid - else do - -- Other boot packages still hardcode their unit-id to just , but we - -- can have hadrian generate a different unit-id for them just as cabal does - -- because the boot packages unit-ids are overriden by setting -this-unit-id - -- in the cabal file - hash <- if use_hash - then do - phash <- pkgHash stg pkg - return $ truncateHash 4 phash - else - return "inplace" - pure $ pid <> "-" <> hash - - where - truncateHash :: Int -> String -> String - truncateHash = take - -data PackageHashInputs = PackageHashInputs { - pkgHashPkgId :: String, -- ^ name-version - pkgHashComponent :: PackageType, - pkgHashSourceHash :: BS.ByteString, - -- pkgHashPkgConfigDeps :: Set (PkgconfigName, Maybe PkgconfigVersion), - pkgHashDirectDeps :: Set.Set String, - pkgHashOtherConfig :: PackageHashConfigInputs - } - --- | Those parts of the package configuration that contribute to the --- package hash computed by hadrian (which is simpler than cabal's). --- --- setting in Oracle.setting, which come from system.config -data PackageHashConfigInputs = PackageHashConfigInputs { - pkgHashCompilerId :: String, - pkgHashPlatform :: String, - pkgHashFlagAssignment :: [String], -- complete not partial - pkgHashVanillaLib :: Bool, - pkgHashSharedLib :: Bool, - pkgHashDynExe :: Bool, - pkgHashGHCiLib :: Bool, - pkgHashProfLib :: Bool, - pkgHashProfExe :: Bool, - pkgHashSplitObjs :: Bool, - pkgHashSplitSections :: Bool, - pkgHashStripLibs :: Bool, - pkgHashStripExes :: Bool, - pkgHashProgramArgs :: Map String [String] - -- pkgHashProgPrefix :: Maybe PathTemplate, - -- pkgHashProgSuffix :: Maybe PathTemplate, - -- pkgHashPackageDbs :: [Maybe PackageDB] - -- Captured by extraArgs --- pkgHashDebugInfo :: DebugInfoLevel, --- pkgHashCoverage :: Bool, --- pkgHashFullyStaticExe :: Bool, --- pkgHashProfLibDetail :: ProfDetailLevel, --- pkgHashOptimization :: Int, --- pkgHashProfExeDetail :: ProfDetailLevel, --- pkgHashExtraLibDirs :: [FilePath], --- pkgHashExtraLibDirsStatic :: [FilePath], --- pkgHashExtraFrameworkDirs :: [FilePath], --- pkgHashExtraIncludeDirs :: [FilePath] - } - deriving Show - -newtype PkgHashKey = PkgHashKey (Stage, Package) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult PkgHashKey = String - -pkgHash :: Stage -> Package -> Action String -pkgHash stg p = askOracle . PkgHashKey $ (stg, p) - --- Needs to be an oracle to be cached. Called lots of times. -pkgHashOracle :: Rules () -pkgHashOracle = void $ addOracleCache $ \(PkgHashKey (stag, pkg)) -> do - let vanilla_ctx = vanillaContext stag pkg - pkg_data <- readPackageData pkg - name <- pkgSimpleIdentifier pkg - stagePkgs <- stagePackages stag - - depsHashes <- sequence [pkgHash stag pkg' | pkg' <- packageDependencies pkg_data, pkg' `elem` stagePkgs] - - flav <- flavour - let flavourArgs = extraArgs flav - - targetOs <- queryTargetTarget queryOS - projectVersion <- setting ProjectVersion - let pkgHashCompilerId = "ghc-" ++ projectVersion - pkgHashPlatform = targetOs - - libWays <- interpretInContext vanilla_ctx (libraryWays flav) - dyn_ghc <- dynamicGhcPrograms flav - flags <- interpret (target vanilla_ctx (Cabal Flags stag) [] []) getArgs - let pkgHashFlagAssignment = flags - pkgHashVanillaLib = vanilla `Set.member` libWays - pkgHashSharedLib = dynamic `Set.member` libWays - pkgHashDynExe = dyn_ghc - pkgHashGHCiLib = False - pkgHashProfLib = profiling `Set.member` libWays - pkgHashProfExe = pkg == ghc && ghcProfiled flav stag - pkgHashSplitObjs = False -- Deprecated - pkgHashSplitSections = ghcSplitSections flav - pkgHashStripExes = False - pkgHashStripLibs = False - - pkgHashProgramArgs <- Map.unions <$> (forM (Set.toList libWays) $ \lib_way -> do - let ctx = vanilla_ctx { way = lib_way } - ghcArgs <- interpret (target ctx (Ghc CompileHs stag) [] []) flavourArgs - ghcCArgs <- interpret (target ctx (Ghc CompileCWithGhc stag) [] []) flavourArgs - linkArgs <- interpret (target ctx (Ghc LinkHs stag) [] []) flavourArgs - ccArgs <- interpret (target ctx (Cc CompileC stag) [] []) flavourArgs - hsc2hsArgs <- interpret (target ctx (Hsc2Hs stag) [] []) flavourArgs - -- TODO: Other arguments for other things (a user could pass extra options to any - -- builder we know about and we need to enumerate them here) - return $ Map.fromList (map (first (++ waySuffix lib_way)) - [("ghc", ghcArgs) - ,("ghc-c", ghcCArgs) - ,("ghc-link", linkArgs) - ,("hsc2hs", hsc2hsArgs) - ,("cc", ccArgs) ])) - - let other_config = PackageHashConfigInputs{..} - - files <- allFilesInDirectory (pkgPath pkg) - need files - files_hash <- liftIO (SHA256.finalize <$> hashFiles (SHA256.init) files) - - return $ BS.unpack $ Base16.encode $ SHA256.hash $ - renderPackageHashInputs $ PackageHashInputs - { - pkgHashPkgId = name - , pkgHashComponent = pkgType pkg - , pkgHashSourceHash = files_hash - , pkgHashDirectDeps = Set.fromList depsHashes - , pkgHashOtherConfig = other_config - } - -allFilesInDirectory :: FilePath -> Action [FilePath] -allFilesInDirectory dir = liftIO $ listFilesRecursive dir - --- Either use git ls-tree if we are in a git repo, otherwise just get all the --- files in the given directory. -{- Deb9 toolchain is too old to support git ls-tree properly - git_tree <- isInGitTree - if git_tree - then do - let gitFiles = filter fileFilter . split (=='\NUL') - fileFilter file = not (null file) && ((dir ++ "/*") ?== file) - gitFiles <$> askWithResources [] (target (vanillaContext stage0Boot compiler) -- This value doesn't matter. - (Git ListFiles) [dir] []) - else - liftIO $ listFilesRecursive dir - - -isInGitTree :: Action Bool -isInGitTree = do - git_commit <- setting ProjectGitCommitId - -- git_commit is not set if we are in a source dist - return $ not ("" == git_commit) --} - - - -hashFiles :: SHA256.Ctx -> [FilePath] -> IO SHA256.Ctx -hashFiles = foldM hashFile - -hashFile :: SHA256.Ctx -> FilePath -> IO SHA256.Ctx -hashFile !ctx fp = do - contents <- BS.readFile fp - return $! SHA256.update ctx contents - - -renderPackageHashInputs :: PackageHashInputs -> BS.ByteString -renderPackageHashInputs PackageHashInputs{ - pkgHashPkgId, - pkgHashComponent, - pkgHashSourceHash, - pkgHashDirectDeps, - pkgHashOtherConfig = - PackageHashConfigInputs{..} - } = - -- The purpose of this somewhat laboured rendering (e.g. why not just - -- use show?) is so that existing package hashes do not change - -- unnecessarily when new configuration inputs are added into the hash. - BS.pack $ unlines $ catMaybes $ - [ entry "pkgid" show pkgHashPkgId - , entry "component" show pkgHashComponent - , entry "src" show pkgHashSourceHash - , entry "deps" (intercalate ", " . map show - . Set.toList) pkgHashDirectDeps - -- and then all the config - , entry "compilerid" show pkgHashCompilerId - , entry "platform" show pkgHashPlatform - , opt "flags" mempty show pkgHashFlagAssignment - , opt "vanilla-lib" True show pkgHashVanillaLib - , opt "shared-lib" False show pkgHashSharedLib - , opt "dynamic-exe" False show pkgHashDynExe - , opt "ghci-lib" False show pkgHashGHCiLib - , opt "prof-lib" False show pkgHashProfLib - , opt "prof-exe" False show pkgHashProfExe - , opt "split-objs" False show pkgHashSplitObjs - , opt "split-sections" False show pkgHashSplitSections - , opt "stripped-lib" False show pkgHashStripLibs - , opt "stripped-exe" True show pkgHashStripExes - ] ++ Map.foldrWithKey (\prog args acc -> opt (prog ++ "-options") [] unwords args : acc) [] pkgHashProgramArgs - where - entry key format value = Just (key ++ ": " ++ format value) - opt key def format value - | value == def = Nothing - | otherwise = entry key format value diff --git a/hadrian/src/Hadrian/Haskell/Hash.hs-boot b/hadrian/src/Hadrian/Haskell/Hash.hs-boot deleted file mode 100644 index b6fc67e36f1c..000000000000 --- a/hadrian/src/Hadrian/Haskell/Hash.hs-boot +++ /dev/null @@ -1,8 +0,0 @@ -module Hadrian.Haskell.Hash where - -import Hadrian.Package -import Stage -import Development.Shake - -pkgUnitId :: Stage -> Package -> Action String - diff --git a/hadrian/src/Hadrian/Oracles/ArgsHash.hs b/hadrian/src/Hadrian/Oracles/ArgsHash.hs deleted file mode 100644 index bae2fdbd809d..000000000000 --- a/hadrian/src/Hadrian/Oracles/ArgsHash.hs +++ /dev/null @@ -1,51 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -module Hadrian.Oracles.ArgsHash ( - TrackArgument, trackAllArguments, trackArgsHash, argsHashOracle - ) where - -import Control.Monad -import Development.Shake -import Development.Shake.Classes - -import Hadrian.Expression hiding (inputs, outputs) -import Hadrian.Target - --- | 'TrackArgument' is used to specify the arguments that should be tracked by --- the @ArgsHash@ oracle. The safest option is to track all arguments, but some --- arguments, such as @-jN@, do not change the build results, hence there is no --- need to initiate unnecessary rebuild if they are added to or removed from a --- command line. If all arguments should be tracked, use 'trackAllArguments'. -type TrackArgument c b = Target c b -> String -> Bool - --- | Returns 'True' for all targets and arguments, hence can be used a safe --- default for 'argsHashOracle'. -trackAllArguments :: TrackArgument c b -trackAllArguments _ _ = True - --- | Given a 'Target' this 'Action' determines the corresponding argument list --- and computes its hash. The resulting value is tracked in a Shake oracle, --- hence initiating rebuilds when the hash changes (a hash change indicates --- changes in the build command for the given target). --- Note: for efficiency we replace the list of input files with its hash to --- avoid storing long lists of source files passed to some builders (e.g. ar) --- in the Shake database. This optimisation is normally harmless, because --- argument list constructors are assumed not to examine target sources, but --- only append them to argument lists where appropriate. -trackArgsHash :: (ShakeValue c, ShakeValue b) => Target c b -> Action () -trackArgsHash t = do - let hashedInputs = [ show $ hash (inputs t) ] - hashedTarget = target (context t) (builder t) hashedInputs (outputs t) - void (askOracle $ ArgsHash hashedTarget :: Action Int) - -newtype ArgsHash c b = ArgsHash (Target c b) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult (ArgsHash c b) = Int - --- | This oracle stores per-target argument list hashes in the Shake database, --- allowing the user to track them between builds using 'trackArgsHash' queries. -argsHashOracle :: (ShakeValue c, ShakeValue b) => TrackArgument c b -> Args c b -> Rules () -argsHashOracle trackArgument args = void $ - addOracle $ \(ArgsHash target) -> do - argList <- interpret target args - let trackedArgList = filter (trackArgument target) argList - return $ hash trackedArgList diff --git a/hadrian/src/Hadrian/Oracles/Cabal.hs b/hadrian/src/Hadrian/Oracles/Cabal.hs deleted file mode 100644 index 4c5216272998..000000000000 --- a/hadrian/src/Hadrian/Oracles/Cabal.hs +++ /dev/null @@ -1,41 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Oracles.Cabal --- Copyright : (c) Andrey Mokhov 2014-2018 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- This module defines oracles for reading and parsing Cabal files, as well as --- for configuring Haskell packages. ------------------------------------------------------------------------------ -module Hadrian.Oracles.Cabal ( - readPackageData, readContextData, configurePackageGHC - ) where - -import Development.Shake -import Distribution.Simple (Compiler) -import Distribution.System (Platform) - -import Context.Type -import Hadrian.Haskell.Cabal.Type -import Hadrian.Oracles.Cabal.Type -import Hadrian.Package -import Stage - --- | Read and parse a Cabal file, caching and tracking the result. -readPackageData :: Package -> Action PackageData -readPackageData = askOracle . PackageDataKey - --- | Read and parse a Cabal file recording the obtained 'ContextData', caching --- and tracking the result. Note that unlike 'readPackageData' this function --- resolves all Cabal configuration flags and associated conditionals. -readContextData :: Context -> Action ContextData -readContextData = askOracle . ContextDataKey - --- | Configure a 'Package' using the GHC corresponding to a given 'Stage', --- caching and tracking the result. -configurePackageGHC :: Package -> Stage -> Action (Compiler, Platform) -configurePackageGHC pkg stage = do - PackageConfiguration res <- askOracle $ PackageConfigurationKey (pkg, stage) - return res diff --git a/hadrian/src/Hadrian/Oracles/Cabal/Rules.hs b/hadrian/src/Hadrian/Oracles/Cabal/Rules.hs deleted file mode 100644 index e7672dd06bad..000000000000 --- a/hadrian/src/Hadrian/Oracles/Cabal/Rules.hs +++ /dev/null @@ -1,79 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Oracles.Cabal.Rules --- Copyright : (c) Andrey Mokhov 2014-2018 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- This module defines Shake rules corresponding to the /Cabal oracle/; see --- the module "Hadrian.Oracles.Cabal" for various supported queries. ------------------------------------------------------------------------------ -module Hadrian.Oracles.Cabal.Rules where - -import Control.Monad -import Data.Maybe -import Development.Shake -import Distribution.Simple.GHC -import Distribution.Simple.Program.Builtin -import Distribution.Simple.Program.Db -import Distribution.Verbosity - -import Builder -import Context -import Hadrian.Haskell.Cabal.Parse -import Hadrian.Oracles.Cabal.Type -import Hadrian.Package -import Hadrian.Utilities - --- | These oracle rules are used to cache and track answers to the following --- queries, which are implemented via the Cabal library: --- --- 1) 'Hadrian.Oracles.Cabal.readPackageData' that reads Cabal package data. --- --- 2) 'Hadrian.Oracles.Cabal.readContextData' that reads 'Context'-dependent --- Cabal package data. --- --- 3) 'Hadrian.Oracles.Cabal.configurePackageGHC' that configures a package. -cabalOracle :: Rules () -cabalOracle = do - void $ addOracleCache $ \(PackageDataKey package) -> do - let file = pkgCabalFile package - need [file] - putVerbose $ "| PackageData oracle: parsing " ++ quote file ++ "..." - parsePackageData package - - void $ addOracleCache $ \(ContextDataKey context@Context {..}) -> do - putVerbose $ "| ContextData oracle: resolving data for " - ++ quote (pkgName package) ++ " (" ++ show stage - ++ ", " ++ show way ++ ")..." - -- Calling 'need' on @setup-config@ triggers 'configurePackage'. Why - -- this indirection? Going via @setup-config@ allows us to cache the - -- configuration step, i.e. not to repeat it if it's already been done. - setupConfig <- pkgSetupConfigFile context - need [setupConfig] - resolveContextData context - - void $ addOracleCache $ \(PackageConfigurationKey (pkg, stage)) -> do - putVerbose $ "| PackageConfiguration oracle: configuring " - ++ quote (pkgName pkg) ++ " (" ++ show stage ++ ")..." - -- Configure the package with the GHC corresponding to the given stage - hcPath <- builderPath (Ghc CompileHs stage) - hcPkgPath <- builderPath (GhcPkg undefined stage) - -- N.B. the hcPath parameter of `configure` is broken when given an - -- empty ProgramDb. To work around this we manually construct an - -- appropriate ProgramDb. - -- - -- We also need to pass the path to ghc-pkg, because Cabal cannot - -- guess it (from ghc's path) when it's for a cross-compiler (e.g., - -- _build/stage0/bin/aarch64-linux-gnu-ghc-pkg). - let progDb = userSpecifyPath "ghc" hcPath - $ addKnownProgram ghcProgram - $ userSpecifyPath "ghc-pkg" hcPkgPath - $ addKnownProgram ghcPkgProgram - $ emptyProgramDb - (compiler, maybePlatform, _pkgdb) <- liftIO $ - configure normal Nothing Nothing progDb - let platform = fromMaybe (error msg) maybePlatform - msg = "PackageConfiguration oracle: cannot detect platform" - return $ PackageConfiguration (compiler, platform) diff --git a/hadrian/src/Hadrian/Oracles/Cabal/Type.hs b/hadrian/src/Hadrian/Oracles/Cabal/Type.hs deleted file mode 100644 index c1a3b21b1a9c..000000000000 --- a/hadrian/src/Hadrian/Oracles/Cabal/Type.hs +++ /dev/null @@ -1,62 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Oracles.Cabal.Type --- Copyright : (c) Andrey Mokhov 2014-2018 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- This module defines the types of keys used by the /Cabal oracles/. See the --- module "Hadrian.Oracles.Cabal" for supported Cabal oracle queries, and the --- module "Hadrian.Oracles.Cabal.Rules" for the corresponding Shake rules. ------------------------------------------------------------------------------ -module Hadrian.Oracles.Cabal.Type where - -import Development.Shake -import Development.Shake.Classes -import qualified Distribution.Simple as C -import qualified Distribution.System as C - -import Context.Type -import Hadrian.Haskell.Cabal.Type -import Hadrian.Package -import Stage - --- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readPackageData' --- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.PackageData'. -newtype PackageDataKey = PackageDataKey Package - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult PackageDataKey = PackageData - --- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readContextData' --- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.ContextData'. -newtype ContextDataKey = ContextDataKey Context - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult ContextDataKey = ContextData - --- TODO: Should @PackageConfiguration@ be simply @()@? Presumably the pair --- @(Compiler, Maybe Platform)@ is fully determined by the current build Stage. --- | The result of Cabal package configuration produced by the oracle --- 'Hadrian.Oracles.Cabal.configurePackageGHC'. -newtype PackageConfiguration = PackageConfiguration (C.Compiler, C.Platform) - deriving (Binary, Eq, Show, Typeable) - -instance NFData PackageConfiguration where - rnf (PackageConfiguration (c, p)) = - rnf (C.compilerId c) `seq` - rnf (C.abiTagString $ C.compilerAbiTag c) `seq` - rnf (C.compilerCompat c) `seq` - rnf (C.compilerLanguages c) `seq` - rnf (C.compilerExtensions c) `seq` - rnf (C.compilerProperties c) `seq` - rnf p - -instance Hashable PackageConfiguration where - hashWithSalt _ = hash . show - --- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.configurePackageGHC' --- to cache configuration of a Cabal package. -newtype PackageConfigurationKey = PackageConfigurationKey (Package, Stage) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult PackageConfigurationKey = PackageConfiguration diff --git a/hadrian/src/Hadrian/Oracles/DirectoryContents.hs b/hadrian/src/Hadrian/Oracles/DirectoryContents.hs deleted file mode 100644 index f302af9da03d..000000000000 --- a/hadrian/src/Hadrian/Oracles/DirectoryContents.hs +++ /dev/null @@ -1,64 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -module Hadrian.Oracles.DirectoryContents ( - directoryContents, copyDirectoryContents, directoryContentsOracle, copyDirectoryContentsUntracked, - Match (..), matches, matchAll - ) where - -import Control.Monad -import Development.Shake -import Development.Shake.Classes -import Development.Shake.FilePath -import GHC.Generics - -import Hadrian.Utilities - -import qualified System.Directory.Extra as IO - -data Match = Test FilePattern | Not Match | And [Match] | Or [Match] - deriving (Generic, Eq, Show, Typeable) - -instance Binary Match -instance Hashable Match -instance NFData Match - --- | A 'Match' expression that always evaluates to 'True' (i.e. always matches). -matchAll :: Match -matchAll = And [] - --- | Check if a file name matches a given 'Match' expression. -matches :: Match -> FilePath -> Bool -matches (Test p) f = p ?== f -matches (Not m) f = not $ matches m f -matches (And ms) f = all (`matches` f) ms -matches (Or ms) f = any (`matches` f) ms - --- | Given a 'Match' expression and a directory, recursively traverse it and all --- its subdirectories to find and return all matching contents. -directoryContents :: Match -> FilePath -> Action [FilePath] -directoryContents expr dir = askOracle $ DirectoryContents (expr, dir) - --- | Copy the contents of the source directory that matches a given 'Match' --- expression into the target directory. The copied contents is tracked. -copyDirectoryContents :: Match -> FilePath -> FilePath -> Action () -copyDirectoryContents expr source target = do - putProgressInfo =<< renderAction "Copy directory contents" source target - let cp file = copyFile file $ target -/- makeRelative source file - mapM_ cp =<< directoryContents expr source - --- | Copy the contents of the source directory that matches a given 'Match' --- expression into the target directory. The copied contents is untracked. -copyDirectoryContentsUntracked :: Match -> FilePath -> FilePath -> Action () -copyDirectoryContentsUntracked expr source target = do - putProgressInfo =<< renderAction "Copy directory contents (untracked)" source target - let cp file = copyFileUntracked file $ target -/- makeRelative source file - mapM_ cp =<< directoryContents expr source - -newtype DirectoryContents = DirectoryContents (Match, FilePath) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult DirectoryContents = [FilePath] - --- | This oracle answers 'directoryContents' queries and tracks the results. -directoryContentsOracle :: Rules () -directoryContentsOracle = void $ - addOracle $ \(DirectoryContents (expr, dir)) -> liftIO $ map unifyPath . - filter (matches expr) <$> IO.listFilesInside (return . matches expr) dir diff --git a/hadrian/src/Hadrian/Oracles/Path.hs b/hadrian/src/Hadrian/Oracles/Path.hs deleted file mode 100644 index 833e1cd9f9cd..000000000000 --- a/hadrian/src/Hadrian/Oracles/Path.hs +++ /dev/null @@ -1,60 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -module Hadrian.Oracles.Path ( - lookupInPath, fixAbsolutePathOnWindows, pathOracle - ) where - -import Control.Monad -import Data.Char -import Data.List.Extra -import Development.Shake -import Development.Shake.Classes -import Development.Shake.FilePath -import System.Directory -import System.Info.Extra - -import Hadrian.Utilities - --- | Lookup a specified 'FilePath' in the system @PATH@. -lookupInPath :: FilePath -> Action FilePath -lookupInPath name - | name == takeFileName name = askOracle $ LookupInPath name - | otherwise = return name - --- | Fix an absolute path on Windows: --- * "/c/" => "C:/" --- * "/usr/bin/tar.exe" => "C:/msys/usr/bin/tar.exe" -fixAbsolutePathOnWindows :: FilePath -> Action FilePath -fixAbsolutePathOnWindows path = - if isWindows - then do - let (dir, file) = splitFileName path - winDir <- askOracle $ WindowsPath dir - return $ winDir -/- file - else - return path - -newtype LookupInPath = LookupInPath String - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult LookupInPath = String - -newtype WindowsPath = WindowsPath FilePath - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult WindowsPath = String - --- | Oracles for looking up paths. These are slow and require caching. -pathOracle :: Rules () -pathOracle = do - void $ addOracleCache $ \(WindowsPath path) -> do - Stdout out <- quietly $ cmd ["cygpath", "-m", path] - let windowsPath = unifyPath $ dropWhileEnd isSpace out - putVerbose $ "| Windows path mapping: " ++ path ++ " => " ++ windowsPath - return windowsPath - - void $ addOracleCache $ \(LookupInPath name) -> do - path <- liftIO getSearchPath - exes <- liftIO (findExecutablesInDirectories path name) - exe <- case exes of - [] -> error $ "Cannot find executable " ++ quote name - (exe:_) -> pure $ unifyPath exe - putVerbose $ "| Executable found: " ++ name ++ " => " ++ exe - return exe diff --git a/hadrian/src/Hadrian/Oracles/TextFile.hs b/hadrian/src/Hadrian/Oracles/TextFile.hs deleted file mode 100644 index a85669780d34..000000000000 --- a/hadrian/src/Hadrian/Oracles/TextFile.hs +++ /dev/null @@ -1,189 +0,0 @@ -{-# OPTIONS_GHC -Wno-orphans #-} -- Orphan instances for Toolchain.Target -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE StandaloneDeriving #-} ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Oracles.TextFile --- Copyright : (c) Andrey Mokhov 2014-2018 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- Read and parse text files, tracking their contents. This oracle can be used --- to read configuration or package metadata files and cache the parsing. ------------------------------------------------------------------------------ -module Hadrian.Oracles.TextFile ( - lookupValue, lookupValueOrEmpty, lookupValueOrError, lookupSystemConfig, lookupValues, - lookupValuesOrEmpty, lookupValuesOrError, lookupDependencies, textFileOracle, - getBuildTarget, getHostTarget, getTargetTarget, - queryBuildTarget, queryHostTarget, queryTargetTarget - ) where - -import Control.Monad -import qualified Data.HashMap.Strict as Map -import Data.Maybe -import Data.List -import Development.Shake -import Development.Shake.Classes -import Development.Shake.Config -import Base -import Text.Read (readMaybe) - -import qualified GHC.Toolchain.Target as Toolchain - --- | Lookup a value in a text file, tracking the result. Each line of the file --- is expected to have @key = value@ format. -lookupValue :: FilePath -> String -> Action (Maybe String) -lookupValue file key = askOracle $ KeyValue (file, key) - --- | Like 'lookupValue' but returns the empty string if the key is not found. -lookupValueOrEmpty :: FilePath -> String -> Action String -lookupValueOrEmpty file key = fromMaybe "" <$> lookupValue file key - --- | Like 'lookupValue' but raises an error if the key is not found. -lookupValueOrError :: Maybe String -> FilePath -> String -> Action String -lookupValueOrError helper file key = fromMaybe (error msg) <$> lookupValue file key - where - msg = unlines $ ["Key " ++ quote key ++ " not found in file " ++ quote file] - ++ maybeToList helper - -lookupSystemConfig :: String -> Action String -lookupSystemConfig = lookupValueOrError (Just configError) configFile - where - configError = "Perhaps you need to rerun ./configure" - --- | Lookup a list of values in a text file, tracking the result. Each line of --- the file is expected to have @key value1 value2 ...@ format. -lookupValues :: FilePath -> String -> Action (Maybe [String]) -lookupValues file key = askOracle $ KeyValues (file, key) - --- | Like 'lookupValues' but returns the empty list if the key is not found. -lookupValuesOrEmpty :: FilePath -> String -> Action [String] -lookupValuesOrEmpty file key = fromMaybe [] <$> lookupValues file key - --- | Like 'lookupValues' but raises an error if the key is not found. -lookupValuesOrError :: FilePath -> String -> Action [String] -lookupValuesOrError file key = fromMaybe (error msg) <$> lookupValues file key - where - msg = "Key " ++ quote key ++ " not found in file " ++ quote file - --- | The 'Action' @lookupDependencies depFile file@ looks up dependencies of a --- @file@ in a (typically generated) dependency file @depFile@. The action --- returns a pair @(source, files)@, such that the @file@ can be produced by --- compiling @source@, which in turn also depends on a number of other @files@. -lookupDependencies :: FilePath -> FilePath -> Action (FilePath, [FilePath]) -lookupDependencies depFile file = do - let -- .hs needs to come before .hi-boot deps added to fix #14482. - -- This is still a bit fragile: we have no order guarantee from the input - -- file. Let's hope we don't have two different .hs source files (e.g. - -- one included into the other)... - weigh p - | ".hs" `isSuffixOf` p = 0 :: Int - | otherwise = 1 - deps <- fmap (sortOn weigh) <$> lookupValues depFile file - case deps of - Nothing -> error $ "No dependencies found for file " ++ quote file ++ " in " ++ quote depFile - Just [] -> error $ "No source file found for file " ++ quote file ++ " in " ++ quote depFile - Just (source : files) -> return (source, files) - --- | Parse a target from a text file, tracking the result. The file is expected --- to contain a parseable Toolchain.Target value generated by ghc-toolchain. -getTargetConfig :: FilePath -> Action Toolchain.Target -getTargetConfig file0 = do - useGhcToolchain <- lookupSystemConfig "use-ghc-toolchain" - let file1 = if useGhcToolchain == "YES" then file0 <.> "ghc-toolchain" else file0 - askOracle $ TargetFile file1 - --- | Get the build target configuration through 'getTargetConfig' -getBuildTarget :: Action Toolchain.Target -getBuildTarget = getTargetConfig buildTargetFile - --- | Get the host target configuration through 'getTargetConfig' -getHostTarget :: Action Toolchain.Target -getHostTarget = getTargetConfig hostTargetFile - -- where - -- msg = "The host's target configuration file " ++ quote hostTargetFile ++ " does not exist! ghc-toolchain might have failed to generate it." - --- | Get the target target configuration through 'getTargetConfig' -getTargetTarget :: Action Toolchain.Target -getTargetTarget = getTargetConfig targetTargetFile - -queryBuildTarget :: (Toolchain.Target -> a) -> Action a -queryBuildTarget f = f <$> getBuildTarget - -queryHostTarget :: (Toolchain.Target -> a) -> Action a -queryHostTarget f = f <$> getHostTarget - -queryTargetTarget :: (Toolchain.Target -> a) -> Action a -queryTargetTarget f = f <$> getTargetTarget - -newtype KeyValue = KeyValue (FilePath, String) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult KeyValue = Maybe String - -newtype KeyValues = KeyValues (FilePath, String) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult KeyValues = Maybe [String] - -newtype TargetFile = TargetFile FilePath - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult TargetFile = Toolchain.Target - --- | These oracle rules are used to cache and track answers to the following --- queries, which are implemented by parsing text files: --- --- 1) Looking up key-value pairs formatted as @key = value1 value2 ...@ that --- are often used in text configuration files. See functions 'lookupValue', --- 'lookupValueOrEmpty', 'lookupValueOrError', 'lookupValues', --- 'lookupValuesOrEmpty' and 'lookupValuesOrError'. --- --- 2) Parsing Makefile dependency files generated by commands like @gcc -MM@: --- see 'lookupDependencies'. --- --- 3) Parsing target files as generated by ghc-toolchain. See functions --- 'lookupTarget' and lookupTargetConfig' --- -textFileOracle :: Rules () -textFileOracle = do - kv <- newCache $ \file -> do - need [file] - putVerbose $ "| KeyValue oracle: reading " ++ quote file ++ "..." - liftIO $ readConfigFile file - void $ addOracleCache $ \(KeyValue (file, key)) -> Map.lookup key <$> kv file - - kvs <- newCache $ \file -> do - need [file] - putVerbose $ "| KeyValues oracle: reading " ++ quote file ++ "..." - contents <- map words <$> readFileLines file - return $ Map.fromList [ (key, values) | (key:values) <- contents ] - void $ addOracleCache $ \(KeyValues (file, key)) -> Map.lookup key <$> kvs file - - tf <- newCache $ \file -> do - need [file] - putVerbose $ "| TargetFile oracle: reading " ++ quote file ++ "..." - mtarget <- readMaybe <$> readFile' file - case mtarget of - Nothing -> error $ unlines ["Error parsing a Toolchain.Target from " ++ quote file, - "Perhaps the `.target` file is out of date.", - "Try re-running `./configure`." - ] - - Just target -> return (target :: Toolchain.Target) - void $ addOracleCache $ \(TargetFile file) -> tf file - --- Orphan instances for (ShakeValue Toolchain.Target) -instance Binary Toolchain.Target where - put = put . show - get = fromMaybe (error $ unlines ["Error parsing a toolchain `.target` file from its binary representation in hadrian.", - "This is likely caused by a stale hadrian/shake cache", - "which has saved an old `.target` file that can't be parsed", - "into a more recent `Toolchain.Target`. It is recommended to reset", - "by running `./hadrian/build clean`." - ]) . readMaybe <$> get - -instance Hashable Toolchain.Target where - hashWithSalt s = hashWithSalt s . show - -instance NFData Toolchain.Target where - rnf = flip seq () -- ROMES:TODO: Would be better to have a correct instance, perhaps we could instance NFData in ghc-toolchain? - diff --git a/hadrian/src/Hadrian/Package.hs b/hadrian/src/Hadrian/Package.hs deleted file mode 100644 index 6291edee7408..000000000000 --- a/hadrian/src/Hadrian/Package.hs +++ /dev/null @@ -1,84 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Hadrian.Package --- Copyright : (c) Andrey Mokhov 2014-2017 --- License : MIT (see the file LICENSE) --- Maintainer : andrey.mokhov@gmail.com --- Stability : experimental --- --- A /package/ is a collection of files. We currently only support C and Haskell --- packages and treat a package as either a library or a program. The latter is --- a gross oversimplification as, for example, Haskell packages can be both. --- This works for now, but should be improved in future. ------------------------------------------------------------------------------ -module Hadrian.Package ( - -- * Data types - Package (..), PackageName, PackageType, - - -- * Construction and properties - library, program, dummyPackage, isLibrary, isProgram, - - -- * Package directory structure - pkgCabalFile - ) where - -import Development.Shake.Classes -import Development.Shake.FilePath -import GHC.Generics - -import Hadrian.Utilities - --- TODO: Make PackageType more precise. --- See https://github.com/snowleopard/hadrian/issues/12. -data PackageType = Library | Program deriving (Eq, Generic, Ord, Show) - -type PackageName = String - --- TODO: Consider turning Package into a GADT indexed with language and type. -data Package = Package { - -- | The package type. 'Library' and 'Program' packages are supported. - pkgType :: PackageType, - -- | The package name. We assume that all packages have different names, - -- hence two packages with the same name are considered equal. - pkgName :: PackageName, - -- | The path to the package source code relative to the root of the build - -- system. For example, @libraries/Cabal/Cabal@ and @ghc@ are paths to the - -- @Cabal@ and @ghc-bin@ packages in GHC. - pkgPath :: FilePath - } deriving (Eq, Generic, Ord, Show) - --- | Construct a library package. -library :: PackageName -> FilePath -> Package -library = Package Library - --- | Construct a program package. -program :: PackageName -> FilePath -> Package -program = Package Program - --- TODO: Remove this hack. --- | A dummy package that we never try to build but use when we need a 'Package' --- to construct a 'Context' but do not need to access the package field. -dummyPackage :: Package -dummyPackage = library "dummy" "dummy/path/" - --- | Is this a library package? -isLibrary :: Package -> Bool -isLibrary (Package Library _ _) = True -isLibrary _ = False - --- | Is this a program package? -isProgram :: Package -> Bool -isProgram (Package Program _ _) = True -isProgram _ = False - --- | The path to the Cabal file of a Haskell package, e.g. @ghc/ghc-bin.cabal@. -pkgCabalFile :: Package -> FilePath -pkgCabalFile p = pkgPath p -/- pkgName p <.> "cabal" - -instance Binary PackageType -instance Hashable PackageType -instance NFData PackageType - -instance Binary Package -instance Hashable Package -instance NFData Package diff --git a/hadrian/src/Hadrian/Target.hs b/hadrian/src/Hadrian/Target.hs deleted file mode 100644 index 88489776c08e..000000000000 --- a/hadrian/src/Hadrian/Target.hs +++ /dev/null @@ -1,29 +0,0 @@ -module Hadrian.Target (Target, target, context, builder, inputs, outputs) where - -import Development.Shake.Classes -import GHC.Generics - --- | Each invocation of a builder is fully described by a 'Target', which --- comprises a build context (type variable @c@), a builder (type variable @b@), --- a list of input files and a list of output files. For example: --- --- @ --- preludeTarget = Target (GHC.Context) (GHC.Builder) --- { context = Context Stage1 base profiling --- , builder = Ghc Stage1 --- , inputs = ["libraries/base/Prelude.hs"] --- , outputs = ["build/stage1/libraries/base/Prelude.p_o"] } --- @ -data Target c b = Target - { context :: c -- ^ Current build context - , builder :: b -- ^ Builder to be invoked - , inputs :: [FilePath] -- ^ Input files for the builder - , outputs :: [FilePath] -- ^ Files to be produced - } deriving (Eq, Generic, Show) - -target :: c -> b -> [FilePath] -> [FilePath] -> Target c b -target = Target - -instance (Binary c, Binary b) => Binary (Target c b) -instance (Hashable c, Hashable b) => Hashable (Target c b) -instance (NFData c, NFData b) => NFData (Target c b) diff --git a/hadrian/src/Hadrian/Utilities.hs b/hadrian/src/Hadrian/Utilities.hs deleted file mode 100644 index e88f1c045c5e..000000000000 --- a/hadrian/src/Hadrian/Utilities.hs +++ /dev/null @@ -1,700 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -module Hadrian.Utilities ( - -- * List manipulation - fromSingleton, replaceEq, minusOrd, intersectOrd, lookupAll, chunksOfSize, - - -- * String manipulation - quote, yesNo, parseYesNo, zeroOne, - - -- * FilePath manipulation - unifyPath, (-/-), makeRelativeNoSysLink, makeAbsolute, - - -- * Accessing Shake's type-indexed map - insertExtra, lookupExtra, userSetting, - - -- * Paths - BuildRoot (..), buildRoot, buildRootRules, isGeneratedSource, - - -- * File system operations - copyFile, copyFileUntracked, createFileLink, fixFile, - makeExecutable, moveFile, removeFile, createDirectory, copyDirectory, - moveDirectory, removeDirectory, removeFile_, writeFileChangedBS, - findExecutable, - - -- * Diagnostic info - Colour (..), ANSIColour (..), putColoured, shouldUseColor, - BuildProgressColour, mkBuildProgressColour, putBuild, - SuccessColour, mkSuccessColour, putSuccess, - FailureColour(..), red, mkFailureColour, putFailure, - ProgressInfo (..), putProgressInfo, - renderAction, renderActionNoOutput, renderProgram, renderLibrary, renderBox, renderUnicorn, - - -- * Miscellaneous - (<&>), (%%>), cmdLineLengthLimit, windowsHost, osxHost, iosHost, - - -- * Useful re-exports - Dynamic, fromDynamic, toDyn, TypeRep, typeOf - ) where - -import Control.Applicative -import Control.Monad.Extra -import Data.Char -import Data.Dynamic (Dynamic, fromDynamic, toDyn) -import Data.Functor -import Data.HashMap.Strict (HashMap) -import Data.List.Extra -import Data.Maybe -import Data.Typeable (TypeRep, typeOf) -import Development.Shake hiding (Normal) -import Development.Shake.Classes -import Development.Shake.FilePath -import System.Environment (lookupEnv) - -import qualified Data.ByteString as BS -import qualified Control.Exception.Base as IO -import qualified Data.HashMap.Strict as Map -import qualified System.Directory.Extra as IO -import qualified System.Info.Extra as IO -import qualified System.IO as IO -import System.IO.Error (isPermissionError) -import qualified System.FilePath.Posix as Posix - --- | Extract a value from a singleton list, or terminate with an error message --- if the list does not contain exactly one value. -fromSingleton :: String -> [a] -> a -fromSingleton _ [res] = res -fromSingleton msg _ = error msg - --- | Find and replace all occurrences of a value in a list. -replaceEq :: Eq a => a -> a -> [a] -> [a] -replaceEq from to = map (\cur -> if cur == from then to else cur) - --- Explicit definition to avoid dependency on Data.List.Ordered --- | Difference of two ordered lists. -minusOrd :: Ord a => [a] -> [a] -> [a] -minusOrd [] _ = [] -minusOrd xs [] = xs -minusOrd (x:xs) (y:ys) = case compare x y of - LT -> x : minusOrd xs (y:ys) - EQ -> minusOrd xs ys - GT -> minusOrd (x:xs) ys - --- Explicit definition to avoid dependency on Data.List.Ordered. TODO: add tests --- | Intersection of two ordered lists by a predicate. -intersectOrd :: (a -> b -> Ordering) -> [a] -> [b] -> [a] -intersectOrd cmp = loop - where - loop [] _ = [] - loop _ [] = [] - loop (x:xs) (y:ys) = case cmp x y of - LT -> loop xs (y:ys) - EQ -> x : loop xs (y:ys) - GT -> loop (x:xs) ys - --- | Lookup all elements of a given sorted list in a given sorted dictionary. --- @lookupAll list dict@ is equivalent to @map (flip lookup dict) list@ but has --- linear complexity O(|list| + |dist|) instead of quadratic O(|list| * |dict|). --- --- > lookupAll ["b", "c"] [("a", 1), ("c", 3), ("d", 4)] == [Nothing, Just 3] --- > list & dict are sorted: lookupAll list dict == map (flip lookup dict) list -lookupAll :: Ord a => [a] -> [(a, b)] -> [Maybe b] -lookupAll [] _ = [] -lookupAll (_:xs) [] = Nothing : lookupAll xs [] -lookupAll (x:xs) (y:ys) = case compare x (fst y) of - LT -> Nothing : lookupAll xs (y:ys) - EQ -> Just (snd y) : lookupAll xs (y:ys) - GT -> lookupAll (x:xs) ys - --- | @chunksOfSize size strings@ splits a given list of strings into chunks not --- exceeding the given @size@. If that is impossible, it uses singleton chunks. -chunksOfSize :: Int -> [String] -> [[String]] -chunksOfSize n = repeatedly f - where - f xs = splitAt (max 1 $ length $ takeWhile (<= n) $ scanl1 (+) $ map length xs) xs - --- | Add single quotes around a string. -quote :: String -> String -quote s = "'" ++ s ++ "'" - --- | Pretty-print a 'Bool' as a @"YES"@ or @"NO"@ string. -yesNo :: Bool -> String -yesNo True = "YES" -yesNo False = "NO" - --- | Parse a 'Bool' from a @"YES"@ or @"NO"@ string. Returns @Nothing@ in case --- of a parse failure. -parseYesNo :: String -> Maybe Bool -parseYesNo "YES" = Just True -parseYesNo "NO" = Just False -parseYesNo _ = Nothing - --- | Pretty-print a 'Bool' as a @"0"@ or @"1"@ string -zeroOne :: Bool -> String -zeroOne False = "0" -zeroOne True = "1" - --- | Normalise a path and convert all path separators to @/@, even on Windows. -unifyPath :: FilePath -> FilePath -unifyPath = toStandard . normaliseEx - -{- Note [Absolute paths and MSYS] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When dealing with absolute paths in Hadrian, we opt to always use Unix-style -forward slashes for separating paths. -This is because, on Windows, the MSYS toolchain can reliably handle paths such -as /c/foo, while it occasionally falls over on paths of the form C:\foo. --} - --- | Combine paths with a forward slash regardless of platform. --- --- See Note [Absolute paths and MSYS]. -(-/-) :: FilePath -> FilePath -> FilePath -_ -/- b - | isAbsolute b - , _:b' <- b - , not (isAbsolute b') = b -"" -/- b = b -a -/- b - | last a == '/' = a ++ b - | otherwise = a ++ '/' : b - -infixr 6 -/- - --- | Like 'System.Directory.makeAbsolute' from @directory@, but always --- using forward slashes. --- --- See Note [Absolute paths and MSYS]. -makeAbsolute :: FilePath -> IO FilePath -makeAbsolute fp = do - cwd <- IO.getCurrentDirectory - let fp' = cwd -/- fp - return $ Posix.normalise fp' - --- | This is like Posix makeRelative, but assumes no sys links in the input --- paths. This allows the result to start with possibly many "../"s. Input --- paths must both be relative, or be on the same drive -makeRelativeNoSysLink :: FilePath -> FilePath -> FilePath -makeRelativeNoSysLink a b - | aDrive == bDrive - = if aToB == [] - then "." - else joinPath aToB - | otherwise - = error $ if isRelative a /= isRelative b - then "Paths must both be relative or both be absolute, but got" - ++ " \"" ++ a ++ "\" and \"" ++ b ++ "\"" - else "Paths are on different drives " - ++ " \"" ++ aDrive ++ "\" and \"" ++ bDrive ++ "\"" - where - (aDrive, aRelPath) = splitDrive a - (bDrive, bRelPath) = splitDrive b - - aRelSplit = removeIndirections (splitPath aRelPath) - bRelSplit = removeIndirections (splitPath bRelPath) - - -- Use removePrefix to get the relative paths relative to a new - -- base directory as high in the directory tree as possible. - (baseToA, baseToB) = removePrefix aRelSplit bRelSplit - aToBase = case baseToA of - (p: _) | isDirUp p -> - -- if baseToA contains any '..' then there is no way to get - -- a path from a to the base directory. - -- E.g. if baseToA == "../u/v" - -- then aToBase == "../../" - error $ "Impossible to find relatieve path from " - ++ a ++ " to " ++ b - _ -> ".." <$ baseToA - aToB = aToBase ++ baseToB - - -- removePrefix "pre123" "prefix456" == ("123", "fix456") - removePrefix :: Eq a => [a] -> [a] -> ([a], [a]) - removePrefix as [] = (as, []) - removePrefix [] bs = ([], bs) - removePrefix (a:as) (b:bs) - | a == b = removePrefix as bs - | otherwise = (a:as, b:bs) - - -- Removes all '.', and tries to remove all '..'. In some cases '..'s - -- cannot be removes, but will all appear to the left. - -- e.g. removeIndirections "../a/./b/../../../c" == "../../c" - removeIndirections :: [String] -> [String] - removeIndirections [] = [] - removeIndirections (x:xs) - -- Remove all '.' - | isDot x = removeIndirections xs - -- Bubble all '..' to the left - | otherwise = case removeIndirections xs of - [] -> [x] - -- Only when x /= '..' and y == '..' do we need to - -- bubble to the left. In that case they cancel out - (y:ys) -> if not (isDirUp x) && isDirUp y - then ys - else x : y : ys - - isDirUp ".." = True - isDirUp "../" = True - isDirUp _ = False - - isDot "." = True - isDot "./" = True - isDot _ = False - --- | Like Shake's '%>' but gives higher priority to longer patterns. Useful --- in situations when a family of build rules, e.g. @"**/*.a"@ and @"**/*_p.a"@ --- can be matched by the same file, such as @library_p.a@. We break the tie --- by preferring longer matches, which correspond to longer patterns. -(%%>) :: FilePattern -> (FilePath -> Action ()) -> Rules () -p %%> a = priority (fromIntegral (length p) + 1) $ p %> a - -infix 1 %%> - --- | Build command lines can get very long; for example, when building the Cabal --- library, they can reach 2MB! Some operating systems do not support command --- lines of such length, and this function can be used to obtain a reasonable --- approximation of the limit. On Windows, it is theoretically 32768 characters --- (since Windows 7). In practice we use 31000 to leave some breathing space for --- the builder path & name, auxiliary flags, and other overheads. On Mac OS X, --- ARG_MAX is 262144, yet when using @xargs@ on OSX this is reduced by over --- 20000. Hence, 200000 seems like a sensible limit. On other operating systems --- we currently use the 4194304 setting. -cmdLineLengthLimit :: Int -cmdLineLengthLimit | IO.isWindows = 31000 - | IO.isMac = 200000 - | otherwise = 4194304 - --- | Check if the host OS is Windows. -windowsHost :: Bool -windowsHost = IO.isWindows - --- | Check if the host OS is Mac OS. -osxHost :: Bool -osxHost = IO.isMac - --- | Check if the host OS is iOS. -iosHost :: Bool -iosHost = IO.os == "ios" - --- | Insert a value into Shake's type-indexed map. -insertExtra :: Typeable a => a -> HashMap TypeRep Dynamic -> HashMap TypeRep Dynamic -insertExtra value = Map.insert (typeOf value) (toDyn value) - --- | Lookup a value in Shake's type-indexed map. -lookupExtra :: Typeable a => a -> Map.HashMap TypeRep Dynamic -> a -lookupExtra defaultValue extra = fromMaybe defaultValue maybeValue - where - maybeValue = fromDynamic =<< Map.lookup (typeOf defaultValue) extra - --- | Lookup a user setting in Shake's type-indexed map 'shakeExtra'. If the --- setting is not found, return the provided default value instead. -userSetting :: Typeable a => a -> Action a -userSetting defaultValue = do - extra <- shakeExtra <$> getShakeOptions - return $ lookupExtra defaultValue extra - --- | Lookup a user setting in Shake's type-indexed map 'shakeExtra'. If the --- setting is not found, return the provided default value instead. -userSettingRules :: Typeable a => a -> Rules a -userSettingRules defaultValue = do - extra <- shakeExtra <$> getShakeOptionsRules - return $ lookupExtra defaultValue extra - -newtype BuildRoot = BuildRoot FilePath deriving (Typeable, Eq, Show) - --- | All build results are put into the 'buildRoot' directory. -buildRoot :: Action FilePath -buildRoot = do - BuildRoot path <- userSetting (BuildRoot "") - return path - -buildRootRules :: Rules FilePath -buildRootRules = do - BuildRoot path <- userSettingRules (BuildRoot "") - return path - --- | Given a 'FilePath' to a source file, return 'True' if it is generated. --- The current implementation simply assumes that a file is generated if it --- lives in the 'buildRoot' directory. Since most files are not generated the --- test is usually very fast. -isGeneratedSource :: FilePath -> Action Bool -isGeneratedSource file = buildRoot <&> (`isPrefixOf` file) - --- | Link a file tracking the link target. Create the target directory if --- missing. -createFileLink :: FilePath -> FilePath -> Action () -createFileLink linkTarget link - | windowsHost = copyFile' source link - | otherwise = do - -- TODO `disableHistory` is a temporary fix (see issue #16866). Remove - -- `disableHistory` when shake issue is fixed: https://github.com/ndmitchell/shake/issues/683. - historyDisable - - need [source] - - liftIO $ IO.createDirectoryIfMissing True dir - putProgressInfo =<< renderCreateFileLink linkTarget link - quietly . liftIO $ do - IO.removeFile link <|> return () - IO.createFileLink linkTarget link - - where dir = takeDirectory link - source | isAbsolute linkTarget = linkTarget - | otherwise = takeDirectory link -/- linkTarget - --- | Copy a file tracking the source. Create the target directory if missing. -copyFile :: FilePath -> FilePath -> Action () -copyFile source target = do - need [source] -- Guarantee the source is built before printing progress info. - let dir = takeDirectory target - liftIO $ IO.createDirectoryIfMissing True dir - putProgressInfo =<< renderAction "Copy file" source target - quietly $ copyFileChanged source target - --- | Remove a file or a link, but don't worry if it fails -removeFile_ :: FilePath -> IO () -removeFile_ x = - (IO.removeFile x >> IO.removeDirectoryLink x) `IO.catch` \e -> - when (isPermissionError e) $ IO.handle (\(_ :: IO.IOException) -> pure ()) $ do - perms <- IO.getPermissions x - IO.setPermissions x perms{IO.readable = True, IO.searchable = True, IO.writable = True} - IO.removeFile x - --- | Copy a file without tracking the source. Create the target directory if missing. -copyFileUntracked :: FilePath -> FilePath -> Action () -copyFileUntracked source target = do - let dir = takeDirectory target - liftIO $ IO.createDirectoryIfMissing True dir - putProgressInfo =<< renderAction "Copy file (untracked)" source target - liftIO $ IO.copyFile source target - --- | Transform a given file by applying a function to its contents. -fixFile :: FilePath -> (String -> String) -> Action () -fixFile file f = do - putProgressInfo $ "| Fix " ++ file - contents <- liftIO $ IO.withFile file IO.ReadMode $ \h -> do - old <- IO.hGetContents h - let new = f old - IO.evaluate $ rnf new - return new - liftIO $ writeFile file contents - --- | Make a given file executable by running the @chmod +x@ command. -makeExecutable :: FilePath -> Action () -makeExecutable file = do - putProgressInfo $ "| Make " ++ quote file ++ " executable." - quietly $ cmd "chmod +x " [file] - - --- | Move a file. Note that we cannot track the source, because it is moved. -moveFile :: FilePath -> FilePath -> Action () -moveFile source target = do - putProgressInfo =<< renderAction "Move file" source target - quietly $ cmd ["mv", source, target] - --- | Remove a file that doesn't necessarily exist. -removeFile :: FilePath -> Action () -removeFile file = do - putProgressInfo $ "| Remove file " ++ file - liftIO . whenM (IO.doesFileExist file) $ IO.removeFile file - --- | Create a directory if it does not already exist. -createDirectory :: FilePath -> Action () -createDirectory dir = do - putProgressInfo $ "| Create directory " ++ dir - liftIO $ IO.createDirectoryIfMissing True dir - --- | Copy a directory. The contents of the source directory is untracked. -copyDirectory :: FilePath -> FilePath -> Action () -copyDirectory source target = do - putProgressInfo =<< renderAction "Copy directory" source target - quietly $ cmd ["cp", "-r", source, target] - --- | Move a directory. The contents of the source directory is untracked. -moveDirectory :: FilePath -> FilePath -> Action () -moveDirectory source target = do - putProgressInfo =<< renderAction "Move directory" source target - quietly $ cmd ["mv", source, target] - --- | Remove a directory that doesn't necessarily exist. -removeDirectory :: FilePath -> Action () -removeDirectory dir = do - putProgressInfo $ "| Remove directory " ++ dir - liftIO . whenM (IO.doesDirectoryExist dir) $ IO.removeDirectoryRecursive dir - --- | Like Shake's 'writeFileChanged', but accepts a 'ByteString'. -writeFileChangedBS :: FilePath -> BS.ByteString -> Action () -writeFileChangedBS name new = do - liftIO $ IO.createDirectoryIfMissing True $ takeDirectory name - exists <- liftIO $ IO.doesFileExist name - if exists - then do - old <- liftIO $ BS.readFile name - when (old /= new) $ do - liftIO $ removeFile_ name - do_write - else - do_write - where - do_write = do - putProgressInfo $ "| Write file " ++ name - liftIO $ BS.writeFile name new - - --- | Terminal output colours -data Colour - = Dull ANSIColour -- ^ 8-bit ANSI colours - | Vivid ANSIColour -- ^ 16-bit vivid ANSI colours - | Extended String -- ^ Extended 256-bit colours, manual code stored - --- | ANSI terminal colours -data ANSIColour - = Black -- ^ ANSI code: 30 - | Red -- ^ 31 - | Green -- ^ 32 - | Yellow -- ^ 33 - | Blue -- ^ 34 - | Magenta -- ^ 35 - | Cyan -- ^ 36 - | White -- ^ 37 - | Reset -- ^ 0 - --- | Convert ANSI colour names into their associated codes -colourCode :: ANSIColour -> String -colourCode Black = "30" -colourCode Red = "31" -colourCode Green = "32" -colourCode Yellow = "33" -colourCode Blue = "34" -colourCode Magenta = "35" -colourCode Cyan = "36" -colourCode White = "37" -colourCode Reset = "0" - --- | Create the final ANSI code. -mkColour :: Colour -> String -mkColour (Dull c) = colourCode c -mkColour (Vivid c) = colourCode c ++ ";1" -mkColour (Extended code) = "38;5;" ++ code - --- | A more colourful version of Shake's 'putInfo'. -putColoured :: String -> String -> Action () -putColoured code msg = do - useColour <- shakeColor <$> getShakeOptions - if useColour - then putInfo $ "\ESC[" ++ code ++ "m" ++ msg ++ "\ESC[0m" - else putInfo msg - -newtype BuildProgressColour = BuildProgressColour String - deriving Typeable - --- | By default, Hadrian tries to figure out if the current terminal --- supports colors using this function. The default can be overridden --- by supplying @--[no-]color@. -shouldUseColor :: IO Bool -shouldUseColor = - (&&) <$> IO.hIsTerminalDevice IO.stdout - <*> (not <$> isDumb) - where - isDumb = maybe False (== "dumb") <$> lookupEnv "TERM" - --- | Generate an encoded colour for progress output from names. -mkBuildProgressColour :: Colour -> BuildProgressColour -mkBuildProgressColour c = BuildProgressColour $ mkColour c - --- | Default 'BuildProgressColour'. -magenta :: BuildProgressColour -magenta = mkBuildProgressColour (Dull Magenta) - --- | Print a build progress message (e.g. executing a build command). -putBuild :: String -> Action () -putBuild msg = do - BuildProgressColour code <- userSetting magenta - putColoured code msg - -newtype SuccessColour = SuccessColour String - deriving Typeable - --- | Generate an encoded colour for successful output from names -mkSuccessColour :: Colour -> SuccessColour -mkSuccessColour c = SuccessColour $ mkColour c - --- | Default 'SuccessColour'. -green :: SuccessColour -green = mkSuccessColour (Dull Green) - --- | Print a success message (e.g. a package is built successfully). -putSuccess :: String -> Action () -putSuccess msg = do - SuccessColour code <- userSetting green - putColoured code msg - -newtype FailureColour = FailureColour String - deriving Typeable - --- | Generate an encoded colour for failure output messages -mkFailureColour :: Colour -> FailureColour -mkFailureColour c = FailureColour $ mkColour c - --- | Default 'FailureColour'. -red :: FailureColour -red = mkFailureColour (Dull Red) - --- | Print a failure message (e.g. a precondition was not met). -putFailure :: String -> Action () -putFailure msg = do - FailureColour code <- userSetting red - putColoured code msg - -data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show, Typeable) - --- | Version of 'putBuild' controlled by @--progress-info@ command line argument. -putProgressInfo :: String -> Action () -putProgressInfo msg = do - progressInfo <- userSetting None - when (progressInfo /= None) $ putBuild msg - --- | Render an action. -renderAction :: String -> FilePath -> FilePath -> Action String -renderAction what input output = do - progressInfo <- userSetting Brief - return $ case progressInfo of - None -> "" - Brief -> "| " ++ what ++ ": " ++ i ++ " => " ++ o - Normal -> renderBox [ what - , " input: " ++ i - , " => output: " ++ o ] - Unicorn -> renderUnicorn [ what - , " input: " ++ i - , " => output: " ++ o ] - where - i = unifyPath input - o = unifyPath output - --- | Render an action. -renderActionNoOutput :: String -> FilePath -> Action String -renderActionNoOutput what input = do - progressInfo <- userSetting Brief - return $ case progressInfo of - None -> "" - Brief -> "| " ++ what ++ ": " ++ i - Normal -> renderBox [ what, " input: " ++ i ] - Unicorn -> renderUnicorn [ what, " input: " ++ i ] - where - i = unifyPath input - --- | Render creating a file link. -renderCreateFileLink :: String -> FilePath -> Action String -renderCreateFileLink linkTarget link' = do - progressInfo <- userSetting Brief - let what = "Creating file link" - linkString = link ++ " -> " ++ linkTarget - return $ case progressInfo of - None -> "" - Brief -> "| " ++ what ++ ": " ++ linkString - Normal -> renderBox [ what - , " link name: " ++ link - , " -> link target: " ++ linkTarget ] - Unicorn -> renderUnicorn [ what - , " link name: " ++ link - , " -> link target: " ++ linkTarget ] - where - link = unifyPath link' - --- | Render a multiline string, prefixing the first line with a header. -renderMultiLineString :: String -> String -> [String] -renderMultiLineString header string = - [ linePrefix index ++ line | (index, line) <- zip [0..] (lines string) ] - where - linePrefix :: Int -> String - linePrefix index - | index == 0 = header - | otherwise = replicate (length header) ' ' - --- | Render a (possibly multiline) synopsis, making sure it ends with a dot. -renderSynopsis :: String -> String -> [String] -renderSynopsis header synopsis - | null synopsis = [] - | otherwise = renderMultiLineString header (endWithADot synopsis) - where - endWithADot :: String -> String - endWithADot s = dropWhileEnd isPunctuation s ++ "." - --- | Render the successful build of a program. -renderProgram :: String -> String -> String -> String -renderProgram name bin synopsis = renderBox $ - [ "Successfully built program " ++ name, "Executable: " ++ bin ] ++ - renderSynopsis "Program synopsis: " synopsis - --- | Render the successful build of a library. -renderLibrary :: String -> String -> String -> String -renderLibrary name lib synopsis = renderBox $ - [ "Successfully built library " ++ name, "Library: " ++ lib ] ++ - renderSynopsis "Library synopsis: " synopsis - --- | Render the given set of lines in an ASCII box. The minimum width and --- whether to use Unicode symbols are hardcoded in the function's body. --- --- >>> renderBox (words "lorem ipsum") --- /----------\ --- | lorem | --- | ipsum | --- \----------/ -renderBox :: [String] -> String -renderBox ls = - drop 1 $ concatMap ('\n' :) (boxTop : map renderLine ls ++ [boxBot]) - where - -- Minimum total width of the box in characters - minimumBoxWidth = 32 - - -- TODO: Make this setting configurable? Setting to True by default seems - -- to work poorly with many fonts. - useUnicode = False - - -- Characters to draw the box - (dash, pipe, topLeft, topRight, botLeft, botRight, padding) - | useUnicode = ('─', '│', '╭', '╮', '╰', '╯', ' ') - | otherwise = ('-', '|', '/', '\\', '\\', '/', ' ') - - -- Box width, taking minimum desired length and content into account. - -- The -4 is for the beginning and end pipe/padding symbols, as - -- in "| xxx |". - boxContentWidth = (minimumBoxWidth - 4) `max` maxContentLength - where - maxContentLength = maximum (map length ls) - - renderLine l = concat - [ [pipe, padding] - , padToLengthWith boxContentWidth padding l - , [padding, pipe] ] - where - padToLengthWith n filler x = x ++ replicate (n - length x) filler - - (boxTop, boxBot) = ( topLeft : dashes ++ [topRight] - , botLeft : dashes ++ [botRight] ) - where - -- +1 for each non-dash (= corner) char - dashes = replicate (boxContentWidth + 2) dash - --- | Render the given set of lines next to our favorite unicorn Robert. -renderUnicorn :: [String] -> String -renderUnicorn ls = - unlines $ take (max (length ponyLines) (length boxLines)) $ - zipWith (++) (ponyLines ++ repeat ponyPadding) (boxLines ++ repeat "") - where - ponyLines :: [String] - ponyLines = [ " ,;,,;'" - , " ,;;'( Robert the spitting unicorn" - , " __ ,;;' ' \\ wants you to know" - , " /' '\\'~~'~' \\ /'\\.) that a task " - , " ,;( ) / |. / just finished! " - , " ,;' \\ /-.,,( ) \\ " - , " ^ ) / ) / )| Almost there! " - , " || || \\) " - , " (_\\ (_\\ " ] - ponyPadding :: String - ponyPadding = " " - boxLines :: [String] - boxLines = ["", "", ""] ++ (lines . renderBox $ ls) - --- Workaround for https://github.com/haskell/directory/issues/180 -findExecutable :: String -> IO (Maybe FilePath) -findExecutable exe = IO.catch (IO.findExecutable exe) $ \(_ :: IO.IOException) -> pure Nothing diff --git a/hadrian/src/Main.hs b/hadrian/src/Main.hs deleted file mode 100644 index e46cb2a1d2f0..000000000000 --- a/hadrian/src/Main.hs +++ /dev/null @@ -1,160 +0,0 @@ -{-# LANGUAGE CPP #-} -module Main (main) where - -import Development.Shake -import Hadrian.Utilities -import Settings.Parser -import System.Directory (getCurrentDirectory) -import System.IO -import System.Exit -import System.Environment -import Control.Exception -import Data.IORef - -import qualified Base -import qualified CommandLine -import qualified Environment -import qualified Rules -import qualified Rules.Codes -import qualified Rules.Clean -import qualified Rules.Docspec -import qualified Rules.Documentation -import qualified Rules.Lint -import qualified Rules.Nofib -#if HADRIAN_ENABLE_SELFTEST -import qualified Rules.Selftest -#endif -import qualified Rules.SourceDist -import qualified Rules.Test -import qualified UserSettings -import qualified Progress - -main :: IO () -main = do - -- Provide access to command line arguments and some user settings through - -- Shake's type-indexed map 'shakeExtra'. - argsMap <- CommandLine.cmdLineArgsMap - let extra = insertExtra UserSettings.buildProgressColour - $ insertExtra UserSettings.successColour - $ argsMap - - BuildRoot buildRoot = CommandLine.lookupBuildRoot argsMap - - rebuild = [ (RebuildLater, buildRoot -/- "stage0/**") - | CommandLine.lookupFreeze1 argsMap || - CommandLine.lookupFreeze2 argsMap - ] ++ - [ (RebuildLater, buildRoot -/- "stage1/**") - | CommandLine.lookupFreeze2 argsMap - ] ++ - (if CommandLine.lookupSkipDepends argsMap - then [(RebuildLater, buildRoot -/- "**/.dependencies.mk"), (RebuildLater, buildRoot -/- "**/.dependencies")] - else []) - - cwd <- getCurrentDirectory - shakeColor <- shouldUseColor - let options :: ShakeOptions - options = shakeOptions - { shakeChange = ChangeModtimeAndDigest - , shakeFiles = buildRoot -/- Base.shakeFilesDir - , shakeProgress = Progress.hadrianProgress cwd - , shakeRebuild = rebuild - , shakeTimings = False - , shakeColor = shakeColor - , shakeExtra = extra - - -- Setting shakeSymlink to False ensures files are copied out of - -- shake's cloud cache instead of hard linked. This is important as - -- the hard link mode makes all such files read only to avoid - -- accidentally modifying cache files via the hard link. It turns - -- out, many Hadrian rules attempt read access to such files and - -- hence would in the hard link mode. These rules could be - -- refactored to avoid write access, but setting shakeSymlink to - -- False is a much simpler solution. - , shakeSymlink = False - - -- Enable linting file accesses in the build dir and ghc root dir - -- (cwd) when using the `--lint-fsatrace` option. - , shakeLintInside = [ cwd, buildRoot ] - , shakeLintIgnore = - -- Ignore access to the package database caches. - -- They are managed externally by the ghc-pkg tool. - [ buildRoot -/- "**/package.conf.d/package.cache" - - -- Ignore access to autom4te.cache directories. - -- They are managed externally by auto tools. - , "//autom4te.cache/**" - - -- Ignore in-tree GMP objects - , buildRoot -/- "**/gmp/objs/**" - ] - , shakeOutput = \v -> case v of - -- We don't want to print internal shake diagnostic messages as - -- they are too verbose to be of any use. See #20484. - Diagnostic -> const (pure ()) - _ -> shakeOutput shakeOptions v - } - - rules :: Rules () - rules = do - Rules.buildRules - Rules.Docspec.docspecRules - Rules.Documentation.documentationRules - Rules.Clean.cleanRules - Rules.Codes.codesRules - Rules.Lint.lintRules - Rules.Nofib.nofibRules - Rules.oracleRules -#if HADRIAN_ENABLE_SELFTEST - Rules.Selftest.selftestRules -#endif - Rules.SourceDist.sourceDistRules - Rules.Test.testRules - Rules.topLevelTargets - Rules.toolArgsTarget - - -- This IORef is used to communicate the result of shake parsing - -- command line options (which happens in shakeArgsOptionsWith, but - -- isn't exposed to the user) to the exception handler, which uses the - -- verbosity and colour information to decide how much of the error to display. - shake_opts_var <- newIORef options - handleShakeException shake_opts_var $ shakeArgsOptionsWith options CommandLine.optDescrs $ \shake_opts _ targets -> do - writeIORef shake_opts_var shake_opts - let targets' = filter (not . null) $ removeKVs targets - Environment.setupEnvironment - return . Just $ (shake_opts, if null targets' - then rules - else want targets' >> withoutActions rules) - -handleShakeException :: IORef ShakeOptions -> IO a -> IO a -handleShakeException shake_opts_var shake_run = do - args <- getArgs - -- Using withArgs here is a bit of a hack but the API doesn't allow another way - -- See https://github.com/ndmitchell/shake/issues/811 - -- Passing --exception means shake throws an exception rather than - -- catching ShakeException and displaying the error itself to the user. - catch (withArgs ("--exception" : args) $ shake_run) $ \(_e :: ShakeException) -> do - shake_opts <- readIORef shake_opts_var - let - FailureColour col = lookupExtra red (shakeExtra shake_opts) - esc = if shakeColor shake_opts then escape col else id - if shakeVerbosity shake_opts >= Verbose - then - hPrint stderr _e - else - -- The SomeException here is normally an IOError which lacks - -- very much structure, in the future we could try to catch - -- a more structured exception and further refine the - -- displayed output. https://github.com/ndmitchell/shake/pull/812 - hPrint stderr (shakeExceptionInner _e) - hPutStrLn stderr (esc "Build failed.") - exitFailure - -escForeground :: String -> String -escForeground code = "\ESC[" ++ code ++ "m" - -escNormal :: String -escNormal = "\ESC[0m" - -escape :: String -> String -> String -escape code x = escForeground code ++ x ++ escNormal diff --git a/hadrian/src/Oracles/Flag.hs b/hadrian/src/Oracles/Flag.hs deleted file mode 100644 index e1328150c104..000000000000 --- a/hadrian/src/Oracles/Flag.hs +++ /dev/null @@ -1,149 +0,0 @@ -{-# LANGUAGE MultiWayIf #-} - -module Oracles.Flag ( - Flag (..), flag, getFlag, - platformSupportsSharedLibs, - platformSupportsGhciObjects, - targetRTSLinkerOnlySupportsSharedLibs, - targetSupportsThreadedRts, - targetSupportsSMP, - useLibffiForAdjustors, - arSupportsDashL, - arSupportsAtFile - ) where - -import Hadrian.Oracles.TextFile -import Hadrian.Expression - -import Base -import Oracles.Setting - -import GHC.Toolchain.Target (Target(..)) -import qualified GHC.Toolchain as Toolchain -import GHC.Platform.ArchOS - -data Flag = CrossCompiling - | CcLlvmBackend - | GmpInTree - | GmpFrameworkPref - | UseSystemFfi - | BootstrapThreadedRts - | BootstrapEventLoggingRts - | UseLibdw - | UseLibnuma - | UseLibzstd - | StaticLibzstd - | UseLibm - | UseLibrt - | UseLibdl - | UseLibbfd - | UseLibpthread - | NeedLibatomic - | UseGhcToolchain - --- Note, if a flag is set to empty string we treat it as set to NO. This seems --- fragile, but some flags do behave like this. -flag :: Flag -> Action Bool -flag f = do - let key = case f of - CrossCompiling -> "cross-compiling" - CcLlvmBackend -> "cc-llvm-backend" - GmpInTree -> "intree-gmp" - GmpFrameworkPref -> "gmp-framework-preferred" - UseSystemFfi -> "use-system-ffi" - BootstrapThreadedRts -> "bootstrap-threaded-rts" - BootstrapEventLoggingRts -> "bootstrap-event-logging-rts" - UseLibdw -> "use-lib-dw" - UseLibnuma -> "use-lib-numa" - UseLibzstd -> "use-lib-zstd" - StaticLibzstd -> "static-lib-zstd" - UseLibm -> "use-lib-m" - UseLibrt -> "use-lib-rt" - UseLibdl -> "use-lib-dl" - UseLibbfd -> "use-lib-bfd" - UseLibpthread -> "use-lib-pthread" - NeedLibatomic -> "need-libatomic" - UseGhcToolchain -> "use-ghc-toolchain" - value <- lookupSystemConfig key - when (value `notElem` ["YES", "NO", ""]) . error $ "Configuration flag " - ++ quote (key ++ " = " ++ value) ++ " cannot be parsed." - return $ value == "YES" - --- | Get a configuration setting. -getFlag :: Flag -> Expr c b Bool -getFlag = expr . flag - --- | Does the platform support object merging (and therefore we can build GHCi objects --- when appropriate). -platformSupportsGhciObjects :: Action Bool --- FIXME: The name of the function is not entirely clear about which platform, it would be better named targetSupportsGhciObjects -platformSupportsGhciObjects = do - has_merge_objs <- isJust <$> queryTargetTarget tgtMergeObjs - only_shared_libs <- targetRTSLinkerOnlySupportsSharedLibs - pure $ has_merge_objs && not only_shared_libs - --- | Does the target RTS linker only support loading shared libraries? --- If true, this has several implications: --- 1. The GHC driver must not do loadArchive/loadObj etc and must --- always do loadDLL, regardless of whether host GHC is dynamic or --- not. --- 2. The GHC driver will always enable -dynamic-too when compiling --- vanilla way with TH codegen requirement. --- 3. ghci will always enforce dynamic ways even if -dynamic or --- -dynamic-too is not explicitly passed. --- 4. Cabal must not build ghci objects since it's not supported by --- the target. --- 5. The testsuite driver will use dyn way for TH/ghci tests even --- when host GHC is static. --- 6. TH/ghci doesn't work if stage1 is built without shared libraries --- (e.g. quickest/fully_static). -targetRTSLinkerOnlySupportsSharedLibs :: Action Bool -targetRTSLinkerOnlySupportsSharedLibs = anyTargetArch [ ArchWasm32 ] - -arSupportsDashL :: Stage -> Action Bool -arSupportsDashL stage = Toolchain.arSupportsDashL . tgtAr <$> targetStage stage - -arSupportsAtFile :: Stage -> Action Bool -arSupportsAtFile stage = Toolchain.arSupportsAtFile . tgtAr <$> targetStage stage - -platformSupportsSharedLibs :: Action Bool --- FIXME: This is querying about the target but is named "platformXXX", targetSupportsSharedLibs would be better -platformSupportsSharedLibs = do - windows <- isWinTarget - ppc_linux <- (&&) <$> anyTargetArch [ ArchPPC ] <*> anyTargetOs [ OSLinux ] - solaris <- (&&) <$> anyTargetArch [ ArchX86 ] <*> anyTargetOs [ OSSolaris2 ] - javascript <- anyTargetArch [ ArchJavaScript ] - return $ not (windows || javascript || ppc_linux || solaris) - --- | Does the target support threaded RTS? -targetSupportsThreadedRts :: Action Bool -targetSupportsThreadedRts = do - bad_arch <- anyTargetArch [ ArchWasm32, ArchJavaScript ] - return $ not bad_arch - --- | Does the target support the -N RTS flag? -targetSupportsSMP :: Action Bool -targetSupportsSMP = do - unreg <- queryTargetTarget tgtUnregisterised - armVer <- targetArmVersion - goodArch <- (||) <$> - anyTargetArch [ ArchX86 - , ArchX86_64 - , ArchPPC - , ArchPPC_64 ELF_V1 - , ArchPPC_64 ELF_V2 - , ArchAArch64 - , ArchS390X - , ArchRISCV64 - , ArchLoongArch64 ] <*> isArmTarget - if -- The THREADED_RTS requires `BaseReg` to be in a register and the - -- Unregisterised mode doesn't allow that. - | unreg -> return False - -- We don't support load/store barriers pre-ARMv7. See #10433. - | Just ver <- armVer - , ver < ARMv7 -> return False - | goodArch -> return True - | otherwise -> return False - -useLibffiForAdjustors :: Action Bool -useLibffiForAdjustors = queryTargetTarget tgtUseLibffiForAdjustors diff --git a/hadrian/src/Oracles/Flavour.hs b/hadrian/src/Oracles/Flavour.hs deleted file mode 100644 index cf9ec7e3c25c..000000000000 --- a/hadrian/src/Oracles/Flavour.hs +++ /dev/null @@ -1,34 +0,0 @@ -{-# LANGUAGE ConstraintKinds #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE TypeFamilies #-} - -module Oracles.Flavour - ( oracles - , askDynGhcPrograms - , askGhcProfiled - ) where - -import Base -import Flavour -import Settings (flavour) - -newtype DynGhcPrograms = - DynGhcPrograms () deriving (Show, Typeable, Eq, Hashable, Binary, NFData) -type instance RuleResult DynGhcPrograms = Bool - -newtype GhcProfiled = - GhcProfiled Stage deriving (Show, Typeable, Eq, Hashable, Binary, NFData) -type instance RuleResult GhcProfiled = Bool - -oracles :: Rules () -oracles = do - void $ addOracle $ \(DynGhcPrograms _) -> dynamicGhcPrograms =<< flavour - void $ addOracle $ \(GhcProfiled stage) -> - ghcProfiled <$> flavour <*> pure (succStage stage) - -askDynGhcPrograms :: Action Bool -askDynGhcPrograms = askOracle $ DynGhcPrograms () - -askGhcProfiled :: Stage -> Action Bool -askGhcProfiled s = askOracle $ GhcProfiled s diff --git a/hadrian/src/Oracles/ModuleFiles.hs b/hadrian/src/Oracles/ModuleFiles.hs deleted file mode 100644 index 6c5d49aa4f0d..000000000000 --- a/hadrian/src/Oracles/ModuleFiles.hs +++ /dev/null @@ -1,191 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -module Oracles.ModuleFiles ( - decodeModule, encodeModule, findGenerator, hsSources, hsObjects, - determineBuilder, - moduleFilesOracle, moduleSource - ) where - -import qualified Data.HashMap.Strict as Map -import Hadrian.Haskell.Cabal.Type as PD - -import Base -import Builder -import Context -import Expression - -type ModuleName = String - -newtype ModuleFiles = ModuleFiles (Stage, Package) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult ModuleFiles = [Maybe FilePath] - -newtype Generator = Generator (Stage, Package, FilePath) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) -type instance RuleResult Generator = Maybe FilePath - --- | We scan for the following Haskell source extensions when looking for module --- files. Note, we do not list "*.(l)hs-boot" files here, as they can never --- appear by themselves and always have accompanying "*.(l)hs" master files. -haskellExtensions :: [String] -haskellExtensions = [".hs", ".lhs"] - --- | Non-Haskell source extensions and corresponding builders. -otherExtensions :: Stage -> [(String, Builder)] -otherExtensions stage = [ (".x" , Alex ) - , (".y" , Happy ) - , (".ly" , Happy ) - , (".hsc", Hsc2Hs stage) ] - --- | We match the following file patterns when looking for module files. -moduleFilePatterns :: Stage -> [FilePattern] -moduleFilePatterns stage = map ("*" ++) $ haskellExtensions ++ map fst (otherExtensions stage) - --- | Given a FilePath determine the corresponding builder. -determineBuilder :: Stage -> FilePath -> Maybe Builder -determineBuilder stage file = lookup (takeExtension file) (otherExtensions stage) - --- | Given a non-empty module name extract the directory and file name, e.g.: --- --- > decodeModule "Data.Functor.Identity" == ("Data/Functor", "Identity") --- > decodeModule "Prelude" == ("", "Prelude") -decodeModule :: ModuleName -> (FilePath, String) -decodeModule moduleName = (intercalate "/" (init xs), last xs) - where - xs = words $ replaceEq '.' ' ' moduleName - --- | Given the directory and file name find the corresponding module name, e.g.: --- --- > encodeModule "Data/Functor" "Identity.hs" == "Data.Functor.Identity" --- > encodeModule "" "Prelude" == "Prelude" --- > uncurry encodeModule (decodeModule name) == name -encodeModule :: FilePath -> String -> ModuleName -encodeModule dir file - | dir == "" = takeBaseName file - | otherwise = replaceEq '/' '.' dir ++ '.' : takeBaseName file - --- | Find the generator for a given 'Context' and a source file. For example: --- findGenerator (Context Stage1 compiler vanilla) --- "_build/stage1/compiler/build/Lexer.hs" --- == Just ("compiler/parser/Lexer.x", Alex) --- findGenerator (Context Stage1 base vanilla) --- "_build/stage1/base/build/Prelude.hs" --- == Nothing -findGenerator :: Context -> FilePath -> Action (Maybe (FilePath, Builder)) -findGenerator Context {..} file = do - maybeSource <- askOracle $ Generator (stage, package, file) - return $ do - source <- maybeSource - builder <- determineBuilder stage source - return (source, builder) - --- | Find all Haskell source files for a given 'Context'. -hsSources :: Context -> Action [FilePath] -hsSources context = do - let modFile (m, Nothing) - | "Paths_" `isPrefixOf` m = autogenFile context m - | otherwise = generatedFile context m - modFile (m, Just file ) - | takeExtension file `elem` haskellExtensions = return file - | otherwise = generatedFile context m - mapM modFile =<< contextFiles context - --- | Find all Haskell object files for a given 'Context'. Note: this is a much --- simpler function compared to 'hsSources', because all object files live in --- the build directory regardless of whether they are generated or not. -hsObjects :: Context -> Action [FilePath] -hsObjects context = do - modules <- interpretInContext context (getContextData PD.modules) - mapM (objectPath context . moduleSource) modules - --- | Generated module files live in the 'Context' specific build directory. -generatedFile :: Context -> ModuleName -> Action FilePath -generatedFile context moduleName = buildPath context <&> (-/- moduleSource moduleName) - --- | Generated module files live in the 'Context' specific build directory. -autogenFile :: Context -> ModuleName -> Action FilePath -autogenFile context modName = autogenPath context <&> (-/- moduleSource modName) - --- | Turn a module name (e.g. @Data.Functor@) to a path (e.g. @Data/Functor.hs@). -moduleSource :: ModuleName -> FilePath -moduleSource moduleName = replaceEq '.' '/' moduleName <.> "hs" - --- | Module files for a given 'Context'. -contextFiles :: Context -> Action [(ModuleName, Maybe FilePath)] -contextFiles context@Context {..} = do - modules <- fmap sort . interpretInContext context $ - getContextData PD.modules - zip modules <$> askOracle (ModuleFiles (stage, package)) - --- | This is an important oracle whose role is to find and cache module source --- files. It takes a 'Stage' and a 'Package', looks up corresponding source --- directories @dirs@ and a sorted list of module names @modules@, and for each --- module, e.g. @A.B.C@, returns a 'FilePath' of the form @dir/A/B/C.extension@, --- such that @dir@ belongs to @dirs@, and file @dir/A/B/C.extension@ exists, or --- 'Nothing' if there is no such file. If more than one matching file is found --- an error is raised. For example, for 'Stage1' and 'compiler', @dirs@ will --- contain ["compiler/codeGen", "compiler/parser"], and @modules@ will contain --- ["CodeGen.Platform.ARM", "Config", "Lexer"]; the oracle will produce a list --- containing [Just "compiler/codeGen/CodeGen/Platform/ARM.hs", Nothing, --- Just "compiler/parser/Lexer.x"]. The oracle ignores @.(l)hs-boot@ files. -moduleFilesOracle :: Rules () -moduleFilesOracle = void $ do - void . addOracleCache $ \(ModuleFiles (stage, package)) -> do - let context = vanillaContext stage package - ensureConfigured context - srcDirs <- interpretInContext context (getContextData PD.srcDirs) - mainIs <- interpretInContext context (getContextData PD.mainIs) - let removeMain = case mainIs of - Just (mod, _) -> delete mod - Nothing -> id - modules <- fmap sort $ interpretInContext context (getContextData PD.modules) - autogen <- autogenPath context - let dirs = autogen : map (pkgPath package -/-) srcDirs - -- Don't resolve the file path for module `Main` twice. - modDirFiles = groupSort $ map decodeModule $ removeMain modules - result <- concatForM dirs $ \dir -> do - todo <- filterM (doesDirectoryExist . (dir -/-) . fst) modDirFiles - forM todo $ \(mDir, mFiles) -> do - let fullDir = unifyPath $ dir -/- mDir - files <- getDirectoryFiles fullDir (moduleFilePatterns stage) - let cmp f = compare (dropExtension f) - found = intersectOrd cmp files mFiles - return (map (fullDir -/-) found, mDir) - - -- For a BuildInfo, it may be a library, which doesn't have the @Main@ - -- module, or an executable, which must have the @Main@ module and the - -- file path of @Main@ module is indicated by the @main-is@ field in its - -- Cabal file. - -- - -- For the Main module, the file name may not be @Main.hs@, unlike other - -- exposed modules. We could get the file path by the module name for - -- other exposed modules, but for @Main@ we must resolve the file path - -- via the @main-is@ field in the Cabal file. - mainpairs <- case mainIs of - Just (mod, filepath) -> - concatForM dirs $ \dir -> do - found <- doesFileExist (dir -/- filepath) - return [(mod, unifyPath $ dir -/- filepath) | found] - Nothing -> return [] - - let pairs = sort $ mainpairs ++ [ (encodeModule d f, f) | (fs, d) <- result, f <- fs ] - multi = [ (m, f1, f2) | (m, f1):(n, f2):_ <- tails pairs, m == n ] - - case multi of - [] -> return () - (m, f1, f2) : _ -> - fail $ "Module " ++ m ++ " has more than one source file: " - ++ f1 ++ " and " ++ f2 ++ "." - return $ lookupAll modules pairs - - -- Optimisation: we discard Haskell files here, because they are never used - -- as generators, and hence would be discarded in 'findGenerator' anyway. - generators <- newCache $ \(stage, package) -> do - let context = vanillaContext stage package - files <- contextFiles context - list <- sequence [ (,src) <$> generatedFile context modName - | (modName, Just src) <- files - , takeExtension src `notElem` haskellExtensions ] - return $ Map.fromList list - - addOracleCache $ \(Generator (stage, package, file)) -> - Map.lookup file <$> generators (stage, package) diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs deleted file mode 100644 index bfa4c3c9cde4..000000000000 --- a/hadrian/src/Oracles/Setting.hs +++ /dev/null @@ -1,224 +0,0 @@ -module Oracles.Setting ( - configFile, - -- * Settings - Setting (..), setting, getSetting, - - -- * Helpers - ghcCanonVersion, cmdLineLengthLimit, targetSupportsRPaths, topDirectory, - libsuf, ghcVersionStage, bashPath, targetStage, - - -- ** Target platform things - anyTargetOs, anyTargetArch, anyHostOs, - isElfTarget, isOsxTarget, isWinTarget, isJsTarget, isArmTarget, - isWinHost, - targetArmVersion - ) where - -import System.Directory -import System.Info.Extra -import Hadrian.Expression -import Hadrian.Oracles.TextFile -import Hadrian.Oracles.Path -import Control.Monad.Trans (lift) -import Control.Monad.Trans.Maybe (runMaybeT) - -import Base - -import GHC.Toolchain -import GHC.Platform.ArchOS - --- | Each 'Setting' comes from the file @hadrian/cfg/system.config@, generated --- by the @configure@ script from the input file @hadrian/cfg/system.config.in@. --- For example, the line --- --- > target-os = mingw32 --- --- sets the value of the setting 'TargetOs'. The action 'setting' 'TargetOs' --- looks up the value of the setting and returns the string @"mingw32"@, --- tracking the result in the Shake database. --- --- * ROMES:TODO: How to handle target-platform-full? -data Setting = CursesIncludeDir - | CursesLibDir - | DynamicExtension - | FfiIncludeDir - | FfiLibDir - | GhcMajorVersion - | GhcMinorVersion - | GhcPatchLevel - | GhcVersion - | GhcSourcePath - | LlvmMinVersion - | LlvmMaxVersion - | GmpIncludeDir - | GmpLibDir - | IconvIncludeDir - | IconvLibDir - | LibdwIncludeDir - | LibdwLibDir - | LibnumaIncludeDir - | LibnumaLibDir - | LibZstdIncludeDir - | LibZstdLibDir - | ProjectGitCommitId - | ProjectName - | ProjectVersion - | ProjectVersionInt - | ProjectVersionMunged - | ProjectVersionForLib - | ProjectPatchLevel - | ProjectPatchLevel1 - | ProjectPatchLevel2 - | SystemGhc - | TargetPlatformFull - | BourneShell - | EmsdkVersion - --- | Look up the value of a 'Setting' in @cfg/system.config@, tracking the --- result. -setting :: Setting -> Action String -setting key = lookupSystemConfig $ case key of - CursesIncludeDir -> "curses-include-dir" - CursesLibDir -> "curses-lib-dir" - DynamicExtension -> "dynamic-extension" - FfiIncludeDir -> "ffi-include-dir" - FfiLibDir -> "ffi-lib-dir" - GhcMajorVersion -> "ghc-major-version" - GhcMinorVersion -> "ghc-minor-version" - GhcPatchLevel -> "ghc-patch-level" - GhcVersion -> "ghc-version" - GhcSourcePath -> "ghc-source-path" - LlvmMinVersion -> "llvm-min-version" - LlvmMaxVersion -> "llvm-max-version" - GmpIncludeDir -> "gmp-include-dir" - GmpLibDir -> "gmp-lib-dir" - IconvIncludeDir -> "iconv-include-dir" - IconvLibDir -> "iconv-lib-dir" - LibdwIncludeDir -> "libdw-include-dir" - LibdwLibDir -> "libdw-lib-dir" - LibnumaIncludeDir -> "libnuma-include-dir" - LibnumaLibDir -> "libnuma-lib-dir" - LibZstdIncludeDir -> "libzstd-include-dir" - LibZstdLibDir -> "libzstd-lib-dir" - ProjectGitCommitId -> "project-git-commit-id" - ProjectName -> "project-name" - ProjectVersion -> "project-version" - ProjectVersionMunged -> "project-version-munged" - ProjectVersionForLib -> "project-version-for-lib" - ProjectVersionInt -> "project-version-int" - ProjectPatchLevel -> "project-patch-level" - ProjectPatchLevel1 -> "project-patch-level1" - ProjectPatchLevel2 -> "project-patch-level2" - SystemGhc -> "system-ghc" - TargetPlatformFull -> "target-platform-full" - BourneShell -> "bourne-shell" - EmsdkVersion -> "emsdk-version" - --- | An expression that looks up the value of a 'Setting' in @cfg/system.config@, --- tracking the result. -getSetting :: Setting -> Expr c b String -getSetting = expr . setting - --- | The path to a Bourne shell interpreter. -bashPath :: Action FilePath -bashPath = setting BourneShell - -isWinHost :: Action Bool -isWinHost = anyHostOs [OSMinGW32] - -isWinTarget :: Action Bool -isWinTarget = anyTargetOs [OSMinGW32] - -isJsTarget :: Action Bool -isJsTarget = anyTargetArch [ArchJavaScript] - -isOsxTarget :: Action Bool -isOsxTarget = anyTargetOs [OSDarwin] - -isArmTarget :: Action Bool -isArmTarget = queryTargetTarget (isARM . archOS_arch . tgtArchOs) - --- | Check whether the host OS setting matches one of the given strings. -anyHostOs :: [OS] -> Action Bool -anyHostOs oss = (`elem` oss) <$> queryHostTarget (archOS_OS . tgtArchOs) - --- | Check whether the target architecture setting matches one of the given --- strings. -anyTargetArch :: [Arch] -> Action Bool -anyTargetArch archs = (`elem` archs) <$> queryTargetTarget (archOS_arch . tgtArchOs) - --- | Check whether the target OS setting matches one of the given strings. -anyTargetOs :: [OS] -> Action Bool -anyTargetOs oss = (`elem` oss) <$> queryTargetTarget (archOS_OS . tgtArchOs) - --- | Check whether the target OS uses the ELF object format. -isElfTarget :: Action Bool -isElfTarget = queryTargetTarget (osElfTarget . archOS_OS . tgtArchOs) - --- | Check whether the target OS supports the @-rpath@ linker option when --- using dynamic linking. --- --- ROMES:TODO: Whether supports -rpath should be determined by ghc-toolchain --- --- TODO: Windows supports lazy binding (but GHC doesn't currently support --- dynamic way on Windows anyways). -targetSupportsRPaths :: Action Bool -targetSupportsRPaths = queryTargetTarget (\t -> let os = archOS_OS (tgtArchOs t) - in osElfTarget os || osMachOTarget os) - --- | Which variant of the ARM architecture is the target (or 'Nothing' if not --- ARM)? -targetArmVersion :: Action (Maybe ArmISA) -targetArmVersion = runMaybeT $ do - ArchARM isa _ _ <- lift $ queryTargetTarget (archOS_arch . tgtArchOs) - return isa - --- | Canonicalised GHC version number, used for integer version comparisons. We --- expand 'GhcMinorVersion' to two digits by adding a leading zero if necessary. -ghcCanonVersion :: Action String -ghcCanonVersion = do - ghcMajorVersion <- setting GhcMajorVersion - ghcMinorVersion <- setting GhcMinorVersion - let leadingZero = [ '0' | length ghcMinorVersion == 1 ] - return $ ghcMajorVersion ++ leadingZero ++ ghcMinorVersion - --- | Absolute path to the GHC source tree. -topDirectory :: Action FilePath -topDirectory = do - x <- fixAbsolutePathOnWindows =<< setting GhcSourcePath - canonicalize x - where - -- We must canonicalize as the source directory may be accessed via a symlink. See #22451. - canonicalize = if isWindows then return else liftIO . canonicalizePath - -ghcVersionStage :: Stage -> Action String -ghcVersionStage (Stage0 {}) = setting GhcVersion -ghcVersionStage _ = setting ProjectVersion - --- | The file suffix used for libraries of a given build 'Way'. For example, --- @_p.a@ corresponds to a static profiled library, and @-ghc7.11.20141222.so@ --- is a dynamic vanilla library. Why do we need GHC version number in the --- dynamic suffix? Here is a possible reason: dynamic libraries are placed in a --- single giant directory in the load path of the dynamic linker, and hence we --- must distinguish different versions of GHC. In contrast, static libraries --- live in their own per-package directory and hence do not need a unique --- filename. We also need to respect the system's dynamic extension, e.g. @.dll@ --- or @.so@. -libsuf :: Stage -> Way -> Action String -libsuf st way - | not (wayUnit Dynamic way) = return (waySuffix way ++ ".a") -- e.g., _p.a - | otherwise = do - extension <- setting DynamicExtension -- e.g., .dll or .so - version <- ghcVersionStage st -- e.g. 8.4.4 or 8.9.xxxx - let suffix = waySuffix (removeWayUnit Dynamic way) - return (suffix ++ "-ghc" ++ version ++ extension) - -targetStage :: Stage -> Action Target --- TODO(#19174): --- We currently only support cross-compiling a stage1 compiler, --- but the cross compiler should really be stage2 (#19174). --- When we get there, we'll need to change the definition here. -targetStage (Stage0 {}) = getHostTarget -targetStage (Stage1 {}) = getTargetTarget -targetStage (Stage2 {}) = getTargetTarget -- the last two only make sense if the target can be executed locally -targetStage (Stage3 {}) = getTargetTarget diff --git a/hadrian/src/Oracles/TestSettings.hs b/hadrian/src/Oracles/TestSettings.hs deleted file mode 100644 index 4c9bcb36cd00..000000000000 --- a/hadrian/src/Oracles/TestSettings.hs +++ /dev/null @@ -1,125 +0,0 @@ --- | We create a file /test/ghcconfig containing configuration of test --- | compiler. We need to search this file for required keys and setting --- | required for testsuite e.g. WORDSIZE, HOSTOS etc. - -module Oracles.TestSettings - ( TestSetting (..), testSetting, testRTSSettings - , getCompilerPath, getBinaryDirectory, isInTreeCompiler - , stageOfTestCompiler - ) where - -import Base -import Hadrian.Oracles.TextFile -import Oracles.Setting (topDirectory, setting, Setting(..)) -import Packages -import Settings.Program (programContext) - -testConfigFile :: Action FilePath -testConfigFile = buildRoot <&> (-/- "test/ghcconfig") - --- | Test settings that are obtained from ghcconfig file. -data TestSetting = TestHostOS - | TestWORDSIZE - | TestTARGETPLATFORM - | TestTargetOS_CPP - | TestTargetARCH_CPP - | TestRTSWay - | TestGhcStage - | TestGhcDebugAssertions - | TestGhcWithNativeCodeGen - | TestGhcWithInterpreter - | TestGhcCrossCompiling - | TestRTSLinkerForceDyn - | TestGhcWithRtsLinker - | TestGhcUnregisterised - | TestGhcTablesNextToCode - | TestGhcWithSMP - | TestGhcDynamic - | TestGhcProfiled - | TestAR - | TestLLC - | TestTEST_CC - | TestTEST_CC_OPTS - | TestLeadingUnderscore - | TestGhcPackageDb - | TestGhcLibDir - deriving (Show) - --- | Lookup a test setting in @ghcconfig@ file. --- | To obtain RTS ways supported in @ghcconfig@ file, use 'testRTSSettings'. -testSetting :: TestSetting -> Action String -testSetting key = do - file <- testConfigFile - lookupValueOrError Nothing file $ case key of - TestHostOS -> "HostOS" - TestWORDSIZE -> "WORDSIZE" - TestTARGETPLATFORM -> "TARGETPLATFORM" - TestTargetOS_CPP -> "TargetOS_CPP" - TestTargetARCH_CPP -> "TargetARCH_CPP" - TestRTSWay -> "RTSWay" - TestGhcStage -> "GhcStage" - TestGhcDebugAssertions -> "GhcDebugAssertions" - TestGhcWithNativeCodeGen -> "GhcWithNativeCodeGen" - TestGhcWithInterpreter -> "GhcWithInterpreter" - TestGhcCrossCompiling -> "CrossCompiling" - TestRTSLinkerForceDyn -> "TargetRTSLinkerOnlySupportsSharedLibs" - TestGhcWithRtsLinker -> "GhcWithRtsLinker" - TestGhcUnregisterised -> "GhcUnregisterised" - TestGhcTablesNextToCode -> "GhcTablesNextToCode" - TestGhcWithSMP -> "GhcWithSMP" - TestGhcDynamic -> "GhcDynamic" - TestGhcProfiled -> "GhcProfiled" - TestAR -> "AR" - TestLLC -> "LLC" - TestTEST_CC -> "TEST_CC" - TestTEST_CC_OPTS -> "TEST_CC_OPTS" - TestLeadingUnderscore -> "LeadingUnderscore" - TestGhcPackageDb -> "GhcGlobalPackageDb" - TestGhcLibDir -> "GhcLibdir" - --- | Get the RTS ways of the test compiler -testRTSSettings :: Action [String] -testRTSSettings = do - file <- testConfigFile - words <$> lookupValueOrError Nothing file "GhcRTSWays" - --- | Directory to look for binaries. --- We assume that required programs are present in the same binary directory --- in which ghc is stored and that they have their conventional name. -getBinaryDirectory :: String -> Action FilePath -getBinaryDirectory "stage0" = takeDirectory <$> setting SystemGhc -getBinaryDirectory "stage1" = liftM2 (-/-) topDirectory (stageBinPath stage0InTree) -getBinaryDirectory "stage2" = liftM2 (-/-) topDirectory (stageBinPath Stage1) -getBinaryDirectory "stage3" = liftM2 (-/-) topDirectory (stageBinPath Stage2) -getBinaryDirectory "stage-cabal" = do - top <- topDirectory - root <- buildRoot - pure (top -/- root -/- "stage-cabal" -/- "bin") -getBinaryDirectory compiler = pure $ takeDirectory compiler - --- | Get the path to the given @--test-compiler@. -getCompilerPath :: String -> Action FilePath -getCompilerPath "stage0" = setting SystemGhc -getCompilerPath "stage1" = liftM2 (-/-) topDirectory (fullPath stage0InTree ghc) -getCompilerPath "stage2" = liftM2 (-/-) topDirectory (fullPath Stage1 ghc) -getCompilerPath "stage3" = liftM2 (-/-) topDirectory (fullPath Stage2 ghc) -getCompilerPath "stage-cabal" = do - top <- topDirectory - root <- buildRoot - pure (top -/- root -/- "stage-cabal" -/- "bin" -/- "ghc") -getCompilerPath compiler = pure compiler - -isInTreeCompiler :: String -> Bool -isInTreeCompiler c = isJust (stageOfTestCompiler c) - --- | Get the full path to the given program. -fullPath :: Stage -> Package -> Action FilePath -fullPath stage pkg = programPath =<< programContext stage pkg - --- stage 1 ghc lives under stage0/bin, --- stage 2 ghc lives under stage1/bin, etc -stageOfTestCompiler :: String -> Maybe Stage -stageOfTestCompiler "stage1" = Just stage0InTree -stageOfTestCompiler "stage2" = Just Stage1 -stageOfTestCompiler "stage3" = Just Stage2 -stageOfTestCompiler _ = Nothing diff --git a/hadrian/src/Packages.hs b/hadrian/src/Packages.hs deleted file mode 100644 index da8b2ae4ff51..000000000000 --- a/hadrian/src/Packages.hs +++ /dev/null @@ -1,249 +0,0 @@ -{-# OPTIONS_GHC -fno-warn-missing-signatures #-} -module Packages ( - -- * GHC packages - array, base, binary, bytestring, cabal, cabalSyntax, checkPpr, - checkExact, countDeps, - compareSizes, compiler, containers, deepseq, deriveConstants, directory, dumpDecls, - exceptions, filepath, fileio, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh, ghcBootThNext, ghcPlatform, - ghcCompact, ghcConfig, ghcExperimental, ghcHeap, ghcInternal, ghci, ghciWrapper, ghcPkg, ghcPrim, - ghcToolchain, ghcToolchainBin, haddockApi, haddockLibrary, haddock, haskeline, - hsc2hs, hp2ps, hpc, hpcBin, integerGmp, iserv, iservProxy, - libffi, mtl, osString, parsec, pretty, primitive, process, remoteIserv, rts, - runGhc, semaphoreCompat, stm, templateHaskell, terminfo, text, time, timeout, - transformers, unlit, unix, win32, xhtml, - lintersCommon, lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace, - ghcPackages, isGhcPackage, - - -- * Package information - crossPrefix, programName, nonHsMainPackage, programPath, timeoutPath, - ) where - -import Hadrian.Package -import Hadrian.Utilities - -import Base -import Context.Type -import Oracles.Flag -import Oracles.Setting - --- | These are all GHC packages we know about. Build rules will be generated for --- all of them. However, not all of these packages will be built. For example, --- package 'win32' is built only on Windows. @GHC.defaultPackages@ defines --- default conditions for building each package. Users can add their own --- packages and modify build default build conditions in "UserSettings". -ghcPackages :: [Package] -ghcPackages = - [ array, base, binary, bytestring, cabalSyntax, cabal, checkPpr, checkExact, countDeps - , compareSizes, compiler, containers, deepseq, deriveConstants, directory, dumpDecls - , exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh, ghcBootThNext, ghcPlatform - , ghcCompact, ghcConfig, ghcExperimental, ghcHeap, ghcInternal, ghci, ghciWrapper, ghcPkg, ghcPrim - , ghcToolchain, ghcToolchainBin, haddockApi, haddockLibrary, haddock, haskeline, hsc2hs - , hp2ps, hpc, hpcBin, integerGmp, iserv, libffi, mtl, osString - , parsec, pretty, process, rts, runGhc, stm, semaphoreCompat, templateHaskell - , terminfo, text, time, transformers, unlit, unix, win32, xhtml, fileio - , timeout - , lintersCommon - , lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace ] - --- TODO: Optimise by switching to sets of packages. -isGhcPackage :: Package -> Bool -isGhcPackage = (`elem` ghcPackages) - --- | Package definitions, see 'Package'. -array, base, binary, bytestring, cabalSyntax, cabal, checkPpr, checkExact, countDeps, - compareSizes, compiler, containers, deepseq, deriveConstants, directory, dumpDecls, - exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh, ghcBootThNext, ghcPlatform, - ghcCompact, ghcConfig, ghcExperimental, ghcHeap, ghci, ghcInternal, ghciWrapper, ghcPkg, ghcPrim, - ghcToolchain, ghcToolchainBin, haddockLibrary, haddockApi, haddock, haskeline, hsc2hs, - hp2ps, hpc, hpcBin, integerGmp, iserv, iservProxy, remoteIserv, libffi, mtl, - osString, parsec, pretty, primitive, process, rts, runGhc, semaphoreCompat, stm, templateHaskell, - terminfo, text, time, transformers, unlit, unix, win32, xhtml, - timeout, - lintersCommon, lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace - :: Package -array = lib "array" -base = lib "base" -binary = lib "binary" -bytestring = lib "bytestring" -cabalSyntax = lib "Cabal-syntax" `setPath` "libraries/Cabal/Cabal-syntax" -cabal = lib "Cabal" `setPath` "libraries/Cabal/Cabal" -checkPpr = util "check-ppr" -checkExact = util "check-exact" -countDeps = util "count-deps" -compareSizes = util "compareSizes" `setPath` "utils/compare_sizes" -compiler = top "ghc" `setPath` "compiler" -containers = lib "containers" `setPath` "libraries/containers/containers" -deepseq = lib "deepseq" -deriveConstants = util "deriveConstants" -directory = lib "directory" -dumpDecls = util "dump-decls" -exceptions = lib "exceptions" -filepath = lib "filepath" -fileio = lib "file-io" -genapply = util "genapply" -genprimopcode = util "genprimopcode" -ghc = prg "ghc-bin" `setPath` "ghc" -ghcBignum = lib "ghc-bignum" -ghcBoot = lib "ghc-boot" -ghcBootTh = lib "ghc-boot-th" -ghcBootThNext = lib "ghc-boot-th-next" -ghcPlatform = lib "ghc-platform" -ghcCompact = lib "ghc-compact" -ghcConfig = prg "ghc-config" `setPath` "testsuite/ghc-config" -ghcExperimental = lib "ghc-experimental" -ghcHeap = lib "ghc-heap" -ghcInternal = lib "ghc-internal" -ghci = lib "ghci" -ghciWrapper = prg "ghci-wrapper" `setPath` "driver/ghci" - -- See Note [Hadrian's ghci-wrapper package] -ghcPkg = util "ghc-pkg" -ghcPrim = lib "ghc-prim" -ghcToolchain = lib "ghc-toolchain" `setPath` "utils/ghc-toolchain" -ghcToolchainBin = prg "ghc-toolchain-bin" `setPath` "utils/ghc-toolchain/exe" -- workaround for #23690 -haddockLibrary = lib "haddock-library" `setPath` "utils/haddock/haddock-library" -haddockApi = lib "haddock-api" `setPath` "utils/haddock/haddock-api" -haddock = util "haddock" -haskeline = lib "haskeline" -hsc2hs = util "hsc2hs" -hp2ps = util "hp2ps" -hpc = lib "hpc" -hpcBin = util "hpc-bin" `setPath` "utils/hpc" -integerGmp = lib "integer-gmp" -iserv = util "iserv" -iservProxy = util "iserv-proxy" -libffi = top "libffi" -mtl = lib "mtl" -osString = lib "os-string" -parsec = lib "parsec" -pretty = lib "pretty" -primitive = lib "primitive" -process = lib "process" -remoteIserv = util "remote-iserv" -rts = top "rts" -runGhc = util "runghc" -semaphoreCompat = lib "semaphore-compat" -stm = lib "stm" -templateHaskell = lib "template-haskell" -terminfo = lib "terminfo" -text = lib "text" -time = lib "time" -timeout = util "timeout" `setPath` "testsuite/timeout" -transformers = lib "transformers" -unlit = util "unlit" -unix = lib "unix" -win32 = lib "Win32" -xhtml = lib "xhtml" - -lintersCommon = lib "linters-common" `setPath` "linters/linters-common" -lintNotes = linter "lint-notes" -lintCodes = linter "lint-codes" -lintCommitMsg = linter "lint-commit-msg" -lintSubmoduleRefs = linter "lint-submodule-refs" -lintWhitespace = linter "lint-whitespace" - --- | Construct a library package, e.g. @array@. -lib :: PackageName -> Package -lib name = library name ("libraries" -/- name) - --- | Construct a top-level library package, e.g. @compiler@. -top :: PackageName -> Package -top name = library name name - --- | Construct a top-level program package, e.g. @ghc@. -prg :: PackageName -> Package -prg name = program name name - --- | Construct a utility package, e.g. @haddock@. -util :: PackageName -> Package -util name = program name ("utils" -/- name) - --- | Construct a linter executable program (lives in the \"linters\" subdirectory). -linter :: PackageName -> Package -linter name = program name ("linters" -/- name) - --- | Amend a package path if it doesn't conform to a typical pattern. -setPath :: Package -> FilePath -> Package -setPath pkg path = pkg { pkgPath = path } - --- | Target prefix to prepend to executable names. -crossPrefix :: Action String -crossPrefix = do - cross <- flag CrossCompiling - targetPlatform <- setting TargetPlatformFull - return $ if cross then targetPlatform ++ "-" else "" - --- | Given a 'Context', compute the name of the program that is built in it --- assuming that the corresponding package's type is 'Program'. For example, GHC --- built in 'Stage0' is called @ghc-stage1@. If the given package is a --- 'Library', the function simply returns its name. -programName :: Context -> Action String -programName Context {..} = do - prefix <- crossPrefix - -- TODO: Can we extract this information from Cabal files? - -- Alp: We could, but then the iserv package would have to - -- use Cabal conditionals + a 'profiling' flag - -- to declare the executable name, and I'm not sure - -- this is allowed (or desired for that matter). - return $ prefix ++ basename - where - basename - | package == ghc = "ghc" - | package == ghciWrapper = "ghci" -- See Note [Hadrian's ghci-wrapper package] - | package == hpcBin = "hpc" - | package == iserv = "ghc-iserv" ++ concat [ - if wayUnit' `wayUnit` way - then suffix - else "" - | (wayUnit', suffix) <- [ - (Profiling, "-prof"), - (Dynamic, "-dyn") - ]] - | otherwise = pkgName package - --- | The 'FilePath' to a program executable in a given 'Context'. -programPath :: Context -> Action FilePath -programPath context@Context {..} = do - name <- programName context - path <- stageBinPath stage - return $ path -/- name <.> exe - --- TODO: Move @timeout@ to the @util@ directory and build in a more standard --- location like other programs used only by the testsuite. -timeoutPath :: FilePath -timeoutPath = "testsuite/timeout/install-inplace/bin/timeout" <.> exe - --- TODO: Can we extract this information from Cabal files? --- | Some program packages should not be linked with Haskell main function. -nonHsMainPackage :: Package -> Bool -nonHsMainPackage = (`elem` [hp2ps, iserv, unlit, ghciWrapper]) - - -{- -Note [Hadrian's ghci-wrapper package] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -On Linux platforms the `ghci` executable is a shell-script wrapper produced -by the binary distribution `install` rule. However, this approach is not -viable work on Windows platforms, where binary distributions are usable -directly after unzipping, without any need for the user to run `make install`. - -Moreover, Windows has rather special requirements regarding console setup and -teardown. Consequently on Windows ghci.exe is a purpose-built executable, the -C source of which is found in driver/ghci. Getting Hadrian to build this via -Cabal requires a few headstands: - - - Hadrian generally assumes that the name of the executable produced by a - 'Program' package is the same as the package name. However, this is not - the case here: we name the package `ghci-wrapper` to avoid conflicting - with the `ghci` library yet we want the final executable to be named - `ghci.exe`. We accomplish this by overriding 'Packages.programName'. - - - The executable requires a few C sources (which live in `driver/utils`) in - addition to the main ghci.c. Ideally these would be built independently as - a static library which could then be linked into the executable; - unfortunately Cabal doesn't support this. We instead add the sources to - the C-Sources list in the Cabal file. - - - Unfortunately, Cabal/Hadrian's handling of C-sources appears to fall on - its face when a relative path is used (e.g. `../cwrapper.c`). Consequently - we copy the files into `driver/ghci` in the configure script. --} diff --git a/hadrian/src/Progress.hs b/hadrian/src/Progress.hs deleted file mode 100644 index 4ad8bf2858a0..000000000000 --- a/hadrian/src/Progress.hs +++ /dev/null @@ -1,12 +0,0 @@ -module Progress (hadrianProgress) where - -import Development.Shake - --- | A simple method for displaying progress messages, suitable for using as 'Development.Shake.shakeProgress'. --- This is the shakeProgress function hadrian uses. It writes the current progress to the titlebar every five seconds --- using 'progressTitlebar', and calls any @shake-progress@ program on the @$PATH@ using 'progressProgram'. -hadrianProgress :: String -> IO Progress -> IO () -hadrianProgress cwd p = do - program <- progressProgram - progressDisplay 5 (\status -> let s = status<> "(" <> cwd <> ")" in progressTitlebar s >> program s) p - diff --git a/hadrian/src/Rules.hs b/hadrian/src/Rules.hs deleted file mode 100644 index 55de341f8e00..000000000000 --- a/hadrian/src/Rules.hs +++ /dev/null @@ -1,151 +0,0 @@ -module Rules (buildRules, oracleRules, packageTargets, topLevelTargets - , toolArgsTarget ) where - -import qualified Data.Set as Set - -import qualified Hadrian.Oracles.ArgsHash -import qualified Hadrian.Oracles.Cabal.Rules -import qualified Hadrian.Oracles.DirectoryContents -import qualified Hadrian.Oracles.Path -import qualified Hadrian.Oracles.TextFile -import qualified Hadrian.Haskell.Hash - -import Expression -import qualified Oracles.Flavour -import qualified Oracles.ModuleFiles -import Packages -import qualified Rules.BinaryDist -import qualified Rules.CabalReinstall -import qualified Rules.Compile -import qualified Rules.Dependencies -import qualified Rules.Documentation -import qualified Rules.Generate -import qualified Rules.Gmp -import qualified Rules.Libffi -import qualified Rules.Library -import qualified Rules.Program -import qualified Rules.Register -import qualified Rules.Rts -import qualified Rules.SimpleTargets -import Rules.ToolArgs -import Settings -import Settings.Program (programContext) -import Target -import UserSettings - --- | This rule calls 'need' on all top-level build targets that Hadrian builds --- by default, respecting the 'finalStage' flag. -topLevelTargets :: Rules () -topLevelTargets = action $ do - verbosity <- getVerbosity - forM_ [ Stage1, Stage2, Stage3] $ \stage -> do - when (verbosity >= Verbose) $ do - (libraries, programs) <- partition isLibrary <$> stagePackages stage - libNames <- mapM (name stage) libraries - pgmNames <- mapM (name stage) programs - let stageHeader t ps = - "| Building " ++ show stage ++ " " - ++ t ++ ": " ++ intercalate ", " ps - putInfo . unlines $ - [ stageHeader "libraries" libNames - , stageHeader "programs" pgmNames ] - let buildStages = [ s | s <- allStages, s < finalStage ] - targets <- concatForM buildStages $ \stage -> do - packages <- stagePackages stage - mapM (path stage) packages - - -- Why we need wrappers: https://gitlab.haskell.org/ghc/ghc/issues/16534. - root <- buildRoot - let wrappers = [ root -/- ("ghc-" ++ stageString s) | s <- [Stage1, Stage2, Stage3] - , s < finalStage ] - need (targets ++ wrappers) - where - -- either the package database config file for libraries or - -- the programPath for programs. However this still does - -- not support multiple targets, where a cabal package has - -- a library /and/ a program. - path :: Stage -> Package -> Action FilePath - path stage pkg | isLibrary pkg = pkgConfFile (vanillaContext stage pkg) - | otherwise = programPath =<< programContext stage pkg - name :: Stage -> Package -> Action String - name stage pkg | isLibrary pkg = return (pkgName pkg) - | otherwise = programName (vanillaContext stage pkg) - --- TODO: Get rid of the @includeGhciLib@ hack. --- | Return the list of targets associated with a given 'Stage' and 'Package'. --- By setting the Boolean parameter to False it is possible to exclude the GHCi --- library from the targets, and avoid configuring the package to determine --- whether GHCi library needs to be built for it. We typically want to set --- this parameter to True, however it is important to set it to False when --- computing 'topLevelTargets', as otherwise the whole build gets sequentialised --- because packages are configured in the order respecting their dependencies. -packageTargets :: Bool -> Stage -> Package -> Action [FilePath] -packageTargets includeGhciLib stage pkg = do - let context = vanillaContext stage pkg - activePackages <- stagePackages stage - if pkg `notElem` activePackages - then return [] -- Skip inactive packages. - else if isLibrary pkg - then do -- Collect all targets of a library package. - let pkgWays = if pkg == rts then getRtsWays else getLibraryWays - ways <- interpretInContext context pkgWays - libs <- mapM (\w -> pkgLibraryFile (Context stage pkg w (error "unused"))) (Set.toList ways) - more <- Rules.Library.libraryTargets includeGhciLib context - setupConfig <- pkgSetupConfigFile context - return $ [setupConfig] ++ libs ++ more - else do -- The only target of a program package is the executable. - prgContext <- programContext stage pkg - prgPath <- programPath prgContext - return [prgPath] - -packageRules :: Rules () -packageRules = do - -- We cannot register multiple GHC packages in parallel. Also we cannot run - -- GHC when the package database is being mutated by "ghc-pkg". This is a - -- classic concurrent read exclusive write (CREW) conflict. - let maxConcurrentReaders = 1000 - packageDb <- newResource "package-db" maxConcurrentReaders - let readPackageDb = [(packageDb, 1)] -- this is correct: take 1 slot to read - writePackageDb = [(packageDb, maxConcurrentReaders)] -- and all the slots to write - - Rules.Compile.compilePackage readPackageDb - Rules.Dependencies.buildPackageDependencies readPackageDb - Rules.Documentation.buildPackageDocumentation - Rules.Program.buildProgramRules readPackageDb - Rules.Register.configurePackageRules - - forM_ [Inplace, Final] $ \iplace -> forM_ allStages $ \stage -> (Rules.Register.registerPackageRules writePackageDb stage iplace) - - -- TODO: Can we get rid of this enumeration of contexts? Since we iterate - -- over it to generate all 4 types of rules below, all the time, we - -- might want to see whether the parse-and-extract approach of - -- Rules.Compile and Rules.Library could save us some time there. - let vanillaContexts = liftM2 vanillaContext allStages knownPackages - - forM_ vanillaContexts Rules.Generate.generatePackageCode - Rules.SimpleTargets.simplePackageTargets - Rules.SimpleTargets.completionRule - -buildRules :: Rules () -buildRules = do - Rules.BinaryDist.bindistRules - Rules.Generate.copyRules - Rules.Generate.generateRules - Rules.Generate.templateRules - Rules.Gmp.gmpRules - Rules.Libffi.libffiRules - Rules.Library.libraryRules - Rules.Rts.rtsRules - packageRules - Rules.CabalReinstall.cabalBuildRules - -oracleRules :: Rules () -oracleRules = do - Hadrian.Oracles.ArgsHash.argsHashOracle trackArgument getArgs - Hadrian.Oracles.Cabal.Rules.cabalOracle - Hadrian.Haskell.Hash.pkgHashOracle - Hadrian.Oracles.DirectoryContents.directoryContentsOracle - Hadrian.Oracles.Path.pathOracle - Hadrian.Oracles.TextFile.textFileOracle - Oracles.Flavour.oracles - Oracles.ModuleFiles.moduleFilesOracle diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs deleted file mode 100644 index af8fa5c7d36e..000000000000 --- a/hadrian/src/Rules/BinaryDist.hs +++ /dev/null @@ -1,553 +0,0 @@ -{-# LANGUAGE TupleSections, MultiWayIf #-} -module Rules.BinaryDist where - -import CommandLine -import Context -import Expression -import Oracles.Setting -import Oracles.Flag -import Packages -import Settings -import Settings.Program (programContext) -import Target -import Utilities -import qualified System.Directory.Extra as IO -import Data.Either -import qualified Data.Set as Set -import Oracles.Flavour - -{- -Note [Binary distributions] -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Hadrian produces binary distributions under: - /bindist/ghc-..--.tar.xz - -It is generated by creating an archive from: - /bindist/ghc-..--/ - -It does so by following the steps below. - -- make sure we have a complete stage 2 compiler + haddock - -- copy the specific binaries which should be in the bindist to the - bin folder and add the version suffix: - /stage1/bin/xxxx - to - ..--/bin/xxxx- - -- create symlink (or bash) wrapper from unversioned to versioned executable: - ..--/bin/xxxx - points to: - ..--/bin/xxxx- - -- copy the lib directories of the compiler we built: - /stage1/lib - to - /bindist/ghc-..--/lib - -- copy the generated docs (user guide, haddocks, etc): - /docs/ - to - /bindist/ghc-..--/docs/ - -- use autoreconf to generate a `configure` script from - aclocal.m4 and distrib/configure.ac, that we move to: - /bindist/ghc-..--/configure - -- write a (fixed) Makefile capable of supporting 'make install' to: - /bindist/ghc-..--/Makefile - -- write some (fixed) supporting bash code for the wrapper scripts to: - /bindist/ghc-..--/wrappers/ - - where is the name of the executable that the bash file will - help wrapping. - -- copy supporting configure/make related files - (see @bindistInstallFiles@) to: - /bindist/ghc-..--/ - -- create a .tar.xz archive of the directory: - /bindist/ghc-..--/ - at - /bindist/ghc-..--.tar.xz - - -Note [Wrapper scripts and binary distributions] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Users of Linux, FreeBSD, Windows and OS X can unpack a -binary distribution produced by hadrian for their arch -and OS and start using @bin/ghc@, @bin/ghc-pkg@ and so on -right away, without even having to configure or install -the distribution. They would then be using the real executables -directly, not through wrapper scripts. - -This works because GHCs produced by hadrian on those systems -are relocatable. This means that you can copy the @bin@ and @lib@ -dirs anywhere and GHC will keep working, as long as both -directories sit next to each other. (This is achieved by having -GHC look up its $libdir relatively to where the GHC executable -resides.) - -It is however still possible (and simple) to install a GHC -distribution that uses wrapper scripts. From the unpacked archive, -you can simply do: - - ./configure --prefix= [... other configure options ...] - make install - -In order to support @bin@ and @lib@ directories that don't sit next to each -other, the install script: - * installs programs into @LIBDIR/ghc-VERSION/bin@ - * installs libraries into @LIBDIR/ghc-VERSION/lib@ - * installs the wrappers scripts into @BINDIR@ directory - --} - -data Relocatable = Relocatable | NotRelocatable - -installTo :: Relocatable -> String -> Action () -installTo relocatable prefix = do - root <- buildRoot - version <- setting ProjectVersion - targetPlatform <- setting TargetPlatformFull - let ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform - bindistFilesDir = root -/- "bindist" -/- ghcVersionPretty - runBuilder (Configure bindistFilesDir) ["--prefix="++prefix] [] [] - let env = case relocatable of - Relocatable -> [AddEnv "RelocatableBuild" "YES"] - NotRelocatable -> [] - runBuilderWithCmdOptions env (Make bindistFilesDir) ["install"] [] [] - - -bindistRules :: Rules () -bindistRules = do - root <- buildRootRules - phony "reloc-binary-dist-dir" $ do - need ["binary-dist-dir"] - cwd <- liftIO $ IO.getCurrentDirectory - version <- setting ProjectVersion - targetPlatform <- setting TargetPlatformFull - let ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform - let prefix = cwd -/- root -/- "reloc-bindist" -/- ghcVersionPretty - installTo Relocatable prefix - - phony "install" $ do - need ["binary-dist-dir"] - let prefixErr = "You must specify a path with --prefix when using the" - ++ " 'install' rule" - installPrefix <- fromMaybe (error prefixErr) <$> cmdPrefix - installTo NotRelocatable installPrefix - - phony "binary-dist-dir" $ do - version <- setting ProjectVersion - targetPlatform <- setting TargetPlatformFull - distDir <- Context.distDir (vanillaContext Stage1 rts) - - let ghcBuildDir = root -/- stageString Stage1 - bindistFilesDir = root -/- "bindist" -/- ghcVersionPretty - ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform - rtsIncludeDir = distDir -/- "include" - - -- We 'need' all binaries and libraries - all_pkgs <- stagePackages Stage1 - (lib_targets, bin_targets) <- partitionEithers <$> mapM pkgTarget all_pkgs - cross <- flag CrossCompiling - iserv_targets <- if cross then pure [] else iservBins - - let lib_exe_targets = (lib_targets ++ (map (\(_, p) -> p) (bin_targets ++ iserv_targets))) - - let doc_target = ["docs"] - - let other_targets = map (bindistFilesDir -/-) (["configure", "Makefile"] ++ bindistInstallFiles) - let all_targets = lib_exe_targets ++ doc_target ++ other_targets - - -- Better parallelism if everything is needed together. - need all_targets - - -- We create the bindist directory at /bindist/ghc-X.Y.Z-platform/ - -- and populate it with Stage2 build results - createDirectory bindistFilesDir - createDirectory (bindistFilesDir -/- "bin") - createDirectory (bindistFilesDir -/- "lib") - -- Also create wrappers with version suffixes (#20074) - forM_ (bin_targets ++ iserv_targets) $ \(pkg, prog_path) -> do - let orig_filename = takeFileName prog_path - (name, ext) = splitExtensions orig_filename - suffix = if useGhcPrefix pkg - then "ghc-" ++ version - else version - version_prog = name ++ "-" ++ suffix ++ ext - -- Install the actual executable with a version suffix - install_path = bindistFilesDir -/- "bin" -/- version_prog - -- The wrapper doesn't have a version - unversioned_install_path = (bindistFilesDir -/- "bin" -/- orig_filename) - -- 1. Copy the executable to the versioned executable name in - -- the directory - copyFile prog_path install_path - -- 2. Either make a symlink for the unversioned version or - -- a wrapper script on platforms (windows) which don't support symlinks. - if windowsHost - then if pkg == unlit - -- The unlit executable is a C executable already, wrapping it again causes - -- paths to be double escaped, so we just copy this one as it is already small. - then copyFile install_path unversioned_install_path - else createVersionWrapper pkg version_prog unversioned_install_path - else liftIO $ do - -- Use the IO versions rather than createFileLink because - -- we need to create a relative symlink. - IO.removeFile unversioned_install_path <|> return () - IO.createFileLink version_prog unversioned_install_path - - -- If we have runghc, also need runhaskell (#19571) - -- Make links for both versioned and unversioned runhaskell to - -- normal runghc - when (pkg == runGhc) $ do - let unversioned_runhaskell_path = - bindistFilesDir -/- "bin" -/- "runhaskell" ++ ext - versioned_runhaskell_path = - bindistFilesDir -/- "bin" -/- "runhaskell" ++ "-" ++ version ++ ext - if windowsHost - then do - createVersionWrapper pkg version_prog unversioned_runhaskell_path - createVersionWrapper pkg version_prog versioned_runhaskell_path - else liftIO $ do - -- Unversioned - IO.removeFile unversioned_runhaskell_path <|> return () - IO.createFileLink version_prog unversioned_runhaskell_path - -- Versioned - IO.removeFile versioned_runhaskell_path <|> return () - IO.createFileLink version_prog versioned_runhaskell_path - - copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir - copyDirectory (rtsIncludeDir) bindistFilesDir - when windowsHost $ createGhcii (bindistFilesDir -/- "bin") - - -- Call ghc-pkg recache, after copying so the package.cache is - -- accurate, then it's on the distributor to use `cp -a` to install - -- a relocatable bindist. - -- - -- N.B. the ghc-pkg executable may be prefixed with a target triple - -- (c.f. #20267). - ghcPkgName <- programName (vanillaContext Stage1 ghcPkg) - cmd_ (bindistFilesDir -/- "bin" -/- ghcPkgName) ["recache"] - - - - -- TODO: we should only embed the docs that have been generated - -- depending on the current settings (flavours' "ghcDocs" field and - -- "--docs=.." command-line flag) - -- Currently we embed the "docs" directory if it exists but it may - -- contain outdated or even invalid data. - - -- Use the IO version of doesDirectoryExist because the Shake Action - -- version should not be used for directories the build system can - -- create. Using the Action version caused documentation to not be - -- included in the bindist in the past (part of the problem in #18669). - whenM (liftIO (IO.doesDirectoryExist (root -/- "doc"))) $ do - copyDirectory (root -/- "doc") bindistFilesDir - copyFile ("libraries" -/- "prologue.txt") (bindistFilesDir -/- "docs-utils" -/- "prologue.txt") - copyFile ("libraries" -/- "gen_contents_index") (bindistFilesDir -/- "docs-utils" -/- "gen_contents_index" ) - - when windowsHost $ do - copyDirectory (root -/- "mingw") bindistFilesDir - -- we use that opportunity to delete the .stamp file that we use - -- as a proxy for the whole mingw toolchain, there's no point in - -- shipping it - removeFile (bindistFilesDir -/- mingwStamp) - - -- Include LICENSE files and related data. - -- On Windows LICENSE files are in _build/lib/doc, which is - -- already included above. - unless windowsHost $ do - copyDirectory (ghcBuildDir -/- "share") bindistFilesDir - - -- Include bash-completion script in binary distributions. We don't - -- currently install this but merely include it for the user's - -- reference. See #20802. - copyDirectory ("utils" -/- "completion") bindistFilesDir - - -- Copy the manpage into the binary distribution - whenM (liftIO (IO.doesDirectoryExist (root -/- "manpage"))) $ do - copyDirectory (root -/- "manpage") bindistFilesDir - - -- We then 'need' all the files necessary to configure and install - -- (as in, './configure [...] && make install') this build on some - -- other machine. - copyFile ("hadrian" -/- "bindist" -/- "config.mk.in") (bindistFilesDir -/- "config.mk.in") - generateBuildMk >>= writeFile' (bindistFilesDir -/- "build.mk") - copyFile ("hadrian" -/- "cfg" -/- "default.target.in") (bindistFilesDir -/- "default.target.in") - copyFile ("hadrian" -/- "cfg" -/- "default.host.target.in") (bindistFilesDir -/- "default.host.target.in") - - -- todo: do we need these wrappers on windows - forM_ bin_targets $ \(pkg, _) -> do - needed_wrappers <- pkgToWrappers pkg - forM_ needed_wrappers $ \wrapper_name -> do - let suffix = if useGhcPrefix pkg - then "ghc-" ++ version - else version - wrapper_content <- wrapper wrapper_name - let unversioned_wrapper_path = bindistFilesDir -/- "wrappers" -/- wrapper_name - versioned_wrapper = wrapper_name ++ "-" ++ suffix - versioned_wrapper_path = bindistFilesDir -/- "wrappers" -/- versioned_wrapper - -- Write the wrapper to the versioned path - writeFile' versioned_wrapper_path wrapper_content - -- Create a symlink from the non-versioned to the versioned. - liftIO $ do - IO.removeFile unversioned_wrapper_path <|> return () - IO.createFileLink versioned_wrapper unversioned_wrapper_path - - let buildBinDist compressor = do - win_target <- isWinTarget - win_host <- isWinHost - when (win_target && win_host) (error "normal binary-dist does not work at Windows, use `reloc-binary-dist-*` target instead.") - buildBinDistX "binary-dist-dir" "bindist" compressor - buildBinDistReloc = buildBinDistX "reloc-binary-dist-dir" "reloc-bindist" - - buildBinDistX :: String -> FilePath -> Compressor -> Action () - buildBinDistX target bindist_folder compressor = do - need [target] - - version <- setting ProjectVersion - targetPlatform <- setting TargetPlatformFull - - let ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform - - -- Finally, we create the archive /bindist/ghc-X.Y.Z-platform.tar.xz - tarPath <- builderPath (Tar Create) - cmd [Cwd $ root -/- bindist_folder] tarPath - [ "-c", compressorTarFlag compressor, "-f" - , ghcVersionPretty <.> "tar" <.> compressorExtension compressor - , ghcVersionPretty ] - - forM_ [("binary", buildBinDist), ("reloc-binary", buildBinDistReloc)] $ \(name, mk_bindist) -> do - phony (name <> "-dist") $ mk_bindist Xz - phony (name <> "-dist-gzip") $ mk_bindist Gzip - phony (name <> "-dist-bzip2") $ mk_bindist Bzip2 - phony (name <> "-dist-xz") $ mk_bindist Xz - - -- Prepare binary distribution configure script - -- (generated under /distrib/configure by 'autoreconf') - root -/- "bindist" -/- "ghc-*" -/- "configure" %> \configurePath -> do - need ["distrib" -/- "configure.ac"] - ghcRoot <- topDirectory - copyFile (ghcRoot -/- "aclocal.m4") (ghcRoot -/- "distrib" -/- "aclocal.m4") - copyDirectory (ghcRoot -/- "m4") (ghcRoot -/- "distrib") - buildWithCmdOptions [] $ - target (vanillaContext Stage1 ghc) (Autoreconf $ ghcRoot -/- "distrib") [] [] - -- We clean after ourselves, moving the configure script we generated in - -- our bindist dir - removeFile (ghcRoot -/- "distrib" -/- "aclocal.m4") - removeDirectory (ghcRoot -/- "distrib" -/- "m4") - - moveFile (ghcRoot -/- "distrib" -/- "configure") configurePath - - -- Generate the Makefile that enables the "make install" part - root -/- "bindist" -/- "ghc-*" -/- "Makefile" %> \makefilePath -> do - top <- topDirectory - copyFile (top -/- "hadrian" -/- "bindist" -/- "Makefile") makefilePath - - -- Copy various configure-related files needed for a working - -- './configure [...] && make install' workflow - -- (see the list of files needed in the 'binary-dist' rule above, before - -- creating the archive). - forM_ bindistInstallFiles $ \file -> - root -/- "bindist" -/- "ghc-*" -/- file %> \dest -> do - copyFile (fixup file) dest - - where - fixup f | f `elem` ["INSTALL", "README"] = "distrib" -/- f - | otherwise = f - -data Compressor = Gzip | Bzip2 | Xz - deriving (Eq, Ord, Show) - - --- Information from the build configuration which needs to be propagated to config.mk.in -generateBuildMk :: Action String -generateBuildMk = do - dynamicGhc <- askDynGhcPrograms - rtsWays <- unwords . map show . Set.toList <$> interpretInContext (vanillaContext Stage1 rts) getRtsWays - return $ unlines [ "GhcRTSWays" =. rtsWays - , "DYNAMIC_GHC_PROGRAMS" =. yesNo dynamicGhc ] - - - where - yesNo True = "YES" - yesNo False = "NO" - a =. b = a ++ " = " ++ b - --- | Flag to pass to tar to use the given 'Compressor'. -compressorTarFlag :: Compressor -> String -compressorTarFlag Gzip = "--gzip" -compressorTarFlag Xz = "--xz" -compressorTarFlag Bzip2 = "--bzip" - --- | File extension to use for archives compressed with the given 'Compressor'. -compressorExtension :: Compressor -> String -compressorExtension Gzip = "gz" -compressorExtension Xz = "xz" -compressorExtension Bzip2 = "bz2" - --- | A list of files that allow us to support a simple --- @./configure [...] && make install@ workflow. -bindistInstallFiles :: [FilePath] -bindistInstallFiles = - [ "config.sub", "config.guess", "install-sh" - , "mk" -/- "project.mk" - , "mk" -/- "relpath.sh" - , "mk" -/- "system-cxx-std-lib-1.0.conf.in" - , "mk" -/- "hsc2hs.in" - , "mk" -/- "install_script.sh" - , "README", "INSTALL" ] - --- | This auxiliary function gives us a top-level 'Filepath' that we can 'need' --- for all libraries and programs that are needed for a complete build. --- For libraries, it returns the path to the @.conf@ file in the package --- database. For programs, it returns the path to the compiled executable. -pkgTarget :: Package -> Action (Either FilePath (Package, FilePath)) -pkgTarget pkg - | isLibrary pkg = Left <$> pkgConfFile (vanillaContext Stage1 pkg) - | otherwise = do - path <- programPath =<< programContext Stage1 pkg - return (Right (pkg, path)) - -useGhcPrefix :: Package -> Bool -useGhcPrefix pkg - | pkg == ghc = False - | pkg == runGhc = False - | pkg == ghcPkg = False - | pkg == ghciWrapper = False - | otherwise = True - --- | Which wrappers point to a specific package -pkgToWrappers :: Package -> Action [String] -pkgToWrappers pkg = do - prefix <- crossPrefix - if -- ghc also has the ghci script wrapper - -- N.B. programName would add the crossPrefix therefore we must do the - -- same here. - | pkg == ghc -> pure $ map (prefix++) ["ghc", "ghci"] - | pkg == runGhc -> pure $ map (prefix++) ["runghc", "runhaskell"] - -- These are the packages which we want to expose to the user and hence - -- there are wrappers installed in the bindist. - | pkg `elem` [hpcBin, haddock, hp2ps, hsc2hs, ghc, ghcPkg] - -> (:[]) <$> (programName =<< programContext Stage1 pkg) - | otherwise -> pure [] - -wrapper :: FilePath -> Action String -wrapper wrapper_name - | "runghc" `isSuffixOf` wrapper_name = runGhcWrapper - | "ghc" `isSuffixOf` wrapper_name = ghcWrapper - | "ghc-pkg" `isSuffixOf` wrapper_name = ghcPkgWrapper - | "ghci" `isSuffixOf` wrapper_name = ghciScriptWrapper - | "haddock" `isSuffixOf` wrapper_name = haddockWrapper - | "hsc2hs" `isSuffixOf` wrapper_name = hsc2hsWrapper - | "runhaskell" `isSuffixOf` wrapper_name = runGhcWrapper -wrapper _ = commonWrapper - --- | Wrapper scripts for different programs. Common is default wrapper. --- See Note [Two Types of Wrappers] - -ghcWrapper :: Action String -ghcWrapper = pure $ "exec \"$executablename\" -B\"$libdir\" ${1+\"$@\"}\n" - -ghcPkgWrapper :: Action String -ghcPkgWrapper = pure $ unlines - [ "PKGCONF=\"$libdir/package.conf.d\"" - , "exec \"$executablename\" --global-package-db \"$PKGCONF\" ${1+\"$@\"}" ] - -haddockWrapper :: Action String -haddockWrapper = pure $ "exec \"$executablename\" -B\"$libdir\" -l\"$libdir\" ${1+\"$@\"}\n" - -commonWrapper :: Action String -commonWrapper = pure $ "exec \"$executablename\" ${1+\"$@\"}\n" - -hsc2hsWrapper :: Action String -hsc2hsWrapper = return "Copied from mk/hsc2hs" - -runGhcWrapper :: Action String -runGhcWrapper = pure $ "exec \"$executablename\" -f \"$exedir/ghc\" ${1+\"$@\"}\n" - --- | We need to ship ghci executable, which basically just calls ghc with --- | --interactive flag. -ghciScriptWrapper :: Action String -ghciScriptWrapper = do - prefix <- crossPrefix - version <- setting ProjectVersion - pure $ unlines - [ "executable=\"$bindir/" ++ prefix ++ "ghc-" ++ version ++ "\"" - , "exec $executable --interactive \"$@\"" ] - --- | When not on Windows, we want to ship the 3 flavours of the iserv program --- in binary distributions. This isn't easily achievable by just asking for --- the package to be built, since here we're generating 3 different --- executables out of just one package, so we need to specify all 3 contexts --- explicitly and 'need' the result of building them. -iservBins :: Action [(Package, FilePath)] -iservBins = do - rtsways <- interpretInContext (vanillaContext Stage1 ghc) getRtsWays - traverse (fmap (\p -> (iserv, p)) . programPath) - [ Context Stage1 iserv w Final - | w <- [vanilla, profiling, dynamic] - , w `elem` rtsways - ] - --- Version wrapper scripts --- See Note [Two Types of Wrappers] - --- | Create a wrapper script calls the executable given as first argument -createVersionWrapper :: Package -> String -> FilePath -> Action () -createVersionWrapper pkg versioned_exe install_path = do - ghcPath <- builderPath (Ghc CompileCWithGhc Stage2) - top <- topDirectory - let version_wrapper_dir = top -/- "hadrian" -/- "bindist" -/- "cwrappers" - wrapper_files = [ version_wrapper_dir -/- file | file <- ["version-wrapper.c", "getLocation.c", "cwrapper.c"]] - -- If the wrapper is for an interactive process like GHCi then we need to call - -- FreeConsole to pass event processing to the child process - -- See #21889 and #14150 and #13411 - interactive - | pkg == ghciWrapper = (1 :: Int) - | otherwise = 0 - - cmd ghcPath (["-no-hs-main", "-o", install_path, "-I"++version_wrapper_dir - , "-optc-DEXE_PATH=\"" ++ versioned_exe ++ "\"" - , "-optc-DINTERACTIVE_PROCESS=" ++ show interactive - ] ++ wrapper_files) - -{- -Note [Two Types of Wrappers] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -There are two different types of wrapper scripts. - -1. The wrapper scripts installed - /bindist/ghc-..--/wrappers/ -2. The version wrapper scripts installed in - ..--/bin/xxxx - -The purpose of the wrappers in (1) is to allow the executables to be installed -into a different @BINDIR@ which is not already adjacent to a libdir. Therefore -these wrappers pass the libdir and so on explicitliy to the executable so the -wrappers can be placed anywhere and still work. - -The purpose of the wrappers in (2) is to provide both versioned and unversioned -executables. On windows, these are actual wrapper scripts which just call the executable -but on linux these wrappers are symlinks. - --} - --- | On Windows ghci must be invoked via this wrapper script due to signal craziness. --- When WinIO becomes the default it can be removed. See #19339 and #12720. -createGhcii :: FilePath -> Action () -createGhcii outDir = do - version <- setting ProjectVersion - create (outDir -/- "ghcii.sh") - create (outDir -/- "ghcii"++version++".sh") - where - create out = writeFileChanged out content >> makeExecutable out - content = unlines - [ "#!/bin/sh" - , "exec \"$(dirname \"$0\")\"/ghc --interactive \"$@\"" - ] diff --git a/hadrian/src/Rules/CabalReinstall.hs b/hadrian/src/Rules/CabalReinstall.hs deleted file mode 100644 index d69d01101c0a..000000000000 --- a/hadrian/src/Rules/CabalReinstall.hs +++ /dev/null @@ -1,105 +0,0 @@ -module Rules.CabalReinstall where - -import Context -import Expression -import Oracles.Flag -import Packages -import Settings -import Target -import Utilities -import qualified System.Directory.Extra as IO -import Data.Either -import Rules.BinaryDist -import Oracles.Setting - -{- -Note [Testing reinstallable GHC] -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To test the reinstallable GHC configuration, we install a GHC to /stage-cabal/bin -along with appropriate wrapper scripts. - -The libdir of the reinstalled GHC points to the libdir of the stage 2 compiler (in /stage1) --} - - --- | We don't support reinstalling these -cabalExcludedPackages :: [Package] -cabalExcludedPackages = [array, base, deepseq, filepath, ghcBootTh, pretty, templateHaskell] - - -cabalBuildRules :: Rules () -cabalBuildRules = do - root <- buildRootRules - root -/- "stage-cabal" -/- "cabal-packages" %> \outpath -> do - -- Always rerun to pass onto cabal's own recompilation logic - alwaysRerun - all_pkgs <- stagePackages Stage1 - forM_ (filter (not . (`elem` cabalExcludedPackages)) all_pkgs) $ \pkg -> do - withVerbosity Diagnostic $ - buildWithCmdOptions [] $ - target (vanillaContext Stage2 pkg) (Cabal Install Stage2) [] [] - liftIO $ writeFile outpath "done" - - phony "build-cabal" $ need [root -/- "stage-cabal" -/- "bin" -/- ".stamp"] - - root -/- "stage-cabal" -/- "bin" -/- "*" %> \_ -> need [root -/- "stage-cabal" -/- "bin" -/- ".stamp"] - - priority 2.0 $ root -/- "stage-cabal" -/- "bin" -/- ".stamp" %> \stamp -> do - -- We 'need' all binaries and libraries - all_pkgs <- stagePackages Stage1 - (lib_targets, bin_targets) <- partitionEithers <$> mapM pkgTarget all_pkgs - cross <- flag CrossCompiling - iserv_targets <- if cross then pure [] else iservBins - need (lib_targets ++ (map (\(_, p) -> p) (bin_targets ++ iserv_targets))) - - distDir <- Context.distDir (vanillaContext Stage1 rts) - let rtsIncludeDir = distDir -/- "include" - - libdir <- liftIO . makeAbsolute =<< stageLibPath Stage1 - work_dir <- liftIO $ makeAbsolute $ root -/- "stage-cabal" - let outputDir = work_dir -/- "bin" - includeDir <- liftIO $ makeAbsolute rtsIncludeDir - - createDirectory outputDir - - need [root -/- "stage-cabal" -/- "cabal-packages"] - - cwd <- liftIO $ IO.getCurrentDirectory - version <- setting ProjectVersion - - let cabal_package_db = cwd -/- root -/- "stage-cabal" -/- "dist-newstyle" -/- "packagedb" -/- "ghc-" ++ version - - forM_ (filter ((/= iserv) . fst) bin_targets) $ \(bin_pkg,_bin_path) -> do - let pgmName pkg - | pkg == ghc = "ghc" - | pkg == hpcBin = "hpc" - | otherwise = pkgName pkg - let cabal_bin_out = work_dir -/- "cabal-bin" -/- (pgmName bin_pkg) - needed_wrappers <- pkgToWrappers bin_pkg - forM_ needed_wrappers $ \wrapper_name -> do - let wrapper_prefix = unlines - ["#!/usr/bin/env sh" - ,"executablename="++show cabal_bin_out - ,"libdir="++show libdir - ,"bindir="++show outputDir - ,"exedir="++show outputDir - ,"includedir="++show includeDir - ,"export GHC_PACKAGE_PATH="++show cabal_package_db++":" - ] - output_file = outputDir -/- wrapper_name - wrapper_content <- wrapper wrapper_name - writeFile' output_file (wrapper_prefix ++ wrapper_content) - makeExecutable output_file - pure () - - -- Just symlink these for now - -- TODO: build these with cabal as well - forM_ iserv_targets $ \(_bin_pkg,bin_path') -> do - bin_path <- liftIO $ makeAbsolute bin_path' - let orig_filename = takeFileName bin_path - output_file = outputDir -/- orig_filename - liftIO $ do - IO.removeFile output_file <|> pure () - IO.createFileLink bin_path output_file - pure () - writeFile' stamp "OK" diff --git a/hadrian/src/Rules/Clean.hs b/hadrian/src/Rules/Clean.hs deleted file mode 100644 index 3ac95989b4cc..000000000000 --- a/hadrian/src/Rules/Clean.hs +++ /dev/null @@ -1,45 +0,0 @@ -module Rules.Clean (clean, cleanSourceTree, cleanRules) where - -import qualified System.Directory as IO -import Base - -distclean :: Action () -distclean = do - putBuild "| Removing mingw tarballs..." - cleanMingwTarballs - cleanFsUtils - clean - -clean :: Action () -clean = do - putBuild "| Removing Hadrian files..." - cleanSourceTree - path <- buildRoot - putBuild $ "| Remove directory " ++ path ++ " (after build completes)" - runAfter $ IO.removeDirectoryRecursive path -- since we can't delete the Shake database while Shake is running - putSuccess "| Done. " - -cleanSourceTree :: Action () -cleanSourceTree = do - path <- buildRoot - forM_ allStages $ removeDirectory . (path -/-) . stageString - removeDirectory "sdistprep" - -cleanMingwTarballs :: Action () -cleanMingwTarballs = do - removeDirectory "ghc-tarballs" - --- Clean all temporary fs files copied by configure into the source folder -cleanFsUtils :: Action () -cleanFsUtils = do - let dirs = [ "utils/unlit/" - , "rts/" - , "libraries/base/include/" - , "libraries/base/cbits/" - ] - liftIO $ forM_ dirs (flip removeFiles ["fs.*"]) - -cleanRules :: Rules () -cleanRules = do - "clean" ~> clean - "distclean" ~> distclean diff --git a/hadrian/src/Rules/Codes.hs b/hadrian/src/Rules/Codes.hs deleted file mode 100644 index 4852ce22f268..000000000000 --- a/hadrian/src/Rules/Codes.hs +++ /dev/null @@ -1,37 +0,0 @@ -module Rules.Codes - ( codesRules - ) where - -import Base -import Packages ( programPath, lintCodes ) -import Settings.Program ( programContext ) - -data Usage - = Used - | Outdated - -describeUsage :: Usage -> String -describeUsage Used = "used" -describeUsage Outdated = "outdated" - -usageArg :: Usage -> String -usageArg Used = "list" -usageArg Outdated = "outdated" - -codesRules :: Rules () -codesRules = do - "codes:used" ~> codes Used - "codes:outdated" ~> codes Outdated - "codes" ~> codes Used - -codes :: Usage -> Action () -codes usage = do - let stage = Stage1 -- ? - codesProgram <- programPath =<< programContext stage lintCodes - need [ codesProgram ] - ghcLibDir <- stageLibPath stage - let args = [ usageArg usage, ghcLibDir ] - cmdLine = unwords ( codesProgram : args ) - putBuild $ "| Computing " ++ describeUsage usage ++ " diagnostic codes." - putBuild $ "| " <> cmdLine - cmd_ cmdLine diff --git a/hadrian/src/Rules/Compile.hs b/hadrian/src/Rules/Compile.hs deleted file mode 100644 index d8ca9ab40634..000000000000 --- a/hadrian/src/Rules/Compile.hs +++ /dev/null @@ -1,311 +0,0 @@ -{-# LANGUAGE GADTs #-} - -module Rules.Compile (compilePackage) where - -import Hadrian.BuildPath -import Hadrian.Oracles.TextFile - -import Base -import Context as C -import Expression -import Oracles.Flag (platformSupportsSharedLibs) -import Rules.Generate -import Settings -import Target -import Utilities - -import qualified Text.Parsec as Parsec - --- * Rules for building objects and Haskell interface files - -compilePackage :: [(Resource, Int)] -> Rules () -compilePackage rs = do - root <- buildRootRules - -- We match all file paths that look like: - -- /...stuffs.../build/...stuffs.../. - -- - -- where: - -- - the '...stuffs...' bits can be one or more path components, - -- - the '' part is a way prefix (e.g thr_p_, or nothing if - -- vanilla) followed by an object file extension, without the dot - -- (o, o-boot, hi, hi-boot), - -- - -- and parse the information we need (stage, package path, ...) from - -- the path and figure out the suitable way to produce that object file. - alternatives $ do - -- Language is identified by subdirectory under /build. - -- These are non-haskell files so only have a .o or ._o suffix. - [ root -/- "**/build/c/**/*." ++ wayPat ++ "o" - | wayPat <- wayPats] |%> compileNonHsObject rs C - - [ root -/- "**/build/cmm/**/*." ++ wayPat ++ "o" - | wayPat <- wayPats] |%> compileNonHsObject rs Cmm - - [ root -/- "**/build/cpp/**/*." ++ wayPat ++ "o" - | wayPat <- wayPats] |%> compileNonHsObject rs Cxx - - [ root -/- "**/build/s/**/*." ++ wayPat ++ "o" - | wayPat <- wayPats] |%> compileNonHsObject rs Asm - - [ root -/- "**/build/S/**/*." ++ wayPat ++ "o" - | wayPat <- wayPats] |%> compileNonHsObject rs Asm - - [ root -/- "**/build/js/**/*." ++ wayPat ++ "o" - | wayPat <- wayPats] |%> compileNonHsObject rs JS - - -- All else is haskell. - -- These come last as they overlap with the above rules' file patterns. - - -- When building dynamically we depend on the static rule if shared libs - -- are supported, because it will add the -dynamic-too flag when - -- compiling to build the dynamic files alongside the static files - ( root -/- "**/build/**/*.dyn_o" :& root -/- "**/build/**/*.dyn_hi" :& Nil ) - &%> \ ( dyn_o :& _dyn_hi :& _ ) -> do - p <- platformSupportsSharedLibs - if p - then do - -- We `need` ".o/.hi" because GHC is called with `-dynamic-too` - -- and builds ".dyn_o/.dyn_hi" too. - changed <- needHasChanged [dyn_o -<.> "o", dyn_o -<.> "hi"] - - -- If for some reason a previous Hadrian execution has been - -- interrupted after the rule for .o/.hi generation has completed - -- but before the current rule for .dyn_o/.dyn_hi has completed, - -- or if some of the dynamic artifacts have been removed by the - -- user, "needing" the non dynamic artifacts is not enough as - -- Shake won't execute the associated action. Hence we detect - -- this case and we explicitly build the dynamic artifacts here: - case changed of - [] -> compileHsObjectAndHi rs dyn_o - _ -> pure () - - else compileHsObjectAndHi rs dyn_o - - forM_ ((,) <$> hsExts <*> wayPats) $ \ ((oExt, hiExt), wayPat) -> - ( (root -/- "**/build/**/*." ++ wayPat ++ oExt) - :& (root -/- "**/build/**/*." ++ wayPat ++ hiExt) - :& Nil ) &%> - \ ( o :& _hi :& _ ) -> - compileHsObjectAndHi rs o - where - hsExts = [ ("o", "hi") - , ("o-boot", "hi-boot") - ] - wayPats = [ "", "*_" ] - --- * Object file paths types and parsers - -{- We are using a non uniform representation that separates - object files produced from Haskell code and from other - languages, because the two "groups" have to be parsed - differently enough that this would complicated the parser - significantly. - - Indeed, non-Haskell files can only produce .o (or .thr_o, ...) - files while Haskell modules can produce those as well as - interface files, both in -boot or non-boot variants. - - Moreover, non-Haskell object files live under: - /stage//build/{c,cmm,s}/ - - while Haskell object/interface files live under: - /stage//build/ - - So the kind of object is partially determined by - whether we're in c/, cmm/ or s/ but also by the - object file's extension, in the case of a Haskell file. - This could have been addressed with some knot-tying but - Parsec's monad doesn't give us a MonadFix instance. - - We therefore stick to treating those two type of object - files non uniformly. --} - --- | Non Haskell source languages that we compile to get object files. -data SourceLang = Asm | C | Cmm | Cxx | JS deriving (Eq, Show) - -parseSourceLang :: Parsec.Parsec String () SourceLang -parseSourceLang = Parsec.choice - [ Parsec.string "js" *> pure JS - , Parsec.char 'c' *> Parsec.choice - [ Parsec.string "mm" *> pure Cmm - , Parsec.string "pp" *> pure Cxx - , pure C - ] - , Parsec.char 's' *> pure Asm - ] - -type Basename = String - -parseBasename :: Parsec.Parsec String () Basename -parseBasename = Parsec.manyTill Parsec.anyChar (Parsec.try $ Parsec.char '.') - --- | > /._o -data NonHsObject = NonHsObject SourceLang Basename Way - deriving (Eq, Show) - -parseNonHsObject :: Parsec.Parsec String () NonHsObject -parseNonHsObject = do - lang <- parseSourceLang - _ <- Parsec.char '/' - file <- parseBasename - way <- parseWayPrefix vanilla - _ <- Parsec.char 'o' - return (NonHsObject lang file way) - --- | > -data SuffixType = O | Hi | OBoot | HiBoot deriving (Eq, Show) - -parseSuffixType :: Parsec.Parsec String () SuffixType -parseSuffixType = Parsec.choice - [ Parsec.char 'o' *> Parsec.choice - [ Parsec.string "-boot" *> pure OBoot - , pure O - ] - , Parsec.string "hi" *> Parsec.choice - [ Parsec.string "-boot" *> pure HiBoot - , pure Hi - ] - ] - --- | > _ -data Extension = Extension Way SuffixType deriving (Eq, Show) - -parseExtension :: Parsec.Parsec String () Extension -parseExtension = Extension <$> parseWayPrefix vanilla <*> parseSuffixType - --- | > ._ -data HsObject = HsObject Basename Extension deriving (Eq, Show) - -parseHsObject :: Parsec.Parsec String () HsObject -parseHsObject = do - file <- parseBasename - ext <- parseExtension - return (HsObject file ext) - -data Object = Hs HsObject | NonHs NonHsObject deriving (Eq, Show) - -parseObject :: Parsec.Parsec String () Object -parseObject = Parsec.choice - [ NonHs <$> parseNonHsObject - , Hs <$> parseHsObject ] - --- * Toplevel parsers - -parseBuildObject :: FilePath -> Parsec.Parsec String () (BuildPath Object) -parseBuildObject root = parseBuildPath root parseObject - --- * Getting contexts from objects - -objectContext :: BuildPath Object -> Context -objectContext (BuildPath _ stage pkgPath obj) = - Context stage (unsafeFindPackageByPath pkgPath) way Inplace - where - way = case obj of - NonHs (NonHsObject _lang _file w) -> w - Hs (HsObject _file (Extension w _suf)) -> w - --- * Building an object - -compileHsObjectAndHi - :: [(Resource, Int)] -> FilePath -> Action () -compileHsObjectAndHi rs objpath = do - root <- buildRoot - b@(BuildPath _root stage _path _o) - <- parsePath (parseBuildObject root) "" objpath - let ctx = objectContext b - way = C.way ctx - ctxPath <- contextPath ctx - (src, deps) <- lookupDependencies (ctxPath -/- ".dependencies") objpath - need (src:deps) - -- The .conf file is needed when template-haskell is implicitly added as a dependency - -- when a module in the template-haskell package is compiled. (See #24737) - when (isLibrary (C.package ctx)) (need . (:[]) =<< pkgConfFile ctx) - - -- The .dependencies file lists indicating inputs. ghc will - -- generally read more *.hi and *.hi-boot files (direct inputs). - -- Allow such reads (see https://gitlab.haskell.org/ghc/ghc/wikis/Developing-Hadrian#haskell-object-files-and-hi-inputs) - -- Note that this may allow too many *.hi and *.hi-boot files, but - -- calculating the exact set of direct inputs is not feasible. - trackAllow [ "**/*." ++ hisuf way - , "**/*." ++ hibootsuf way - ] - - buildWithResources rs $ target ctx (Ghc CompileHs stage) [src] [objpath] - -compileNonHsObject :: [(Resource, Int)] -> SourceLang -> FilePath -> Action () -compileNonHsObject rs lang path = do - root <- buildRoot - b@(BuildPath _root stage _path _o) - <- parsePath (parseBuildObject root) "" path - let - ctx = objectContext b - builder = case lang of - C -> Ghc CompileCWithGhc - Cxx-> Ghc CompileCppWithGhc - _ -> Ghc CompileHs - src <- case lang of - Asm -> obj2src "S" (const False) ctx path - C -> obj2src "c" (const False) ctx path - Cmm -> obj2src "cmm" isGeneratedCmmFile ctx path - Cxx -> obj2src "cpp" (const False) ctx path - JS -> obj2src "js" (const False) ctx path - need [src] - needDependencies lang ctx src (path <.> "d") - buildWithResources rs $ target ctx (builder stage) [src] [path] - --- * Helpers - --- | Discover dependencies of a given source file by iteratively calling @gcc@ --- in the @-MM -MG@ mode and building generated dependencies if they are missing --- until reaching a fixed point. -needDependencies :: SourceLang -> Context -> FilePath -> FilePath -> Action () -needDependencies lang context@Context {..} src depFile = do - gens <- interpretInContext context generatedDependencies - need gens - discover - where - discover = do - build $ target context (Cc (FindCDependencies depType) stage) [src] [depFile] - deps <- parseFile depFile - -- Generated dependencies, if not yet built, will not be found and hence - -- will be referred to simply by their file names. - let notFound = filter (\file -> file == takeFileName file) deps - -- We find the full paths to generated dependencies, so we can request - -- to build them by calling 'need'. - todo <- catMaybes <$> mapM (fullPathIfGenerated context) notFound - - if null todo - then need deps -- The list of dependencies is final, need all - else do - need todo -- Build newly discovered generated dependencies - discover -- Continue the discovery process - - -- We need to pass different flags to cc depending on whether the - -- file to compile is a .c or a .cpp file - depType = if lang == Cxx then CxxDep else CDep - - parseFile :: FilePath -> Action [String] - parseFile file = do - input <- liftIO $ readFile file - case parseMakefile input of - [(_file, deps)] -> return deps - _ -> return [] - --- | Find a given 'FilePath' in the list of generated files in the given --- 'Context' and return its full path. -fullPathIfGenerated :: Context -> FilePath -> Action (Maybe FilePath) -fullPathIfGenerated context file = interpretInContext context $ do - generated <- generatedDependencies - return $ find ((== file) . takeFileName) generated - -obj2src :: String -> (FilePath -> Bool) -> Context -> FilePath -> Action FilePath -obj2src extension isGenerated context@Context {..} obj - | isGenerated src = return src - | otherwise = (pkgPath package ++) <$> suffix - where - src = obj -<.> extension - suffix = do - path <- buildPath context - return $ fromMaybe ("Cannot determine source for " ++ obj) - $ stripPrefix (path -/- extension) src diff --git a/hadrian/src/Rules/Dependencies.hs b/hadrian/src/Rules/Dependencies.hs deleted file mode 100644 index ab79ea112e51..000000000000 --- a/hadrian/src/Rules/Dependencies.hs +++ /dev/null @@ -1,59 +0,0 @@ -{-# OPTIONS_GHC -Wno-deprecations #-} -{-# OPTIONS_GHC -Wno-x-data-list-nonempty-unzip #-} - -module Rules.Dependencies (buildPackageDependencies) where - -import Data.Bifunctor -import qualified Data.List.NonEmpty as NE - -import Base -import Context -import Expression -import Hadrian.BuildPath -import Oracles.ModuleFiles -import Rules.Generate -import Settings -import Target -import Utilities - -import qualified Text.Parsec as Parsec - -buildPackageDependencies :: [(Resource, Int)] -> Rules () -buildPackageDependencies rs = do - root <- buildRootRules - root -/- "**/.dependencies.mk" %> \mk -> do - DepMkFile stage pkgpath <- getDepMkFile root mk - let pkg = unsafeFindPackageByPath pkgpath - context = Context stage pkg vanilla Inplace - srcs <- hsSources context - gens <- interpretInContext context generatedDependencies - need (srcs ++ gens) - if null srcs - then writeFileChanged mk "" - else buildWithResources rs $ target context - (Ghc FindHsDependencies $ Context.stage context) srcs [mk] - removeFile $ mk <.> "bak" - - root -/- "**/.dependencies" %> \deps -> do - mkDeps <- readFile' (deps <.> "mk") - writeFileChanged deps . unlines - . map (\(src, deps) -> unwords $ src : deps) - . map (bimap unifyPath (map unifyPath)) - . map (bimap NE.head concat . NE.unzip) - . NE.groupAllWith fst - $ parseMakefile mkDeps - - -data DepMkFile = DepMkFile Stage FilePath deriving (Eq, Show) - -parseDepMkFile :: FilePath -> Parsec.Parsec String () DepMkFile -parseDepMkFile root = do - _ <- Parsec.string root *> Parsec.optional (Parsec.char '/') - stage <- parseStage - _ <- Parsec.char '/' - pkgPath <- Parsec.manyTill Parsec.anyChar - (Parsec.try $ Parsec.string "/.dependencies.mk") - return (DepMkFile stage pkgPath) - -getDepMkFile :: FilePath -> FilePath -> Action DepMkFile -getDepMkFile root = parsePath (parseDepMkFile root) "" diff --git a/hadrian/src/Rules/Docspec.hs b/hadrian/src/Rules/Docspec.hs deleted file mode 100644 index 8b07ffe80cab..000000000000 --- a/hadrian/src/Rules/Docspec.hs +++ /dev/null @@ -1,55 +0,0 @@ -module Rules.Docspec - ( docspecRules - ) where - -import Base -import Context.Path -import Settings.Builders.Common -import qualified Packages as P -import System.Exit (exitFailure) - -docspecRules :: Rules () -docspecRules = do - "docspec:base" ~> docspec base - -docspec :: Action () -> Action () -docspec lintAction = do - isExecutablePresent <- isJust <$> liftIO (findExecutable "cabal-docspec") - if isExecutablePresent - then do - putBuild "| Running cabal-docspec…" - lintAction - putSuccess "| Done." - else do - putFailure "| Please make sure you have the `cabal-docspec` executable in your $PATH" - liftIO exitFailure - -base :: Action () -base = do - topDir <- topDirectory - let context = vanillaContext Stage1 P.base - stage1GHCPath <- P.programPath (vanillaContext Stage1 P.ghc) - let stage1GHC = topDir stage1GHCPath - stage1Lib <- stageLibPath Stage1 - let cabalFile = pkgCabalFile P.base - let topIncludes = topDir "includes" - buildPath' <- buildPath context - let buildIncludesPath = topDir buildPath' "include" - mtlConfFile <- pkgConfFile $ vanillaContext Stage1 P.mtl - deepseqConfFile <- pkgConfFile $ vanillaContext Stage1 P.deepseq - bytestringConfFile <- pkgConfFile $ vanillaContext Stage1 P.bytestring - let neededIncludes = [mtlConfFile, deepseqConfFile, bytestringConfFile] - need neededIncludes - - command_ [] "cabal-docspec" [ "-w", stage1GHC - , "--no-cabal-plan" - , "--strip-comments" - , "--timeout", "2" - , "--ghci-rtsopts=-K500K" - , "--extra-package=mtl", "--extra-package=deepseq", "--extra-package=bytestring" - , "-XNoImplicitPrelude" - , "-I", topIncludes - , "-I", buildIncludesPath - , "-I", stage1Lib - , cabalFile - ] diff --git a/hadrian/src/Rules/Documentation.hs b/hadrian/src/Rules/Documentation.hs deleted file mode 100644 index 93b474c6e544..000000000000 --- a/hadrian/src/Rules/Documentation.hs +++ /dev/null @@ -1,430 +0,0 @@ -{-# LANGUAGE GADTs #-} - -module Rules.Documentation ( - -- * Rules - buildPackageDocumentation, documentationRules, - - -- * Utilities - haddockDependencies - ) where - -import Hadrian.BuildPath -import Hadrian.Haskell.Cabal -import Hadrian.Haskell.Cabal.Type - -import Base -import Context -import Expression (getContextData, interpretInContext) -import Flavour -import Oracles.ModuleFiles -import Oracles.Setting (topDirectory) -import Packages -import Settings -import Target -import Utilities - -import qualified Data.Set as Set -import qualified Text.Parsec as Parsec - -docRoot :: FilePath -docRoot = "doc" - -htmlRoot :: FilePath -htmlRoot = docRoot -/- "html" - -pdfRoot :: FilePath -pdfRoot = docRoot - -infoRoot :: FilePath -infoRoot = docRoot -/- "info" - -archiveRoot :: FilePath -archiveRoot = docRoot -/- "archives" - -manPageBuildPath :: FilePath -manPageBuildPath = "manpage" -/- "ghc.1" - --- TODO: Get rid of this hack. -docContext :: Context -docContext = vanillaContext Stage2 (library "Documentation" "docs") - -docPaths :: [FilePath] -docPaths = ["libraries", "users_guide", "Haddock"] - -pathPdf :: FilePath -> FilePath -pathPdf path = pdfRoot -/- path <.> ".pdf" - -pathIndex :: FilePath -> FilePath -pathIndex path = htmlRoot -/- path -/- "index.html" - -pathArchive :: FilePath -> FilePath -pathArchive path = archiveRoot -/- path <.> "html.tar.xz" - --- TODO: Get rid of this hack. -pathPath :: FilePath -> FilePath -pathPath "GHCUsersGuide" = "docs/users_guide" -pathPath "users_guide" = "docs/users_guide" -pathPath "Haddock" = "utils/haddock/doc" -pathPath _ = "" - -needDocDeps :: Action () -needDocDeps = do - -- These cabal files are needed by the docs/users_guide/ghc_packages.py - -- logic to determine the versions of packages shipped with GHC. - let templatedCabalFiles = map pkgCabalFile - [ ghcBoot - , ghcBootTh - , ghci - , compiler - , ghcHeap - , templateHaskell - ] - - need templatedCabalFiles - need [ "docs" -/- "users_guide" -/- file - | file <- [ "conf.py" - , "flags.py" - , "ghc_config.py" - , "ghc_packages.py" - , "utils.py" - ] - ] - - --- | Build all documentation -documentationRules :: Rules () -documentationRules = do - buildDocumentationArchives - buildHtmlDocumentation - buildManPage - buildPdfDocumentation - buildSphinxInfoGuide - - -- a phony rule that runs Haddock for "Haskell Hierarchical Libraries" and - -- the "GHC-API" - "docs-haddock" ~> do - root <- buildRoot - need [ root -/- pathIndex "libraries" ] - - -- a phony rule that runs Haddock, builds the User's guide, builds - -- Haddock's manual, and builds man pages - "docs" ~> do - root <- buildRoot - - doctargets <- ghcDocs =<< flavour - let html = htmlRoot -/- "index.html" -- also implies "docs-haddock" - archives = map pathArchive docPaths - pdfs = map pathPdf $ docPaths \\ ["libraries"] - - targets = -- include PDFs unless --docs=no-sphinx[-pdf] is - -- passed. - concat [ pdfs | SphinxPDFs `Set.member` doctargets ] - - -- include manpage unless --docs=no-sphinx[-man] is given. - ++ [ manPageBuildPath | SphinxMan `Set.member` doctargets ] - - -- include toplevel html target unless we neither want - -- haddocks nor html pages produced by sphinx. - ++ [ html | Haddocks `Set.member` doctargets - || SphinxHTML `Set.member` doctargets ] - - -- include archives for whatever targets remain from - -- the --docs arguments we got. - ++ [ ar - | (ar, doc) <- zip archives docPaths - , archiveTarget doc `Set.member` doctargets ] - - need $ map (root -/-) targets - - when (SphinxHTML `Set.member` doctargets) - $ checkUserGuideFlags $ root -/- htmlRoot -/- "users_guide" -/- "ghc-flags.txt" - - where archiveTarget "libraries" = Haddocks - archiveTarget _ = SphinxHTML - --- | Check Sphinx log for undefined reference target errors. Ideally we would --- use sphinx's @-W@ flag here but unfortunately it also turns syntax --- highlighting warnings into errors which is undesirable. -checkSphinxWarnings :: FilePath -- ^ output directory - -> Action () -checkSphinxWarnings out = do - log <- liftIO $ readFile (out -/- ".log") - when ("Inline literal start-string without end-string." `isInfixOf` log) - $ fail $ unlines - [ "Syntax error found in Sphinx log. " - , "" - , "This likely means that you have forgotten a \\ after inline code block. For instance," - , "you might have written:" - , "" - , " are not allowed to contain nested ``forall``s." - , "" - , "Whereas you need to write:" - , "" - , " are not allowed to contain nested ``forall``\\s." - , "" - ] - - when ("reference target not found" `isInfixOf` log) - $ fail "Undefined reference targets found in Sphinx log." - - when ("undefined label:" `isInfixOf` log) - $ fail "Undefined labels found in Sphinx log." - - when (any hasError (lines log)) - $ fail "Errors found in the Sphinx log." - where - hasError line = - case words line of - _ : "ERROR:" : _ -> True - _ : "CRITICAL:" : _ -> True - _ -> False - --- | Check that all GHC flags are documented in the users guide. -checkUserGuideFlags :: FilePath -> Action () -checkUserGuideFlags documentedFlagList = do - scriptPath <- ( "docs/users_guide/compare-flags.py") <$> topDirectory - ghc <- programPath (vanillaContext Stage1 ghc) - need [ghc] - ghcPath <- () <$> topDirectory <*> pure ghc - runBuilder Python - [ scriptPath - , "--doc-flags", documentedFlagList - , "--ghc", ghcPath - ] [documentedFlagList] [] - - -------------------------------------- HTML ------------------------------------- - --- | Build rules for HTML documentation. -buildHtmlDocumentation :: Rules () -buildHtmlDocumentation = do - mapM_ buildSphinxHtml $ docPaths \\ ["libraries"] - buildLibraryDocumentation - root <- buildRootRules - - root -/- htmlRoot -/- "index.html" %> \file -> do - doctargets <- ghcDocs =<< flavour - - -- We include the HTML output of haddock for libraries unless - -- told not to (e.g with --docs=no-haddocks). Likewise for - -- the HTML version of the users guide or the Haddock manual. - let targets = [ "libraries" | Haddocks `Set.member` doctargets ] - ++ concat [ ["users_guide", "Haddock"] - | SphinxHTML `Set.member` doctargets ] - need $ map ((root -/-) . pathIndex) targets - - copyFile "docs/index.html" file - --- | Compile a Sphinx ReStructured Text package to HTML. -buildSphinxHtml :: FilePath -> Rules () -buildSphinxHtml path = do - root <- buildRootRules - root -/- htmlRoot -/- path -/- "index.html" %> \file -> do - let dest = takeDirectory file - rstFilesDir = pathPath path - - needDocDeps - - rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"] - need (map (rstFilesDir -/-) rstFiles) - build $ target docContext (Sphinx HtmlMode) [pathPath path] [dest] - checkSphinxWarnings dest - ------------------------------------- Haddock ----------------------------------- - --- | Build the haddocks for GHC's libraries. -buildLibraryDocumentation :: Rules () -buildLibraryDocumentation = do - root <- buildRootRules - - -- Building the "Haskell Hierarchical Libraries" index - root -/- htmlRoot -/- "libraries/index.html" %> \file -> do - need [ "libraries/prologue.txt" ] - - -- We want Haddocks for everything except `rts` to be built, but we - -- don't want the index to be polluted by stuff from `ghc`-the-library - -- (there will be a separate top-level link to those Haddocks). - haddocks <- allHaddocks - let neededDocs = filter (\x -> takeFileName x /= "rts.haddock") haddocks - libDocs = filter (\x -> takeFileName x /= "ghc.haddock") neededDocs - - need neededDocs - build $ target docContext (Haddock BuildIndex) libDocs [file] - -allHaddocks :: Action [FilePath] -allHaddocks = do - pkgs <- stagePackages Stage1 - sequence [ pkgHaddockFile $ vanillaContext Stage1 pkg - | pkg <- pkgs, isLibrary pkg, pkgName pkg /= "rts" ] - --- Note: this build rule creates plenty of files, not just the .haddock one. --- All of them go into the 'docRoot' subdirectory. Pedantically tracking all --- built files in the Shake database seems fragile and unnecessary. -buildPackageDocumentation :: Rules () -buildPackageDocumentation = do - root <- buildRootRules - - -- Per-package haddocks - root -/- htmlRoot -/- "libraries/*/haddock-prologue.txt" %> \file -> do - ctx <- pkgDocContext <$> getPkgDocTarget root file - syn <- pkgSynopsis (Context.package ctx) - desc <- pkgDescription (Context.package ctx) - let prologue = if null desc then syn else desc - liftIO $ writeFile file prologue - - root -/- htmlRoot -/- "libraries/*/*.haddock" %> \file -> do - context <- pkgDocContext <$> getPkgDocTarget root file - need [ takeDirectory file -/- "haddock-prologue.txt"] - haddocks <- haddockDependencies context - - -- Build Haddock documentation - -- TODO: Pass the correct way from Rules via Context. - dynamicPrograms <- dynamicGhcPrograms =<< flavour - let haddockWay = if dynamicPrograms then dynamic else vanilla - - -- Build the dependencies of the package we are going to build documentation for - dep_pkgs <- sequence [pkgConfFile (context { way = haddockWay, Context.package = p}) - | (p, _) <- haddocks] - - srcs <- hsSources context - need $ srcs ++ (map snd haddocks) ++ dep_pkgs - - statsFilesDir <- haddockStatsFilesDir - createDirectory statsFilesDir - build $ target (context {way = haddockWay}) (Haddock BuildPackage) srcs [file] - produces [ - statsFilesDir pkgName (Context.package context) <.> "t" - ] - -data PkgDocTarget = DotHaddock PackageName | HaddockPrologue PackageName - deriving (Eq, Show) - -pkgDocContext :: PkgDocTarget -> Context -pkgDocContext target = Context Stage1 (unsafeFindPackageByName name) vanilla Final - where - name = case target of DotHaddock n -> n - HaddockPrologue n -> n - -parsePkgDocTarget :: FilePath -> Parsec.Parsec String () PkgDocTarget -parsePkgDocTarget root = do - _ <- Parsec.string root *> Parsec.optional (Parsec.char '/') - _ <- Parsec.string (htmlRoot ++ "/") - _ <- Parsec.string "libraries/" - (pkgname, _, _) <- parsePkgId <* Parsec.char '/' - Parsec.choice - [ Parsec.try (Parsec.string "haddock-prologue.txt") - *> pure (HaddockPrologue pkgname) - , Parsec.string (pkgname <.> "haddock") -- Same as before - *> pure (DotHaddock pkgname) - ] - -getPkgDocTarget :: FilePath -> FilePath -> Action PkgDocTarget -getPkgDocTarget root path = - parsePath (parsePkgDocTarget root) "" path - --------------------------------------- PDF ------------------------------------- - --- | Build all PDF documentation -buildPdfDocumentation :: Rules () -buildPdfDocumentation = do - -- Note [Avoiding mktexfmt race] - -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- We must ensure that the *first* xelatex invocation in the - -- build is performed serially (that is, not concurrently with - -- any other xelatex invocations) as mktexfmt does not handle - -- racing `mkdir` calls gracefully. However, we assume that - -- subsequent invocations are safe to run concurrently since the - -- initial call will have created the requisite directories (namely - -- $HOME/.texlive2020/texmf-var/web2c). - -- - -- Fixes #25564. - let maxConcurrentReaders = 1000 - xelatexMutex <- newResource "xelatex-mutex" maxConcurrentReaders - let rs = [(xelatexMutex, 1)] - - mapM_ (buildSphinxPdf rs) docPaths - --- | Compile a Sphinx ReStructured Text package to LaTeX -buildSphinxPdf :: [(Resource, Int)] -> FilePath -> Rules () -buildSphinxPdf rs path = do - root <- buildRootRules - root -/- pdfRoot -/- path <.> "pdf" %> \file -> do - - needDocDeps - - withTempDir $ \dir -> do - let rstFilesDir = pathPath path - rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"] - need (map (rstFilesDir -/-) rstFiles) - build $ target docContext (Sphinx LatexMode) [pathPath path] [dir] - checkSphinxWarnings dir - - -- LaTeX "fixed point" - -- See Note [Avoiding mktexfmt race] above. - buildWithResources rs $ target docContext Xelatex [path <.> "tex"] [dir] - build $ target docContext Xelatex [path <.> "tex"] [dir] - build $ target docContext Xelatex [path <.> "tex"] [dir] - build $ target docContext Makeindex [path <.> "idx"] [dir] - build $ target docContext Xelatex [path <.> "tex"] [dir] - build $ target docContext Xelatex [path <.> "tex"] [dir] - copyFileUntracked (dir -/- path <.> "pdf") file - ------------------------------------- Info -------------------------------------- - --- | Build the user guide as an Info hypertext -buildSphinxInfoGuide :: Rules () -buildSphinxInfoGuide = do - root <- buildRootRules - let path = "GHCUsersGuide" - root -/- infoRoot -/- path <.> "info" %> \ file -> do - - needDocDeps - - withTempDir $ \dir -> do - let rstFilesDir = pathPath path - rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"] - need (map (rstFilesDir -/-) rstFiles) - build $ target docContext (Sphinx InfoMode) [pathPath path] [dir] - checkSphinxWarnings dir - -- Sphinx outputs texinfo source and a makefile, the - -- default target of which actually produces the target - -- for this build rule. - let p = dir -/- path - let (texipath :& infopath :& _) = fmap (p <.>) ("texi" :& "info" :& Nil) - build $ target docContext (Makeinfo) [texipath] [infopath] - copyFileUntracked infopath file - ------------------------------------- Archive ----------------------------------- - --- | Build documentation archives. -buildDocumentationArchives :: Rules () -buildDocumentationArchives = mapM_ buildArchive docPaths - -buildArchive :: FilePath -> Rules () -buildArchive path = do - root <- buildRootRules - root -/- pathArchive path %> \file -> do - root <- buildRoot - let src = root -/- pathIndex path - need [src] - build $ target docContext (Tar Create) [takeDirectory src] [file] - --- | Build the man page. -buildManPage :: Rules () -buildManPage = do - root <- buildRootRules - root -/- manPageBuildPath %> \file -> do - need ["docs/users_guide/ghc.rst"] - needDocDeps - - withTempDir $ \dir -> do - build $ target docContext (Sphinx ManMode) ["docs/users_guide"] [dir] - checkSphinxWarnings dir - copyFileUntracked (dir -/- "ghc.1") file - --- | Find the Haddock files for the dependencies of the current library. -haddockDependencies :: Context -> Action [(Package, FilePath)] -haddockDependencies context = do - depNames <- interpretInContext context (getContextData depNames) - sequence [ (,) <$> pure depPkg <*> (pkgHaddockFile $ vanillaContext Stage1 depPkg) - | Just depPkg <- map findPackageByName depNames, depPkg /= rts ] diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs deleted file mode 100644 index bf54e83b10c3..000000000000 --- a/hadrian/src/Rules/Generate.hs +++ /dev/null @@ -1,730 +0,0 @@ -module Rules.Generate ( - isGeneratedCmmFile, compilerDependencies, generatePackageCode, - generateRules, copyRules, generatedDependencies, - templateRules - ) where - -import Development.Shake.FilePath -import Data.Char (isSpace) -import qualified Data.Set as Set -import Base -import qualified Context -import Expression -import Hadrian.Oracles.TextFile (lookupSystemConfig) -import Oracles.Flag hiding (arSupportsAtFile, arSupportsDashL) -import Oracles.ModuleFiles -import Oracles.Setting -import Hadrian.Haskell.Cabal.Type (PackageData(version)) -import Hadrian.Haskell.Cabal -import Hadrian.Oracles.Cabal (readPackageData) -import Packages -import Rules.Libffi -import Settings -import Target -import Utilities - -import GHC.Toolchain as Toolchain hiding (HsCpp(HsCpp)) -import GHC.Toolchain.Program -import GHC.Platform.ArchOS -import Settings.Program (ghcWithInterpreter) - --- | Track this file to rebuild generated files whenever it changes. -trackGenerateHs :: Expr () -trackGenerateHs = expr $ need [sourcePath -/- "Rules/Generate.hs"] - -primopsSource :: FilePath -primopsSource = "compiler/GHC/Builtin/primops.txt.pp" - -primopsTxt :: Stage -> FilePath -primopsTxt stage = buildDir (vanillaContext stage compiler) -/- "primops.txt" - -isGeneratedCmmFile :: FilePath -> Bool -isGeneratedCmmFile file = - takeBaseName file `elem` - [ "AutoApply" - , "AutoApply_V16" - , "AutoApply_V32" - , "AutoApply_V64" - ] - -ghcInternalDependencies :: Expr [FilePath] -ghcInternalDependencies = do - stage <- getStage - path <- expr $ buildPath (vanillaContext stage ghcInternal) - return [path -/- "GHC/Internal/Prim.hs", path -/- "GHC/Internal/PrimopWrappers.hs"] - -rtsDependencies :: Expr [FilePath] -rtsDependencies = do - stage <- getStage - rtsPath <- expr (rtsBuildPath stage) - jsTarget <- expr isJsTarget - useSystemFfi <- expr (flag UseSystemFfi) - - let -- headers common to native and JS RTS - common_headers = - [ "ghcautoconf.h", "ghcplatform.h" - , "DerivedConstants.h" - ] - -- headers specific to the native RTS - native_headers = - [ "rts" -/- "EventTypes.h" - , "rts" -/- "EventLogConstants.h" - ] - ++ (if useSystemFfi then [] else libffiHeaderFiles) - headers - | jsTarget = common_headers - | otherwise = common_headers ++ native_headers - pure $ ((rtsPath -/- "include") -/-) <$> headers - -compilerDependencies :: Expr [FilePath] -compilerDependencies = do - let fixed = ("compiler" -/-) <$> - [ "GHC/CmmToLlvm/Version/Bounds.hs" - ] - stage <- getStage - ghcPath <- expr $ buildPath (vanillaContext stage compiler) - let buildSpecific = (ghcPath -/-) <$> - [ "primop-code-size.hs-incl" - , "primop-commutable.hs-incl" - , "primop-data-decl.hs-incl" - , "primop-fixity.hs-incl" - , "primop-effects.hs-incl" - , "primop-list.hs-incl" - , "primop-out-of-line.hs-incl" - , "primop-primop-info.hs-incl" - , "primop-strictness.hs-incl" - , "primop-is-work-free.hs-incl" - , "primop-is-cheap.hs-incl" - , "primop-tag.hs-incl" - , "primop-vector-tycons.hs-incl" - , "primop-vector-tys-exports.hs-incl" - , "primop-vector-tys.hs-incl" - , "primop-vector-uniques.hs-incl" - , "primop-docs.hs-incl" - , "primop-deprecations.hs-incl" - , "primop-prim-module.hs-incl" - , "primop-wrappers-module.hs-incl" - , "GHC/Platform/Constants.hs" - , "GHC/Settings/Config.hs" - ] - pure $ fixed ++ buildSpecific - -generatedDependencies :: Expr [FilePath] -generatedDependencies = do - mconcat [ package compiler ? compilerDependencies - , package ghcInternal ? ghcInternalDependencies - , package rts ? rtsDependencies - ] - -generate :: FilePath -> Context -> Expr String -> Action () -generate file context expr = do - contents <- interpretInContext context expr - writeFileChanged file contents - putSuccess $ "| Successfully generated " ++ file ++ "." - -generatePackageCode :: Context -> Rules () -generatePackageCode context@(Context stage pkg _ _) = do - root <- buildRootRules - let dir = buildDir context - generated f = (root -/- dir -/- "**/*.hs") ?== f && not ("//autogen/*" ?== f) - go gen file = generate file context gen - generated ?> \file -> do - let unpack = fromMaybe . error $ "No generator for " ++ file ++ "." - (src, builder) <- unpack <$> findGenerator context file - -- Make sure we have configured the package before running the builder - pkg_setup <- pkgSetupConfigFile context - need [src, pkg_setup] - build $ target context builder [src] [file] - let boot = src -<.> "hs-boot" - whenM (doesFileExist boot) $ do - let target = file -<.> "hs-boot" - copyFile boot target - produces [target] - - priority 2.0 $ do - when (pkg == compiler) $ do - root -/- "**" -/- dir -/- "GHC/Platform/Constants.hs" %> genPlatformConstantsType context - root -/- "**" -/- dir -/- "GHC/Settings/Config.hs" %> go generateConfigHs - root -/- "**" -/- dir -/- "*.hs-incl" %> genPrimopCode context - when (pkg == ghcInternal) $ do - root -/- "**" -/- dir -/- "GHC/Internal/Prim.hs" %> genPrimopCode context - root -/- "**" -/- dir -/- "GHC/Internal/PrimopWrappers.hs" %> genPrimopCode context - when (pkg == ghcBoot) $ do - root -/- "**" -/- dir -/- "GHC/Version.hs" %> go generateVersionHs - root -/- "**" -/- dir -/- "GHC/Platform/Host.hs" %> go generatePlatformHostHs - - when (pkg == compiler) $ do - root -/- primopsTxt stage %> \file -> do - need $ [primopsSource] - build $ target context HsCpp [primopsSource] [file] - - when (pkg == rts) $ do - root -/- "**" -/- dir -/- "cmm/AutoApply.cmm" %> \file -> do - -- See Note [How genapply gets target info] for details - path <- buildPath context - let h = path -/- "include/DerivedConstants.h" - need [h] - build $ target context (GenApply Nothing) [h] [file] - root -/- "**" -/- dir -/- "cmm/AutoApply_V16.cmm" %> \file -> do - path <- buildPath context - let h = path -/- "include/DerivedConstants.h" - need [h] - build $ target context (GenApply (Just 16)) [h] [file] - root -/- "**" -/- dir -/- "cmm/AutoApply_V32.cmm" %> \file -> do - path <- buildPath context - let h = path -/- "include/DerivedConstants.h" - need [h] - build $ target context (GenApply (Just 32)) [h] [file] - root -/- "**" -/- dir -/- "cmm/AutoApply_V64.cmm" %> \file -> do - path <- buildPath context - let h = path -/- "include/DerivedConstants.h" - need [h] - build $ target context (GenApply (Just 64)) [h] [file] - root -/- "**" -/- dir -/- "include/ghcautoconf.h" %> \_ -> - need . pure =<< pkgSetupConfigFile context - root -/- "**" -/- dir -/- "include/ghcplatform.h" %> \_ -> - need . pure =<< pkgSetupConfigFile context - root -/- "**" -/- dir -/- "include/DerivedConstants.h" %> genPlatformConstantsHeader context - root -/- "**" -/- dir -/- "include/rts/EventLogConstants.h" %> genEventTypes "--event-types-defines" - root -/- "**" -/- dir -/- "include/rts/EventTypes.h" %> genEventTypes "--event-types-array" - -genEventTypes :: String -> FilePath -> Action () -genEventTypes flag file = do - need ["rts" -/- "gen_event_types.py"] - runBuilder Python - ["rts" -/- "gen_event_types.py", flag, file] - [] [] - -genPrimopCode :: Context -> FilePath -> Action () -genPrimopCode context@(Context stage _pkg _ _) file = do - root <- buildRoot - need [root -/- primopsTxt stage] - build $ target context GenPrimopCode [root -/- primopsTxt stage] [file] - -genPlatformConstantsType :: Context -> FilePath -> Action () -genPlatformConstantsType context file = do - withTempDir $ \tmpdir -> - build $ target context DeriveConstants [] [file,tmpdir] - -genPlatformConstantsHeader :: Context -> FilePath -> Action () -genPlatformConstantsHeader context file = do - -- N.B. deriveConstants needs to compile programs which #include - -- PosixSource.h, which #include's ghcplatform.h. Fixes #18290. - let prefix = takeDirectory file - need - [ prefix -/- "ghcplatform.h" - , prefix -/- "ghcautoconf.h" - ] - withTempDir $ \tmpdir -> build $ - target context DeriveConstants [] [file, tmpdir] - -copyRules :: Rules () -copyRules = do - root <- buildRootRules - forM_ allStages $ \stage -> do - let prefix = root -/- stageString stage -/- "lib" - - infixl 1 <~ - pattern <~ mdir = pattern %> \file -> do - dir <- mdir - copyFile (dir -/- makeRelative prefix file) file - - prefix -/- "ghc-usage.txt" <~ return "driver" - prefix -/- "ghci-usage.txt" <~ return "driver" - prefix -/- "llvm-targets" <~ return "." - prefix -/- "llvm-passes" <~ return "." - prefix -/- "ghc-interp.js" <~ return "." - prefix -/- "template-hsc.h" <~ return (pkgPath hsc2hs -/- "data") - - prefix -/- "dyld.mjs" %> \file -> do - copyFile ("utils/jsffi" -/- makeRelative prefix file) file - makeExecutable file - - prefix -/- "post-link.mjs" %> \file -> do - copyFile ("utils/jsffi" -/- makeRelative prefix file) file - makeExecutable file - - prefix -/- "prelude.mjs" <~ pure "utils/jsffi" - - prefix -/- "html/**" <~ return "utils/haddock/haddock-api/resources" - prefix -/- "latex/**" <~ return "utils/haddock/haddock-api/resources" - - forM_ [Inplace, Final] $ \iplace -> - root -/- relativePackageDbPath (PackageDbLoc stage iplace) -/- systemCxxStdLibConf %> \file -> do - copyFile ("mk" -/- "system-cxx-std-lib-1.0.conf") file - -generateRules :: Rules () -generateRules = do - root <- buildRootRules - - (root -/- "ghc-stage1") <~+ ghcWrapper Stage1 - (root -/- "ghc-stage2") <~+ ghcWrapper Stage2 - (root -/- "ghc-stage3") <~+ ghcWrapper Stage3 - - forM_ allStages $ \stage -> do - let prefix = root -/- stageString stage -/- "lib" - go gen file = generate file (semiEmptyTarget (succStage stage)) gen - (prefix -/- "settings") %> \out -> go (generateSettings out) out - - where - file <~+ gen = file %> \out -> generate out emptyTarget gen >> makeExecutable out - --- TODO: Use the Types, Luke! (drop partial function) --- We sometimes need to evaluate expressions that do not require knowing all --- information about the context. In this case, we don't want to know anything. -semiEmptyTarget :: Stage -> Context -semiEmptyTarget stage = vanillaContext stage - (error "Rules.Generate.emptyTarget: unknown package") - -emptyTarget :: Context -emptyTarget = vanillaContext (error "Rules.Generate.emptyTarget: unknown stage") - (error "Rules.Generate.emptyTarget: unknown package") - --- | A set of interpolation variable substitutions. -newtype Interpolations = Interpolations (Action [(String, String)]) - -instance Semigroup Interpolations where - Interpolations m <> Interpolations n = Interpolations ((++) <$> m <*> n) - -instance Monoid Interpolations where - mempty = Interpolations $ return [] - --- | @interpolateVar var value@ is an interpolation which replaces @\@var\@@ --- with the result of @value@. -interpolateVar :: String -> Action String -> Interpolations -interpolateVar var value = Interpolations $ do - val <- value - return [(var, val)] - -runInterpolations :: Interpolations -> String -> Action String -runInterpolations (Interpolations mk_substs) input = do - substs <- mk_substs - let subst :: String -> String - subst = foldr (.) id [replace ("@"++k++"@") v | (k,v) <- substs] - return (subst input) - --- | Interpolate the given variable with the value of the given 'Setting'. -interpolateSetting :: String -> Setting -> Interpolations -interpolateSetting name settng = interpolateVar name $ setting settng - --- | Interpolate the @ProjectVersion@, @ProjectVersionMunged@, and @ProjectVersionForLib@ variables. -projectVersion :: Interpolations -projectVersion = mconcat - [ interpolateSetting "ProjectVersion" ProjectVersion - , interpolateSetting "ProjectVersionMunged" ProjectVersionMunged - , interpolateSetting "ProjectVersionForLib" ProjectVersionForLib - ] - -packageVersions :: Interpolations -packageVersions = foldMap f [ base, ghcPrim, compiler, ghc, cabal, templateHaskell, ghcCompact, array ] - where - f :: Package -> Interpolations - f pkg = interpolateVar var $ version <$> readPackageData pkg - where var = "LIBRARY_" <> escapedPkgName pkg <> "_VERSION" - -packageUnitIds :: Stage -> Interpolations -packageUnitIds stage = - foldMap f [ base, ghcPrim, compiler, ghc, cabal, templateHaskell, ghcCompact, array ] - where - f :: Package -> Interpolations - f pkg = interpolateVar var $ pkgUnitId stage pkg - where var = "LIBRARY_" <> escapedPkgName pkg <> "_UNIT_ID" - -escapedPkgName :: Package -> String -escapedPkgName = map f . pkgName - where - f '-' = '_' - f other = other - -templateRuleFrom :: FilePath -> FilePath -> Interpolations -> Rules () -templateRuleFrom inPath outPath interps = do - outPath %> \_ -> do - s <- readFile' inPath - result <- runInterpolations interps s - writeFile' outPath result - putSuccess ("| Successfully generated " ++ outPath ++ " from its template") - -templateRule :: FilePath -> Interpolations -> Rules () -templateRule outPath = - templateRuleFrom (outPath <.> "in") outPath - -templateRules :: Rules () -templateRules = do - templateRule "compiler/ghc.cabal" $ projectVersion - templateRule "driver/ghci/ghci-wrapper.cabal" $ projectVersion - templateRule "ghc/ghc-bin.cabal" $ projectVersion - templateRule "utils/iserv/iserv.cabal" $ projectVersion - templateRule "utils/remote-iserv/remote-iserv.cabal" $ projectVersion - templateRule "utils/runghc/runghc.cabal" $ projectVersion - templateRule "libraries/ghc-boot/ghc-boot.cabal" $ projectVersion - templateRule "libraries/ghc-boot-th/ghc-boot-th.cabal" $ mconcat - [ projectVersion - , interpolateVar "Suffix" $ pure "" - , interpolateVar "SourceRoot" $ pure "." - ] - templateRuleFrom "libraries/ghc-boot-th/ghc-boot-th.cabal.in" - "libraries/ghc-boot-th-next/ghc-boot-th-next.cabal" $ mconcat - [ projectVersion - , interpolateVar "Suffix" $ pure "-next" - , interpolateVar "SourceRoot" $ pure "../ghc-boot-th" - ] - templateRule "libraries/ghci/ghci.cabal" $ projectVersion - templateRule "libraries/ghc-heap/ghc-heap.cabal" $ projectVersion - templateRule "libraries/ghc-internal/ghc-internal.cabal" $ projectVersion - templateRule "libraries/ghc-experimental/ghc-experimental.cabal" $ projectVersion - templateRule "libraries/base/base.cabal" $ projectVersion - templateRule "utils/ghc-pkg/ghc-pkg.cabal" $ projectVersion - templateRule "libraries/template-haskell/template-haskell.cabal" $ mconcat - [ projectVersion - ] - templateRule "libraries/prologue.txt" $ packageVersions - templateRule "rts/include/ghcversion.h" $ mconcat - [ interpolateSetting "ProjectVersionInt" ProjectVersionInt - , interpolateSetting "ProjectVersion" ProjectVersion - , interpolateSetting "ProjectPatchLevel1" ProjectPatchLevel1 - , interpolateSetting "ProjectPatchLevel2" ProjectPatchLevel2 - ] - templateRule "docs/index.html" $ packageUnitIds Stage1 - templateRule "docs/users_guide/ghc_config.py" $ mconcat - [ projectVersion - , packageUnitIds Stage1 - , interpolateSetting "LlvmMinVersion" LlvmMinVersion - , interpolateSetting "LlvmMaxVersion" LlvmMaxVersion - ] - templateRule "compiler/GHC/CmmToLlvm/Version/Bounds.hs" $ mconcat - [ interpolateVar "LlvmMinVersion" $ replaceEq '.' ',' <$> setting LlvmMinVersion - , interpolateVar "LlvmMaxVersion" $ replaceEq '.' ',' <$> setting LlvmMaxVersion - ] - bindistRules - -bindistRules :: Rules () -bindistRules = do - templateRule ("mk" -/- "project.mk") $ mconcat - [ interpolateSetting "ProjectName" ProjectName - , interpolateSetting "ProjectVersion" ProjectVersion - , interpolateSetting "ProjectVersionInt" ProjectVersionInt - , interpolateSetting "ProjectPatchLevel" ProjectPatchLevel - , interpolateSetting "ProjectPatchLevel1" ProjectPatchLevel1 - , interpolateSetting "ProjectPatchLevel2" ProjectPatchLevel2 - , interpolateSetting "ProjectGitCommitId" ProjectGitCommitId - - , interpolateVar "HostOS_CPP" $ fmap cppify $ interp $ queryHost queryOS - - , interpolateVar "TargetPlatform" $ getTarget targetPlatformTriple - , interpolateVar "TargetPlatform_CPP" $ cppify <$> getTarget targetPlatformTriple - , interpolateVar "TargetArch_CPP" $ cppify <$> getTarget queryArch - , interpolateVar "TargetOS_CPP" $ cppify <$> getTarget queryOS - , interpolateVar "LLVMTarget" $ getTarget tgtLlvmTarget - ] - templateRule ("distrib" -/- "configure.ac") $ mconcat - [ interpolateSetting "ConfiguredEmsdkVersion" EmsdkVersion - , interpolateVar "CrossCompilePrefix" $ do - crossCompiling <- interp $ getFlag CrossCompiling - tpf <- setting TargetPlatformFull - pure $ if crossCompiling then tpf <> "-" else "" - , interpolateVar "LeadingUnderscore" $ yesNo <$> getTarget tgtSymbolsHaveLeadingUnderscore - , interpolateSetting "LlvmMaxVersion" LlvmMaxVersion - , interpolateSetting "LlvmMinVersion" LlvmMinVersion - , interpolateVar "LlvmTarget" $ getTarget tgtLlvmTarget - , interpolateSetting "ProjectVersion" ProjectVersion - , interpolateVar "SettingsUseDistroMINGW" $ lookupSystemConfig "settings-use-distro-mingw" - , interpolateVar "TablesNextToCode" $ yesNo <$> getTarget tgtTablesNextToCode - , interpolateVar "TargetHasLibm" $ lookupSystemConfig "target-has-libm" - , interpolateVar "TargetPlatform" $ getTarget targetPlatformTriple - , interpolateVar "TargetWordBigEndian" $ getTarget isBigEndian - , interpolateVar "TargetWordSize" $ getTarget wordSize - , interpolateVar "Unregisterised" $ yesNo <$> getTarget tgtUnregisterised - , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw - , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors - , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP - , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base - ] - where - interp = interpretInContext (semiEmptyTarget Stage2) - getTarget = interp . queryTarget - --- | Given a 'String' replace characters '.' and '-' by underscores ('_') so that --- the resulting 'String' is a valid C preprocessor identifier. -cppify :: String -> String -cppify = replaceEq '-' '_' . replaceEq '.' '_' - - --- Generators - --- | GHC wrapper scripts used for passing the path to the right package database --- when invoking in-tree GHC executables. -ghcWrapper :: Stage -> Expr String -ghcWrapper (Stage0 {}) = error "Stage0 GHC does not require a wrapper script to run." -ghcWrapper stage = do - ghcPath <- expr $ () <$> topDirectory - <*> programPath (vanillaContext (predStage stage) ghc) - return $ unwords $ map show $ [ ghcPath ] - ++ [ "$@" ] - -generateSettings :: FilePath -> Expr String -generateSettings settingsFile = do - ctx <- getContext - stage <- getStage - - package_db_path <- expr $ do - let get_pkg_db stg = packageDbPath (PackageDbLoc stg Final) - case stage of - Stage0 {} -> error "Unable to generate settings for stage0" - Stage1 -> get_pkg_db Stage1 - Stage2 -> get_pkg_db Stage1 - Stage3 -> get_pkg_db Stage2 - - -- The unit-id of the base package which is always linked against (#25382) - base_unit_id <- expr $ do - case stage of - Stage0 {} -> error "Unable to generate settings for stage0" - Stage1 -> pkgUnitId Stage1 base - Stage2 -> pkgUnitId Stage1 base - Stage3 -> pkgUnitId Stage2 base - - let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path - - settings <- traverse sequence $ - [ ("C compiler command", queryTarget ccPath) - , ("C compiler flags", queryTarget ccFlags) - , ("C++ compiler command", queryTarget cxxPath) - , ("C++ compiler flags", queryTarget cxxFlags) - , ("C compiler link flags", queryTarget clinkFlags) - , ("C compiler supports -no-pie", queryTarget linkSupportsNoPie) - , ("CPP command", queryTarget cppPath) - , ("CPP flags", queryTarget cppFlags) - , ("Haskell CPP command", queryTarget hsCppPath) - , ("Haskell CPP flags", queryTarget hsCppFlags) - , ("JavaScript CPP command", queryTarget jsCppPath) - , ("JavaScript CPP flags", queryTarget jsCppFlags) - , ("C-- CPP command", queryTarget cmmCppPath) - , ("C-- CPP flags", queryTarget cmmCppFlags) - , ("C-- CPP supports -g0", queryTarget cmmCppSupportsG0') - , ("ld supports compact unwind", queryTarget linkSupportsCompactUnwind) - , ("ld supports filelist", queryTarget linkSupportsFilelist) - , ("ld supports single module", queryTarget linkSupportsSingleModule) - , ("ld is GNU ld", queryTarget linkIsGnu) - , ("Merge objects command", queryTarget mergeObjsPath) - , ("Merge objects flags", queryTarget mergeObjsFlags) - , ("Merge objects supports response files", queryTarget mergeObjsSupportsResponseFiles') - , ("ar command", queryTarget arPath) - , ("ar flags", queryTarget arFlags) - , ("ar supports at file", queryTarget arSupportsAtFile') - , ("ar supports -L", queryTarget arSupportsDashL') - , ("ranlib command", queryTarget ranlibPath) - , ("otool command", queryTarget otoolPath) - , ("install_name_tool command", queryTarget installNameToolPath) - , ("windres command", queryTarget (maybe "/bin/false" prgPath . tgtWindres)) -- TODO: /bin/false is not available on many distributions by default, but we keep it as it were before the ghc-toolchain patch. Fix-me. - , ("unlit command", ("$topdir/../bin/" <>) <$> expr (programName (ctx { Context.package = unlit }))) - , ("cross compiling", expr $ yesNo <$> flag CrossCompiling) - , ("target platform string", queryTarget targetPlatformTriple) - , ("target os", queryTarget (show . archOS_OS . tgtArchOs)) - , ("target arch", queryTarget (show . archOS_arch . tgtArchOs)) - , ("target word size", queryTarget wordSize) - , ("target word big endian", queryTarget isBigEndian) - , ("target has GNU nonexec stack", queryTarget (yesNo . Toolchain.tgtSupportsGnuNonexecStack)) - , ("target has .ident directive", queryTarget (yesNo . Toolchain.tgtSupportsIdentDirective)) - , ("target has subsections via symbols", queryTarget (yesNo . Toolchain.tgtSupportsSubsectionsViaSymbols)) - , ("target has libm", expr $ lookupSystemConfig "target-has-libm") - , ("Unregisterised", queryTarget (yesNo . tgtUnregisterised)) - , ("LLVM target", queryTarget tgtLlvmTarget) - , ("LLVM llc command", queryTarget llcPath) - , ("LLVM opt command", queryTarget optPath) - , ("LLVM llvm-as command", queryTarget llvmAsPath) - , ("LLVM llvm-as flags", queryTarget llvmAsFlags) - , ("Use inplace MinGW toolchain", expr $ lookupSystemConfig "settings-use-distro-mingw") - - , ("target RTS linker only supports shared libraries", expr $ yesNo <$> targetRTSLinkerOnlySupportsSharedLibs) - , ("Use interpreter", expr $ yesNo <$> ghcWithInterpreter (predStage stage)) - , ("Support SMP", expr $ yesNo <$> targetSupportsSMP) - , ("RTS ways", escapeArgs . map show . Set.toList <$> getRtsWays) - , ("Tables next to code", queryTarget (yesNo . tgtTablesNextToCode)) - , ("Leading underscore", queryTarget (yesNo . tgtSymbolsHaveLeadingUnderscore)) - , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) - , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) - , ("Relative Global Package DB", pure rel_pkg_db) - , ("base unit-id", pure base_unit_id) - ] - let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" - pure $ case settings of - [] -> "[]" - s : ss -> unlines $ - ("[" ++ showTuple s) - : ((\s' -> "," ++ showTuple s') <$> ss) - ++ ["]"] - where - ccPath = prgPath . ccProgram . tgtCCompiler - ccFlags = escapeArgs . prgFlags . ccProgram . tgtCCompiler - cxxPath = prgPath . cxxProgram . tgtCxxCompiler - cxxFlags = escapeArgs . prgFlags . cxxProgram . tgtCxxCompiler - clinkFlags = escapeArgs . prgFlags . ccLinkProgram . tgtCCompilerLink - linkSupportsNoPie = yesNo . ccLinkSupportsNoPie . tgtCCompilerLink - cppPath = prgPath . cppProgram . tgtCPreprocessor - cppFlags = escapeArgs . prgFlags . cppProgram . tgtCPreprocessor - hsCppPath = prgPath . hsCppProgram . tgtHsCPreprocessor - hsCppFlags = escapeArgs . prgFlags . hsCppProgram . tgtHsCPreprocessor - jsCppPath = maybe "" (prgPath . jsCppProgram) . tgtJsCPreprocessor - jsCppFlags = maybe "" (escapeArgs . prgFlags . jsCppProgram) . tgtJsCPreprocessor - cmmCppPath = prgPath . cmmCppProgram . tgtCmmCPreprocessor - cmmCppFlags = escapeArgs . prgFlags . cmmCppProgram . tgtCmmCPreprocessor - cmmCppSupportsG0' = yesNo . cmmCppSupportsG0 . tgtCmmCPreprocessor - mergeObjsPath = maybe "" (prgPath . mergeObjsProgram) . tgtMergeObjs - mergeObjsFlags = maybe "" (escapeArgs . prgFlags . mergeObjsProgram) . tgtMergeObjs - linkSupportsSingleModule = yesNo . ccLinkSupportsSingleModule . tgtCCompilerLink - linkSupportsFilelist = yesNo . ccLinkSupportsFilelist . tgtCCompilerLink - linkSupportsCompactUnwind = yesNo . ccLinkSupportsCompactUnwind . tgtCCompilerLink - linkIsGnu = yesNo . ccLinkIsGnu . tgtCCompilerLink - llcPath = maybe "" prgPath . tgtLlc - optPath = maybe "" prgPath . tgtOpt - llvmAsPath = maybe "" prgPath . tgtLlvmAs - llvmAsFlags = escapeArgs . maybe [] prgFlags . tgtLlvmAs - arPath = prgPath . arMkArchive . tgtAr - arFlags = escapeArgs . prgFlags . arMkArchive . tgtAr - arSupportsAtFile' = yesNo . arSupportsAtFile . tgtAr - arSupportsDashL' = yesNo . arSupportsDashL . tgtAr - otoolPath = maybe "" prgPath . tgtOtool - installNameToolPath = maybe "" prgPath . tgtInstallNameTool - ranlibPath = maybe "" (prgPath . ranlibProgram) . tgtRanlib - mergeObjsSupportsResponseFiles' = maybe "NO" (yesNo . mergeObjsSupportsResponseFiles) . tgtMergeObjs - -isBigEndian, wordSize :: Toolchain.Target -> String -isBigEndian = yesNo . (\case BigEndian -> True; LittleEndian -> False) . tgtEndianness -wordSize = show . wordSize2Bytes . tgtWordSize - --- | Generate @Config.hs@ files. -generateConfigHs :: Expr String -generateConfigHs = do - stage <- getStage - let chooseSetting x y = case stage of { Stage0 {} -> x; _ -> y } - buildPlatform <- chooseSetting (queryBuild targetPlatformTriple) (queryHost targetPlatformTriple) - hostPlatform <- chooseSetting (queryHost targetPlatformTriple) (queryTarget targetPlatformTriple) - trackGenerateHs - cProjectName <- getSetting ProjectName - cBooterVersion <- getSetting GhcVersion - -- We now give a unit-id with a version and a hash to ghc. - -- See Note [GHC's Unit Id] in GHC.Unit.Types - -- - -- It's crucial that the unit-id matches the unit-key -- ghc is no longer - -- part of the WiringMap, so we don't to go back and forth between the - -- unit-id and the unit-key -- we take care that they are the same by using - -- 'pkgUnitId' on 'compiler' (the ghc-library package) to create the - -- unit-id in both situations. - cProjectUnitId <- expr . (`pkgUnitId` compiler) =<< getStage - - cGhcInternalUnitId <- expr . (`pkgUnitId` ghcInternal) =<< getStage - return $ unlines - [ "module GHC.Settings.Config" - , " ( module GHC.Version" - , " , cBuildPlatformString" - , " , cHostPlatformString" - , " , cProjectName" - , " , cBooterVersion" - , " , cStage" - , " , cProjectUnitId" - , " , cGhcInternalUnitId" - , " ) where" - , "" - , "import GHC.Prelude.Basic" - , "" - , "import GHC.Version" - , "" - , "cBuildPlatformString :: String" - , "cBuildPlatformString = " ++ show buildPlatform - , "" - , "cHostPlatformString :: String" - , "cHostPlatformString = " ++ show hostPlatform - , "" - , "cProjectName :: String" - , "cProjectName = " ++ show cProjectName - , "" - , "cBooterVersion :: String" - , "cBooterVersion = " ++ show cBooterVersion - , "" - , "cStage :: String" - , "cStage = show (" ++ stageString stage ++ " :: Int)" - , "" - , "cProjectUnitId :: String" - , "cProjectUnitId = " ++ show cProjectUnitId - , "" - , "cGhcInternalUnitId :: String" - , "cGhcInternalUnitId = " ++ show cGhcInternalUnitId - ] - where - stageString (Stage0 InTreeLibs) = "1" - stageString Stage1 = "2" - stageString Stage2 = "3" - stageString Stage3 = "4" - stageString (Stage0 GlobalLibs) = error "stageString: StageBoot" - - --- | Generate @Version.hs@ files. -generateVersionHs :: Expr String -generateVersionHs = do - trackGenerateHs - cProjectGitCommitId <- getSetting ProjectGitCommitId - cProjectVersion <- getSetting ProjectVersion - cProjectVersionInt <- getSetting ProjectVersionInt - cProjectPatchLevel <- getSetting ProjectPatchLevel - cProjectPatchLevel1 <- getSetting ProjectPatchLevel1 - cProjectPatchLevel2 <- getSetting ProjectPatchLevel2 - - return $ unlines - [ "module GHC.Version where" - , "" - , "import Prelude -- See Note [Why do we import Prelude here?]" - , "" - , "cProjectGitCommitId :: String" - , "cProjectGitCommitId = " ++ show cProjectGitCommitId - , "" - , "cProjectVersion :: String" - , "cProjectVersion = " ++ show cProjectVersion - , "" - , "cProjectVersionInt :: String" - , "cProjectVersionInt = " ++ show cProjectVersionInt - , "" - , "cProjectPatchLevel :: String" - , "cProjectPatchLevel = " ++ show cProjectPatchLevel - , "" - , "cProjectPatchLevel1 :: String" - , "cProjectPatchLevel1 = " ++ show cProjectPatchLevel1 - , "" - , "cProjectPatchLevel2 :: String" - , "cProjectPatchLevel2 = " ++ show cProjectPatchLevel2 - ] - --- | Generate @Platform/Host.hs@ files. -generatePlatformHostHs :: Expr String -generatePlatformHostHs = do - trackGenerateHs - cHostPlatformArch <- queryHost (archOS_arch . tgtArchOs) - cHostPlatformOS <- queryHost (archOS_OS . tgtArchOs) - return $ unlines - [ "module GHC.Platform.Host where" - , "" - , "import GHC.Platform.ArchOS" - , "" - , "hostPlatformArch :: Arch" - , "hostPlatformArch = " ++ show cHostPlatformArch - , "" - , "hostPlatformOS :: OS" - , "hostPlatformOS = " ++ show cHostPlatformOS - , "" - , "hostPlatformArchOS :: ArchOS" - , "hostPlatformArchOS = ArchOS hostPlatformArch hostPlatformOS" - ] - --- | Just like 'GHC.ResponseFile.escapeArgs', but use spaces instead of newlines --- for splitting elements. -escapeArgs :: [String] -> String -escapeArgs = unwords . map escapeArg - -escapeArg :: String -> String -escapeArg = reverse . foldl' escape [] - -escape :: String -> Char -> String -escape cs c - | isSpace c - || '\\' == c - || '\'' == c - || '"' == c = c:'\\':cs -- n.b., our caller must reverse the result - | otherwise = c:cs diff --git a/hadrian/src/Rules/Gmp.hs b/hadrian/src/Rules/Gmp.hs deleted file mode 100644 index 162ffe652276..000000000000 --- a/hadrian/src/Rules/Gmp.hs +++ /dev/null @@ -1,170 +0,0 @@ -{-# LANGUAGE GADTs #-} - -module Rules.Gmp (gmpRules, gmpBuildPath, gmpObjects) where - -import Base -import Context -import Oracles.Setting -import Oracles.Flag -import Packages -import Target -import Utilities -import Hadrian.BuildPath -import Hadrian.Expression -import Settings.Builders.Common (cArgs, getStagedCCFlags) -import GHC.Platform.ArchOS - --- | Build in-tree GMP library objects (if GmpInTree flag is set) and return --- their paths. -gmpObjects :: Stage -> Action [FilePath] -gmpObjects s = do - isInTree <- flag GmpInTree - if not isInTree - then return [] - else do - -- Indirectly ensure object creation - let ctx = vanillaContext s ghcInternal - ghcInternalPath <- buildPath ctx - need [ghcInternalPath -/- "include/ghc-gmp.h"] - - gmpPath <- gmpIntreePath s - map (unifyPath . (gmpPath -/-)) <$> - -- Note we don't track the object files of the in-tree GMP library (cf - -- #15971). - liftIO (getDirectoryFilesIO gmpPath [gmpObjectsDir -/- "*.o"]) - --- | Build directory for in-tree GMP library --- /stageN/gmp/gmpbuild -gmpBuildPath :: Stage -> Action FilePath -gmpBuildPath s = gmpIntreePath s <&> (-/- "gmpbuild") - --- | Root directory for in-tree GMP library --- /stageN/gmp -gmpIntreePath :: Stage -> Action FilePath -gmpIntreePath s = buildRoot <&> (-/- stageString s -/- "gmp") - --- | Directory for in-tree GMP library object files, relative to 'gmpIntreePath'. -gmpObjectsDir :: FilePath -gmpObjectsDir = "objs" - -gmpRules :: Rules () -gmpRules = do - root <- buildRootRules - - let - -- Path to libraries/integer-gmp/gmp in the source tree - gmpBase :: FilePath - gmpBase = pkgPath ghcInternal -/- "gmp" - - -- Build in-tree gmp if necessary - -- Produce: ghc-internal/build/include/ghc-gmp.h - -- In-tree: copy gmp.h from in-tree build - -- External: copy ghc-gmp.h from base sources - root -/- "stage*/libraries/ghc-internal/build/include/ghc-gmp.h" %> \header -> do - let includeP = takeDirectory header - buildP = takeDirectory includeP - packageP = takeDirectory buildP - librariesP = takeDirectory packageP - stageP = takeDirectory librariesP - - isInTree <- flag GmpInTree - - if isInTree - then do - putBuild "| In tree GMP will be built" - let intreeHeader = stageP -/- "gmp/gmp.h" - need [intreeHeader] - copyFile intreeHeader header - else do - putBuild "| System GMP library/framework will be used" - copyFile (gmpBase -/- "ghc-gmp.h") header - - -- Build in-tree GMP library for the current stage, prioritised so that it - -- matches "before" the generic @.a@ library rule in 'Rules.Library'. - priority 2.0 $ do - - let - -- parse a path of the form "//stage*/gmp/xxx" and returns a vanilla - -- context from it for ghc-internal package. - makeGmpPathContext gmpP = do - let - stageP = takeDirectory gmpP - stageS = takeFileName stageP - stage <- parsePath parseStage "" stageS - pure (vanillaContext stage ghcInternal) - - gmpPath = root -/- "stage*/gmp" - - -- Build in-tree gmp. Produce: - -- - /stageN/gmp/gmp.h - -- - /stageN/gmp/libgmp.a - -- - /stageN/gmp/objs/*.o (unpacked objects from libgmp.a) - (gmpPath -/- "libgmp.a" :& gmpPath -/- "gmp.h" :& Nil) &%> - \( lib :& header :& _) -> do - let gmpP = takeDirectory lib - ctx <- makeGmpPathContext gmpP - -- build libgmp.a via gmp's Makefile - build $ target ctx (Make (gmpP -/- "gmpbuild")) [gmpP -/- "gmpbuild/Makefile"] [] - -- copy header and lib to their final destination - copyFileUntracked (gmpP -/- "gmpbuild/.libs/libgmp.a") lib - copyFileUntracked (gmpP -/- "gmpbuild/gmp.h") header - -- we also unpack objects from libgmp.a into "objs" directory - createDirectory (gmpP -/- gmpObjectsDir) - top <- topDirectory - build $ target ctx (Ar Unpack (stage ctx)) - [top -/- gmpP -/- "libgmp.a"] [gmpP -/- gmpObjectsDir] - objs <- liftIO $ getDirectoryFilesIO "." [gmpP -/- gmpObjectsDir -/- "*"] - produces objs - putSuccess "| Successfully built custom library 'gmp'" - - -- Run GMP's configure script. Produce: - -- - /stageN/gmp/gmpbuild/Makefile - gmpPath -/- "gmpbuild/Makefile" %> \mk -> do - let gmpBuildP = takeDirectory mk - gmpP = takeDirectory gmpBuildP - ctx <- makeGmpPathContext gmpP - cFlags <- - interpretInContext ctx $ - mconcat - [ cArgs - , getStagedCCFlags - , anyTargetArch [ArchWasm32] ? arg "-fvisibility=default" - ] - env <- sequence - [ builderEnvironment "CC" $ Cc CompileC (stage ctx) - , return . AddEnv "CFLAGS" $ unwords cFlags - , builderEnvironment "AR" (Ar Unpack (stage ctx)) - , builderEnvironment "NM" Nm - ] - need [mk <.> "in"] - buildWithCmdOptions env $ - target ctx (Configure gmpBuildP) [mk <.> "in"] [mk] - - -- Extract in-tree GMP sources and apply patches. Produce - -- - /stageN/gmp/gmpbuild/Makefile.in - -- - /stageN/gmp/gmpbuild/configure - (gmpPath -/- "gmpbuild/Makefile.in" :& gmpPath -/- "gmpbuild/configure" :& Nil) - &%> \( mkIn :& _ ) -> do - top <- topDirectory - let gmpBuildP = takeDirectory mkIn - gmpP = takeDirectory gmpBuildP - ctx <- makeGmpPathContext gmpP - removeDirectory gmpBuildP - -- Note: We use a tarball like gmp-4.2.4-nodoc.tar.xz, which is - -- gmp-4.2.4.tar.xz repacked without the doc/ directory contents. - -- That's because the doc/ directory contents are under the GFDL, - -- which causes problems for Debian. - tarball <- unifyPath . fromSingleton "Exactly one GMP tarball is expected" - <$> getDirectoryFiles top [gmpBase -/- "gmp-tarballs/gmp*.tar.xz"] - - withTempDir $ \dir -> do - let tmp = unifyPath dir - need [top -/- tarball] - build $ target ctx (Tar Extract) [top -/- tarball] [tmp] - - let name = dropExtension . dropExtension $ takeFileName tarball - unpack = fromMaybe . error $ "gmpRules: expected suffix " - ++ "-nodoc (found: " ++ name ++ ")." - libName = unpack $ stripSuffix "-nodoc" name - - moveDirectory (tmp -/- libName) gmpBuildP diff --git a/hadrian/src/Rules/Libffi.hs b/hadrian/src/Rules/Libffi.hs deleted file mode 100644 index edb330c90347..000000000000 --- a/hadrian/src/Rules/Libffi.hs +++ /dev/null @@ -1,246 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} - -module Rules.Libffi ( - LibffiDynLibs(..), - needLibffi, askLibffilDynLibs, libffiRules, libffiLibrary, libffiHeaderFiles, - libffiHeaderDir, libffiSystemHeaderDir, libffiName - ) where - -import Hadrian.Utilities - -import Packages -import Settings.Builders.Common -import Target -import Utilities -import GHC.Toolchain (targetPlatformTriple) - -{- Note [Libffi indicating inputs] - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -First see https://gitlab.haskell.org/ghc/ghc/wikis/Developing-Hadrian for an -explanation of "indicating input". Part of the definition is copied here for -your convenience: - - change in the vital output -> change in the indicating inputs - -In the case of building libffi `vital output = built libffi library files` and -we can consider the libffi archive file (i.e. the "libffi-tarballs/libffi*.tar.gz" -file) to be the only indicating input besides the build tools (e.g. make). -Note building libffi is split into a few rules, but we also expect that: - - no change in the archive file -> no change in the intermediate build artifacts - -and so the archive file is still a valid choice of indicating input for -all libffi rules. Hence we can get away with `need`ing only the archive file and -don't have to `need` intermediate build artifacts (besides those to trigger -dependant libffi rules i.e. to generate vital inputs as is noted on the wiki). -It is then safe to `trackAllow` the libffi build directory as is done in -`needLibfffiArchive`. - -A disadvantage to this approach is that changing the archive file forces a clean -build of libffi i.e. we cannot incrementally build libffi. This seems like a -performance issue, but is justified as building libffi is fast and the archive -file is rarely changed. - --} - --- | Oracle question type. The oracle returns the list of dynamic --- libffi library file paths (all but one of which should be symlinks). -newtype LibffiDynLibs = LibffiDynLibs Stage - deriving (Eq, Show, Hashable, Binary, NFData) -type instance RuleResult LibffiDynLibs = [FilePath] - -askLibffilDynLibs :: Stage -> Action [FilePath] -askLibffilDynLibs stage = askOracle (LibffiDynLibs stage) - --- | The path to the dynamic library manifest file. The file contains all file --- paths to libffi dynamic library file paths. --- The path is calculated but not `need`ed. -dynLibManifest' :: Monad m => m FilePath -> Stage -> m FilePath -dynLibManifest' getRoot stage = do - root <- getRoot - return $ root -/- stageString stage -/- pkgName libffi -/- ".dynamiclibs" - -dynLibManifestRules :: Stage -> Rules FilePath -dynLibManifestRules = dynLibManifest' buildRootRules - -dynLibManifest :: Stage -> Action FilePath -dynLibManifest = dynLibManifest' buildRoot - --- | Need the (locally built) libffi library. -needLibffi :: Stage -> Action () -needLibffi stage = do - jsTarget <- isJsTarget - unless jsTarget $ do - manifest <- dynLibManifest stage - need [manifest] - --- | Context for @libffi@. -libffiContext :: Stage -> Action Context -libffiContext stage = do - ways <- interpretInContext - (Context stage libffi (error "libffiContext: way not set") (error "libffiContext: iplace not set")) - getLibraryWays - return $ (\w -> Context stage libffi w Final) (if any (wayUnit Dynamic) ways - then dynamic - else vanilla) - --- | The name of the library -libffiName :: Expr String -libffiName = do - useSystemFfi <- expr (flag UseSystemFfi) - if useSystemFfi - then pure "ffi" - else libffiLocalName Nothing - --- | The name of the (locally built) library -libffiLocalName :: Maybe Bool -> Expr String -libffiLocalName force_dynamic = do - way <- getWay - winTarget <- expr isWinTarget - let dynamic = fromMaybe (Dynamic `wayUnit` way) force_dynamic - pure $ mconcat - [ if dynamic then "" else "C" - , if winTarget then "ffi-6" else "ffi" - ] - -libffiLibrary :: FilePath -libffiLibrary = "inst/lib/libffi.a" - --- | These are the headers that we must package with GHC since foreign export --- adjustor code produced by GHC depends upon them. --- See Note [Packaging libffi headers] in GHC.Driver.CodeOutput. -libffiHeaderFiles :: [FilePath] -libffiHeaderFiles = ["ffi.h", "ffitarget.h"] - -libffiHeaderDir :: Stage -> Action FilePath -libffiHeaderDir stage = do - path <- libffiBuildPath stage - return $ path -/- "inst/include" - -libffiSystemHeaderDir :: Action FilePath -libffiSystemHeaderDir = setting FfiIncludeDir - -fixLibffiMakefile :: FilePath -> String -> String -fixLibffiMakefile top = - replace "-MD" "-MMD" - . replace "@toolexeclibdir@" "$(libdir)" - . replace "@INSTALL@" ("$(subst ../install-sh," ++ top ++ "/install-sh,@INSTALL@)") - --- TODO: check code duplication w.r.t. ConfCcArgs -configureEnvironment :: Stage -> Action [CmdOption] -configureEnvironment stage = do - context <- libffiContext stage - cFlags <- interpretInContext context $ mconcat - [ cArgs - , getStagedCCFlags ] - ldFlags <- interpretInContext context ldArgs - sequence [ builderEnvironment "CC" $ Cc CompileC stage - , builderEnvironment "CXX" $ Cc CompileC stage - , builderEnvironment "AR" (Ar Unpack stage) - , builderEnvironment "NM" Nm - , builderEnvironment "RANLIB" Ranlib - , return . AddEnv "CFLAGS" $ unwords cFlags ++ " -w" - , return . AddEnv "LDFLAGS" $ unwords ldFlags ++ " -w" ] - --- Need the libffi archive and `trackAllow` all files in the build directory. --- See [Libffi indicating inputs]. -needLibfffiArchive :: FilePath -> Action FilePath -needLibfffiArchive buildPath = do - top <- topDirectory - tarball <- unifyPath - . fromSingleton "Exactly one LibFFI tarball is expected" - <$> getDirectoryFiles top ["libffi-tarballs/libffi*.tar.gz"] - need [top -/- tarball] - trackAllow [buildPath -/- "**"] - return tarball - -libffiRules :: Rules () -libffiRules = do - _ <- addOracleCache $ \ (LibffiDynLibs stage) - -> do - jsTarget <- isJsTarget - if jsTarget - then return [] - else readFileLines =<< dynLibManifest stage - forM_ [Stage1, Stage2, Stage3] $ \stage -> do - root <- buildRootRules - let path = root -/- stageString stage - libffiPath = path -/- pkgName libffi -/- "build" - - -- We set a higher priority because this rule overlaps with the build rule - -- for static libraries 'Rules.Library.libraryRules'. - dynLibMan <- dynLibManifestRules stage - let topLevelTargets = [ libffiPath -/- libffiLibrary - , dynLibMan - ] - priority 2 $ topLevelTargets &%> \_ -> do - _ <- needLibfffiArchive libffiPath - context <- libffiContext stage - - -- Note this build needs the Makefile, triggering the rules bellow. - build $ target context (Make libffiPath) [] [] - libffiName' <- interpretInContext context (libffiLocalName (Just True)) - - -- Produces all install files. - produces =<< (\\ topLevelTargets) - <$> liftIO (getDirectoryFilesIO "." [libffiPath -/- "inst//*"]) - - -- Find dynamic libraries. - osxTarget <- isOsxTarget - winTarget <- isWinTarget - - dynLibFiles <- do - let libfilesDir = libffiPath -/- - (if winTarget then "inst" -/- "bin" else "inst" -/- "lib") - dynlibext - | winTarget = "dll" - | osxTarget = "dylib" - | otherwise = "so" - filepat = "lib" ++ libffiName' ++ "." ++ dynlibext ++ "*" - liftIO $ getDirectoryFilesIO "." [libfilesDir -/- filepat] - - writeFileLines dynLibMan dynLibFiles - putSuccess "| Successfully build libffi." - - fmap (libffiPath -/-) ( "Makefile.in" :& "configure" :& Nil ) &%> - \ ( mkIn :& _ ) -> do - -- Extract libffi tar file - context <- libffiContext stage - removeDirectory libffiPath - tarball <- needLibfffiArchive libffiPath - -- Go from 'libffi-3.99999+git20171002+77e130c.tar.gz' to 'libffi-3.99999' - let libname = takeWhile (/= '+') $ fromJust $ stripExtension "tar.gz" $ takeFileName tarball - - -- Move extracted directory to libffiPath. - root <- buildRoot - removeDirectory (root -/- libname) - actionFinally (do - build $ target context (Tar Extract) [tarball] [path] - moveDirectory (path -/- libname) libffiPath) $ - -- And finally: - removeFiles (path) [libname -/- "**"] - - top <- topDirectory - fixFile mkIn (fixLibffiMakefile top) - - files <- liftIO $ getDirectoryFilesIO "." [libffiPath -/- "**"] - produces files - - fmap (libffiPath -/-) ("Makefile" :& "config.guess" :& "config.sub" :& Nil) - &%> \( mk :& _ ) -> do - _ <- needLibfffiArchive libffiPath - context <- libffiContext stage - - -- This need rule extracts the libffi tar file to libffiPath. - need [mk <.> "in"] - - -- Configure. - forM_ ["config.guess", "config.sub"] $ \file -> do - copyFile file (libffiPath -/- file) - env <- configureEnvironment stage - buildWithCmdOptions env $ - target context (Configure libffiPath) [mk <.> "in"] [mk] - - dir <- queryBuildTarget targetPlatformTriple - files <- liftIO $ getDirectoryFilesIO "." [libffiPath -/- dir -/- "**"] - produces files diff --git a/hadrian/src/Rules/Library.hs b/hadrian/src/Rules/Library.hs deleted file mode 100644 index 1aa19fc2fd28..000000000000 --- a/hadrian/src/Rules/Library.hs +++ /dev/null @@ -1,352 +0,0 @@ -module Rules.Library (libraryRules, needLibrary, libraryTargets) where - -import Hadrian.BuildPath -import Hadrian.Haskell.Cabal -import Hadrian.Haskell.Cabal.Type -import qualified Text.Parsec as Parsec - -import Base -import Context -import Expression hiding (way, package, stage) -import Oracles.ModuleFiles -import Packages -import Rules.Gmp -import Rules.Register -import Settings -import Target -import Utilities -import Data.Time.Clock -import Rules.Generate (generatedDependencies) -import Oracles.Flag - - --- * Library 'Rules' - -libraryRules :: Rules () -libraryRules = do - root <- buildRootRules - root -/- "**/libHS*-*.dylib" %> buildDynamicLib root "dylib" - root -/- "**/libHS*-*.so" %> buildDynamicLib root "so" - root -/- "**/libHS*-*.dll" %> buildDynamicLib root "dll" - root -/- "**/*.a" %> buildStaticLib root - root -/- "**/stamp-*" %> buildPackage root - priority 2 $ do - root -/- "stage*/lib/**/libHS*-*.dylib" %> registerDynamicLib root "dylib" - root -/- "stage*/lib/**/libHS*-*.so" %> registerDynamicLib root "so" - root -/- "stage*/lib/**/libHS*-*.dll" %> registerDynamicLib root "dll" - root -/- "stage*/lib/**/*.a" %> registerStaticLib root - root -/- "**/HS*-*.o" %> buildGhciLibO root - root -/- "**/HS*-*.p_o" %> buildGhciLibO root - --- * 'Action's for building libraries - --- | Register (with ghc-pkg) a static library ('LibA') under the given build --- root, whose path is the second argument. -registerStaticLib :: FilePath -> FilePath -> Action () -registerStaticLib root archivePath = do - -- Simply need the ghc-pkg database .conf file. - GhcPkgPath _ stage _ (LibA name _ _ w) - <- parsePath (parseGhcPkgLibA root) - "<.a library (register) path parser>" - archivePath - let ctx = Context stage (unsafeFindPackageByName name) w Final - need . (:[]) =<< pkgConfFile ctx - --- | Build a static library ('LibA') under the given build root, whose path is --- the second argument. -buildStaticLib :: FilePath -> FilePath -> Action () -buildStaticLib root archivePath = do - l@(BuildPath _ stage _ (LibA pkgname _ _ way)) - <- parsePath (parseBuildLibA root) - "<.a library (build) path parser>" - archivePath - let context = libAContext l - objs <- libraryObjects context - removeFile archivePath - build $ target context (Ar Pack stage) objs [archivePath] - synopsis <- pkgSynopsis (package context) - putSuccess $ renderLibrary - (quote pkgname ++ " (" ++ show stage ++ ", way " ++ show way ++ ").") - archivePath synopsis - --- | Register (with ghc-pkg) a dynamic library ('LibDyn') under the given build --- root, with the given suffix (@.so@ or @.dylib@, @.dll@), where the complete --- path of the registered dynamic library is given as the third argument. -registerDynamicLib :: FilePath -> String -> FilePath -> Action () -registerDynamicLib root suffix dynlibpath = do - -- Simply need the ghc-pkg database .conf file. - (GhcPkgPath _ stage _ (LibDyn name _ _ w _)) - <- parsePath (parseGhcPkgLibDyn root suffix) - "" - dynlibpath - let ctx = Context stage (unsafeFindPackageByName name) w Final - need . (:[]) =<< pkgConfFile ctx - --- | Build a dynamic library ('LibDyn') under the given build root, with the --- given suffix (@.so@ or @.dylib@, @.dll@), where the complete path of the --- archive to build is given as the third argument. -buildDynamicLib :: FilePath -> String -> FilePath -> Action () -buildDynamicLib root suffix dynlibpath = do - dynlib@(BuildPath _ stage _ (LibDyn pkgname _ _ way _)) - <- parsePath (parseBuildLibDyn root suffix) "" dynlibpath - let context = libDynContext dynlib - synopsis <- pkgSynopsis (package context) - deps <- contextDependencies context - registerPackages deps - objs <- libraryObjects context - build $ target context (Ghc LinkHs $ Context.stage context) objs [dynlibpath] - putSuccess $ - renderLibrary - (quote pkgname ++ " (" ++ show stage ++ ", way " ++ show way ++ ").") - dynlibpath synopsis - --- | Build a "GHCi library" ('LibGhci') under the given build root, with the --- complete path of the file to build is given as the second argument. --- See Note [Merging object files for GHCi] in GHC.Driver.Pipeline. -buildGhciLibO :: FilePath -> FilePath -> Action () -buildGhciLibO root ghcilibPath = do - l@(BuildPath _ stage _ (LibGhci _ _ _ _)) - <- parsePath (parseBuildLibGhci root) - "<.o ghci lib (build) path parser>" - ghcilibPath - let context = libGhciContext l - objs <- allObjects context - need objs - build $ target context (MergeObjects stage) objs [ghcilibPath] - - -{- -Note [Stamp Files] -~~~~~~~~~~~~~~~~~~ - -A package stamp file exists to communicate that all the objects for a certain -package are built. - -If you need a stamp file, then it needs all the library dependencies - -The format for a stamp file is defined in `pkgStampFile`. The stamp file is named -"stamp-" so if you want to build base in dynamic way then need `_build/stage1/libraries/base/stamp-dyn` - -By using stamp files you can easily say you want to build a library in a certain -way by needing the stamp file for that context. - -Before these stamp files existed the way to declare that all objects in a certain way -were build was by needing the .conf file for the package. Stamp files decouple this -decision from creating the .conf file which does extra stuff such as linking, copying -files etc. - --} - - -buildPackage :: FilePath -> FilePath -> Action () -buildPackage root fp = do - l@(BuildPath _ _ _ (PkgStamp _ _ _ way)) <- parsePath (parseStampPath root) "<.stamp parser>" fp - let ctx = stampContext l - srcs <- hsSources ctx - gens <- interpretInContext ctx generatedDependencies - - lib_targets <- libraryTargets True ctx - - need (srcs ++ gens ++ lib_targets) - - -- Write the current time into the file so the file always changes if - -- we restamp it because a dependency changes. - time <- liftIO $ getCurrentTime - liftIO $ writeFile fp (show time) - ways <- interpretInContext ctx getLibraryWays - let hasVanilla = elem vanilla ways - hasDynamic = elem dynamic ways - support <- platformSupportsSharedLibs - when ((hasVanilla && hasDynamic) && - support && way == vanilla) $ do - stamp <- (pkgStampFile (ctx { way = dynamic })) - liftIO $ writeFile stamp (show time) - - - --- * Helpers - --- | Return all Haskell and non-Haskell object files for the given 'Context'. -allObjects :: Context -> Action [FilePath] -allObjects context = (++) <$> nonHsObjects context <*> hsObjects context - --- | Return all the non-Haskell object files for the given library context --- (object files built from C, C-- and sometimes other things). -nonHsObjects :: Context -> Action [FilePath] -nonHsObjects context = do - asmSrcs <- interpretInContext context (getContextData asmSrcs) - asmObjs <- mapM (objectPath context) asmSrcs - cObjs <- cObjects context - cxxObjs <- cxxObjects context - jsObjs <- jsObjects context - cmmSrcs <- interpretInContext context (getContextData cmmSrcs) - cmmObjs <- mapM (objectPath context) cmmSrcs - eObjs <- extraObjects context - return $ asmObjs ++ cObjs ++ cxxObjs ++ cmmObjs ++ jsObjs ++ eObjs - --- | Return all the Cxx object files needed to build the given library context. -cxxObjects :: Context -> Action [FilePath] -cxxObjects context = do - srcs <- interpretInContext context (getContextData cxxSrcs) - mapM (objectPath context) srcs - --- | Return all the C object files needed to build the given library context. -cObjects :: Context -> Action [FilePath] -cObjects context = do - srcs <- interpretInContext context (getContextData cSrcs) - objs <- mapM (objectPath context) srcs - return $ if Threaded `wayUnit` way context - then objs - else filter ((`notElem` ["Evac_thr", "Scav_thr"]) . takeBaseName) objs - --- | Return all the JS object files to be included in the library. -jsObjects :: Context -> Action [FilePath] -jsObjects context = do - srcs <- interpretInContext context (getContextData jsSrcs) - mapM (objectPath context) srcs - --- | Return extra object files needed to build the given library context. The --- resulting list is currently non-empty only when the package from the --- 'Context' is @ghc-internal@ built with in-tree GMP backend. -extraObjects :: Context -> Action [FilePath] -extraObjects context - | package context == ghcInternal = do - interpretInContext context getBignumBackend >>= \case - "gmp" -> gmpObjects (stage context) - _ -> return [] - - | otherwise = return [] - --- | Return all the object files to be put into the library we're building for --- the given 'Context'. -libraryObjects :: Context -> Action [FilePath] -libraryObjects context = do - hsObjs <- hsObjects context - noHsObjs <- nonHsObjects context - need $ noHsObjs ++ hsObjs - return (noHsObjs ++ hsObjs) - --- | Coarse-grain 'need': make sure all given libraries are fully built. -needLibrary :: [Context] -> Action () -needLibrary cs = need =<< concatMapM (libraryTargets True) cs - --- * Library paths types and parsers - --- | > libHS--[_].a -data LibA = LibA String [Integer] String Way deriving (Eq, Show) - --- | > -data DynLibExt = So | Dylib deriving (Eq, Show) - --- | > libHS--[_]-ghc. -data LibDyn = LibDyn String [Integer] String Way DynLibExt deriving (Eq, Show) - --- | > HS--[_].o -data LibGhci = LibGhci String [Integer] String Way deriving (Eq, Show) - --- | Get the 'Context' corresponding to the build path for a given static library. -libAContext :: BuildPath LibA -> Context -libAContext (BuildPath _ stage pkgpath (LibA pkgname _ _ way)) = - Context stage pkg way Final - where - pkg = library pkgname pkgpath - --- | Get the 'Context' corresponding to the build path for a given GHCi library. -libGhciContext :: BuildPath LibGhci -> Context -libGhciContext (BuildPath _ stage pkgpath (LibGhci pkgname _ _ way)) = - Context stage pkg way Final - where - pkg = library pkgname pkgpath - --- | Get the 'Context' corresponding to the build path for a given dynamic library. -libDynContext :: BuildPath LibDyn -> Context -libDynContext (BuildPath _ stage pkgpath (LibDyn pkgname _ _ way _)) = - Context stage pkg way Final - where - pkg = library pkgname pkgpath - --- | Get the 'Context' corresponding to the build path for a given static library. -stampContext :: BuildPath PkgStamp -> Context -stampContext (BuildPath _ stage _ (PkgStamp pkgname _ _ way)) = - Context stage pkg way Final - where - pkg = unsafeFindPackageByName pkgname - -data PkgStamp = PkgStamp String [Integer] String Way deriving (Eq, Show) - - --- | Parse a path to a ghci library to be built, making sure the path starts --- with the given build root. -parseStampPath :: FilePath -> Parsec.Parsec String () (BuildPath PkgStamp) -parseStampPath root = parseBuildPath root parseStamp - - --- | Parse a path to a registered ghc-pkg static library to be built, making --- sure the path starts with the given build root. -parseGhcPkgLibA :: FilePath -> Parsec.Parsec String () (GhcPkgPath LibA) -parseGhcPkgLibA root - = parseGhcPkgPath root - (do -- Skip past pkgId directory. - _ <- Parsec.manyTill Parsec.anyChar (Parsec.try $ Parsec.string "/") - parseLibAFilename) - Parsec. "ghc-pkg path for a static library" - --- | Parse a path to a static library to be built, making sure the path starts --- with the given build root. -parseBuildLibA :: FilePath -> Parsec.Parsec String () (BuildPath LibA) -parseBuildLibA root = parseBuildPath root parseLibAFilename - Parsec. "build path for a static library" - --- | Parse a path to a ghci library to be built, making sure the path starts --- with the given build root. -parseBuildLibGhci :: FilePath -> Parsec.Parsec String () (BuildPath LibGhci) -parseBuildLibGhci root = parseBuildPath root parseLibGhciFilename - Parsec. "build path for a ghci library" - --- | Parse a path to a dynamic library to be built, making sure the path starts --- with the given build root. -parseBuildLibDyn :: FilePath -> String -> Parsec.Parsec String () (BuildPath LibDyn) -parseBuildLibDyn root ext = parseBuildPath root (parseLibDynFilename ext) - Parsec. ("build path for a dynamic library with extension " ++ ext) - --- | Parse a path to a registered ghc-pkg dynamic library, making sure the path --- starts with the given package database root. -parseGhcPkgLibDyn :: FilePath -> String -> Parsec.Parsec String () (GhcPkgPath LibDyn) -parseGhcPkgLibDyn root ext = parseGhcPkgPath root (parseLibDynFilename ext) - Parsec. ("ghc-pkg path for a dynamic library with extension " ++ ext) - --- | Parse the filename of a static library to be built into a 'LibA' value. -parseLibAFilename :: Parsec.Parsec String () LibA -parseLibAFilename = do - _ <- Parsec.string "libHS" - (pkgname, pkgver, pkghash) <- parsePkgId - way <- parseWaySuffix vanilla - _ <- Parsec.string ".a" - return (LibA pkgname pkgver pkghash way) - --- | Parse the filename of a ghci library to be built into a 'LibGhci' value. -parseLibGhciFilename :: Parsec.Parsec String () LibGhci -parseLibGhciFilename = do - _ <- Parsec.string "HS" - (pkgname, pkgver, pkghash) <- parsePkgId - _ <- Parsec.string "." - way <- parseWayPrefix vanilla - _ <- Parsec.string "o" - return (LibGhci pkgname pkgver pkghash way) - --- | Parse the filename of a dynamic library to be built into a 'LibDyn' value. -parseLibDynFilename :: String -> Parsec.Parsec String () LibDyn -parseLibDynFilename ext = do - _ <- Parsec.string "libHS" - (pkgname, pkgver, pkghash) <- parsePkgId - way <- addWayUnit Dynamic <$> parseWaySuffix dynamic - _ <- optional $ Parsec.string "-ghc" *> parsePkgVersion - _ <- Parsec.string ("." ++ ext) - return (LibDyn pkgname pkgver pkghash way $ if ext == "so" then So else Dylib) - -parseStamp :: Parsec.Parsec String () PkgStamp -parseStamp = do - _ <- Parsec.string "stamp-" - (pkgname, pkgver, pkghash) <- parsePkgId - way <- parseWaySuffix vanilla - return (PkgStamp pkgname pkgver pkghash way) diff --git a/hadrian/src/Rules/Library.hs-boot b/hadrian/src/Rules/Library.hs-boot deleted file mode 100644 index d516902c0aec..000000000000 --- a/hadrian/src/Rules/Library.hs-boot +++ /dev/null @@ -1,8 +0,0 @@ -module Rules.Library where - -import Base -import Context - --- Necessary for inter-dependence between Rules.Register and --- Rules.Library. -needLibrary :: [Context] -> Action () diff --git a/hadrian/src/Rules/Lint.hs b/hadrian/src/Rules/Lint.hs deleted file mode 100644 index a8b1660556a9..000000000000 --- a/hadrian/src/Rules/Lint.hs +++ /dev/null @@ -1,123 +0,0 @@ -module Rules.Lint - ( lintRules - ) where - -import Base -import Settings.Builders.Common -import System.Exit (exitFailure) - -lintRules :: Rules () -lintRules = do - "lint:base" ~> lint base - "lint:ghc-internal" ~> lint ghcInternal - "lint:ghc-experimental" ~> lint ghcExperimental - "lint:compiler" ~> lint compiler - - -- Ensure that autoconf scripts, which are usually run by Cabal, are run to - -- avoid depending upon Cabal from the stage0 compiler.. - "libraries" -/- "base" -/- "include" -/- "HsBaseConfig.h" %> \_ -> - -- ./configure is called here manually because we need to generate - -- HsBaseConfig.h, which is created from HsBaseConfig.h.in. ./configure - cmd_ (Cwd "libraries/base") "./configure" - "rts" -/- "include" -/- "ghcautoconf.h" %> \_ -> - cmd_ (Cwd "rts") "./configure" - "rts" -/- "include" -/- "ghcplatform.h" %> \_ -> - cmd_ (Cwd "rts") "./configure" - -lint :: Action () -> Action () -lint lintAction = do - isHlintPresent <- isJust <$> liftIO (findExecutable "hlint") - if isHlintPresent - then do - putBuild "| Running the linter…" - lintAction - putSuccess "| Done." - else do - putFailure "| Please make sure you have the `hlint` executable in your $PATH" - liftIO exitFailure - -runHLint :: [FilePath] -- ^ include directories - -> [String] -- ^ CPP defines - -> FilePath - -> Action () -runHLint includeDirs defines dir = do - threads <- shakeThreads <$> getShakeOptions - hostArch <- (<> "_HOST_ARCH") <$> queryHostTarget queryArch - let hlintYaml = dir ".hlint.yaml" - defines' = hostArch : defines - cmdLine = unwords $ - [ "hlint" - , "--colour=never" - , "-j" <> show threads - ] ++ - map ("--cpp-define=" <>) defines' ++ - map ("--cpp-include=" <>) includeDirs ++ - [ "-h" <> hlintYaml - , dir - ] - putBuild $ "| " <> cmdLine - cmd_ cmdLine - -base :: Action () -base = do - buildDir <- buildRoot - let stage1RtsInc = buildDir "stage1/rts/build/include" - let machDeps = "rts/include/MachDeps.h" - let ghcautoconf = stage1RtsInc "ghcautoconf.h" - let ghcplatform = stage1RtsInc "ghcplatform.h" - need [ghcautoconf, ghcplatform, machDeps, "libraries/base/include/HsBaseConfig.h"] - let includeDirs = - [ "rts/include" - , "libraries/base/include" - ] - runHLint includeDirs [] "libraries/base" - -ghcInternal :: Action () -ghcInternal = do - let includeDirs = [] - runHLint includeDirs [] "libraries/ghc-internal" - -ghcExperimental :: Action () -ghcExperimental = do - let includeDirs = [] - runHLint includeDirs [] "libraries/ghc-experimental" - -compiler :: Action () -compiler = do - buildDir <- buildRoot - let stage1RtsInc = buildDir "stage1/rts/build/include" - let stage1Compiler = buildDir "stage1/compiler/build" - let machDeps = "rts/include/MachDeps.h" - let compilerDir = "compiler" - let ghcautoconf = stage1RtsInc "ghcautoconf.h" - let ghcplatform = stage1RtsInc "ghcplatform.h" - let ghcLlvmVersion = compilerDir "GHC/CmmToLlvm/Version/Bounds.hs" - need $ mconcat [[ghcautoconf, ghcplatform, ghcLlvmVersion], hsIncls stage1Compiler, [machDeps]] - let includeDirs = - [ stage1RtsInc - , compilerDir - , ghcplatform - , stage1Compiler - ] - runHLint includeDirs [] "compiler" - -hsIncls :: FilePath -> [FilePath] -hsIncls path = [ path "primop-vector-tycons.hs-incl" - , path "primop-vector-tys.hs-incl" - , path "primop-vector-tys-exports.hs-incl" - , path "primop-code-size.hs-incl" - , path "primop-vector-uniques.hs-incl" - , path "primop-data-decl.hs-incl" - , path "primop-tag.hs-incl" - , path "primop-list.hs-incl" - , path "primop-strictness.hs-incl" - , path "primop-is-work-free.hs-incl" - , path "primop-is-cheap.hs-incl" - , path "primop-fixity.hs-incl" - , path "primop-docs.hs-incl" - , path "primop-deprecations.hs-incl" - , path "primop-primop-info.hs-incl" - , path "primop-out-of-line.hs-incl" - , path "primop-effects.hs-incl" - , path "primop-commutable.hs-incl" - ] diff --git a/hadrian/src/Rules/Nofib.hs b/hadrian/src/Rules/Nofib.hs deleted file mode 100644 index 99f149d6aa4e..000000000000 --- a/hadrian/src/Rules/Nofib.hs +++ /dev/null @@ -1,56 +0,0 @@ -module Rules.Nofib where - -import Base -import Expression -import Oracles.Setting -import Packages - -import System.Environment -import System.Exit - -nofibLogFile :: FilePath -nofibLogFile = "nofib-log" - --- | Rules for running the @nofib@ benchmark suite. -nofibRules :: Rules () -nofibRules = do - root <- buildRootRules - - -- a phony "nofib" rule that just triggers - -- the rule below. - "nofib" ~> need [root -/- nofibLogFile] - - -- a rule to produce /nofig-log - -- by running the nofib suite and capturing - -- the relevant output. - root -/- nofibLogFile %> \fp -> do - needNofibDeps - - makePath <- builderPath (Make "nofib") - top <- topDirectory - ghcPath <- builderPath (Ghc CompileHs Stage2) - - -- some makefiles in nofib rely on a $MAKE - -- env var being defined - liftIO (setEnv "MAKE" makePath) - - -- this runs make commands in the nofib - -- subdirectory, passing the path to - -- the GHC to benchmark and perl to - -- nofib's makefiles. - let nofibArgs = ["WithNofibHc=" ++ (top -/- ghcPath)] - unit $ cmd (Cwd "nofib") [makePath] ["clean"] - unit $ cmd (Cwd "nofib") [makePath] (nofibArgs ++ ["boot"]) - (Exit e, Stdouterr log) <- cmd (Cwd "nofib") [makePath] nofibArgs - writeFile' fp log - if e == ExitSuccess - then putVerbose $ "nofib log available at " ++ fp - else error $ "nofib failed, full log available at " ++ fp - --- | Build the dependencies required by @nofib@. -needNofibDeps :: Action () -needNofibDeps = do - unlitPath <- programPath (vanillaContext Stage1 unlit) - mtlPath <- pkgConfFile (vanillaContext Stage1 mtl ) - need [ unlitPath, mtlPath ] - needBuilders [Ghc CompileHs Stage2] diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs deleted file mode 100644 index c36d5c4b933f..000000000000 --- a/hadrian/src/Rules/Program.hs +++ /dev/null @@ -1,130 +0,0 @@ -module Rules.Program (buildProgramRules) where - -import qualified Data.Set as Set - -import Hadrian.Haskell.Cabal -import Hadrian.Haskell.Cabal.Type - -import Base -import Context -import Expression hiding (stage, way) -import Oracles.Flag -import Oracles.ModuleFiles -import Oracles.Setting (topDirectory) -import Packages -import Settings -import Settings.Default -import Settings.Program (programContext) -import Target -import Utilities -import Rules.Library -import Rules.Register - --- | TODO: Drop code duplication -buildProgramRules :: [(Resource, Int)] -> Rules () -buildProgramRules rs = do - root <- buildRootRules - - -- Proxy rule for the whole mingw toolchain on Windows. - -- We 'need' configure because that's when the inplace/mingw - -- folder gets filled with the toolchain. This "proxy" rule - -- is listed as a runtime dependency for stage >= 1 GHCs. - root -/- mingwStamp %> \stampPath -> do - top <- topDirectory - need [ top -/- "configure" ] - copyDirectory (top -/- "inplace" -/- "mingw") root - writeFile' stampPath "OK" - - -- Rules for programs that are actually built by hadrian. - forM_ allStages $ \stage -> - [ root -/- stageString stage -/- "bin" -/- "*" - ] |%> \bin -> do - programContexts <- getProgramContexts stage - case lookupProgramContext bin programContexts of - Nothing -> error $ "Unknown program " ++ show bin - Just ctx -> buildProgram bin ctx rs - -getProgramContexts :: Stage -> Action [(FilePath, Context)] -getProgramContexts stage = do - -- This is quite inefficient, but we can't access 'programName' from - -- 'Rules', because it is an 'Action' depending on an oracle. - sPackages <- filter isProgram <$> stagePackages stage - tPackages <- testsuitePackages - -- TODO: Shall we use Stage2 for testsuite packages instead? - let allPackages = sPackages - ++ tPackages - fmap concat . forM allPackages $ \pkg -> do - -- the iserv pkg results in three different programs at - -- the moment, ghc-iserv (built the vanilla way), - -- ghc-iserv-prof (built the profiling way), - -- ghc-iserv-dyn (built the dynamic way), and - -- ghc-iserv-prof-dyn (built the profiling+dynamic way). - -- The testsuite requires all to be present, so we - -- make sure that we cover these - -- "prof-build-under-other-name" cases. - -- iserv gets its names from Packages.hs:programName - ctx <- programContext stage pkg -- TODO: see todo on programContext. - let allCtxs = if pkg == iserv - then [ vanillaContext stage pkg - , Context stage pkg profiling Final - , Context stage pkg dynamic Final - , Context stage pkg profilingDynamic Final - ] - else [ ctx ] - forM allCtxs $ \ctx -> do - name <- programName ctx - return (name <.> exe, ctx) - -lookupProgramContext :: FilePath -> [(FilePath, Context)] -> Maybe Context -lookupProgramContext wholePath progs = lookup (takeFileName wholePath) progs - -buildProgram :: FilePath -> Context -> [(Resource, Int)] -> Action () -buildProgram bin ctx@(Context{..}) rs = do - - when (package == hsc2hs) $ do - -- 'Hsc2hs' needs the @template-hsc.h@ file. - template <- templateHscPath stage - need [template] - -- Custom dependencies: this should be modeled better in the - -- Cabal file somehow. - when (package == haddock) $ do - -- Haddock has a resource folder - need =<< haddockDeps stage - - -- Need library dependencies. - -- Note pkgLibraryFile gets the path in the build dir e.g. - -- _build/stage1/libraries/haskeline/build/libHShaskeline-0.7.5.0-ghc8.9.0.20190430.so - -- but when building the program, we link against the *ghc-pkg registered* library e.g. - -- _build/stage1/lib/x86_64-linux-ghc-8.9.0.20190430/libHShaskeline-0.7.5.0-ghc8.9.0.20190430.so - -- so we use pkgRegisteredLibraryFile instead. - registerPackages =<< contextDependencies ctx - - cross <- flag CrossCompiling - -- For cross compiler, copy @stage0/bin/@ to @stage1/bin/@. - case (cross, stage) of - (True, s) | s > stage0InTree -> do - srcDir <- buildRoot <&> (-/- (stageString stage0InTree -/- "bin")) - copyFile (srcDir -/- takeFileName bin) bin - _ -> buildBinary rs bin ctx - -buildBinary :: [(Resource, Int)] -> FilePath -> Context -> Action () -buildBinary rs bin context@Context {..} = do - needLibrary =<< contextDependencies context - when (stage > stage0InTree) $ do - ways <- interpretInContext context (getLibraryWays <> getRtsWays) - needLibrary [ (rtsContext stage) { way = w } | w <- Set.toList ways ] - asmSrcs <- interpretInContext context (getContextData asmSrcs) - asmObjs <- mapM (objectPath context) asmSrcs - cSrcs <- interpretInContext context (getContextData cSrcs) - cxxSrcs <- interpretInContext context (getContextData cxxSrcs) - jsSrcs <- interpretInContext context (getContextData jsSrcs) - cObjs <- mapM (objectPath context) cSrcs - cxxObjs <- mapM (objectPath context) cxxSrcs - jsObjs <- mapM (objectPath context) jsSrcs - hsObjs <- hsObjects context - let binDeps = asmObjs ++ cObjs ++ cxxObjs ++ jsObjs ++ hsObjs - need binDeps - buildWithResources rs $ target context (Ghc LinkHs stage) binDeps [bin] - synopsis <- pkgSynopsis package - putSuccess $ renderProgram - (quote (pkgName package) ++ " (" ++ show stage ++ ").") bin synopsis diff --git a/hadrian/src/Rules/Register.hs b/hadrian/src/Rules/Register.hs deleted file mode 100644 index f9150db49cb3..000000000000 --- a/hadrian/src/Rules/Register.hs +++ /dev/null @@ -1,314 +0,0 @@ -{-# LANGUAGE TypeApplications #-} -module Rules.Register ( - configurePackageRules, registerPackageRules, registerPackages, - libraryTargets - ) where - -import Base -import Context -import Expression ( getContextData ) -import Flavour -import Oracles.Setting -import Hadrian.BuildPath -import Hadrian.Expression -import Hadrian.Haskell.Cabal -import Oracles.Flag (platformSupportsGhciObjects) -import Packages -import Rules.Rts -import Settings -import Target -import Utilities - -import Hadrian.Haskell.Cabal.Type -import qualified Text.Parsec as Parsec -import qualified Data.Set as Set -import qualified Data.Char as Char -import Data.Bifunctor (bimap) - -import Distribution.Version (Version) -import qualified Distribution.Types.PackageId as Cabal -import qualified Distribution.Types.PackageName as Cabal -import qualified Distribution.Parsec as Cabal -import qualified Distribution.Compat.Parsing as Cabal -import qualified Distribution.Parsec.FieldLineStream as Cabal -import qualified Distribution.Compat.CharParsing as CabalCharParsing - -import qualified Hadrian.Haskell.Cabal.Parse as Cabal -import qualified System.Directory as IO - --- * Configuring - --- | Configure a package and build its @setup-config@ file, as well as files in --- the @build/pkgName/build/autogen@ directory. -configurePackageRules :: Rules () -configurePackageRules = do - root <- buildRootRules - root -/- "**/setup-config" %> \out -> do - (stage, path) <- parsePath (parseSetupConfig root) "" out - let pkg = unsafeFindPackageByPath path - let ctx = Context stage pkg vanilla Inplace - buildP <- buildPath ctx - when (pkg == ghcInternal) $ do - isGmp <- (== "gmp") <$> interpretInContext ctx getBignumBackend - when isGmp $ - need [buildP -/- "include/ghc-gmp.h"] - when (pkg == text) $ do - simdutf <- textWithSIMDUTF <$> flavour - when simdutf $ do - -- This is required, otherwise you get Error: hadrian: - -- Encountered missing or private dependencies: - -- system-cxx-std-lib ==1.0 - cxxStdLib <- systemCxxStdLibConfPath $ PackageDbLoc stage Inplace - need [cxxStdLib] - Cabal.configurePackage ctx - - root -/- "**/autogen/cabal_macros.h" %> \out -> do - (stage, path) <- parsePath (parseToBuildSubdirectory root) "" out - let pkg = unsafeFindPackageByPath path - Cabal.buildAutogenFiles (Context stage pkg vanilla Inplace) - - root -/- "**/autogen/Paths_*.hs" %> \out -> - need [takeDirectory out -/- "cabal_macros.h"] - -parseSetupConfig :: FilePath -> Parsec.Parsec String () (Stage, FilePath) -parseSetupConfig root = do - _ <- Parsec.string root *> Parsec.optional (Parsec.char '/') - stage <- parseStage - _ <- Parsec.char '/' - pkgPath <- Parsec.manyTill Parsec.anyChar - (Parsec.try $ Parsec.string "/setup-config") - return (stage, pkgPath) - -parseToBuildSubdirectory :: FilePath -> Parsec.Parsec String () (Stage, FilePath) -parseToBuildSubdirectory root = do - _ <- Parsec.string root *> Parsec.optional (Parsec.char '/') - stage <- parseStage - _ <- Parsec.char '/' - pkgPath <- Parsec.manyTill Parsec.anyChar - (Parsec.try $ Parsec.string "/build/") - return (stage, pkgPath) - --- * Registering - -registerPackages :: [Context] -> Action () -registerPackages ctxs = do - need =<< mapM pkgRegisteredLibraryFile ctxs - - -- Dynamic RTS library files need symlinks (Rules.Rts.rtsRules). - forM_ ctxs $ \ ctx -> when (package ctx == rts) $ do - ways <- interpretInContext ctx (getLibraryWays <> getRtsWays) - needRtsSymLinks (stage ctx) ways - --- | Register a package and initialise the corresponding package database if --- need be. Note that we only register packages in 'Stage0' and 'Stage1'. -registerPackageRules :: [(Resource, Int)] -> Stage -> Inplace -> Rules () -registerPackageRules rs stage iplace = do - root <- buildRootRules - - -- Initialise the package database. - root -/- relativePackageDbPath (PackageDbLoc stage iplace) -/- packageDbStamp %> \stamp -> do - -- This command initialises the package.cache file to avoid a race where - -- a package gets registered but there's not a package.cache file (which - -- leads to errors in GHC). - buildWithResources rs $ - target (Context stage compiler vanilla iplace) (GhcPkg Recache stage) [] [] - writeFileLines stamp [] - - -- Register a package. - root -/- relativePackageDbPath (PackageDbLoc stage iplace) -/- "*.conf" %> \conf -> do - historyDisable - - pkgName <- getPackageNameFromConfFile conf - let pkg = unsafeFindPackageByName pkgName - - when (pkg == compiler) $ need =<< ghcLibDeps stage iplace - - -- Only used in guard when Stage0 {} but can be GlobalLibs or InTreeLibs - isBoot <- (pkg `notElem`) <$> stagePackages stage - - let ctx = Context stage pkg vanilla iplace - case stage of - Stage0 _ | isBoot -> copyConf rs ctx conf - _ -> - -- See Note [Inplace vs Final package databases] - case iplace of - Inplace -> buildConfInplace rs ctx conf - Final -> buildConfFinal rs ctx conf - -buildConfFinal :: [(Resource, Int)] -> Context -> FilePath -> Action () -buildConfFinal rs context@Context {..} _conf = do - depPkgIds <- cabalDependencies context - ensureConfigured context - ways <- interpretInContext context (getLibraryWays <> if package == rts then getRtsWays else mempty) - stamps <- mapM pkgStampFile [ context { way = w } | w <- Set.toList ways ] - confs <- mapM (\pkgId -> packageDbPath (PackageDbLoc stage Final) <&> (-/- pkgId <.> "conf")) depPkgIds - -- Important to need these together to avoid introducing a linearisation. This is not the most critical place - -- though because needing the stamp file, will cause all dependent object files to be built anyway (even if other packages) - -- so the .conf file being needed will probably not have to build so much (only stuff which is not use transitively). It's - -- still better though to need both together to give hadrian the best chance possible to build things in parallel. - need (stamps ++ confs) - - -- We might need some package-db resource to limit read/write, see packageRules. - path <- buildPath context - - -- Special package cases (these should ideally be rolled into Cabal). - when (package == rts) $ do - jsTarget <- isJsTarget - - -- If Cabal knew about "generated-headers", we could read them from the - -- 'configuredCabal' information, and just "need" them here. - let common_headers = - [ path -/- "include/DerivedConstants.h" - , path -/- "include/ghcautoconf.h" - , path -/- "include/ghcplatform.h" - ] - -- headers only required for the native RTS - native_headers = - [ path -/- "include/rts/EventLogConstants.h" - , path -/- "include/rts/EventTypes.h" - ] - headers - | jsTarget = common_headers - | otherwise = common_headers ++ native_headers - - need headers - - -- we need to generate this file for GMP - when (package == ghcInternal) $ do - bignum <- interpretInContext context getBignumBackend - when (bignum == "gmp") $ - need [path -/- "include/ghc-gmp.h"] - - -- Copy and register the package. - Cabal.copyPackage context - Cabal.registerPackage rs context - - -- We declare that this rule also produces files matching: - -- - /stage/lib/--ghc-/*libHS* - -- (for .so files, Cabal's registration mechanism places them there) - -- - /stage/lib/--ghc-//** - -- (for interface files, static libs, ghci libs, includes, ...) - -- - -- so that if any change ends up modifying a library (but not its .conf - -- file), we still rebuild things that depend on it. - dyndir <- distDynDir context - distdir <- distDir context - pkgid <- pkgUnitId stage package - files <- liftIO $ - (++) <$> getDirectoryFilesIO "." [dyndir -/- "*libHS"++pkgid++"*"] - <*> getDirectoryFilesIO "." [distdir -/- "**"] - produces files - -buildConfInplace :: [(Resource, Int)] -> Context -> FilePath -> Action () -buildConfInplace rs context@Context {..} _conf = do - depPkgIds <- cabalDependencies context - ensureConfigured context - need =<< mapM (\pkgId -> packageDbPath (PackageDbLoc stage Inplace) <&> (-/- pkgId <.> "conf")) depPkgIds - - path <- buildPath context - - -- Special package cases (these should ideally be rolled into Cabal). - when (package == rts) $ - -- If Cabal knew about "generated-headers", we could read them from the - -- 'configuredCabal' information, and just "need" them here. - need [ path -/- "include/DerivedConstants.h" - , path -/- "include/ghcautoconf.h" - , path -/- "include/ghcplatform.h" - , path -/- "include/rts/EventLogConstants.h" - , path -/- "include/rts/EventTypes.h" - ] - - -- we need to generate this file for GMP - when (package == ghcInternal) $ do - bignum <- interpretInContext context getBignumBackend - when (bignum == "gmp") $ - need [path -/- "include/ghc-gmp.h"] - - -- Write an "inplace" package conf which points into the build directories - -- for finding the build products - Cabal.writeInplacePkgConf context - conf <- pkgInplaceConfig context - buildWithResources rs $ - target context (GhcPkg Update stage) [conf] [] - - -copyConf :: [(Resource, Int)] -> Context -> FilePath -> Action () -copyConf rs context@Context {..} conf = do - depPkgIds <- fmap stdOutToPkgIds . askWithResources rs $ - target context (GhcPkg Dependencies stage) [pkgName package] [] - need =<< mapM (\pkgId -> packageDbPath (PackageDbLoc stage iplace) <&> (-/- pkgId <.> "conf")) depPkgIds - -- We should unregister if the file exists since @ghc-pkg@ will complain - -- about existing package: https://github.com/snowleopard/hadrian/issues/543. - -- Also, we don't always do the unregistration + registration to avoid - -- repeated work after a full build. - -- We do not track 'doesFileExist' since we are going to create the file if - -- it is currently missing. TODO: Is this the right thing to do? - -- See https://github.com/snowleopard/hadrian/issues/569. - unlessM (liftIO $ IO.doesFileExist conf) $ do - buildWithResources rs $ - target context (GhcPkg Unregister stage) [pkgName package] [] - buildWithResources rs $ - target context (GhcPkg Copy stage) [pkgName package] [conf] - where - stdOutToPkgIds :: String -> [String] - stdOutToPkgIds = drop 1 . concatMap words . lines - -getPackageNameFromConfFile :: FilePath -> Action String -getPackageNameFromConfFile conf - | takeBaseName conf == "rts" = return "rts" - | otherwise = case parseCabalName (takeBaseName conf) of - Left err -> error $ "getPackageNameFromConfFile: Couldn't parse " ++ - takeBaseName conf ++ ": " ++ err - Right (name, _) -> return name - --- | Parse a cabal-like name -parseCabalName :: String -> Either String (String, Version) --- Try to parse a name with a hash, but otherwise parse a name without one. -parseCabalName s = bimap show id (Cabal.runParsecParser parser "" $ Cabal.fieldLineStreamFromString s) - where - parser = Cabal.try nameWithHashParser <|> (extractVersion <$> Cabal.parsec) - - extractVersion :: Cabal.PackageId -> (String, Version) - extractVersion pkg_id = (Cabal.unPackageName $ Cabal.pkgName pkg_id, Cabal.pkgVersion pkg_id) - -- Definition similar to 'Parsec PackageIdentifier' from Cabal but extended - -- with logic for parsing the hash (despite not returning it) - nameWithHashParser :: Cabal.ParsecParser (String, Version) - nameWithHashParser = Cabal.PP $ \_ -> do - xs' <- Parsec.sepBy component (Parsec.char '-') - case reverse xs' of - _hash:version_str:xs -> - case Cabal.simpleParsec @Version version_str of - Nothing -> fail ("failed to parse a version from " <> version_str) - Just v -> - if not (null xs) && all (\c -> all (/= '.') c && not (all Char.isDigit c)) xs - then return $ (intercalate "-" (reverse xs), v) - else fail "all digits or a dot in a portion of package name" - _ -> fail "couldn't parse a hash, a version and a name" - where - component = CabalCharParsing.munch1 (\c -> Char.isAlphaNum c || c == '.') - - - --- | Return extra library targets. -extraTargets :: Context -> Action [FilePath] -extraTargets context - | package context == rts = needRtsLibffiTargets (Context.stage context) - | otherwise = return [] - --- | Given a library 'Package' this action computes all of its targets. Needing --- all the targets should build the library such that it is ready to be --- registered into the package database. --- See 'Rules.packageTargets' for the explanation of the @includeGhciLib@ --- parameter. -libraryTargets :: Bool -> Context -> Action [FilePath] -libraryTargets includeGhciLib context@Context {..} = do - libFile <- pkgLibraryFile context - ghciLib <- pkgGhciLibraryFile context - ghciObjsSupported <- platformSupportsGhciObjects - ghci <- if ghciObjsSupported && includeGhciLib && not (wayUnit Dynamic way) - then interpretInContext context $ getContextData buildGhciLib - else return False - extra <- extraTargets context - return $ [ libFile ] - ++ [ ghciLib | ghci ] - ++ extra diff --git a/hadrian/src/Rules/Rts.hs b/hadrian/src/Rules/Rts.hs deleted file mode 100644 index a71dd94c1307..000000000000 --- a/hadrian/src/Rules/Rts.hs +++ /dev/null @@ -1,187 +0,0 @@ -{-# LANGUAGE MultiWayIf #-} - -module Rules.Rts (rtsRules, needRtsLibffiTargets, needRtsSymLinks) where - -import qualified Data.Set as Set - -import Packages (rts) -import Rules.Libffi -import Hadrian.Utilities -import Settings.Builders.Common -import Context.Type - --- | This rule has priority 3 to override the general rule for generating shared --- library files (see Rules.Library.libraryRules). -rtsRules :: Rules () -rtsRules = priority 3 $ do - -- Dynamic RTS library files need symlinks without the dummy version number. - -- This is for backwards compatibility (the old make build system omitted the - -- dummy version number). - root <- buildRootRules - [ root -/- "**/libHSrts_*-ghc*.so", - root -/- "**/libHSrts_*-ghc*.dylib", - root -/- "**/libHSrts-ghc*.so", - root -/- "**/libHSrts-ghc*.dylib"] - |%> \ rtsLibFilePath' -> createFileLink - (addRtsDummyVersion $ takeFileName rtsLibFilePath') - rtsLibFilePath' - - -- Libffi - forM_ [Stage1, Stage2, Stage3 ] $ \ stage -> do - let buildPath = root -/- buildDir (rtsContext stage) - - -- Header files - -- See Note [Packaging libffi headers] in GHC.Driver.CodeOutput. - forM_ libffiHeaderFiles $ \header -> - buildPath -/- "include" -/- header %> copyLibffiHeader stage - - -- Static libraries. - buildPath -/- "libCffi*.a" %> copyLibffiStatic stage - - -- Dynamic libraries - buildPath -/- "libffi*.dylib*" %> copyLibffiDynamicUnix stage ".dylib" - buildPath -/- "libffi*.so*" %> copyLibffiDynamicUnix stage ".so" - buildPath -/- "libffi*.dll*" %> copyLibffiDynamicWin stage - -withLibffi :: Stage -> (FilePath -> FilePath -> Action a) -> Action a -withLibffi stage action = needLibffi stage - >> (join $ action <$> libffiBuildPath stage - <*> rtsBuildPath stage) - --- | Copy a header files wither from the system libffi or from the libffi --- build dir to the rts build dir. --- --- See Note [Packaging libffi headers] in GHC.Driver.CodeOutput. -copyLibffiHeader :: Stage -> FilePath -> Action () -copyLibffiHeader stage header = do - useSystemFfi <- flag UseSystemFfi - (fromStr, headerDir) <- if useSystemFfi - then ("system",) <$> libffiSystemHeaderDir - else needLibffi stage - >> ("custom",) <$> libffiHeaderDir stage - copyFile - (headerDir -/- takeFileName header) - header - putSuccess $ "| Successfully copied " ++ fromStr ++ " FFI library header " - ++ "files to RTS build directory." - --- | Copy a static library file from the libffi build dir to the rts build dir. -copyLibffiStatic :: Stage -> FilePath -> Action () -copyLibffiStatic stage target = withLibffi stage $ \ libffiPath _ -> do - -- Copy the vanilla library, and symlink the rest to it. - vanillaLibFile <- rtsLibffiLibrary stage vanilla - if target == vanillaLibFile - then copyFile' (libffiPath -/- libffiLibrary) target - else createFileLink (takeFileName vanillaLibFile) target - - --- | Copy a dynamic library file from the libffi build dir to the rts build dir. -copyLibffiDynamicUnix :: Stage -> String -> FilePath -> Action () -copyLibffiDynamicUnix stage libSuf target = do - needLibffi stage - dynLibs <- askLibffilDynLibs stage - - -- If no version number suffix, then copy else just symlink. - let versionlessSourceFilePath = fromMaybe - (error $ "Needed " ++ show target ++ " which is not any of " ++ - "libffi's built shared libraries: " ++ show dynLibs) - (find (libSuf `isSuffixOf`) dynLibs) - let versionlessSourceFileName = takeFileName versionlessSourceFilePath - if versionlessSourceFileName == takeFileName target - then do - copyFile' versionlessSourceFilePath target - - -- On OSX the dylib's id must be updated to a relative path. - when osxHost $ cmd - [ "install_name_tool" - , "-id", "@rpath/" ++ takeFileName target - , target - ] - else createFileLink versionlessSourceFileName target - --- | Copy a dynamic library file from the libffi build dir to the rts build dir. -copyLibffiDynamicWin :: Stage -> FilePath -> Action () -copyLibffiDynamicWin stage target = do - needLibffi stage - dynLibs <- askLibffilDynLibs stage - let source = fromMaybe - (error $ "Needed " ++ show target ++ " which is not any of " ++ - "libffi's built shared libraries: " ++ show dynLibs) - (find (\ lib -> takeFileName target == takeFileName lib) dynLibs) - copyFile' source target - -rtsLibffiLibrary :: Stage -> Way -> Action FilePath -rtsLibffiLibrary stage way = do - name <- interpretInContext ((rtsContext stage) { way = way }) libffiName - suf <- if wayUnit Dynamic way - then do - extension <- setting DynamicExtension -- e.g., .dll or .so - let suffix = waySuffix (removeWayUnit Dynamic way) - return (suffix ++ extension) - -- Static suffix - else return (waySuffix way ++ ".a") -- e.g., _p.a - rtsPath <- rtsBuildPath stage - return $ rtsPath -/- "lib" ++ name ++ suf - --- | Get the libffi files bundled with the rts (header and library files). --- Unless using the system libffi, this needs the libffi library. It must be --- built before the targets can be calculated. -needRtsLibffiTargets :: Stage -> Action [FilePath] -needRtsLibffiTargets stage = do - rtsPath <- rtsBuildPath stage - useSystemFfi <- flag UseSystemFfi - jsTarget <- isJsTarget - - -- Header files (in the rts build dir). - let headers = fmap ((rtsPath -/- "include") -/-) libffiHeaderFiles - - if | jsTarget -> return [] - | useSystemFfi -> return [] - | otherwise -> do - -- Need Libffi - -- This returns the dynamic library files (in the Libffi build dir). - needLibffi stage - dynLibffSource <- askLibffilDynLibs stage - - -- Dynamic library files (in the rts build dir). - let dynLibffis = fmap (\ lib -> rtsPath -/- takeFileName lib) - dynLibffSource - - -- Libffi files (in the rts build dir). - libffis_libs <- do - ways <- interpretInContext (stageContext stage) - (getLibraryWays <> getRtsWays) - mapM (rtsLibffiLibrary stage) (Set.toList ways) - return $ concat [ headers, dynLibffis, libffis_libs ] - --- Need symlinks generated by rtsRules. -needRtsSymLinks :: Stage -> Set.Set Way -> Action () -needRtsSymLinks stage rtsWays - = forM_ (Set.filter (wayUnit Dynamic) rtsWays) $ \ way -> do - let ctx = Context stage rts way Final - distDir <- distDynDir ctx - rtsLibFile <- takeFileName <$> pkgLibraryFile ctx - need [removeRtsDummyVersion (distDir rtsLibFile)] - -prefix, versionlessPrefix :: String -versionlessPrefix = "libHSrts" -prefix = versionlessPrefix ++ "-1.0.3" - --- removeRtsDummyVersion "a/libHSrts-1.0-ghc1.2.3.4.so" --- == "a/libHSrts-ghc1.2.3.4.so" -removeRtsDummyVersion :: FilePath -> FilePath -removeRtsDummyVersion = replaceLibFilePrefix prefix versionlessPrefix - --- addRtsDummyVersion "a/libHSrts-ghc1.2.3.4.so" --- == "a/libHSrts-1.0-ghc1.2.3.4.so" -addRtsDummyVersion :: FilePath -> FilePath -addRtsDummyVersion = replaceLibFilePrefix versionlessPrefix prefix - -replaceLibFilePrefix :: String -> String -> FilePath -> FilePath -replaceLibFilePrefix oldPrefix newPrefix oldFilePath = let - oldFileName = takeFileName oldFilePath - newFileName = maybe - (error $ "Expected RTS library file to start with " ++ oldPrefix) - (newPrefix ++) - (stripPrefix oldPrefix oldFileName) - in replaceFileName oldFilePath newFileName diff --git a/hadrian/src/Rules/Selftest.hs b/hadrian/src/Rules/Selftest.hs deleted file mode 100644 index eae902013fa7..000000000000 --- a/hadrian/src/Rules/Selftest.hs +++ /dev/null @@ -1,125 +0,0 @@ -{-# OPTIONS_GHC -fno-warn-orphans #-} -module Rules.Selftest (selftestRules) where - -import Hadrian.Haskell.Cabal -import Test.QuickCheck - -import Base -import Context -import Oracles.ModuleFiles -import Packages -import Settings -import Target -import Utilities - -import qualified System.FilePath.Posix as Posix (()) - -instance Arbitrary Way where - arbitrary = wayFromUnits <$> arbitrary - -instance Arbitrary WayUnit where - arbitrary = arbitraryBoundedEnum - -test :: Testable a => a -> Action () -test = liftIO . quickCheck - -selftestRules :: Rules () -selftestRules = - "selftest" ~> do - testBuilder - testChunksOfSize - testDependencies - testLookupAll - testModuleName - testPackages - testPaths - testWay - -testBuilder :: Action () -testBuilder = do - putBuild "==== trackArgument" - let make = target undefined (Make undefined) undefined undefined - test $ forAll (elements ["-j", "MAKEFLAGS=-j", "THREADS="]) - $ \prefix (NonNegative n) -> - not (trackArgument make prefix) && - not (trackArgument make ("-j" ++ show (n :: Int))) - -testChunksOfSize :: Action () -testChunksOfSize = do - putBuild "==== chunksOfSize" - test $ chunksOfSize 3 [ "a", "b", "c" , "defg" , "hi" , "jk" ] - == [ ["a", "b", "c"], ["defg"], ["hi"], ["jk"] ] - test $ \n xs -> - let res = chunksOfSize n xs - in concat res == xs && all (\r -> length r == 1 || length (concat r) <= n) res - -testDependencies :: Action () -testDependencies = do - putBuild "==== pkgDependencies" - let pkgs = ghcPackages \\ [libffi] -- @libffi@ does not have a Cabal file. - depLists <- mapM pkgDependencies pkgs - test $ and [ deps == sort deps | deps <- depLists ] - putBuild "==== Dependencies of the 'ghc-bin' binary" - ghcDeps <- pkgDependencies ghc - test $ pkgName compiler `elem` ghcDeps - stage0Deps <- contextDependencies (vanillaContext stage0InTree ghc) - stage1Deps <- contextDependencies (vanillaContext Stage1 ghc) - stage2Deps <- contextDependencies (vanillaContext Stage2 ghc) - test $ vanillaContext stage0InTree compiler `notElem` stage1Deps - test $ vanillaContext Stage1 compiler `elem` stage1Deps - test $ vanillaContext Stage2 compiler `notElem` stage1Deps - test $ stage1Deps /= stage0Deps - test $ stage1Deps == stage2Deps - -testLookupAll :: Action () -testLookupAll = do - putBuild "==== lookupAll" - test $ lookupAll ["b" , "c" ] [("a", 1), ("c", 3), ("d", 4)] - == [Nothing, Just (3 :: Int)] - test $ forAll dicts $ \dict -> forAll extras $ \extra -> - let items = sort $ map fst dict ++ extra - in lookupAll items (sort dict) == map (`lookup` dict) items - where - dicts :: Gen [(Int, Int)] - dicts = nubBy (\x y -> fst x == fst y) <$> vector 20 - extras :: Gen [Int] - extras = vector 20 - -testModuleName :: Action () -testModuleName = do - putBuild "==== Encode/decode module name" - test $ encodeModule "Data/Functor" "Identity.hs" == "Data.Functor.Identity" - test $ encodeModule "" "Prelude" == "Prelude" - - test $ decodeModule "Data.Functor.Identity" == ("Data/Functor", "Identity") - test $ decodeModule "Prelude" == ("", "Prelude") - - test $ forAll names $ \n -> uncurry encodeModule (decodeModule n) == n - where - names = intercalate "." <$> listOf1 (listOf1 $ elements "abcABC123_'") - -testPackages :: Action () -testPackages = do - putBuild "==== Check system configuration" - putBuild "==== Packages, interpretInContext, configuration flags" - forM_ allStages $ \stage -> do - pkgs <- stagePackages stage - when (win32 `elem` pkgs) . test $ windowsHost - when (unix `elem` pkgs) . test $ not windowsHost - test $ pkgs == nubOrd pkgs - -testWay :: Action () -testWay = do - putBuild "==== Read Way, Show Way" - test $ \(x :: Way) -> read (show x) == x - -testPaths :: Action () -testPaths = do - putBuild "==== Absolute, Relative Path Concatenation" - test $ forAll paths $ \(path1, path2) -> - path1 -/- path2 == path1 Posix. path2 - where - paths = (,) <$> path <*> path - path = frequency [(1, relativePath), (1, absolutePath)] - relativePath = intercalate "/" <$> listOf1 (elements ["a"]) - absolutePath = ('/':) <$> relativePath diff --git a/hadrian/src/Rules/SimpleTargets.hs b/hadrian/src/Rules/SimpleTargets.hs deleted file mode 100644 index 4e461dc9464a..000000000000 --- a/hadrian/src/Rules/SimpleTargets.hs +++ /dev/null @@ -1,80 +0,0 @@ -module Rules.SimpleTargets - ( simplePackageTargets - , completionRule - ) where - -import Base -import CommandLine -import Context -import Packages -import Settings - -import Data.Foldable - --- | Simple aliases for library and executable targets. --- --- - @stage:lib:@ will build library @name@ with --- the stage N compiler, putting the result under --- @/stage/lib@. --- - @stage:exe:@ will build executable @name@ --- with the stage N-1 compiler, putting the result under --- @/stage/bin. -simplePackageTargets :: Rules () -simplePackageTargets = traverse_ simpleTarget targets - - where targets = [ (stage, target) - | stage <- allStages - , target <- knownPackages - ] - -simpleTarget :: (Stage, Package) -> Rules () -simpleTarget (stage, target) = do - root <- buildRootRules - - let tgt = intercalate ":" [stagestr, typ, pkgname] - tgt ~> do - p <- getTargetPath stage target - need [ p ] - -- build the _build/ghc-stageN wrappers if this is the ghc package - if target == Packages.ghc - then need [ root -/- ("ghc-" <> stagestr) ] - else pure () - when (stage == Stage1 && isLibrary target && target /= rts) $ do - let doc_tgt = intercalate ":" ["docs", pkgname] - doc_tgt ~> do - need . (:[]) =<< (pkgHaddockFile $ vanillaContext Stage1 target) - - - where typ = if isLibrary target then "lib" else "exe" - stagestr = stageString stage - pkgname = pkgName target - -getTargetPath :: Stage -> Package -> Action FilePath -getTargetPath stage pkg - | isLibrary pkg = getLibraryPath stage pkg - | otherwise = getProgramPath stage pkg - -getLibraryPath :: Stage -> Package -> Action FilePath -getLibraryPath stage pkg = pkgConfFile (vanillaContext stage pkg) - -getProgramPath :: Stage -> Package -> Action FilePath -getProgramPath stage pkg = - case stage of - (Stage0 GlobalLibs) -> error "Can't build executable in stageBoot" - (Stage0 InTreeLibs) -> programPath (vanillaContext stage0Boot pkg) - s -> programPath (vanillaContext (predStage s) pkg) - - --- | A phony @autocomplete@ rule that prints all valid setting keys --- completions of the value specified in the @--complete-setting=...@ flag, --- or simply all valid setting keys if no such argument is passed to Hadrian. --- --- It is based on the 'completeSetting' function, from the "Settings" module. -completionRule :: Rules () -completionRule = - "autocomplete" ~> do - partialStr <- fromMaybe "" <$> cmdCompleteSetting - case completeSetting (splitOn "." partialStr) of - [] -> fail $ "No valid completion found for " ++ partialStr - cs -> forM_ cs $ \ks -> - liftIO . putStrLn $ intercalate "." ks diff --git a/hadrian/src/Rules/SourceDist.hs b/hadrian/src/Rules/SourceDist.hs deleted file mode 100644 index 49327ce628b4..000000000000 --- a/hadrian/src/Rules/SourceDist.hs +++ /dev/null @@ -1,194 +0,0 @@ -module Rules.SourceDist (sourceDistRules) where - -import Base -import Builder -import Context -import Oracles.Setting -import Packages -import Utilities (askWithResources, build) -import Hadrian.Target (target) -import qualified System.Directory.Extra as IO -import Oracles.ModuleFiles (determineBuilder) - -sourceDistRules :: Rules () -sourceDistRules = alternatives $ do - root <- buildRootRules - "source-dist" ~> do - version <- setting ProjectVersion - need [root -/- "source-dist" -/- ("ghc-" ++ version ++ "-src.tar.xz")] - need [root -/- "source-dist" -/- ("ghc-" ++ version ++ "-testsuite.tar.xz")] - need [root -/- "source-dist" -/- ("ghc-" ++ version ++ "-windows-extra-src.tar.xz")] - putSuccess "| Done" - - -- Ordering of rules is important so that windows-extra-src matches before src - root -/- "source-dist" -/- "ghc-*-windows-extra-src.tar.xz" %> - archiveSourceTree prepareWindowsExtraTree - root -/- "source-dist" -/- "ghc-*-testsuite.tar.xz" %> - archiveSourceTree prepareTestsuiteTree - root -/- "source-dist" -/- "ghc-*-src.tar.xz" %> - archiveSourceTree prepareTree - "GIT_COMMIT_ID" %> \fname -> - writeFileChanged fname =<< setting ProjectGitCommitId - - -- Rules to download mingw tarballs - let mingw_tarballs_stamp = "ghc-tarballs/mingw-w64/.mingw-w64.download.stamp" - ["ghc-tarballs/mingw-w64/*/*.tar.*","ghc-tarballs/mingw-w64/*/SHA256SUMS"] |%> \_ -> - need [mingw_tarballs_stamp] - mingw_tarballs_stamp %> \stamp -> do - build (target (vanillaContext Stage1 compiler) (Win32Tarballs DownloadTarballs) [] []) - writeFile' stamp "OK" - - -archiveSourceTree :: (FilePath -> Action ()) -> FilePath -> Action () -archiveSourceTree prepare fname = do - root <- buildRoot - version <- setting ProjectVersion - let dropTarXz = dropExtension . dropExtension - tarName = takeFileName fname - dirName = dropTarXz tarName - baseName = "ghc-" ++ version - treeDir = dirName -/- baseName - treePath = sourceDistRoot -/- treeDir - sourceDistRoot = root -/- "source-dist" - removeDirectory treePath - prepare treePath - runBuilderWithCmdOptions - [Cwd $ sourceDistRoot -/- dirName] - (Tar Create) - -- See https://github.com/haskell/cabal/issues/10442 for why we exclude this file. - ["--exclude=cabal.project.symlink.broken","-chJf", ".." -/- tarName, baseName] - ["--exclude=cabal.project.symlink.broken","-chJf", ".." -/- tarName] [baseName] - - --- | This creates a symlink to the 'source' at 'target' --- $tar -h$ will eventually copy the source into the tarball --- This is also how `make sdist` works. --- 1. It preserves relative symlinks --- 2. It copies non-empty directories also. This is because git includes --- directories in its output if they are non empty. -copyFileSourceDist :: FilePath -> FilePath -> Action () -copyFileSourceDist source target = do - isSymlink <- liftIO $ IO.pathIsSymbolicLink source - if isSymlink then do - link_target <- liftIO $ IO.getSymbolicLinkTarget source - when (not $ isRelative link_target) $ - error ("source-dist: tried to create non-relative symlink in source dist: " ++ show link_target) - putProgressInfo =<< renderAction ("Create symlink (" ++ link_target ++ ")") source target - isDirectory <- liftIO $ IO.doesDirectoryExist source - -- We don't want to call `need` on broken symlinks - linkTargetExists <- liftIO $ IO.doesPathExist link_target - when (not isDirectory && linkTargetExists) $ - need [source] - let createLink src tgt - | isDirectory = liftIO $ IO.createDirectoryLink src tgt - | otherwise = liftIO $ IO.createFileLink src tgt - let dir = takeDirectory target - liftIO $ IO.createDirectoryIfMissing True dir - liftIO $ removeFile_ target - createLink link_target target - else do - isDirectory <- liftIO $ IO.doesDirectoryExist source - if isDirectory then do - contents <- liftIO $ IO.listDirectory source - when (not $ null contents) $ -- Git only includes directories in the output if they are empty - error ("source-dist: non-empty dir" ++ show source) - createDirectory target - else createFileLink source target - -prepareTestsuiteTree :: FilePath -> Action () -prepareTestsuiteTree dest = do - top <- topDirectory - let testsuiteFiles = filter testFilter . split (=='\NUL') - testFilter file = not (null file) && ("testsuite//" ?== file) - files <- testsuiteFiles <$> askWithResources [] (target (vanillaContext Stage1 compiler) (Git ListFiles) [] []) - forM_ files $ \source -> do - let target = dest -/- source - copyFileSourceDist (top -/- source) target - -prepareWindowsExtraTree :: FilePath -> Action () -prepareWindowsExtraTree dest = do - top <- topDirectory - - files <- lines <$> askWithResources [] (target (vanillaContext Stage1 compiler) (Win32Tarballs ListTarballs) [] []) - need files - build (target (vanillaContext Stage1 compiler) (Win32Tarballs VerifyTarballs) [] []) - - createDirectory dest - liftIO $ IO.createFileLink (top -/- "ghc-tarballs") (dest -/- "ghc-tarballs") - -prepareTree :: FilePath -> Action () -prepareTree dest = do - out <- askWithResources [] (target (vanillaContext Stage1 compiler) (Git ListFiles) [] []) - top <- topDirectory - let files = ["GIT_COMMIT_ID", "VERSION"] ++ getFiles out - need ["GIT_COMMIT_ID"] - forM_ files $ \source -> do - let target = dest -/- source - copyFileSourceDist (top -/- source) target - copyAlexHappyFiles - copyBootFiles - where - - getFiles = filter treeFilter . split (=='\NUL') - treeFilter file = not (null file) && not ("testsuite//" ?== file) - - -- Copy files created by running ./boot - copyBootFiles = do - top <- topDirectory - forM_ bootFiles $ \file -> do - let src_file = top -/- file - dest_file = top -/- dest -/- file - createFileLink src_file dest_file - -- And move ./boot so we can't accidentally call it in CI - moveFile (dest -/- "boot") (dest -/- "boot.source") - - bootFiles = - [ pkgPath rts -/- "configure" - , pkgPath rts -/- "ghcautoconf.h.autoconf.in" - , pkgPath process -/- "include" -/- "HsProcessConfig.h.in" - , pkgPath process -/- "configure" - , pkgPath ghcInternal -/- "configure" - , pkgPath ghcInternal -/- "include" -/- "HsBaseConfig.h.in" - , pkgPath directory -/- "configure" - , pkgPath directory -/- "HsDirectoryConfig.h.in" - , pkgPath time -/- "configure" - , pkgPath time -/- "lib" -/- "include" -/- "HsTimeConfig.h.in" - , pkgPath unix -/- "configure" - , pkgPath unix -/- "include" -/- "HsUnixConfig.h.in" - , pkgPath terminfo -/- "configure" - , "configure" - , "aclocal.m4" - ] - - copyAlexHappyFiles = - forM_ alexHappyFiles $ \(stg, pkg, inp, out) -> do - let ctx = Context stg pkg vanilla Inplace - srcInputFile = dest -/- pkgPath pkg -/- inp - generatedFile = dest -/- pkgPath pkg -/- out - builder = - case determineBuilder stg inp of - Just builder -> builder - Nothing -> error $ "Failed to determine builder for " ++ inp - - -- We first make sure that the generated file is... generated. - build $ target ctx builder [srcInputFile] [generatedFile] - - -- We finally add a ".source" suffix to the input file to - -- prevent it from being used when building GHC, since the - -- generated file being there already should prevent - -- the need for the original input. - moveFile srcInputFile (srcInputFile <.> "source") - - -- (stage, package, input file, output file) - alexHappyFiles = - [ (stage0InTree , compiler, "GHC/Cmm/Parser.y", "GHC/Cmm/Parser.hs") - , (stage0InTree , compiler, "GHC/Cmm/Lexer.x", "GHC/Cmm/Lexer.hs") - , (stage0InTree , compiler, "GHC/Parser.y", "GHC/Parser.hs") - , (stage0InTree , compiler, "GHC/Parser/Lexer.x", "GHC/Parser/Lexer.hs") - , (stage0InTree , compiler, "GHC/Parser/Lexer/String.x", "GHC/Parser/Lexer/String.hs") - , (stage0InTree , compiler, "GHC/Parser/HaddockLex.x", "GHC/Parser/HaddockLex.hs") - , (stage0InTree , hpcBin, "src/Trace/Hpc/Parser.y", "src/Trace/Hpc/Parser.hs") - , (stage0InTree , genprimopcode, "Parser.y", "Parser.hs") - , (stage0InTree , genprimopcode, "Lexer.x", "Lexer.hs") - , (stage0InTree , cabalSyntax , "src/Distribution/Fields/Lexer.x", "src/Distribution/Fields/Lexer.hs") - ] diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs deleted file mode 100644 index aed579583e67..000000000000 --- a/hadrian/src/Rules/Test.hs +++ /dev/null @@ -1,362 +0,0 @@ -{-# OPTIONS_GHC -Wno-unused-top-binds #-} -module Rules.Test (testRules) where - -import Base -import CommandLine -import Expression -import Flavour -import Hadrian.Haskell.Cabal.Type (packageDependencies) -import Hadrian.Oracles.Cabal (readPackageData) -import Hadrian.Oracles.Path (fixAbsolutePathOnWindows) -import Oracles.Setting -import Oracles.TestSettings -import Oracles.Flag -import Packages -import Settings -import Settings.Builders.RunTest -import Settings.Program (programContext) -import Target -import Utilities -import Context.Type -import qualified System.Directory as IO - -import GHC.Toolchain as Toolchain -import GHC.Toolchain.Program as Toolchain - -checkPprProgPath, checkPprSourcePath :: FilePath -checkPprProgPath = "test/bin/check-ppr" <.> exe -checkPprSourcePath = "utils/check-ppr/Main.hs" -checkPprExtra :: [String] -checkPprExtra = [] - -checkExactProgPath, checkExactSourcePath :: FilePath -checkExactProgPath = "test/bin/check-exact" <.> exe -checkExactSourcePath = "utils/check-exact/Main.hs" -checkExactExtra :: [String] -checkExactExtra = ["-iutils/check-exact"] - -countDepsProgPath, countDepsSourcePath :: FilePath -countDepsProgPath = "test/bin/count-deps" <.> exe -countDepsSourcePath = "utils/count-deps/Main.hs" -countDepsExtra :: [String] -countDepsExtra = ["-iutils/count-deps"] - -dumpDeclsProgPath, dumpDeclsSourcePath :: FilePath -dumpDeclsProgPath = "test/bin/dump-decls" <.> exe -dumpDeclsSourcePath = "utils/dump-decls/Main.hs" -dumpDeclsExtra :: [String] -dumpDeclsExtra = [] - -noteLinterProgPath, noteLinterSourcePath :: FilePath -noteLinterProgPath = "test/bin/lint-notes" <.> exe -noteLinterSourcePath = "linters/lint-notes/Main.hs" -noteLinterExtra :: [String] -noteLinterExtra = ["-ilinters/lint-notes"] - -codeLinterProgPath, codeLinterSourcePath :: FilePath -codeLinterProgPath = "test/bin/lint-codes" <.> exe -codeLinterSourcePath = "linters/lint-codes/Main.hs" -codeLinterExtra :: [String] -codeLinterExtra = ["-ilinters/lint-codes"] - -whitespaceLinterProgPath, whitespaceLinterSourcePath :: FilePath -whitespaceLinterProgPath = "test/bin/lint-whitespace" <.> exe -whitespaceLinterSourcePath = "linters/lint-whitespace/Main.hs" -whitespaceLinterExtra :: [String] -whitespaceLinterExtra = ["-ilinters/lint-whitespace", "-ilinters/linters-common"] - -data CheckProgram = - CheckProgram { cp_target :: String -- ^ Name for the hadrian target - , cp_exe_path :: FilePath -- ^ Path to resulting executable - , cp_src_path :: FilePath -- ^ Source to the Main.hs for the executable - , cp_extra_args :: [String] -- ^ Any extra arguments to use when compiling Main.hs - , cp_hadrian_pkg :: Package -- ^ How to build the executable when using in-tree compiler. - , cp_modify_stage :: Stage -> Stage -- ^ Which stage GHC to build the executable with. - , cp_modify_deps :: [Package] -> [Package] -- ^ How to modify the package dependencies, only used for the linter to remove the dependency on lintersCommon. - } - -checkPrograms :: [CheckProgram] -checkPrograms = - [ CheckProgram "test:check-ppr" checkPprProgPath checkPprSourcePath checkPprExtra checkPpr id id - , CheckProgram "test:check-exact" checkExactProgPath checkExactSourcePath checkExactExtra checkExact id id - , CheckProgram "test:count-deps" countDepsProgPath countDepsSourcePath countDepsExtra countDeps id id - , CheckProgram "test:dump-decls" dumpDeclsProgPath dumpDeclsSourcePath dumpDeclsExtra dumpDecls id id - , CheckProgram "lint:notes" noteLinterProgPath noteLinterSourcePath noteLinterExtra lintNotes (const stage0Boot) id - , CheckProgram "lint:codes" codeLinterProgPath codeLinterSourcePath codeLinterExtra lintCodes id id - , CheckProgram "lint:whitespace" whitespaceLinterProgPath whitespaceLinterSourcePath whitespaceLinterExtra lintWhitespace (const stage0Boot) (filter (/= lintersCommon)) - ] - -inTreeOutTree :: (Stage -> Action b) -> Action b -> Action b -inTreeOutTree inTree outTree = do - args <- userSetting defaultTestArgs - let testCompilerArg = testCompiler args - case stageOf testCompilerArg of - Just stg -> inTree stg - Nothing -> outTree - -testsuiteDeps :: Rules () -testsuiteDeps = do - root <- buildRootRules - "test:all_deps" ~> do - need ("test:ghc" : map cp_target checkPrograms) - - "test:ghc" ~> inTreeOutTree - (\stg -> do - needTestsuitePackages stg - need [(root -/- ghcConfigPath)] - -- This is here because it's the one place we know that GHC is - -- up-to-date. Later when we compute the in/out tree arguments - -- we can't be sure whether checking this assertion will trigger - -- a rebuild. - assertSameCompilerArgs stg) - - (return ()) - -ghcConfigPath :: FilePath -ghcConfigPath = "test/ghcconfig" - --- TODO: clean up after testing -testRules :: Rules () -testRules = do - root <- buildRootRules - - testsuiteDeps - - -- Rules for building check-ppr, check-exact and - -- check-ppr-annotations with the compiler we are going to test - -- (in-tree or out-of-tree). - forM_ checkPrograms $ \(CheckProgram name progPath sourcePath mextra progPkg mod_stage mod_pkgs) -> do - name ~> need [root -/- progPath] - root -/- progPath %> \path -> do - need [ sourcePath ] - testGhc <- testCompiler <$> userSetting defaultTestArgs - - -- when we're about to test an in-tree compiler, just build the package - -- normally, NOT stage3, as there are no rules for stage4 yet - case stageOf testGhc of - Just stg -> do - fs <- pkgFile (mod_stage stg) progPkg - need [fs] - prog_path <- programPath =<< programContext (mod_stage stg) progPkg - abs_prog_path <- liftIO (IO.canonicalizePath prog_path) - createFileLink abs_prog_path path - -- otherwise, build it by directly invoking ghc - Nothing -> do - top <- topDirectory - depsPkgs <- mod_pkgs . packageDependencies <$> readPackageData progPkg - bindir <- getBinaryDirectory testGhc - test_args <- outOfTreeCompilerArgs - let dynPrograms = hasDynamic test_args - cmd [bindir "ghc" <.> exe] $ - concatMap (\p -> ["-package", pkgName p]) depsPkgs ++ - ["-o", top -/- path, top -/- sourcePath] ++ - mextra ++ - -- If GHC is build dynamic, then build check-ppr also dynamic. - (if dynPrograms then ["-dynamic"] else []) - - root -/- ghcConfigPath %> \_ -> do - alwaysRerun - args <- userSetting defaultTestArgs - let testGhc = testCompiler args - ghcPath <- getCompilerPath testGhc - whenJust (stageOf testGhc) $ \stg -> - need . (:[]) =<< programPath (Context stg ghc vanilla Final) - ghcConfigProgPath <- programPath =<< programContext stage0InTree ghcConfig - cwd <- liftIO $ IO.getCurrentDirectory - need [makeRelative cwd ghcPath, ghcConfigProgPath] - cmd [FileStdout $ root -/- ghcConfigPath] ghcConfigProgPath [ghcPath] - - root -/- timeoutPath %> \_ -> timeoutProgBuilder - - "test" ~> do - args <- userSetting defaultTestArgs - let testCompilerArg = testCompiler args - let stg = fromMaybe Stage2 $ stageOf testCompilerArg - let test_target tt = target (vanillaContext stg compiler) (Testsuite tt) [] [] - - -- We need to ask the testsuite if it needs any extra hadrian dependencies for the - -- tests it is going to run, - -- for example "docs_haddock" - -- We then need to go and build these dependencies - extra_targets <- words <$> askWithResources [] (test_target GetExtraDeps) - let ok_to_build = filter (isOkToBuild args) extra_targets - putVerbose $ " | ExtraTargets: " ++ intercalate ", " extra_targets - putVerbose $ " | ExtraTargets (ok-to-build): " ++ intercalate ", " ok_to_build - need $ ok_to_build ++ [root -/- timeoutPath] - - -- force stage0 program building for cross - cross <- flag CrossCompiling - when cross $ mapM (relativePathStage (Stage0 InTreeLibs)) [hpc, haddock, runGhc] >>= need - - -- Set environment variables for test's Makefile. - env <- testEnv - - -- Execute the test target. - -- We override the verbosity setting to make sure the user can see - -- the test output: https://gitlab.haskell.org/ghc/ghc/issues/15951. - withVerbosity Diagnostic $ buildWithCmdOptions [AddEnv k v | (k,v) <- env] $ test_target RunTest - -testEnv :: Action [(String, String)] -testEnv = do - cross <- flag CrossCompiling - makePath <- builderPath $ Make "" - prog_ghc_pkg <- absolutePathStage Stage1 ghcPkg - prog_hsc2hs <- absolutePathStage Stage1 hsc2hs - prog_hp2ps <- absolutePathStage Stage1 hp2ps - prog_haddock <- absolutePathStage (Stage0 InTreeLibs) haddock - prog_hpc <- absolutePathStage (Stage0 InTreeLibs) hpc - prog_runghc <- absolutePathStage (Stage0 InTreeLibs) runGhc - - root <- buildRoot - args <- userSetting defaultTestArgs - let testCompilerArg = testCompiler args - ghcPath <- getCompilerPath testCompilerArg - - top <- topDirectory - pythonPath <- builderPath Python - ccPath <- queryTargetTarget (Toolchain.prgPath . Toolchain.ccProgram . Toolchain.tgtCCompiler) - ccFlags <- queryTargetTarget (unwords . Toolchain.prgFlags . Toolchain.ccProgram . Toolchain.tgtCCompiler) - ghcFlags <- runTestGhcFlags - let ghciFlags = ghcFlags ++ unwords - [ "--interactive", "-v0", "-ignore-dot-ghci" - , "-fno-ghci-history", "-fprint-error-index-links=never" - ] - - -- Many of those env vars are used by Makefiles in the - -- test infrastructure, or from tests or their - -- Makefiles. - return $ - [ "MAKE" .= makePath - , "PYTHON" .= pythonPath - , "TEST_HC" .= ghcPath - , "TEST_HC_OPTS" .= ghcFlags - , "TEST_HC_OPTS_INTERACTIVE" .= ghciFlags - , "TEST_CC" .= ccPath - , "TEST_CC_OPTS" .= ccFlags - , "CHECK_PPR" .= (top -/- root -/- checkPprProgPath) - , "CHECK_EXACT" .= (top -/- root -/- checkExactProgPath) - , "DUMP_DECLS" .= (top -/- root -/- dumpDeclsProgPath) - , "COUNT_DEPS" .= (top -/- root -/- countDepsProgPath) - , "LINT_NOTES" .= (top -/- root -/- noteLinterProgPath) - , "LINT_CODES" .= (top -/- root -/- codeLinterProgPath) - , "LINT_WHITESPACE" .= (top -/- root -/- whitespaceLinterProgPath) - -- This lets us bypass the need to generate a config - -- through Make, which happens in testsuite/mk/boilerplate.mk - -- which is in turn included by all test 'Makefile's. - , "ghc_config_mk" .= (top -/- root -/- ghcConfigPath) - ] ++ - if_ cross - [ "GHC_PKG" .= prog_ghc_pkg - , "HSC2HS" .= prog_hsc2hs - , "HP2PS_ABS" .= prog_hp2ps - , "HPC" .= prog_hpc - , "HADDOCK" .= prog_haddock - , "RUNGHC" .= prog_runghc - ] - where - if_ :: Bool -> [a] -> [a] - if_ True xs = xs - if_ False _ = [] - - (.=) = (,) - -needProgramStage :: Stage -> Package -> Action () -needProgramStage s p = relativePathStage s p >>= need . (:[]) - --- | Get relative path for the given program in the given stage. -relativePathStage :: Stage -> Package -> Action FilePath -relativePathStage s p = programPath =<< programContext s p - -absolutePathStage :: Stage -> Package -> Action FilePath -absolutePathStage s p = - relativePathStage s p >>= make_absolute - where - make_absolute rel_path = do - abs_path <- liftIO (makeAbsolute rel_path) - fixAbsolutePathOnWindows abs_path - --- | Given a test compiler and a hadrian dependency (target), check if we --- can build the target with the compiler --- --- We can always build a target with an intree compiler But we can only build --- targets with special support (checkPrograms) with arbitrary compilers. --- --- We need to build the dependencies if --test-have-intree-files is set. --- We should have built them already by this point, but -isOkToBuild :: TestArgs -> String -> Bool -isOkToBuild args target - = isInTreeCompiler (testCompiler args) - || testHasInTreeFiles args - || target `elem` map cp_target checkPrograms - --- | Build the timeout program. --- See: https://github.com/ghc/ghc/blob/master/testsuite/timeout/Makefile#L23 - -timeoutProgBuilder :: Action () -timeoutProgBuilder = do - root <- buildRoot - if windowsHost - then do - prog <- programPath =<< programContext stage0InTree timeout - copyFile prog (root -/- timeoutPath) - else do - python <- builderPath Python - copyFile "testsuite/timeout/timeout.py" (root -/- timeoutPath <.> "py") - let script = unlines - [ "#!/bin/sh" - , "exec " ++ python ++ " $0.py \"$@\"" ] - writeFile' (root -/- timeoutPath) script - makeExecutable (root -/- timeoutPath) - --- | Build extra programs and libraries required by testsuite -needTestsuitePackages :: Stage -> Action () -needTestsuitePackages stg = do - allpkgs <- packages <$> flavour - -- We need the libraries of the successor stage - libpkgs <- map (Stage1,) . filter isLibrary <$> allpkgs (succStage stg) - -- And the executables of the current stage - exepkgs <- map (stg,) . filter isProgram <$> allpkgs stg - -- Don't require lib:ghc or lib:cabal when testing the stage1 compiler - -- This is a hack, but a major usecase for testing the stage1 compiler is - -- so that we can use it even if ghc stage2 fails to build - -- Unfortunately, we still need the liba - let pkgs = filter (\(_,p) -> not $ "iserv" `isInfixOf` pkgName p || ((pkgName p `elem` ["ghc", "Cabal"]) && isStage0 stg)) - (libpkgs ++ exepkgs ++ [ (stg,timeout) | windowsHost ]) - need =<< mapM (uncurry pkgFile) pkgs - cross <- flag CrossCompiling - when (not cross) $ needIservBins stg - --- stage 1 ghc lives under stage0/bin, --- stage 2 ghc lives under stage1/bin, etc -stageOf :: String -> Maybe Stage -stageOf "stage1" = Just stage0InTree -stageOf "stage2" = Just Stage1 -stageOf "stage3" = Just Stage2 -stageOf _ = Nothing - -needIservBins :: Stage -> Action () -needIservBins stg = do - let ws = [vanilla, profiling, dynamic] - progs <- catMaybes <$> mapM (canBuild stg) ws - need progs - where - -- Only build iserv binaries if all dependencies are built the right - -- way already. In particular this fixes the case of no_profiled_libs - -- not working with the testsuite, see #19624 - canBuild (Stage0 {}) _ = pure Nothing - canBuild stg w = do - contextDeps <- contextDependencies (Context stg iserv w Final) - ws <- forM contextDeps $ \c -> - interpretInContext c (getLibraryWays <> - if Context.Type.package c == rts - then getRtsWays - else mempty) - if (all (w `elem`) ws) - then Just <$> programPath (Context stg iserv w Final) - else return Nothing - - -pkgFile :: Stage -> Package -> Action FilePath -pkgFile stage pkg - | isLibrary pkg = pkgConfFile (Context stage pkg profilingDynamic Final) - | otherwise = programPath =<< programContext stage pkg diff --git a/hadrian/src/Rules/ToolArgs.hs b/hadrian/src/Rules/ToolArgs.hs deleted file mode 100644 index 6da2fb75f13e..000000000000 --- a/hadrian/src/Rules/ToolArgs.hs +++ /dev/null @@ -1,202 +0,0 @@ -{-# LANGUAGE ViewPatterns #-} -module Rules.ToolArgs(toolArgsTarget) where - -import Rules.Generate -import Development.Shake -import Target -import Context -import Stage -import Expression - -import Packages -import Settings -import Hadrian.Oracles.Cabal -import Hadrian.Haskell.Cabal.Type -import System.Directory (canonicalizePath) -import System.Environment (lookupEnv) -import qualified Data.Set as Set -import Oracles.ModuleFiles -import Oracles.Setting -import Utilities -import Data.Version.Extra - --- | @tool:@ is used by tooling in order to get the arguments necessary --- to set up a GHC API session which can compile modules from GHC. When --- run, the target prints out the arguments that would be passed to @ghc@ --- during normal compilation to @stdout@ for the file passed as an --- argument. --- --- This target is called by the `ghci.sh` script in order to load all of GHC's --- modules into GHCi. It is invoked with argument `tool:ghc/Main.hs` in --- that script so that we can load the whole library and executable --- components into GHCi. --- --- The suitable arguments for a multi-component session can be queried using --- `multi:`, for example `multi:ghc` will create a session which compiles the --- `ghc` package and all it's dependencies in a single session. This is what the ./hadrian-multi --- script uses to set-up a multi session. --- --- The `multi` target can be used to create a session which loads **everything** that --- can be built by stage0 compiler, this is probably more than what you need so best stick --- with `multi:ghc` unless you're a pro. --- - - --- | A phony target of form `tool:path/to/file.hs` which returns the --- options needed to compile the specific file. -toolArgsTarget :: Rules () -toolArgsTarget = do - phonys (\s -> if "tool:" `isPrefixOf` s then Just (toolRuleBody (drop 5 s)) else Nothing) - - phonys (\s -> if "multi:" `isPrefixOf` s then Just (multiSetup (Just (drop 6 s))) else Nothing) - - "multi" ~> multiSetup Nothing - -multiSetup :: Maybe String -> Action () -multiSetup pkg_s = do - -- Find the targets we want to build. - tool_targets <- case pkg_s of - Nothing -> return toolTargets - Just pkg_s -> case findPackageByName pkg_s of - Just pkg -> (pkg :) . Set.toList <$> pkg_deps pkg - Nothing -> error $ "Unknown package: " ++ pkg_s - -- Get the arguments for all the targets - pargs <- mapM one_args tool_targets - -- Build any other dependencies (such as generated files) - liftIO $ writeOutput (concatMap (\x -> ["-unit", x]) (map ( "@" <>) pargs)) - - where - resp_file root p = root "multi" pkgName p - - pkg_deps pkg = do - deps <- readPackageData pkg - let immediate_deps = filter (`elem` toolTargets) (packageDependencies deps) - trans_deps <- Set.unions <$> mapM pkg_deps immediate_deps - return (Set.fromList immediate_deps `Set.union` trans_deps) - - one_args p = do - putProgressInfo ("Computing arguments for " ++ pkgName p) - root <- buildRoot - let fake_target = target (Context stage0InTree p (if windowsHost then vanilla else dynamic) Inplace) - (Ghc ToolArgs stage0InTree) [] ["ignored"] - arg_list <- interpret fake_target getArgs - let c = Context stage0InTree p (if windowsHost then vanilla else dynamic) Inplace -- Critical use of Inplace, one of the main motivations! - cd <- readContextData c - srcs <- hsSources c - gens <- interpretInContext c generatedDependencies - need (srcs ++ gens) - let rexp m = ["-reexported-module", m] - let hidir = root "interfaces" pkgPath p - ghcVersion <- ghcVersionStage stage0InTree - let ghc_wired_in = readVersion ghcVersion < makeVersion [9,8,1] - ghc_package_id = "-package-id ghc-" ++ ghcVersion - normalise_ghc = if ghc_wired_in then normalisePackageIds else id - normalisePackageIds :: [String] -> [String] - normalisePackageIds ((isPrefixOf ghc_package_id -> True) : xs) = "-package-id" : "ghc" : xs - normalisePackageIds (x:xs) = x : normalisePackageIds xs - normalisePackageIds [] = [] - - writeFile' (resp_file root p) (intercalate "\n" (normalise_ghc arg_list - ++ modules cd - ++ concatMap rexp (reexportModules cd) - ++ ["-outputdir", hidir, - "-this-package-name", pkgName p])) - return (resp_file root p) - - -toolRuleBody :: FilePath -> Action () -toolRuleBody fp = do - mm <- dirMap - cfp <- liftIO $ canonicalizePath fp - case find (flip isPrefixOf cfp . fst) mm of - Just (_, (p, extra)) -> mkToolTarget extra p - Nothing -> fail $ "No prefixes matched " ++ show fp ++ " IN\n " ++ show mm - -writeOutput :: [String] -> IO () -writeOutput args = do - liftIO $ lookupEnv "TOOL_OUTPUT" >>= \case - Nothing -> putStrLn (intercalate "\n" args) - Just out -> writeFile out (intercalate "\n" args) - -mkToolTarget :: [String] -> Package -> Action () -mkToolTarget es p = do - -- This builds automatically generated dependencies. Not sure how to do - -- this generically yet. - putProgressInfo ("Computing arguments for " ++ pkgName p) - - let context = Context stage0InTree p (if windowsHost then vanilla else dynamic) Final - let fake_target = target context - (Ghc ToolArgs stage0InTree) [] ["ignored"] - -- Generate any source files for this target - srcs <- hsSources context - gens <- interpretInContext context generatedDependencies - - -- Build any necessary dependencies - depPkgIds <- cabalDependencies context - dep_confs <- mapM (\pkgId -> packageDbPath (PackageDbLoc stage0InTree Final) <&> (-/- pkgId <.> "conf")) depPkgIds - - need (gens ++ srcs ++ dep_confs) - - arg_list <- interpret fake_target getArgs - liftIO $ writeOutput (arg_list ++ es) - --- This list is quite a lot like stage0packages but doesn't include --- critically the `exe:ghc` component as that depends on the GHC library --- which takes a while to compile. -toolTargets :: [Package] -toolTargets = [ cabalSyntax - , cabal - , checkExact - , compiler - , directory - , process - , filepath - , fileio - , osString - -- , ghc -- # depends on ghc library - -- , runGhc -- # depends on ghc library - , ghcBoot - , ghcBootThNext - , ghcPlatform - , ghcToolchain - , ghcToolchainBin - , ghcHeap - , ghci - , ghcPkg -- # executable - , haddock -- # depends on ghc library - , haddockApi - , haddockLibrary - , hsc2hs -- # executable - , hpc - , hpcBin -- # executable - , time - , semaphoreCompat - , unlit -- # executable - ] ++ if windowsHost then [ win32 ] else [ unix ] - --- | Create a mapping from files to which component it belongs to. -dirMap :: Action [(FilePath, (Package, [String]))] -dirMap = do - auto <- concatMapM go toolTargets - -- Mush the ghc executable into the compiler component so the whole of ghc is not built when - -- configuring - ghc_exe <- mkGhc - return (auto ++ [ghc_exe]) - - where - -- Make a separate target for the exe:ghc target because otherwise - -- configuring would build the whole GHC library which we probably - -- don't want to do. - mkGhc = do - let c = (Context stage0InTree compiler (if windowsHost then vanilla else dynamic) Final) - cd <- readContextData c - fp <- liftIO $ canonicalizePath "ghc/" - return (fp, (compiler, "-ighc" : modules cd ++ otherModules cd ++ ["ghc/Main.hs"])) - go p = do - let c = (Context stage0InTree p (if windowsHost then vanilla else dynamic) Final) - -- readContextData has the effect of configuring the package so all - -- dependent packages will also be built. - cd <- readContextData c - ids <- liftIO $ mapM canonicalizePath [pkgPath p i | i <- srcDirs cd] - return $ map (,(p, modules cd ++ otherModules cd)) ids - diff --git a/hadrian/src/Settings.hs b/hadrian/src/Settings.hs deleted file mode 100755 index 06681049215c..000000000000 --- a/hadrian/src/Settings.hs +++ /dev/null @@ -1,129 +0,0 @@ -{-# LANGUAGE TupleSections #-} - -module Settings ( - getExtraArgs, getArgs, getLibraryWays, getRtsWays, flavour, knownPackages, - findPackageByName, unsafeFindPackageByName, unsafeFindPackageByPath, - isLibrary, stagePackages, getBignumBackend, getBignumCheck, completeSetting, - queryBuildTarget, queryHostTarget, queryTargetTarget, - queryBuild, queryHost, queryTarget, - queryArch, queryOS, queryVendor - ) where - -import CommandLine -import Expression -import Flavour -import Packages -import Settings.Parser -import UserSettings (userFlavours, userPackages, userDefaultFlavour) - -import {-# SOURCE #-} Settings.Default -import Settings.Flavours.Benchmark -import Settings.Flavours.Development -import Settings.Flavours.GhcInGhci -import Settings.Flavours.Performance -import Settings.Flavours.Quick -import Settings.Flavours.Quickest -import Settings.Flavours.QuickCross -import Settings.Flavours.Validate -import Settings.Flavours.Release - -import Hadrian.Oracles.TextFile -import GHC.Toolchain.Target -import GHC.Platform.ArchOS - -getExtraArgs :: Args -getExtraArgs = expr flavour >>= extraArgs - -getArgs :: Args -getArgs = mconcat [ defaultBuilderArgs, getExtraArgs, defaultPackageArgs ] - -getLibraryWays :: Ways -getLibraryWays = expr flavour >>= libraryWays - -getRtsWays :: Ways -getRtsWays = expr flavour >>= rtsWays - -getBignumBackend :: Expr String -getBignumBackend = expr $ cmdBignum >>= \case - Nothing -> bignumBackend <$> flavour - Just b -> pure b - -getBignumCheck :: Expr Bool -getBignumCheck = expr $ cmdBignum >>= \case - Nothing -> bignumCheck <$> flavour - Just _ -> cmdBignumCheck - -stagePackages :: Stage -> Action [Package] -stagePackages stage = do - f <- flavour - packages f stage - -hadrianFlavours :: [Flavour] -hadrianFlavours = - [ benchmarkFlavour, defaultFlavour, developmentFlavour Stage1 - , developmentFlavour Stage2, performanceFlavour - , releaseFlavour - , quickFlavour, quickValidateFlavour, quickDebugFlavour - , quickestFlavour - , quickCrossFlavour - , ghcInGhciFlavour, validateFlavour, slowValidateFlavour - ] - --- | This action looks up a flavour with the name given on the --- command line with @--flavour@, defaulting to 'userDefaultFlavour' --- when no explicit @--flavour@ is passed. It then applies any --- potential setting update specified on the command line or in a --- /hadrian.settings file, using @k = v@ or @k += v@ style --- syntax. See Note [Hadrian settings] at the bottom of this file. -flavour :: Action Flavour -flavour = do - flavourName <- fromMaybe userDefaultFlavour <$> cmdFlavour - kvs <- userSetting ([] :: [KeyVal]) - let flavours = hadrianFlavours ++ userFlavours - (settingErrs, tweak) = applySettings kvs - - -- This used to be a command line argument, and is now a flavour transformer. - uid_hash_cmd <- cmdUnitIdHash - let flagsTweak = if uid_hash_cmd then enableHashUnitIds else id - - when (not $ null settingErrs) $ fail - $ "failed to apply key-value settings:\n\t" ++ unlines (map (" - " ++) settingErrs) ++ - "\t Entries should look something like \"stage1.containers.ghc.hs.opts += -Werror\"" - - case parseFlavour flavours flavourTransformers flavourName of - Left err -> fail err - Right f -> return $ flagsTweak (tweak f) - --- TODO: switch to Set Package as the order of packages should not matter? --- Otherwise we have to keep remembering to sort packages from time to time. -knownPackages :: [Package] -knownPackages = sort $ ghcPackages ++ userPackages - --- TODO: Speed up? Switch to Set? --- Note: this is slow but we keep it simple as there are just ~50 packages -findPackageByName :: PackageName -> Maybe Package -findPackageByName name = find (\pkg -> pkgName pkg == name) knownPackages - -unsafeFindPackageByName :: PackageName -> Package -unsafeFindPackageByName name = fromMaybe (error msg) $ findPackageByName name - where - msg = "unsafeFindPackageByName: No package with name " ++ name - -unsafeFindPackageByPath :: FilePath -> Package -unsafeFindPackageByPath path = err $ find (\pkg -> pkgPath pkg == path) knownPackages - where - err = fromMaybe $ error ("findPackageByPath: No package for path " ++ path) - --- * Combinators for querying configuration defined in the toolchain --- --- Be careful querying values from the HOST and BUILD targets until the targets --- are only generated by ghc-toolchain: --- See Note [The dummy values in the HOST target description] -queryBuild, queryHost, queryTarget :: (Target -> a) -> Expr a -queryBuild f = expr $ queryBuildTarget f -queryHost f = expr $ queryHostTarget f -queryTarget f = expr $ queryTargetTarget f -queryArch, queryOS, queryVendor :: Target -> String -queryArch = stringEncodeArch . archOS_arch . tgtArchOs -queryOS = stringEncodeOS . archOS_OS . tgtArchOs -queryVendor = fromMaybe "" . tgtVendor diff --git a/hadrian/src/Settings/Builders/Alex.hs b/hadrian/src/Settings/Builders/Alex.hs deleted file mode 100644 index e0ef1367f7dd..000000000000 --- a/hadrian/src/Settings/Builders/Alex.hs +++ /dev/null @@ -1,8 +0,0 @@ -module Settings.Builders.Alex (alexBuilderArgs) where - -import Settings.Builders.Common - -alexBuilderArgs :: Args -alexBuilderArgs = builder Alex ? mconcat [ arg "-g" - , arg =<< getInput - , arg "-o", arg =<< getOutput ] diff --git a/hadrian/src/Settings/Builders/Ar.hs b/hadrian/src/Settings/Builders/Ar.hs deleted file mode 100644 index 65c9d5bb5967..000000000000 --- a/hadrian/src/Settings/Builders/Ar.hs +++ /dev/null @@ -1,26 +0,0 @@ -module Settings.Builders.Ar (arBuilderArgs) where - -import Settings.Builders.Common - --- | Note that we do *not* emit arguments for the input paths here since we may --- want to place these in a response file. This is handled in --- 'Hadrian.Builder.Ar.runAr'. -arBuilderArgs :: Args -arBuilderArgs = do - stage <- getStage - mconcat - [ builder (Ar Pack) ? mconcat - [ -- When building on platforms which don't support object merging - -- we must use the -L flag supported by llvm-ar, which ensures that - -- .a files added to the archive are merged into the resulting archive, - -- not added as a single file. This requires that we are using llvm-ar - -- - -- See Note [Object merging] in GHC.Driver.Pipeline.Execute for details. - ifM (expr $ arSupportsDashL stage) (arg "qL") (arg "q") - , arg =<< getOutput - ] - , builder (Ar Unpack) ? mconcat - [ arg "x" - , arg =<< getInput - ] - ] diff --git a/hadrian/src/Settings/Builders/Cabal.hs b/hadrian/src/Settings/Builders/Cabal.hs deleted file mode 100644 index 41e31bebf7ee..000000000000 --- a/hadrian/src/Settings/Builders/Cabal.hs +++ /dev/null @@ -1,272 +0,0 @@ -module Settings.Builders.Cabal (cabalBuilderArgs) where - -import Development.Shake.FilePath -import Hadrian.Haskell.Cabal - -import Builder -import Context -import Flavour -import Packages -import Settings.Builders.Common -import qualified Settings.Builders.Common as S -import Control.Exception (assert) -import qualified Data.Set as Set -import Settings.Program (programContext, ghcWithInterpreter) -import GHC.Toolchain (ccLinkProgram, tgtCCompilerLink) -import GHC.Toolchain.Program (prgFlags) - -cabalBuilderArgs :: Args -cabalBuilderArgs = cabalSetupArgs <> cabalInstallArgs - -cabalInstallArgs :: Args -cabalInstallArgs = builder (Cabal Install) ? do - pkg <- getPackage - root <- exprIO . makeAbsolute =<< getBuildRoot - let pgmName - | pkg == ghc = "ghc" - | pkg == hpcBin = "hpc" - | otherwise = pkgName pkg - assertNoBuildRootLeak $ - mconcat [ arg $ "--store-dir=" ++ (root -/- "stage-cabal" -/- "cabal-store") - , if isProgram pkg then arg "install" else arg "build" - , if isProgram pkg then (arg $ "exe:" ++ pgmName) else (arg $ pkgName pkg) - , commonReinstallCabalArgs - , if isProgram pkg then extraInstallArgs else mempty - ] - --- | Checks that _build/stageN/lib/* doesn't leak into the arguments for --- reinstallable GHC. If this assert fails, then GHC probably isn't --- properly reinstallable. --- We allow "package.conf.d" however since we do need to read the package environment --- of the stage 2 compiler -assertNoBuildRootLeak :: Args -> Args -assertNoBuildRootLeak args = do - libPaths <- expr $ mapM stageLibPath allStages - xs <- args - pure $ assert (not $ any (\arg -> or [libPath `isInfixOf` arg && not ("package.conf.d" `isSuffixOf` arg) - | libPath <- libPaths]) xs) - xs - -extraInstallArgs :: Args -extraInstallArgs = do - root <- getBuildRoot - mconcat [ arg $ "--install-method=copy" - , arg $ "--overwrite-policy=always" - , arg $ "--installdir=" ++ (root -/- "stage-cabal" -/- "cabal-bin") ] - -commonReinstallCabalArgs :: Args -commonReinstallCabalArgs = do - top <- expr topDirectory - root <- getBuildRoot - compiler <- expr $ programPath =<< programContext Stage1 ghc - mconcat [ arg "--project-file" - , arg $ top -/- "cabal.project-reinstall" - , arg "--distdir" - , arg $ root -/- "stage-cabal" -/- "dist-newstyle" - , arg $ "--with-compiler=" ++ top -/- compiler - , arg "--enable-executable-dynamic" - , arg "--enable-library-vanilla" - ] - -cabalSetupArgs :: Args -cabalSetupArgs = builder (Cabal Setup) ? do - top <- expr topDirectory - stage <- getStage - path <- getContextPath - mconcat [ arg "configure" - , arg "--distdir" - , arg $ top -/- path - , commonCabalArgs stage - , configureStageArgs - ] - -commonCabalArgs :: Stage -> Args -commonCabalArgs stage = do - pkg <- getPackage - package_id <- expr $ pkgUnitId stage pkg - let prefix = "${pkgroot}" ++ (if windowsHost then "" else "/..") - mconcat [ -- Don't strip libraries when cross compiling. - -- TODO: We need to set @--with-strip=(stripCmdPath :: Action FilePath)@, - -- and if it's @:@ disable stripping as well. As it is now, I believe - -- we might have issues with stripping on Windows, as I can't see a - -- consumer of 'stripCmdPath'. - -- TODO: See https://github.com/snowleopard/hadrian/issues/549. - flag CrossCompiling ? pure [ "--disable-executable-stripping" - , "--disable-library-stripping" ] - -- We don't want to strip the debug RTS - , S.package rts ? pure [ "--disable-executable-stripping" - , "--disable-library-stripping" ] - , arg "--cabal-file" - , arg $ pkgCabalFile pkg - , arg "--ipid" - , arg package_id - , arg "--prefix" - , arg prefix - - -- NB: this is valid only because Hadrian puts the @doc@ and - -- @libraries@ folders in the same relative position: - -- - -- * libraries in @_build/stageN/libraries@ - -- * docs in @_build/doc/html/libraries@ - -- - -- This doesn't hold if we move the @doc@ folder anywhere else. - , arg "--htmldir" - , arg $ "${pkgroot}/../../doc/html/libraries/" ++ package_id - - -- These trigger a need on each dependency, so every important to need - -- them in parallel or it linearises the build of Ghc and GhcPkg - , withStageds [Ghc CompileHs, GhcPkg Update, Cc CompileC, Ar Pack] - , withBuilderArgs (Ghc CompileHs stage) - , withBuilderArgs (GhcPkg Update stage) - , bootPackageDatabaseArgs - , libraryArgs - , bootPackageConstraints - , notStage0 ? with (Ld stage) - , with Alex - , with Happy - -- Update Target.trackArgument if changing these: - ] - --- TODO: Isn't vanilla always built? If yes, some conditions are redundant. --- TODO: Need compiler_stage1_CONFIGURE_OPTS += --disable-library-for-ghci? --- TODO: should `elem` be `wayUnit`? --- This approach still doesn't work. Previously libraries were build only in the --- Default flavours and not using context. -libraryArgs :: Args -libraryArgs = do - flavourWays <- getLibraryWays - contextWay <- getWay - package <- getPackage - stage <- getStage - withGhci <- expr $ ghcWithInterpreter stage - dynPrograms <- expr (flavour >>= dynamicGhcPrograms) - ghciObjsSupported <- expr platformSupportsGhciObjects - let ways = Set.insert contextWay flavourWays - hasVanilla = vanilla `elem` ways - hasProfiling = any (wayUnit Profiling) ways - hasProfilingShared = profilingDynamic `elem` ways - hasDynamic = any (wayUnit Dynamic) ways - pure [ if hasVanilla - then "--enable-library-vanilla" - else "--disable-library-vanilla" - , if hasProfiling - then "--enable-library-profiling" - else "--disable-library-profiling" - , if hasProfilingShared - then "--enable-profiling-shared" - else "--disable-profiling-shared" - , if ghciObjsSupported && - (hasVanilla || hasProfiling) && - package /= rts && withGhci && not dynPrograms - then "--enable-library-for-ghci" - else "--disable-library-for-ghci" - , if hasDynamic - then "--enable-shared" - else "--disable-shared" ] - --- | Configure args with stage/lib specific include directories and settings -configureStageArgs :: Args -configureStageArgs = do - let cFlags = getStagedCCFlags - linkFlags = prgFlags . ccLinkProgram . tgtCCompilerLink <$> getStagedTarget - mconcat [ configureArgs cFlags linkFlags - , ghcVersionH - ] - -ghcVersionH :: Args -ghcVersionH = notStage0 ? do - let h = "rts/include/ghcversion.h" - expr $ need [h] - arg $ "--ghc-option=-ghcversion-file=" <> h - -configureArgs :: Args -> Args -> Args -configureArgs cFlags' ldFlags' = do - - top <- expr topDirectory - pkg <- getPackage - let conf key expr = do - values <- unwords <$> expr - not (null values) ? - arg ("--configure-option=" ++ key ++ "=" ++ values) - cFlags = mconcat [ remove ["-Werror"] cArgs - , getStagedCCFlags - -- See https://github.com/snowleopard/hadrian/issues/523 - , arg $ "-iquote" - - , arg $ top -/- pkgPath pkg - , cFlags' - ] - ldFlags = ldArgs <> ldFlags' - mconcat - [ conf "CFLAGS" cFlags - , conf "LDFLAGS" ldFlags - , conf "--with-iconv-includes" $ arg =<< getSetting IconvIncludeDir - , conf "--with-iconv-libraries" $ arg =<< getSetting IconvLibDir - , conf "--with-gmp-includes" $ arg =<< getSetting GmpIncludeDir - , conf "--with-gmp-libraries" $ arg =<< getSetting GmpLibDir - , conf "--with-curses-libraries" $ arg =<< getSetting CursesLibDir - -- ROMES:TODO: how is the Host set to TargetPlatformFull? That would be the target - , conf "--host" $ arg =<< getSetting TargetPlatformFull - , conf "--with-cc" $ arg =<< getBuilderPath . (Cc CompileC) =<< getStage - , ghcVersionH - ] - -bootPackageConstraints :: Args -bootPackageConstraints = (stage0InTree ==) <$> getStage ? do - bootPkgs <- expr $ stagePackages stage0InTree - let pkgs = filter (\p -> p /= compiler && isLibrary p) bootPkgs - constraints <- expr $ forM (sort pkgs) $ \pkg -> do - version <- pkgVersion pkg - return $ ((pkgName pkg ++ " == ") ++) version - pure $ concat [ ["--constraint", c] | c <- constraints ] - -withBuilderKey :: Builder -> String -withBuilderKey b = case b of - Ar _ _ -> "--with-ar=" - Ld _ -> "--with-ld=" - Cc _ _ -> "--with-gcc=" - Ghc _ _ -> "--with-ghc=" - Alex -> "--with-alex=" - Happy -> "--with-happy=" - GhcPkg _ _ -> "--with-ghc-pkg=" - _ -> error $ "withBuilderKey: not supported builder " ++ show b - --- | Add arguments to builders if needed. -withBuilderArgs :: Builder -> Args -withBuilderArgs b = case b of - Ghc _ stage -> do - top <- expr topDirectory - pkgDb <- expr $ packageDbPath (PackageDbLoc stage Inplace) - -- GHC starts with a nonempty package DB stack, so we need to tell it - -- to empty the stack first for it to truly consider only the package - -- DB we explicitly provide. See #17468. - notStage0 ? arg ("--ghc-option=-no-global-package-db") <> - arg ("--ghc-option=-package-db=" ++ top -/- pkgDb) - GhcPkg _ stage -> do - top <- expr topDirectory - pkgDb <- expr $ packageDbPath (PackageDbLoc stage Inplace) - notStage0 ? arg ("--ghc-pkg-option=--global-package-db=" ++ top -/- pkgDb) - _ -> return [] -- no arguments - --- | Expression 'with Alex' appends "--with-alex=/path/to/alex" and needs Alex. -with :: Builder -> Args -with b = withs [b] - --- | Expression 'with Alex' appends "--with-alex=/path/to/alex" and needs Alex. -withs :: [Builder] -> Args -withs bs = do - paths <- filter (not . null . snd) <$> mapM (\b -> (b,) <$> getBuilderPath b) bs - let bs = map fst paths - expr $ (needBuilders bs) - top <- expr topDirectory - mconcat $ map (\(b, path) -> - -- Do not inject top, if we have a bare name. E.g. do not turn - -- `ar` into `$top/ar`. But let `ar` be `ar` as found on $PATH. - arg $ withBuilderKey b ++ unifyPath (if path /= takeFileName path - then top path - else path)) paths - -withStageds :: [Stage -> Builder] -> Args -withStageds sb = do - st <- getStage - withs (map (\f -> f st) sb) diff --git a/hadrian/src/Settings/Builders/Cc.hs b/hadrian/src/Settings/Builders/Cc.hs deleted file mode 100644 index 20d6804b54df..000000000000 --- a/hadrian/src/Settings/Builders/Cc.hs +++ /dev/null @@ -1,37 +0,0 @@ -module Settings.Builders.Cc (ccBuilderArgs) where - -import Hadrian.Haskell.Cabal.Type -import Settings.Builders.Common - -ccBuilderArgs :: Args -ccBuilderArgs = do - way <- getWay - builder Cc ? mconcat - [ getContextData ccOpts - , getStagedCCFlags - - , builder (Cc CompileC) ? mconcat - [ arg "-Wall" - , cIncludeArgs - , Dynamic `wayUnit` way ? pure [ "-fPIC", "-DDYNAMIC" ] - , arg "-c", arg =<< getInput - , arg "-o", arg =<< getOutput ] - , builder (Cc (FindCDependencies CDep)) ? findCDepExpr CDep - , builder (Cc (FindCDependencies CxxDep)) ? findCDepExpr CxxDep - ] - where - findCDepExpr depType = do - output <- getOutput - mconcat [ arg "-E" - , arg "-MM", arg "-MG" - , arg "-MF", arg output - , arg "-MT", arg $ dropExtension output -<.> "o" - , case depType of CDep -> mempty; CxxDep -> arg "-std=c++11" - , cIncludeArgs - , arg "-x", arg (case depType of CDep -> "c"; CxxDep -> "c++") - , case depType of CDep -> mempty; CxxDep -> getContextData cxxOpts - -- Pass 'ghcversion.h' to give sources access to the - -- `MIN_VERSION_GLASGOW_HASKELL` macro. - , notStage0 ? arg "-include" <> arg "rts/include/ghcversion.h" - , arg =<< getInput - ] diff --git a/hadrian/src/Settings/Builders/Common.hs b/hadrian/src/Settings/Builders/Common.hs deleted file mode 100644 index 9e0dd6b81643..000000000000 --- a/hadrian/src/Settings/Builders/Common.hs +++ /dev/null @@ -1,83 +0,0 @@ -module Settings.Builders.Common ( - module Base, - module Expression, - module Oracles.Flag, - module Oracles.Setting, - module Settings, - module UserSettings, - cIncludeArgs, ldArgs, cArgs, cppArgs, cWarnings, - packageDatabaseArgs, bootPackageDatabaseArgs, - getStagedCCFlags, wayCcArgs - ) where - -import Hadrian.Haskell.Cabal.Type - -import Base -import Expression -import Oracles.Flag -import Oracles.Setting -import Settings -import UserSettings - -import GHC.Toolchain (ccProgram, tgtCCompiler) -import GHC.Toolchain.Program - -cIncludeArgs :: Args -cIncludeArgs = do - pkg <- getPackage - path <- getBuildPath - incDirs <- getContextData includeDirs - depDirs <- getContextData depIncludeDirs - mconcat [ notStage0 ? arg "-Irts/include" - , arg $ "-I" ++ path - -- Add @incDirs@ in the build directory, since some files generated - -- with @autoconf@ may end up in the build directory. - , pure [ "-I" ++ path -/- dir | dir <- incDirs ] - -- Add @incDirs@ in the package directory for include files shipped - -- with the package. - , pure [ "-I" ++ pkgPath pkg -/- dir | dir <- incDirs ] - , pure [ "-I" ++ unifyPath dir | dir <- depDirs ] ] - -ldArgs :: Args -ldArgs = mempty - -cArgs :: Args -cArgs = mempty - -cppArgs :: Args -cppArgs = mempty - --- TODO: should be in a different file -cWarnings :: Args -cWarnings = mconcat - [ arg "-Wall" - , flag CcLlvmBackend ? arg "-Wno-unknown-pragmas" - , notM (flag CcLlvmBackend) ? not windowsHost ? arg "-Werror=unused-but-set-variable" - , notM (flag CcLlvmBackend) ? arg "-Wno-error=inline" ] - -packageDatabaseArgs :: Args -packageDatabaseArgs = do - loc <- getPackageDbLoc - dbPath <- expr (packageDbPath loc) - expr (need [dbPath -/- packageDbStamp]) - prefix <- ifM (builder Ghc) (return "-package-db ") (return "--package-db=") - arg $ prefix ++ dbPath - -bootPackageDatabaseArgs :: Args -bootPackageDatabaseArgs = do - loc <- getPackageDbLoc - dbPath <- expr $ packageDbPath loc - expr $ need [dbPath -/- packageDbStamp] - stage0 ? packageDatabaseArgs - -getStagedCCFlags :: Args -getStagedCCFlags = prgFlags . ccProgram . tgtCCompiler <$> getStagedTarget - -wayCcArgs :: Args -wayCcArgs = do - way <- getWay - mconcat [ (Threaded `wayUnit` way) ? arg "-DTHREADED_RTS" - , (Debug `wayUnit` way) ? arg "-DDEBUG" - , (way == debug || way == debugDynamic) ? arg "-DTICKY_TICKY" - ] - diff --git a/hadrian/src/Settings/Builders/Configure.hs b/hadrian/src/Settings/Builders/Configure.hs deleted file mode 100644 index 3982e62f61b3..000000000000 --- a/hadrian/src/Settings/Builders/Configure.hs +++ /dev/null @@ -1,43 +0,0 @@ -module Settings.Builders.Configure (configureBuilderArgs) where - -import Rules.Gmp -import Settings.Builders.Common -import GHC.Toolchain.Target (targetPlatformTriple) - -configureBuilderArgs :: Args -configureBuilderArgs = do - stage <- getStage - gmpPath <- expr (gmpBuildPath stage) - libffiPath <- expr (libffiBuildPath stage) - mconcat [ builder (Configure gmpPath) ? do - targetArch <- queryTarget queryArch - targetPlatform <- queryTarget targetPlatformTriple - buildPlatform <- queryBuild targetPlatformTriple - pure $ [ "--enable-shared=no" - , "--host=" ++ targetPlatform -- GMP's host is our target - , "--build=" ++ buildPlatform ] - -- Disable FFT logic on wasm32, sacrifice - -- performance of multiplying very large operands - -- to save code size - <> [ "--disable-fft" | targetArch == "wasm32" ] - -- Disable GMP's alloca usage on wasm32, it may - -- cause stack overflow (#22602) due to the - -- rather small 64KB default stack size. See - -- https://gmplib.org/manual/Build-Options for - -- more detailed explanation of this configure - -- option. - <> [ "--enable-alloca=malloc-notreentrant" | targetArch == "wasm32" ] - <> [ "--with-pic=yes" ] - - , builder (Configure libffiPath) ? do - top <- expr topDirectory - targetPlatform <- queryTarget targetPlatformTriple - way <- getWay - pure [ "--prefix=" ++ top -/- libffiPath -/- "inst" - , "--libdir=" ++ top -/- libffiPath -/- "inst/lib" - , "--enable-static=yes" - , "--enable-shared=" - ++ (if wayUnit Dynamic way - then "yes" - else "no") - , "--host=" ++ targetPlatform ] ] diff --git a/hadrian/src/Settings/Builders/DeriveConstants.hs b/hadrian/src/Settings/Builders/DeriveConstants.hs deleted file mode 100644 index 7aa858e7628f..000000000000 --- a/hadrian/src/Settings/Builders/DeriveConstants.hs +++ /dev/null @@ -1,51 +0,0 @@ -module Settings.Builders.DeriveConstants ( - deriveConstantsBuilderArgs - ) where - -import Builder -import Settings.Builders.Common -import GHC.Toolchain (tgtCCompiler, ccProgram, tgtUnregisterised) -import GHC.Toolchain.Program - -deriveConstantsPairs :: [(String, String)] -deriveConstantsPairs = - [ ("Constants.hs", "--gen-haskell-type") - , ("DerivedConstants.h", "--gen-header") - ] - -deriveConstantsBuilderArgs :: Args -deriveConstantsBuilderArgs = builder DeriveConstants ? do - cFlags <- includeCcArgs - outs <- getOutputs - let (outputFile, mode, tempDir) = case outs of - [ofile, mode, tmpdir] -> (ofile,mode,tmpdir) - [ofile, tmpdir] - | Just mode <- lookup (takeFileName ofile) deriveConstantsPairs - -> (ofile, mode, tmpdir) - | otherwise - -> error $ "DeriveConstants: invalid output file, got " ++ show (takeFileName ofile) - _ -> error $ "DeriveConstants: unexpected outputs, got " ++ show outs - mconcat - [ arg mode - , arg "-o", arg outputFile - , arg "--tmpdir", arg tempDir - , arg "--gcc-program", arg =<< getBuilderPath (Cc CompileC Stage1) - , pure $ concatMap (\a -> ["--gcc-flag", a]) cFlags - , arg "--nm-program", arg =<< getBuilderPath Nm - , isSpecified Objdump ? mconcat [ arg "--objdump-program" - , arg =<< getBuilderPath Objdump ] - , arg "--target-os", arg =<< queryTarget queryOS ] - -includeCcArgs :: Args -includeCcArgs = do - stage <- getStage - rtsPath <- expr $ rtsBuildPath stage - mconcat [ cArgs - , cWarnings - , prgFlags . ccProgram . tgtCCompiler <$> expr (targetStage Stage1) - , queryTargetTarget tgtUnregisterised ? arg "-DUSE_MINIINTERPRETER" - , arg "-Irts" - , arg "-Irts/include" - , arg $ "-I" ++ rtsPath "include" - , notM targetSupportsSMP ? arg "-DNOSMP" - ] diff --git a/hadrian/src/Settings/Builders/GenApply.hs b/hadrian/src/Settings/Builders/GenApply.hs deleted file mode 100644 index 6d79e648d42d..000000000000 --- a/hadrian/src/Settings/Builders/GenApply.hs +++ /dev/null @@ -1,17 +0,0 @@ -module Settings.Builders.GenApply ( - genapplyBuilderArgs - ) where - -import Builder -import Settings.Builders.Common - -genapplyBuilderArgs :: Args -genapplyBuilderArgs = mconcat - [ builder (GenApply Nothing) ? ( arg =<< getInput ) - , mconcat - [ builder (GenApply (Just sz)) ? mconcat - [ arg =<< getInput - , arg ("-V" ++ show sz) ] - | sz <- [16, 32, 64] - ] - ] diff --git a/hadrian/src/Settings/Builders/GenPrimopCode.hs b/hadrian/src/Settings/Builders/GenPrimopCode.hs deleted file mode 100644 index 625fadeba5b6..000000000000 --- a/hadrian/src/Settings/Builders/GenPrimopCode.hs +++ /dev/null @@ -1,29 +0,0 @@ -module Settings.Builders.GenPrimopCode (genPrimopCodeBuilderArgs) where - -import Settings.Builders.Common - -genPrimopCodeBuilderArgs :: Args -genPrimopCodeBuilderArgs = builder GenPrimopCode ? mconcat - [ output "//PrimopWrappers.hs" ? arg "--make-haskell-wrappers" - , output "//Prim.hs" ? arg "--make-haskell-source" - , output "//primop-data-decl.hs-incl" ? arg "--data-decl" - , output "//primop-tag.hs-incl" ? arg "--primop-tag" - , output "//primop-list.hs-incl" ? arg "--primop-list" - , output "//primop-effects.hs-incl" ? arg "--primop-effects" - , output "//primop-out-of-line.hs-incl" ? arg "--out-of-line" - , output "//primop-commutable.hs-incl" ? arg "--commutable" - , output "//primop-code-size.hs-incl" ? arg "--code-size" - , output "//primop-strictness.hs-incl" ? arg "--strictness" - , output "//primop-is-work-free.hs-incl" ? arg "--is-work-free" - , output "//primop-is-cheap.hs-incl" ? arg "--is-cheap" - , output "//primop-fixity.hs-incl" ? arg "--fixity" - , output "//primop-primop-info.hs-incl" ? arg "--primop-primop-info" - , output "//primop-vector-uniques.hs-incl" ? arg "--primop-vector-uniques" - , output "//primop-vector-tys.hs-incl" ? arg "--primop-vector-tys" - , output "//primop-vector-tys-exports.hs-incl" ? arg "--primop-vector-tys-exports" - , output "//primop-vector-tycons.hs-incl" ? arg "--primop-vector-tycons" - , output "//primop-docs.hs-incl" ? arg "--wired-in-docs" - , output "//primop-deprecations.hs-incl" ? arg "--wired-in-deprecations" - , output "//primop-prim-module.hs-incl" ? arg "--prim-module" - , output "//primop-wrappers-module.hs-incl" ? arg "--wrappers-module" - , output "//primop-usage.hs-incl" ? arg "--usage" ] diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs deleted file mode 100644 index 4c274724b46b..000000000000 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ /dev/null @@ -1,289 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} - -module Settings.Builders.Ghc (ghcBuilderArgs, haddockGhcArgs) where - -import Hadrian.Haskell.Cabal -import Hadrian.Haskell.Cabal.Type - -import Flavour -import Packages -import Settings.Builders.Common -import Settings.Warnings -import qualified Context as Context -import Rules.Libffi (libffiName) -import qualified Data.Set as Set -import Data.Version.Extra - -ghcBuilderArgs :: Args -ghcBuilderArgs = mconcat - [ compileAndLinkHs, compileC, compileCxx, findHsDependencies - , toolArgs ] - -toolArgs :: Args -toolArgs = do - builder (Ghc ToolArgs) ? mconcat - [ packageGhcArgs - , includeGhcArgs - , map ("-optc" ++) <$> getStagedCCFlags - , map ("-optP" ++) <$> getContextData cppOpts - , getContextData hcOpts - ] - -compileAndLinkHs :: Args -compileAndLinkHs = (builder (Ghc CompileHs) ||^ builder (Ghc LinkHs)) ? do - ways <- getLibraryWays - useColor <- shakeColor <$> expr getShakeOptions - let hasVanilla = elem vanilla ways - hasDynamic = elem dynamic ways - hieFiles <- ghcHieFiles <$> expr flavour - stage <- getStage - hie_path <- getHieBuildPath - mconcat [ arg "-Wall" - , arg "-Wcompat" - , not useColor ? builder (Ghc CompileHs) ? - -- N.B. Target.trackArgument ignores this argument from the - -- input hash to avoid superfluous recompilation, avoiding - -- #18672. - arg "-fdiagnostics-color=never" - , (hasVanilla && hasDynamic) ? builder (Ghc CompileHs) ? - platformSupportsSharedLibs ? way vanilla ? - arg "-dynamic-too" - , commonGhcArgs - , ghcLinkArgs - , defaultGhcWarningsArgs - , builder (Ghc CompileHs) ? arg "-c" - , hieFiles stage ? builder (Ghc CompileHs) ? mconcat - [ arg "-fwrite-ide-info" - , arg "-hiedir", arg hie_path - ] - , getInputs - , arg "-o", arg =<< getOutput ] - -compileC :: Args -compileC = builder (Ghc CompileCWithGhc) ? do - way <- getWay - let ccArgs = [ getContextData ccOpts - , getStagedCCFlags - , cIncludeArgs - , Dynamic `wayUnit` way ? pure [ "-fPIC", "-DDYNAMIC" ] ] - mconcat [ arg "-Wall" - , ghcLinkArgs - , commonGhcArgs - , mconcat (map (map ("-optc" ++) <$>) ccArgs) - , defaultGhcWarningsArgs - , arg "-c" - , getInputs - , arg "-o" - , arg =<< getOutput ] - -compileCxx :: Args -compileCxx = builder (Ghc CompileCppWithGhc) ? do - way <- getWay - let ccArgs = [ getContextData cxxOpts - , getStagedCCFlags - , cIncludeArgs - , Dynamic `wayUnit` way ? pure [ "-fPIC", "-DDYNAMIC" ] ] - mconcat [ arg "-Wall" - , ghcLinkArgs - , commonGhcArgs - , mconcat (map (map ("-optcxx" ++) <$>) ccArgs) - , defaultGhcWarningsArgs - , arg "-c" - , getInputs - , arg "-o" - , arg =<< getOutput ] - -ghcLinkArgs :: Args -ghcLinkArgs = builder (Ghc LinkHs) ? do - pkg <- getPackage - libs <- getContextData extraLibs - libDirs <- getContextData extraLibDirs - fmwks <- getContextData frameworks - way <- getWay - - -- Relative path from the output (rpath $ORIGIN). - originPath <- dropFileName <$> getOutput - context <- getContext - distPath <- expr (Context.distDynDir context) - - useSystemFfi <- expr (flag UseSystemFfi) - buildPath <- getBuildPath - libffiName' <- libffiName - debugged <- buildingCompilerStage' . ghcDebugged =<< expr flavour - - osxTarget <- expr isOsxTarget - winTarget <- expr isWinTarget - - let - dynamic = Dynamic `wayUnit` way - originToLibsDir = makeRelativeNoSysLink originPath distPath - rpath - -- Programs will end up in the bin dir ($ORIGIN) and will link to - -- libraries in the lib dir. - | isProgram pkg = metaOrigin -/- originToLibsDir - -- libraries will all end up in the lib dir, so just use $ORIGIN - | otherwise = metaOrigin - where - metaOrigin | osxTarget = "@loader_path" - | otherwise = "$ORIGIN" - - -- TODO: an alternative would be to generalize by linking with extra - -- bundled libraries, but currently the rts is the only use case. It is - -- a special case when `useSystemFfi == True`: the ffi library files - -- are not actually bundled with the rts. Perhaps ffi should be part of - -- rts's extra libraries instead of extra bundled libraries in that - -- case. Care should be take as to not break the make build. - rtsFfiArg = package rts ? not useSystemFfi ? mconcat - [ arg ("-L" ++ buildPath) - , arg ("-l" ++ libffiName') - ] - - -- This is the -rpath argument that is required for the bindist scenario - -- to work. Indeed, when you install a bindist, the actual executables - -- end up nested somewhere under $libdir, with the wrapper scripts - -- taking their place in $bindir, and 'rpath' therefore doesn't seem - -- to give us the right paths for such a case. - -- TODO: Could we get away with just one rpath...? - bindistRpath = "$ORIGIN" -/- ".." -/- ".." -/- originToLibsDir - - mconcat [ dynamic ? mconcat - [ arg "-dynamic" - -- TODO what about windows? - , isLibrary pkg ? pure [ "-shared", "-dynload", "deploy" ] - , notStage0 ? targetSupportsRPaths ? mconcat - [ arg ("-optl-Wl,-rpath," ++ rpath) - , isProgram pkg ? arg ("-optl-Wl,-rpath," ++ bindistRpath) - -- The darwin and Windows linkers don't support/require the -zorigin option - , not (osxTarget || winTarget) ? arg "-optl-Wl,-zorigin" - -- We set RPATH directly (relative to $ORIGIN). There's - -- no reason for GHC to inject further RPATH entries. - -- See #19485. - , arg "-fno-use-rpaths" - ] - ] - , arg "-no-auto-link-packages" - , nonHsMainPackage pkg ? arg "-no-hs-main" - , (not (nonHsMainPackage pkg) && not (isLibrary pkg)) ? arg "-rtsopts" - , pure [ "-l" ++ lib | lib <- libs ] - , pure [ "-L" ++ libDir | libDir <- libDirs ] - , rtsFfiArg - , osxTarget ? pure (concat [ ["-framework", fmwk] | fmwk <- fmwks ]) - , debugged ? packageOneOf [ghc, iservProxy, iserv, remoteIserv] ? - arg "-debug" - ] - -findHsDependencies :: Args -findHsDependencies = builder (Ghc FindHsDependencies) ? do - ways <- getLibraryWays - mconcat [ arg "-M" - , arg "-include-cpp-deps" - , commonGhcArgs - , defaultGhcWarningsArgs - , arg "-include-pkg-deps" - , arg "-dep-makefile", arg =<< getOutput - , pure $ concat [ ["-dep-suffix", wayPrefix w] | w <- Set.toList ways ] - , getInputs ] - -haddockGhcArgs :: Args -haddockGhcArgs = mconcat [ commonGhcArgs - , getContextData hcOpts - , ghcWarningsArgs ] - --- | Common GHC command line arguments used in 'ghcBuilderArgs', --- 'ghcCBuilderArgs', 'ghcMBuilderArgs' and 'haddockGhcArgs'. -commonGhcArgs :: Args -commonGhcArgs = do - way <- getWay - path <- getBuildPath - useColor <- shakeColor <$> expr getShakeOptions - mconcat [ arg "-hisuf", arg $ hisuf way - , arg "-osuf" , arg $ osuf way - , arg "-hcsuf", arg $ hcsuf way - , wayGhcArgs - , packageGhcArgs - , includeGhcArgs - -- When compiling RTS for Stage1 or Stage2 we do not have it (yet) - -- in the package database. We therefore explicitly supply the path - -- to the @ghc-version@ file, to prevent GHC from trying to open the - -- RTS package in the package database and failing. - , package rts ? notStage0 ? arg "-ghcversion-file=rts/include/ghcversion.h" - , map ("-optc" ++) <$> getStagedCCFlags - , map ("-optP" ++) <$> getContextData cppOpts - , arg "-outputdir", arg path - -- we need to enable color explicitly because the output is - -- captured to be displayed after the failed command line in case - -- of error (#20490). GHC detects that it doesn't output to a - -- terminal and it disables colors if we don't do this. - , useColor ? - -- N.B. Target.trackArgument ignores this argument from the - -- input hash to avoid superfluous recompilation, avoiding - -- #18672. - arg "-fdiagnostics-color=always" - -- Important this is last.. as these options can override the default options - , getContextData hcOpts - ] - --- TODO: Do '-ticky' in all debug ways? -wayGhcArgs :: Args -wayGhcArgs = do - way <- getWay - mconcat [ if Dynamic `wayUnit` way - then pure ["-fPIC", "-dynamic"] - else arg "-static" - , (Profiling `wayUnit` way) ? arg "-prof" - , (way == debug || way == debugDynamic) ? arg "-ticky" - , wayCcArgs - -- We must pass CPP flags via -optc as well to ensure that they - -- are passed to the preprocessor when, e.g., compiling Cmm - -- sources. - , map ("-optc"++) <$> wayCcArgs - ] - --- | Args related to correct handling of packages, such as setting --- -this-unit-id and passing -package-id for dependencies -packageGhcArgs :: Args -packageGhcArgs = do - package <- getPackage - stage <- getStage - ghc_ver <- readVersion <$> (expr . ghcVersionStage =<< getStage) - -- ROMES: Until the boot compiler no longer needs ghc's - -- unit-id to be "ghc", the stage0 compiler must be built - -- with `-this-unit-id ghc`, while the wired-in unit-id of - -- ghc is correctly set to the unit-id we'll generate for - -- stage1 (set in generateConfigHs in Rules.Generate). - -- - -- However, we don't need to set the unit-id of "ghc" to "ghc" when - -- building stage0 because we have a flag in compiler/ghc.cabal.in that is - -- sets `-this-unit-id ghc` when hadrian is building stage0, which will - -- overwrite this one. - pkgId <- expr $ pkgUnitId stage package - pkgName <- expr $ pkgPackageName package - mconcat [ arg "-hide-all-packages" - , arg "-no-user-package-db" - , arg "-package-env -" - , packageDatabaseArgs - -- We want to pass -this-unit-id for executables as well for multi-repl to - -- work with executable packages but this is buggy on GHC-9.0.2 - , (isLibrary package || (ghc_ver >= makeVersion [9,2,1])) ? mconcat - [ arg ("-this-unit-id " ++ pkgId) - , arg ("-this-package-name " ++ pkgName) - ] - , map ("-package-id " ++) <$> getContextData depIds ] - -includeGhcArgs :: Args -includeGhcArgs = do - pkg <- getPackage - path <- exprIO . makeAbsolute =<< getBuildPath - context <- getContext - srcDirs <- getContextData srcDirs - abSrcDirs <- exprIO $ mapM makeAbsolute [ (pkgPath pkg -/- dir) | dir <- srcDirs ] - autogen <- expr (autogenPath context) - cautogen <- exprIO (makeAbsolute autogen) - let cabalMacros = autogen -/- "cabal_macros.h" - expr $ need [cabalMacros] - mconcat [ arg "-i" - , arg $ "-i" ++ path - , arg $ "-i" ++ cautogen - , pure [ "-i" ++ d | d <- abSrcDirs ] - , cIncludeArgs - , pure ["-optP-include", "-optP" ++ cabalMacros] ] diff --git a/hadrian/src/Settings/Builders/GhcPkg.hs b/hadrian/src/Settings/Builders/GhcPkg.hs deleted file mode 100644 index 6508cd0401e1..000000000000 --- a/hadrian/src/Settings/Builders/GhcPkg.hs +++ /dev/null @@ -1,62 +0,0 @@ -module Settings.Builders.GhcPkg (ghcPkgBuilderArgs) where - -import Settings.Builders.Common - -ghcPkgBuilderArgs :: Args -ghcPkgBuilderArgs = mconcat - [ builder (GhcPkg Recache) ? do - loc <- getPackageDbLoc - pkgDb <- expr $ packageDbPath loc - -- Confusingly calls recache rather than init because shake "creates" - -- the package db by virtue of creating the path to it, so we just recache - -- to create the package.cache file. - mconcat [ use_db pkgDb, arg "recache" ] - - , builder (GhcPkg Copy) ? do - verbosity <- expr getVerbosity - loc <- getPackageDbLoc - pkgDb <- expr $ packageDbPath loc - mconcat [ use_db pkgDb - , arg "register" - , verbosity < Verbose ? arg "-v0" - ] - , builder (GhcPkg Unregister) ? do - verbosity <- expr getVerbosity - loc <- getPackageDbLoc - pkgDb <- expr $ packageDbPath loc - mconcat [ use_db pkgDb - , arg "unregister" - , arg "--force" - , verbosity < Verbose ? arg "-v0" - ] - , builder (GhcPkg Update) ? do - verbosity <- expr getVerbosity - loc <- getPackageDbLoc - pkgDb <- expr $ packageDbPath loc - mconcat [ notM stage0 ? use_db pkgDb - , arg "update" - , arg "--force" - , verbosity < Verbose ? arg "-v0" - , bootPackageDatabaseArgs - , arg =<< getInput ] ] - where - use_db db = mconcat - -- We use ghc-pkg's --global-package-db to manipulate our databases. - -- We can't use --package-db (at least with stage0's ghc-pkg) - -- because units in stage0's global package db would be in scope and - -- ghc-pkg would disallow us the register a second "rts" unit in our - -- database. - -- - -- However ghc-pkg uses the path to the global package db to find - -- the compiler "settings" file... So when it finds our newly - -- generated settings file in _build/stageN, it may crash if it - -- isn't the format it expects (#17601). - -- - -- By chance, ghc-pkg only needs the "settings" file to query the - -- arch/os to generate the path to the user package db, which we - -- don't need. So we disable it below to avoid failures. - [ arg "--no-user-package-db" - , arg "--global-package-db" - , arg db - ] - diff --git a/hadrian/src/Settings/Builders/Haddock.hs b/hadrian/src/Settings/Builders/Haddock.hs deleted file mode 100644 index 0a1893c65dd7..000000000000 --- a/hadrian/src/Settings/Builders/Haddock.hs +++ /dev/null @@ -1,87 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -module Settings.Builders.Haddock (haddockBuilderArgs) where - -import Hadrian.Haskell.Cabal -import Hadrian.Haskell.Cabal.Type -import Hadrian.Utilities - -import Packages -import Rules.Documentation -import Settings.Builders.Common -import Settings.Builders.Ghc -import CommandLine -import qualified Data.Text as T - --- | Given a version string such as "2.16.2" produce an integer equivalent. -versionToInt :: String -> Int -versionToInt = read . dropWhile (=='0') . filter (/='.') - -haddockBuilderArgs :: Args -haddockBuilderArgs = mconcat - [ builder (Haddock BuildIndex) ? do - output <- getOutput - inputs <- getInputs - root <- getBuildRoot - mconcat - [ arg $ "-B" ++ root -/- stageString Stage1 -/- "lib" - , arg $ "--lib=" ++ root -/- stageString Stage1 -/- "lib" - , arg "--gen-index" - , arg "--gen-contents" - , arg "-o", arg $ takeDirectory output - , arg "-t", arg "Haskell Hierarchical Libraries" - , arg "-p", arg "libraries/prologue.txt" - , pure [ "--read-interface=" - ++ (takeFileName . takeDirectory) haddock - ++ "," ++ haddock | haddock <- inputs ] ] - - , builder (Haddock BuildPackage) ? do - output <- getOutput - pkg <- getPackage - root <- getBuildRoot - stage <- getStage - context <- getContext - version <- expr $ pkgVersion pkg - synopsis <- expr $ pkgSynopsis pkg - haddocks <- expr $ haddockDependencies context - haddocks_with_versions <- expr $ sequence $ [(,,h) <$> pkgSimpleIdentifier p <*> pkgUnitId stage p | (p, h) <- haddocks] - - hVersion <- expr $ pkgVersion haddock - statsDir <- expr $ haddockStatsFilesDir - baseUrlTemplate <- expr (docsBaseUrl <$> userSetting defaultDocArgs) - -- The path to where the docs for a package are - let docpath p = substituteTemplate baseUrlTemplate p - -- The path to where the src folder is for a package (typically docs ++ "/src/") - let srcpath p = docpath p ++ "/src/" - ghcOpts <- haddockGhcArgs - -- These are the options which are necessary to perform the build. Additional - -- options such as `--hyperlinked-source`, `--hoogle`, `--quickjump` are - -- added by the `extraArgs` field in the flavour. The defaults are provided - -- by `defaultHaddockExtraArgs`. - mconcat - [ arg "--verbosity=0" - , arg $ "-B" ++ root -/- stageString Stage1 -/- "lib" - , arg $ "--lib=" ++ root -/- stageString Stage1 -/- "lib" - , arg $ "--odir=" ++ takeDirectory output - , arg $ "--dump-interface=" ++ output - , arg "--html" - , arg $ "--title=" ++ pkgName pkg ++ "-" ++ version - ++ ": " ++ synopsis - , arg $ "--prologue=" ++ takeDirectory output -/- "haddock-prologue.txt" - , arg $ "--optghc=-D__HADDOCK_VERSION__=" - ++ show (versionToInt hVersion) - , map ("--hide=" ++) <$> getContextData otherModules - , pure [ "--read-interface=" ++ docpath (p, pid) - ++ "," ++ srcpath (p, pid) ++ "," - ++ haddock | (p, pid, haddock) <- haddocks_with_versions ] - , pure [ "--optghc=" ++ opt | opt <- ghcOpts, not ("--package-db" `isInfixOf` opt) ] - , arg "+RTS" - , arg $ "-t" ++ (statsDir -/- pkgName pkg ++ ".t") - , arg "--machine-readable" - , arg "-RTS" ] ] - -substituteTemplate :: String -> (String, String) -> String -substituteTemplate baseTemplate (pkg, pkgId) = - T.unpack - . T.replace "%pkg%" (T.pack pkg) - . T.replace "%pkgid%" (T.pack pkgId) - . T.pack $ baseTemplate diff --git a/hadrian/src/Settings/Builders/Happy.hs b/hadrian/src/Settings/Builders/Happy.hs deleted file mode 100644 index 5ffb2614cc9b..000000000000 --- a/hadrian/src/Settings/Builders/Happy.hs +++ /dev/null @@ -1,9 +0,0 @@ -module Settings.Builders.Happy (happyBuilderArgs) where - -import Settings.Builders.Common - -happyBuilderArgs :: Args -happyBuilderArgs = builder Happy ? mconcat [ arg "-agc" - , arg "--strict" - , arg =<< getInput - , arg "-o", arg =<< getOutput ] diff --git a/hadrian/src/Settings/Builders/HsCpp.hs b/hadrian/src/Settings/Builders/HsCpp.hs deleted file mode 100644 index c30477d059ae..000000000000 --- a/hadrian/src/Settings/Builders/HsCpp.hs +++ /dev/null @@ -1,17 +0,0 @@ -module Settings.Builders.HsCpp (hsCppBuilderArgs) where - -import Packages -import Settings.Builders.Common -import qualified GHC.Toolchain as T -import GHC.Toolchain.Program - -hsCppBuilderArgs :: Args -hsCppBuilderArgs = builder HsCpp ? do - stage <- getStage - ghcPath <- expr $ buildPath (vanillaContext stage compiler) - mconcat [ prgFlags . T.hsCppProgram . T.tgtHsCPreprocessor <$> getStagedTarget - , arg "-P" - , arg "-Irts/include" - , arg $ "-I" ++ ghcPath - , arg "-x", arg "c" - , arg =<< getInput ] diff --git a/hadrian/src/Settings/Builders/Hsc2Hs.hs b/hadrian/src/Settings/Builders/Hsc2Hs.hs deleted file mode 100644 index 4cae3fe559cd..000000000000 --- a/hadrian/src/Settings/Builders/Hsc2Hs.hs +++ /dev/null @@ -1,69 +0,0 @@ -module Settings.Builders.Hsc2Hs (hsc2hsBuilderArgs) where - -import Hadrian.Haskell.Cabal.Type - -import Builder -import Settings.Builders.Common -import GHC.Toolchain (tgtCCompilerLink, ccLinkProgram) -import GHC.Toolchain.Program - -hsc2hsBuilderArgs :: Args -hsc2hsBuilderArgs = builder Hsc2Hs ? do - stage <- getStage - ccPath <- getBuilderPath $ Cc CompileC stage - gmpDir <- getSetting GmpIncludeDir - top <- expr topDirectory - hArch <- queryHost queryArch - hOs <- queryHost queryOS - tArch <- queryTarget queryArch - tOs <- queryTarget queryOS - version <- case stage of - Stage0 {} -> expr ghcCanonVersion - _ -> getSetting ProjectVersionInt - tmpl <- (top -/-) <$> expr (templateHscPath stage0Boot) - mconcat [ arg $ "--cc=" ++ ccPath - , arg $ "--ld=" ++ ccPath - , notM isWinTarget ? notM (flag CrossCompiling) ? arg "--cross-safe" - , pure $ map ("-I" ++) (words gmpDir) - , map ("--cflag=" ++) <$> getCFlags - , map ("--lflag=" ++) <$> getLFlags - , notStage0 ? flag CrossCompiling ? arg "--cross-compile" - , stage0 ? arg ("--cflag=-D" ++ hArch ++ "_HOST_ARCH=1") - , stage0 ? arg ("--cflag=-D" ++ hOs ++ "_HOST_OS=1" ) - , notStage0 ? arg ("--cflag=-D" ++ tArch ++ "_HOST_ARCH=1") - , notStage0 ? arg ("--cflag=-D" ++ tOs ++ "_HOST_OS=1" ) - , arg $ "--cflag=-D__GLASGOW_HASKELL__=" ++ version - , arg $ "--template=" ++ tmpl - -- We'll assume we compile with gcc or clang, and both support - -- `-S` and can as such use the --via-asm flag, which should be - -- faster and is required for cross compiling to windows, as the c - -- compiler complains about non-constant expressions even though - -- they are constant and end up as constants in the assembly. - -- See #12849 - , flag CrossCompiling ? isWinTarget ? arg "--via-asm" - , arg =<< getInput - , arg "-o", arg =<< getOutput ] - -getCFlags :: Expr [String] -getCFlags = do - context <- getContext - autogen <- expr $ autogenPath context - let cabalMacros = autogen -/- "cabal_macros.h" - expr $ need [cabalMacros] - mconcat [ remove ["-O"] (cArgs <> getStagedCCFlags) - -- Either "-E" is not part of the configured cpp args, or we can't add those args to invocations of things like this - -- ROMES:TODO: , prgFlags . cppProgram . tgtCPreprocessor <$> getStagedTargetConfig - , cIncludeArgs - , getContextData ccOpts - -- we might be able to leave out cppOpts, to be investigated. - , getContextData cppOpts - , getContextData depCcOpts - , cWarnings - , arg "-include", arg cabalMacros ] - -getLFlags :: Expr [String] -getLFlags = - mconcat [ prgFlags . ccLinkProgram . tgtCCompilerLink <$> getStagedTarget - , ldArgs - , getContextData ldOpts - , getContextData depLdOpts ] diff --git a/hadrian/src/Settings/Builders/Ld.hs b/hadrian/src/Settings/Builders/Ld.hs deleted file mode 100644 index 39fb693a72dc..000000000000 --- a/hadrian/src/Settings/Builders/Ld.hs +++ /dev/null @@ -1,10 +0,0 @@ -module Settings.Builders.Ld (ldBuilderArgs) where - -import Settings.Builders.Common -import GHC.Toolchain -import GHC.Toolchain.Program - -ldBuilderArgs :: Args -ldBuilderArgs = builder Ld ? mconcat [ prgFlags . ccLinkProgram . tgtCCompilerLink <$> getStagedTarget - , arg "-o", arg =<< getOutput - , getInputs ] diff --git a/hadrian/src/Settings/Builders/Make.hs b/hadrian/src/Settings/Builders/Make.hs deleted file mode 100644 index 22096a08384c..000000000000 --- a/hadrian/src/Settings/Builders/Make.hs +++ /dev/null @@ -1,46 +0,0 @@ -module Settings.Builders.Make (makeBuilderArgs, validateBuilderArgs) where - -import Oracles.Setting -import Packages -import Rules.Gmp -import Settings.Builders.Common -import Settings.Program (programContext) -import CommandLine - -makeBuilderArgs :: Args -makeBuilderArgs = do - threads <- shakeThreads <$> expr getShakeOptions - stage <- getStage - gmpPath <- expr (gmpBuildPath stage) - libffiPaths <- forM [Stage1, Stage2, Stage3 ] $ \s -> expr (libffiBuildPath s) - let t = show $ max 4 (threads - 2) -- Don't use all Shake's threads - mconcat $ - (builder (Make gmpPath ) ? pure ["MAKEFLAGS=-j" ++ t]) : - [ builder (Make libffiPath) ? pure ["MAKEFLAGS=-j" ++ t, "install"] - | libffiPath <- libffiPaths ] - -validateBuilderArgs :: Args -validateBuilderArgs = builder (Make "testsuite/tests") ? do - threads <- shakeThreads <$> expr getShakeOptions - top <- expr topDirectory - compiler <- expr $ fullpath ghc - checkPpr <- expr $ fullpath checkPpr - checkExact <- expr $ fullpath checkExact - countDeps <- expr $ fullpath countDeps - args <- expr $ userSetting defaultTestArgs - return [ setTestSpeed $ testSpeed args - , "THREADS=" ++ show threads - , "TEST_HC=" ++ (top -/- compiler) - , "CHECK_PPR=" ++ (top -/- checkPpr) - , "CHECK_EXACT=" ++ (top -/- checkExact) - , "COUNT_DEPS=" ++ (top -/- countDeps) - ] - where - fullpath :: Package -> Action FilePath - fullpath pkg = programPath =<< programContext Stage1 pkg - --- | Support for speed of validation -setTestSpeed :: TestSpeed -> String -setTestSpeed TestFast = "fasttest" -setTestSpeed TestNormal = "test" -setTestSpeed TestSlow = "slowtest" diff --git a/hadrian/src/Settings/Builders/MergeObjects.hs b/hadrian/src/Settings/Builders/MergeObjects.hs deleted file mode 100644 index 0060ac5a299b..000000000000 --- a/hadrian/src/Settings/Builders/MergeObjects.hs +++ /dev/null @@ -1,11 +0,0 @@ -module Settings.Builders.MergeObjects (mergeObjectsBuilderArgs) where - -import Settings.Builders.Common -import GHC.Toolchain -import GHC.Toolchain.Program - -mergeObjectsBuilderArgs :: Args -mergeObjectsBuilderArgs = builder MergeObjects ? mconcat - [ maybe [] (prgFlags . mergeObjsProgram) . tgtMergeObjs <$> getStagedTarget - , arg "-o", arg =<< getOutput - , getInputs ] diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs deleted file mode 100644 index bdcb81322448..000000000000 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ /dev/null @@ -1,408 +0,0 @@ -{-# LANGUAGE TypeApplications #-} -module Settings.Builders.RunTest (runTestBuilderArgs - , runTestGhcFlags - , assertSameCompilerArgs - , outOfTreeCompilerArgs - , TestCompilerArgs(..) ) where - -import Hadrian.Utilities -import qualified System.FilePath -import System.Environment - -import CommandLine -import Oracles.TestSettings -import Packages -import Settings.Builders.Common -import qualified Data.Set as Set -import Flavour -import qualified Context.Type as C -import Settings.Program -import qualified Context.Type - -import GHC.Toolchain.Target - -getTestSetting :: TestSetting -> Action String -getTestSetting key = testSetting key - --- | Parse the value of a Boolean test setting or report an error. -getBooleanSetting :: TestSetting -> Action Bool -getBooleanSetting key = fromMaybe (error msg) <$> parseYesNo <$> getTestSetting key - where - msg = "Cannot parse test setting " ++ quote (show key) - --- | Extra flags to send to the Haskell compiler to run tests. -runTestGhcFlags :: Action String -runTestGhcFlags = do - unregisterised <- queryTargetTarget tgtUnregisterised - - let ifMinGhcVer ver opt = do v <- ghcCanonVersion - if ver <= v then pure opt - else pure "" - - -- Read extra argument for test from command line, like `-fvectorize`. - ghcOpts <- fromMaybe "" <$> (liftIO $ lookupEnv "EXTRA_HC_OPTS") - - -- See: https://github.com/ghc/ghc/blob/master/testsuite/mk/test.mk#L28 - let ghcExtraFlags = if unregisterised - then "-optc-fno-builtin" - else "" - - -- Take flags to send to the Haskell compiler from test.mk. - -- See: https://github.com/ghc/ghc/blob/master/testsuite/mk/test.mk#L37 - unwords <$> sequence - [ pure " -dcore-lint -dstg-lint -dcmm-lint -no-user-package-db -fno-dump-with-ways -fprint-error-index-links=never -rtsopts" - , pure ghcOpts - , pure ghcExtraFlags - , ifMinGhcVer "711" "-fno-warn-missed-specialisations" - , ifMinGhcVer "711" "-fshow-warning-groups" - , ifMinGhcVer "801" "-fdiagnostics-color=never" - , ifMinGhcVer "801" "-fno-diagnostics-show-caret" - , pure "-Werror=compat" -- See #15278 - , pure "-dno-debug-output" - ] - -data TestCompilerArgs = TestCompilerArgs{ - hasDynamicRts, hasThreadedRts :: Bool - , hasDynamic :: Bool - , leadingUnderscore :: Bool - , withNativeCodeGen :: Bool - , withInterpreter :: Bool - , cross :: Bool - , interpForceDyn :: Bool - , unregisterised :: Bool - , tables_next_to_code :: Bool - , targetWithSMP :: Bool -- does the target support SMP - , debugged :: Bool - -- ^ Whether the compiler has the debug RTS, - -- corresponding to the -debug option. - , debugAssertions :: Bool - -- ^ Whether the compiler has debug assertions enabled, - -- corresponding to the -DDEBUG option. - , profiled :: Bool - , os,arch, platform, wordsize :: String - , libdir :: FilePath - , have_llvm :: Bool - , rtsLinker :: Bool - , pkgConfCacheFile :: FilePath } - deriving (Eq, Show) - --- | Some archs like wasm32/js used to report have_llvm=True because --- they are based on LLVM related toolchains like wasi-sdk/emscripten, --- but these targets don't really support the LLVM backend, and the --- optllvm test way doesn't work. We used to special-case wasm32/js to --- avoid auto-adding optllvm way in testsuite/config/ghc, but this is --- still problematic if someone writes a new LLVM-related test and --- uses something like when(have_llvm(), extra_ways(["optllvm"])). So --- better just enforce have_llvm=False for these targets here. -allowHaveLLVM :: String -> Bool -allowHaveLLVM = not . (`elem` ["wasm32", "javascript"]) - --- | If the tree is in-compiler then we already know how we will build it so --- don't build anything in order to work out what we will build. --- -inTreeCompilerArgs :: Stage -> Action TestCompilerArgs -inTreeCompilerArgs stg = do - - (hasDynamicRts, hasThreadedRts) <- do - ways <- interpretInContext (vanillaContext stg rts) getRtsWays - return (dynamic `elem` ways, threaded `elem` ways) - -- MP: We should be able to vary if stage1/stage2 is dynamic, ie a dynamic stage1 - -- should be able to built a static stage2? - hasDynamic <- (wayUnit Dynamic) . Context.Type.way <$> (programContext stg ghc) - -- LeadingUnderscore is a property of the system so if cross-compiling stage1/stage2 could - -- have different values? Currently not possible to express. - leadingUnderscore <- queryTargetTarget tgtSymbolsHaveLeadingUnderscore - cross <- flag CrossCompiling - withInterpreter <- ghcWithInterpreter stg - interpForceDyn <- targetRTSLinkerOnlySupportsSharedLibs - unregisterised <- queryTargetTarget tgtUnregisterised - tables_next_to_code <- queryTargetTarget tgtTablesNextToCode - targetWithSMP <- targetSupportsSMP - - - let ghcStage - | cross, Stage1 <- stg = Stage1 - | otherwise = succStage stg - debugAssertions <- ghcDebugAssertions <$> flavour <*> pure ghcStage - debugged <- ghcDebugged <$> flavour <*> pure ghcStage - profiled <- ghcProfiled <$> flavour <*> pure ghcStage - - os <- queryHostTarget queryOS - arch <- queryTargetTarget queryArch - let codegen_arches = ["x86_64", "i386", "powerpc", "powerpc64", "powerpc64le", "aarch64", "wasm32", "riscv64", "loongarch64"] - let withNativeCodeGen - | unregisterised = False - | arch `elem` codegen_arches = True - | otherwise = False - platform <- queryTargetTarget targetPlatformTriple - wordsize <- show @Int . (*8) <$> queryTargetTarget (wordSize2Bytes . tgtWordSize) - - llc_cmd <- queryTargetTarget tgtLlc - llvm_as_cmd <- queryTargetTarget tgtLlvmAs - let have_llvm = allowHaveLLVM arch && all isJust [llc_cmd, llvm_as_cmd] - - top <- topDirectory - - pkgConfCacheFile <- System.FilePath.normalise . (top -/-) - <$> (packageDbPath (PackageDbLoc stg Final) <&> (-/- "package.cache")) - libdir <- System.FilePath.normalise . (top -/-) - <$> stageLibPath stg - - -- For this information, we need to query ghc --info, however, that would - -- require building ghc, which we don't want to do here. Therefore, the - -- logic from `platformHasRTSLinker` is duplicated here. - let rtsLinker = not $ arch `elem` ["powerpc", "powerpc64", "powerpc64le", "s390x", "loongarch64", "javascript"] - - return TestCompilerArgs{..} - -ghcConfigPath :: FilePath -ghcConfigPath = "test/ghcconfig" - --- | If the compiler is out-of-tree then we have to query the compiler to work out --- facts about it. -outOfTreeCompilerArgs :: Action TestCompilerArgs -outOfTreeCompilerArgs = do - root <- buildRoot - need [root -/- ghcConfigPath] - (hasDynamicRts, hasThreadedRts) <- do - ways <- testRTSSettings - return ("dyn" `elem` ways, "thr" `elem` ways) - hasDynamic <- getBooleanSetting TestGhcDynamic - leadingUnderscore <- getBooleanSetting TestLeadingUnderscore - withNativeCodeGen <- getBooleanSetting TestGhcWithNativeCodeGen - withInterpreter <- getBooleanSetting TestGhcWithInterpreter - cross <- getBooleanSetting TestGhcCrossCompiling - interpForceDyn <- getBooleanSetting TestRTSLinkerForceDyn - unregisterised <- getBooleanSetting TestGhcUnregisterised - tables_next_to_code <- getBooleanSetting TestGhcTablesNextToCode - targetWithSMP <- targetSupportsSMP - debugAssertions <- getBooleanSetting TestGhcDebugAssertions - - os <- getTestSetting TestHostOS - arch <- getTestSetting TestTargetARCH_CPP - platform <- getTestSetting TestTARGETPLATFORM - wordsize <- getTestSetting TestWORDSIZE - rtsWay <- getTestSetting TestRTSWay - let debugged = "debug" `isInfixOf` rtsWay - - llc_cmd <- getTestSetting TestLLC - have_llvm <- (allowHaveLLVM arch &&) <$> liftIO (isJust <$> findExecutable llc_cmd) - profiled <- getBooleanSetting TestGhcProfiled - - pkgConfCacheFile <- getTestSetting TestGhcPackageDb <&> ( "package.cache") - libdir <- getTestSetting TestGhcLibDir - - rtsLinker <- getBooleanSetting TestGhcWithRtsLinker - return TestCompilerArgs{..} - - --- | Assert that the inTree and outOfTree compiler args compute to the same --- thing -assertSameCompilerArgs :: Stage -> Action () -assertSameCompilerArgs stg = do - in_args <- inTreeCompilerArgs stg - out_args <- outOfTreeCompilerArgs - -- The assertion to check we calculated the right thing - when (in_args /= out_args) $ putFailure $ unlines $ - [ "Hadrian assertion failure: in-tree arguments don't match out-of-tree arguments." - , "Please report this bug on the GHC issue tracker. Continuing with in-tree arguments." - -- NB: we always use the in-tree arguments whenever they are available. - , "in-tree arguments:\n" ++ show in_args - , "out-of-tree arguments:\n" ++ show out_args - ] - - --- Command line arguments for invoking the @runtests.py@ script. A lot of this --- mirrors @testsuite/mk/test.mk@. -runTestBuilderArgs :: Args -runTestBuilderArgs = builder Testsuite ? do - ctx <- getContext - pkgs <- expr $ stagePackages (C.stage ctx) - libTests <- expr $ filterM doesDirectoryExist $ concat - [ [ pkgPath pkg -/- "tests", pkgPath pkg -/- "tests-ghc" ] - | pkg <- pkgs, isLibrary pkg, pkg /= rts, pkg /= libffi ] - - testGhc <- expr (testCompiler <$> userSetting defaultTestArgs) - - TestCompilerArgs{..} <- expr $ - case stageOfTestCompiler testGhc of - Just stg -> inTreeCompilerArgs stg - Nothing -> outOfTreeCompilerArgs - - -- MP: TODO, these should be queried from the test compiler? - bignumBackend <- getBignumBackend - bignumCheck <- getBignumCheck - - keepFiles <- expr (testKeepFiles <$> userSetting defaultTestArgs) - - accept <- expr (testAccept <$> userSetting defaultTestArgs) - (acceptPlatform, acceptOS) <- expr . liftIO $ - (,) <$> (maybe False (=="YES") <$> lookupEnv "PLATFORM") - <*> (maybe False (=="YES") <$> lookupEnv "OS") - (testEnv, testMetricsFile) <- expr . liftIO $ - (,) <$> lookupEnv "TEST_ENV" <*> lookupEnv "METRICS_FILE" - perfBaseline <- expr . liftIO $ lookupEnv "PERF_BASELINE_COMMIT" - targetWrapper <- expr . liftIO $ lookupEnv "CROSS_EMULATOR" - - threads <- shakeThreads <$> expr getShakeOptions - top <- expr $ topDirectory - ghcFlags <- expr runTestGhcFlags - cmdrootdirs <- expr (testRootDirs <$> userSetting defaultTestArgs) - let defaultRootdirs = ("testsuite" -/- "tests") : libTests - rootdirs | null cmdrootdirs = defaultRootdirs - | otherwise = cmdrootdirs - root <- expr buildRoot - let timeoutProg = root -/- timeoutPath - statsFilesDir <- expr haddockStatsFilesDir - - let asBool :: String -> Bool -> String - asBool s b = s ++ show b - - -- TODO: set CABAL_MINIMAL_BUILD/CABAL_PLUGIN_BUILD - mconcat [ arg "-Wdefault" -- see #22727 - , arg $ "testsuite/driver/runtests.py" - , pure [ "--rootdir=" ++ testdir | testdir <- rootdirs ] - , arg "--top", arg (top -/- "testsuite") - , arg "-e", arg $ "windows=" ++ show windowsHost - , arg "-e", arg $ "darwin=" ++ show osxHost - , arg "-e", arg $ "config.local=False" - , arg "-e", arg $ "config.cleanup=" ++ show (not keepFiles) - , arg "-e", arg $ "config.accept=" ++ show accept - , arg "-e", arg $ "config.accept_platform=" ++ show acceptPlatform - , arg "-e", arg $ "config.accept_os=" ++ show acceptOS - , arg "-e", arg $ "config.exeext=" ++ quote (if null exe then "" else "."<>exe) - , arg "-e", arg $ "config.compiler_debugged=" ++ show debugAssertions - , arg "-e", arg $ "config.debug_rts=" ++ show debugged - - -- MP: TODO, we do not need both, they get aliased to the same thing. - , arg "-e", arg $ asBool "ghc_with_native_codegen=" withNativeCodeGen - , arg "-e", arg $ asBool "config.have_ncg=" withNativeCodeGen - , arg "-e", arg $ asBool "config.have_llvm=" have_llvm - - , arg "-e", arg $ asBool "config.compiler_profiled=" profiled - - , arg "-e", arg $ asBool "config.have_RTS_linker=" rtsLinker - - , arg "-e", arg $ "config.package_conf_cache_file=" ++ show pkgConfCacheFile - - , arg "-e", arg $ "config.libdir=" ++ show libdir - - - , arg "-e", arg $ "config.have_interp=" ++ show withInterpreter - , arg "-e", arg $ "config.cross=" ++ show cross - , arg "-e", arg $ "config.interp_force_dyn=" ++ show interpForceDyn - , arg "-e", arg $ "config.unregisterised=" ++ show unregisterised - , arg "-e", arg $ "config.tables_next_to_code=" ++ show tables_next_to_code - - , arg "-e", arg $ "ghc_compiler_always_flags=" ++ quote ghcFlags - , arg "-e", arg $ asBool "ghc_with_dynamic_rts=" (hasDynamicRts) - , arg "-e", arg $ asBool "config.ghc_with_threaded_rts=" (hasThreadedRts) - , arg "-e", arg $ asBool "config.have_fast_bignum=" (bignumBackend /= "native" && not bignumCheck) - , arg "-e", arg $ asBool "config.target_has_smp=" targetWithSMP - , arg "-e", arg $ "config.ghc_dynamic=" ++ show hasDynamic - , arg "-e", arg $ "config.leading_underscore=" ++ show leadingUnderscore - - , arg "-e", arg $ "config.wordsize=" ++ show wordsize - , arg "-e", arg $ "config.os=" ++ show os - , arg "-e", arg $ "config.arch=" ++ show arch - , arg "-e", arg $ "config.platform=" ++ show platform - , arg "-e", arg $ "config.stage=" ++ show (stageNumber (C.stage ctx)) - - , arg "--config", arg $ "gs=gs" -- Use the default value as in test.mk - , arg "--config", arg $ "timeout_prog=" ++ show (top -/- timeoutProg) - , arg "--config", arg $ "stats_files_dir=" ++ statsFilesDir - , arg $ "--threads=" ++ show threads - , case perfBaseline of - Just commit | not (null commit) -> arg ("--perf-baseline=" ++ commit) - _ -> mempty - , emitWhenSet targetWrapper $ \cmd -> arg ("--target-wrapper=" ++ cmd) - , emitWhenSet testEnv $ \env -> arg ("--test-env=" ++ env) - , emitWhenSet testMetricsFile $ \file -> arg ("--metrics-file=" ++ file) - , getTestArgs -- User-provided arguments from command line. - ] - - where emitWhenSet Nothing _ = mempty - emitWhenSet (Just v) f = f v - - stageNumber :: Stage -> Int - stageNumber (Stage0 GlobalLibs) = error "stageNumber stageBoot" - stageNumber (Stage0 InTreeLibs) = 1 - stageNumber Stage1 = 2 - stageNumber Stage2 = 3 - stageNumber Stage3 = 4 - --- | Command line arguments for running GHC's test script. -getTestArgs :: Args -getTestArgs = do - -- targets specified in the TEST env var - testEnvTargets <- maybe [] words <$> expr (liftIO $ lookupEnv "TEST") - args <- expr $ userSetting defaultTestArgs - bindir <- expr $ getBinaryDirectory (testCompiler args) - compiler <- expr $ getCompilerPath (testCompiler args) - globalVerbosity <- shakeVerbosity <$> expr getShakeOptions - cross_prefix <- expr crossPrefix - -- the testsuite driver will itself tell us if we need to generate the docs target - -- So we always pass the haddock path if the hadrian configuration allows us to build - -- docs - -- If the configuration doesn't allow us to build docs, then we don't pass the haddock - -- option, and the testsuite driver will not subsequently ask us to build haddocks - -- for the required tests - haveDocs <- willDocsBeBuilt - let configFileArg= ["--config-file=" ++ (testConfigFile args)] - testOnlyArg = map ("--only=" ++) (testOnly args ++ testEnvTargets) - onlyPerfArg = if testOnlyPerf args - then Just "--only-perf-tests" - else Nothing - skipPerfArg = if testSkipPerf args - then Just "--skip-perf-tests" - else Nothing - brokenTestArgs = concat [ ["--broken-test", t] | t <- brokenTests args ] - speedArg = ["-e", "config.speed=" ++ setTestSpeed (testSpeed args)] - summaryArg = case testSummary args of - Just filepath -> Just $ "--summary-file=" ++ filepath - Nothing -> Just $ "--summary-file=testsuite_summary.txt" - junitArg = case testJUnit args of - Just filepath -> Just $ "--junit=" ++ filepath - Nothing -> Nothing - metricsArg = case testMetricsFile args of - Just filepath -> Just $ "--metrics-file=" ++ filepath - Nothing -> Nothing - configArgs = concat [["-e", configArg] | configArg <- testConfigs args] - globalTestVerbosity = case globalVerbosity of - Silent -> "0" - Error -> "1" - Warn -> "1" - Info -> "2" - Verbose -> "4" - Diagnostic -> "5" - verbosityArg = case testVerbosity args of - Nothing -> Just $ "--verbose=" ++ globalTestVerbosity - Just verbosity -> Just $ "--verbose=" ++ verbosity - wayArgs = map ("--way=" ++) (testWays args) - compilerArg = ["--config", "compiler=" ++ show (compiler)] - ghcPkgArg = ["--config", "ghc_pkg=" ++ show (bindir -/- (cross_prefix <> "ghc-pkg") <.> exe)] - haddockArg = if haveDocs - then [ "--config", "haddock=" ++ show (bindir -/- (cross_prefix <> "haddock") <.> exe) ] - else [ "--config", "haddock=" ] - hp2psArg = ["--config", "hp2ps=" ++ show (bindir -/- (cross_prefix <> "hp2ps") <.> exe)] - hpcArg = ["--config", "hpc=" ++ show (bindir -/- (cross_prefix <> "hpc") <.> exe)] - inTreeArg = [ "-e", "config.in_tree_compiler=" ++ - show (isInTreeCompiler (testCompiler args) || testHasInTreeFiles args) ] - - pure $ configFileArg ++ testOnlyArg ++ speedArg - ++ catMaybes [ onlyPerfArg, skipPerfArg, summaryArg - , junitArg, metricsArg, verbosityArg ] - ++ configArgs ++ wayArgs ++ compilerArg ++ ghcPkgArg - ++ haddockArg ++ hp2psArg ++ hpcArg ++ inTreeArg - ++ brokenTestArgs - - where willDocsBeBuilt = expr $ do - doctargets <- ghcDocs =<< flavour - pure $ Haddocks `Set.member` doctargets - - --- | Set speed for test -setTestSpeed :: TestSpeed -> String -setTestSpeed TestSlow = "0" -setTestSpeed TestNormal = "1" -setTestSpeed TestFast = "2" diff --git a/hadrian/src/Settings/Builders/SplitSections.hs b/hadrian/src/Settings/Builders/SplitSections.hs deleted file mode 100644 index 6c87d425992c..000000000000 --- a/hadrian/src/Settings/Builders/SplitSections.hs +++ /dev/null @@ -1,39 +0,0 @@ --- | Settings required when split-sections is enabled. -module Settings.Builders.SplitSections where - -import Expression -import Packages -import Settings -import Flavour.Type - -import Oracles.Setting - --- | Does it make sense to enable or disable split sections? -splitSectionsArgs :: Args -splitSectionsArgs = do - pkg <- getPackage - osx <- expr isOsxTarget - notSt0 <- notStage0 - flav <- expr flavour - if ( ghcSplitSections flav - -- Flavour enables split-sections - && not osx - -- OS X doesn't support split sections - && notSt0 - -- Disable for stage 0 because we aren't going to ship - -- the resulting binaries and consequently there is no - -- reason to minimize size. - && (pkg /= ghc) - -- Disable section splitting for the GHC library. - -- It takes too long and there is little benefit. - ) then - ( mconcat - [ builder (Ghc CompileHs) ? arg "-fsplit-sections" - , builder (Ghc CompileCWithGhc) ? arg "-fsplit-sections" - , builder (Ghc CompileCppWithGhc) ? arg "-fsplit-sections" - , builder (Cc CompileC) ? arg "-ffunction-sections" <> arg "-fdata-sections" - , builder MergeObjects ? ifM (expr isWinTarget) - (pure ["-T", "driver/utils/merge_sections_pe.ld"]) - (pure ["-T", "driver/utils/merge_sections.ld"]) - ] - ) else mempty diff --git a/hadrian/src/Settings/Builders/Win32Tarballs.hs b/hadrian/src/Settings/Builders/Win32Tarballs.hs deleted file mode 100644 index 7be63d4f8606..000000000000 --- a/hadrian/src/Settings/Builders/Win32Tarballs.hs +++ /dev/null @@ -1,13 +0,0 @@ -module Settings.Builders.Win32Tarballs (win32TarballsArgs) where - -import Settings.Builders.Common - -win32TarballsArgs :: Args -win32TarballsArgs = do - scriptPath <- expr $ (-/- "mk" -/- "get-win32-tarballs.py") <$> topDirectory - expr $ need [scriptPath] - mconcat - [ builder (Win32Tarballs DownloadTarballs) ? pure [scriptPath, "download", "all"] - , builder (Win32Tarballs ListTarballs) ? pure [scriptPath, "list", "all"] - , builder (Win32Tarballs VerifyTarballs) ? pure [scriptPath, "verify", "all"] - ] diff --git a/hadrian/src/Settings/Builders/Xelatex.hs b/hadrian/src/Settings/Builders/Xelatex.hs deleted file mode 100644 index a39c68705f6e..000000000000 --- a/hadrian/src/Settings/Builders/Xelatex.hs +++ /dev/null @@ -1,13 +0,0 @@ -module Settings.Builders.Xelatex (xelatexBuilderArgs) where - -import Settings.Builders.Common - -xelatexBuilderArgs :: Args -xelatexBuilderArgs = mconcat - [ builder Xelatex ? mconcat [ arg "-halt-on-error" - , arg =<< getInput ] - - -- this fixes #20913 although is a bit of a hack given that this is - -- specific to the user-guide. - , builder Makeindex ? mconcat [ arg "-s", arg "python.ist" ] - ] diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs deleted file mode 100644 index 8e357c191d9b..000000000000 --- a/hadrian/src/Settings/Default.hs +++ /dev/null @@ -1,338 +0,0 @@ -module Settings.Default ( - -- * Packages that are build by default and for the testsuite - defaultPackages, testsuitePackages, stage0Packages, - - -- * Default build ways - defaultLibraryWays, defaultRtsWays, - - -- * Default command line arguments for various builders - SourceArgs (..), sourceArgs, defaultBuilderArgs, defaultPackageArgs, - defaultExtraArgs, defaultHaddockExtraArgs, - - -- * Default build flavour and BigNum backend - defaultFlavour, defaultBignumBackend - ) where - -import qualified Data.Set as Set - -import qualified Hadrian.Builder.Sphinx -import qualified Hadrian.Builder.Tar - -import CommandLine -import Expression -import Flavour.Type -import Oracles.Flag -import Oracles.Setting -import Packages -import Settings.Builders.Alex -import Settings.Builders.DeriveConstants -import Settings.Builders.GenApply -import Settings.Builders.Cabal -import Settings.Builders.Cc -import Settings.Builders.Configure -import Settings.Builders.GenPrimopCode -import Settings.Builders.Ghc -import Settings.Builders.GhcPkg -import Settings.Builders.Haddock -import Settings.Builders.Happy -import Settings.Builders.Hsc2Hs -import Settings.Builders.HsCpp -import Settings.Builders.Ar -import Settings.Builders.Ld -import Settings.Builders.Make -import Settings.Builders.MergeObjects -import Settings.Builders.SplitSections -import Settings.Builders.RunTest -import Settings.Builders.Xelatex -import Settings.Packages -import Settings.Warnings -import qualified Hadrian.Builder.Git -import Settings.Builders.Win32Tarballs - --- | Packages that are built by default. You can change this in "UserSettings". -defaultPackages :: Stage -> Action [Package] -defaultPackages (Stage0 GlobalLibs) = stageBootPackages -defaultPackages (Stage0 InTreeLibs) = stage0Packages -defaultPackages Stage1 = stage1Packages -defaultPackages Stage2 = stage2Packages -defaultPackages Stage3 = return [] - --- | Default bignum backend. -defaultBignumBackend :: String -defaultBignumBackend = "gmp" - --- These packages are things needed to do the build.. so they are only built by --- boot compiler, with global package database. By default we will only build these --- packages in StageBoot so if you also need to distribute anything here then add --- it to `stage0packages` or `stage1packages` as appropriate. -stageBootPackages :: Action [Package] -stageBootPackages = return - [ lintersCommon, lintCommitMsg, lintSubmoduleRefs, lintWhitespace, lintNotes - , hsc2hs - , compareSizes - , deriveConstants - , genapply - , genprimopcode - , unlit - ] - --- | Packages built in 'Stage0' by default. You can change this in "UserSettings". -stage0Packages :: Action [Package] -stage0Packages = do - cross <- flag CrossCompiling - return $ [ cabalSyntax - , cabal - , compiler - , directory -- depends on filepath, fileIo - , filepath -- depends on os-string - , fileio - , ghc - , ghcBoot - , ghcBootThNext - , ghcHeap - , ghcPkg - , ghcPlatform - , ghcToolchain - , ghci - , haskeline - , haddockApi - , haddockLibrary - , haddock - , hp2ps - , hpc - , hpcBin - , hsc2hs - , osString -- new library not yet present for boot compilers - , process -- depends on filepath - , runGhc - , semaphoreCompat -- depends on - , time -- depends on win32 - , unlit - , if windowsHost then win32 else unix - -- We must use the in-tree `Win32` as the version - -- bundled with GHC 9.6 is too old for `semaphore-compat`. - -- Once 9.6 is no longer a boot compiler, we can drop win32/unix. - -- These depend on `filepath`/`os-string` through an automatic flag - -- that confused Hadrian, so we must make those a stage0 package as well. - -- Once we drop `Win32`/`unix` it should be possible to drop those too. - ] - ++ [ terminfo | not windowsHost, not cross ] - ++ [ timeout | windowsHost ] - --- | Packages built in 'Stage1' by default. You can change this in "UserSettings". -stage1Packages :: Action [Package] -stage1Packages = do - let good_stage0_package p - -- we only keep libraries for some reason - | not (isLibrary p) = False - -- but not win32/unix because it depends on cross-compilation target - | p == win32 = False - | p == unix = False - -- These packages are only needed for bootstrapping. - -- See Note [Bootstrapping Template Haskell] - | p == ghcBootThNext = False - | otherwise = True - - libraries0 <- filter good_stage0_package <$> stage0Packages - cross <- flag CrossCompiling - winTarget <- isWinTarget - - let when c xs = if c then xs else mempty - - return $ mconcat - [ libraries0 -- Build all Stage0 libraries in Stage1 - , [ array - , base - , binary - , bytestring - , containers - , deepseq - , exceptions - , ghc - , ghcBignum - , ghcBootTh - , ghcCompact - , ghcExperimental - , ghcInternal - , ghcPkg - , ghcPrim - , haddock - , haskeline - , hp2ps - , hsc2hs - , integerGmp - , mtl - , parsec - , pretty - , rts - , semaphoreCompat - , stm - , templateHaskell - , text - , transformers - , unlit - , xhtml - , if winTarget then win32 else unix - ] - , when (not cross) - [ hpcBin - , iserv - , runGhc - , ghcToolchainBin - ] - , when (winTarget && not cross) - [ -- See Note [Hadrian's ghci-wrapper package] - ghciWrapper - ] - ] - --- | Packages built in 'Stage2' by default. You can change this in "UserSettings". -stage2Packages :: Action [Package] -stage2Packages = stage1Packages - --- | Packages that are built only for the testsuite. -testsuitePackages :: Action [Package] -testsuitePackages = return ([ timeout | windowsHost ] ++ [ checkPpr, checkExact, countDeps, lintCodes, ghcConfig, dumpDecls ]) - --- | Default build ways for library packages: --- * We always build 'vanilla' way. --- * We build 'profiling' way when stage > Stage0. --- * We build 'dynamic' way when stage > Stage0 and the platform supports it. -defaultLibraryWays :: Ways -defaultLibraryWays = Set.fromList <$> - mconcat - [ pure [vanilla] - , notStage0 ? pure [profiling] - , notStage0 ? platformSupportsSharedLibs ? pure [dynamic, profilingDynamic] - ] - --- | Default build ways for the RTS. -defaultRtsWays :: Ways -defaultRtsWays = Set.fromList <$> - mconcat - [ pure [vanilla] - , notStage0 ? pure - [ profiling, debugProfiling - , debug - ] - , notStage0 ? targetSupportsThreadedRts ? pure [threaded, threadedProfiling, threadedDebugProfiling, threadedDebug] - , notStage0 ? platformSupportsSharedLibs ? pure - [ dynamic, profilingDynamic, debugDynamic, debugProfilingDynamic - ] - , notStage0 ? platformSupportsSharedLibs ? targetSupportsThreadedRts ? pure - [ threadedDynamic, threadedDebugDynamic, threadedProfilingDynamic, threadedDebugProfilingDynamic - ] - ] - --- TODO: Move C source arguments here --- | Default and package-specific source arguments. -data SourceArgs = SourceArgs - { hsDefault :: Args - , hsLibrary :: Args - , hsCompiler :: Args - , hsGhc :: Args } - --- | Concatenate source arguments in appropriate order. -sourceArgs :: SourceArgs -> Args -sourceArgs SourceArgs {..} = builder Ghc ? mconcat - [ hsDefault - -- `compiler` is also a library but the specific arguments that we want - -- to apply to that are given by the hsCompiler option. `ghc` is an - -- executable so we don't have to exclude that. - , libraryPackage ? notM (packageOneOf [compiler]) ? hsLibrary - , package compiler ? hsCompiler - , package ghc ? hsGhc ] - --- | All default command line arguments. -defaultExtraArgs :: Args -defaultExtraArgs = - mconcat [ sourceArgs defaultSourceArgs, defaultHaddockExtraArgs ] - -defaultHaddockExtraArgs :: Args -defaultHaddockExtraArgs = builder (Haddock BuildPackage) ? - mconcat [ arg "--hyperlinked-source", arg "--hoogle", arg "--quickjump" ] - - --- | Default source arguments, e.g. optimisation settings. -defaultSourceArgs :: SourceArgs -defaultSourceArgs = SourceArgs - { hsDefault = mconcat [ stage0 ? arg "-O" - , notStage0 ? arg "-O2" - , arg "-H32m" ] - , hsLibrary = notStage0 ? arg "-haddock" - , hsCompiler = mempty - , hsGhc = mempty } - --- Please update doc/flavours.md when changing the default build flavour. --- | Default build flavour. Other build flavours are defined in modules --- @Settings.Flavours.*@. Users can add new build flavours in "UserSettings". -defaultFlavour :: Flavour -defaultFlavour = Flavour - { name = "default" - , extraArgs = defaultExtraArgs - , packages = defaultPackages - , bignumBackend = defaultBignumBackend - , bignumCheck = False - , textWithSIMDUTF = False - , libraryWays = defaultLibraryWays - , rtsWays = defaultRtsWays - , dynamicGhcPrograms = defaultDynamicGhcPrograms - , ghcProfiled = const False - , ghcDebugged = const False - , ghcThreaded = const True - , ghcDebugAssertions = const False - , ghcSplitSections = False - , ghcDocs = cmdDocsArgs - , ghcHieFiles = const False - , hashUnitIds = False } - --- | Default logic for determining whether to build --- dynamic GHC programs. --- --- It corresponds to the DYNAMIC_GHC_PROGRAMS logic implemented --- in @mk/config.mk.in@. -defaultDynamicGhcPrograms :: Action Bool -defaultDynamicGhcPrograms = do - supportsShared <- platformSupportsSharedLibs - return (not windowsHost && supportsShared) - --- | All 'Builder'-dependent command line arguments. -defaultBuilderArgs :: Args -defaultBuilderArgs = mconcat - -- GHC-specific builders: - [ alexBuilderArgs - , cabalBuilderArgs - , ccBuilderArgs - , configureBuilderArgs - , deriveConstantsBuilderArgs - , genapplyBuilderArgs - , genPrimopCodeBuilderArgs - , ghcBuilderArgs - , ghcPkgBuilderArgs - , haddockBuilderArgs - , happyBuilderArgs - , hsc2hsBuilderArgs - , hsCppBuilderArgs - , ldBuilderArgs - , arBuilderArgs - , makeBuilderArgs - , mergeObjectsBuilderArgs - , runTestBuilderArgs - , validateBuilderArgs - , xelatexBuilderArgs - , win32TarballsArgs - , splitSectionsArgs - -- Generic builders from the Hadrian library: - , builder (Sphinx HtmlMode ) ? Hadrian.Builder.Sphinx.args HtmlMode - , builder (Sphinx LatexMode) ? Hadrian.Builder.Sphinx.args LatexMode - , builder (Sphinx ManMode ) ? Hadrian.Builder.Sphinx.args ManMode - , builder (Sphinx InfoMode ) ? Hadrian.Builder.Sphinx.args InfoMode - , builder (Tar Create ) ? Hadrian.Builder.Tar.args Create - , builder (Tar Extract ) ? Hadrian.Builder.Tar.args Extract - , Hadrian.Builder.Git.gitArgs - ] - --- | All 'Package'-dependent command line arguments. -defaultPackageArgs :: Args -defaultPackageArgs = mconcat [ packageArgs - , builder Ghc ? ghcWarningsArgs ] diff --git a/hadrian/src/Settings/Default.hs-boot b/hadrian/src/Settings/Default.hs-boot deleted file mode 100644 index ae9820b91972..000000000000 --- a/hadrian/src/Settings/Default.hs-boot +++ /dev/null @@ -1,21 +0,0 @@ -module Settings.Default ( - SourceArgs (..), sourceArgs, defaultBuilderArgs, defaultPackageArgs, - defaultExtraArgs, defaultHaddockExtraArgs, defaultLibraryWays, defaultRtsWays, - defaultFlavour, defaultBignumBackend - ) where - -import Flavour.Type -import Expression - -data SourceArgs = SourceArgs - { hsDefault :: Args - , hsLibrary :: Args - , hsCompiler :: Args - , hsGhc :: Args } - -sourceArgs :: SourceArgs -> Args - -defaultBuilderArgs, defaultPackageArgs, defaultExtraArgs, defaultHaddockExtraArgs :: Args -defaultLibraryWays, defaultRtsWays :: Ways -defaultFlavour :: Flavour -defaultBignumBackend :: String diff --git a/hadrian/src/Settings/Flavours/Benchmark.hs b/hadrian/src/Settings/Flavours/Benchmark.hs deleted file mode 100644 index 432eff36b4e6..000000000000 --- a/hadrian/src/Settings/Flavours/Benchmark.hs +++ /dev/null @@ -1,25 +0,0 @@ -module Settings.Flavours.Benchmark (benchmarkFlavour) where - -import qualified Data.Set as Set -import Expression -import Flavour -import Oracles.Flag -import {-# SOURCE #-} Settings.Default - --- Please update doc/flavours.md when changing this file. -benchmarkFlavour :: Flavour -benchmarkFlavour = defaultFlavour - { name = "bench" - , extraArgs = benchmarkArgs <> defaultHaddockExtraArgs - , libraryWays = pure $ Set.fromList [vanilla] - , rtsWays = Set.fromList <$> mconcat [pure [vanilla], targetSupportsThreadedRts ? pure [threaded]] } - -benchmarkArgs :: Args -benchmarkArgs = sourceArgs SourceArgs - { hsDefault = pure ["-O", "-H64m"] - , hsLibrary = pure ["-O2"] - -- TODO: We should really pass -O2 when notStage0. Otherwise, we aren't - -- really measuring the overhead of a potential new optimisation we want - -- to benchmark. This has to happen in sync with the Makefile build, though. - , hsCompiler = mconcat [stage0 ? arg "-O2", notStage0 ? arg "-O0"] - , hsGhc = pure ["-O2"] } diff --git a/hadrian/src/Settings/Flavours/Development.hs b/hadrian/src/Settings/Flavours/Development.hs deleted file mode 100644 index 746ae73f7cb1..000000000000 --- a/hadrian/src/Settings/Flavours/Development.hs +++ /dev/null @@ -1,36 +0,0 @@ -module Settings.Flavours.Development (developmentFlavour) where - -import qualified Data.Set as Set - -import Expression -import Flavour -import Oracles.Flag -import Packages -import {-# SOURCE #-} Settings.Default - --- Please update doc/flavours.md when changing this file. -developmentFlavour :: Stage -> Flavour -developmentFlavour ghcStage = defaultFlavour - { name = "devel" ++ stageString ghcStage - , extraArgs = developmentArgs ghcStage <> defaultHaddockExtraArgs - , libraryWays = pure $ Set.fromList [vanilla] - , rtsWays = Set.fromList <$> mconcat [pure [vanilla, debug], targetSupportsThreadedRts ? pure [threaded, threadedDebug]] - , dynamicGhcPrograms = return False - , ghcDebugAssertions = (== ghcStage) } - where - stageString Stage2 = "2" - stageString Stage1 = "1" - stageString Stage3 = "3" - stageString s = error ("developmentFlavour not supported for " ++ show s) - -developmentArgs :: Stage -> Args -developmentArgs ghcStage = - sourceArgs SourceArgs - { hsDefault = mconcat [ pure ["-O", "-H64m"], - -- Disable optimization when building Cabal; - -- this saves many minutes of build time. - package cabal ? pure ["-O0"]] - , hsLibrary = notStage0 ? arg "-dlint" - , hsCompiler = mconcat [stage0 ? arg "-O2", - buildingCompilerStage ghcStage ? pure ["-O0"]] - , hsGhc = buildingCompilerStage ghcStage ? pure ["-O0"] } diff --git a/hadrian/src/Settings/Flavours/GhcInGhci.hs b/hadrian/src/Settings/Flavours/GhcInGhci.hs deleted file mode 100644 index 8c1b38d47338..000000000000 --- a/hadrian/src/Settings/Flavours/GhcInGhci.hs +++ /dev/null @@ -1,29 +0,0 @@ -module Settings.Flavours.GhcInGhci (ghcInGhciFlavour) where - -import qualified Data.Set as Set - -import Expression -import Flavour -import Oracles.Flag -import {-# SOURCE #-} Settings.Default - --- Please update doc/flavours.md when changing this file. -ghcInGhciFlavour :: Flavour -ghcInGhciFlavour = defaultFlavour - { name = "ghc-in-ghci" - , extraArgs = ghciArgs - -- We can't build DLLs on Windows (yet). Actually we should only - -- include the dynamic way when we have a dynamic host GHC, but just - -- checking for Windows seems simpler for now. - , libraryWays = pure (Set.fromList [vanilla]) <> pure (Set.fromList [ dynamic | not windowsHost ]) - , rtsWays = pure (Set.fromList [vanilla]) <> (targetSupportsThreadedRts ? pure (Set.fromList [threaded])) <> pure (Set.fromList [ dynamic | not windowsHost ]) - } - -ghciArgs :: Args -ghciArgs = sourceArgs SourceArgs - { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] - ] - , hsLibrary = mempty - , hsCompiler = mempty - , hsGhc = mempty } diff --git a/hadrian/src/Settings/Flavours/Performance.hs b/hadrian/src/Settings/Flavours/Performance.hs deleted file mode 100644 index e1ac4bf72f19..000000000000 --- a/hadrian/src/Settings/Flavours/Performance.hs +++ /dev/null @@ -1,22 +0,0 @@ -module Settings.Flavours.Performance (performanceFlavour, performanceArgs) where - -import Expression -import Flavour -import {-# SOURCE #-} Settings.Default - --- Please update doc/flavours.md when changing this file. -performanceFlavour :: Flavour -performanceFlavour = splitSections $ enableLateCCS $ defaultFlavour - { name = "perf" - , extraArgs = performanceArgs <> defaultHaddockExtraArgs } - -performanceArgs :: Args -performanceArgs = sourceArgs SourceArgs - { hsDefault = pure ["-O", "-H64m"] - , hsLibrary = orM [notStage0, cross] ? arg "-O2" - , hsCompiler = pure ["-O2"] - , hsGhc = mconcat - [ andM [stage0, notCross] ? arg "-O" - , orM [notStage0, cross] ? arg "-O2" - ] - } diff --git a/hadrian/src/Settings/Flavours/Quick.hs b/hadrian/src/Settings/Flavours/Quick.hs deleted file mode 100644 index fe804240a055..000000000000 --- a/hadrian/src/Settings/Flavours/Quick.hs +++ /dev/null @@ -1,46 +0,0 @@ -module Settings.Flavours.Quick - ( quickFlavour - , quickDebugFlavour - ) -where - -import qualified Data.Set as Set - -import Expression -import Flavour -import Oracles.Flag -import {-# SOURCE #-} Settings.Default - --- Please update doc/flavours.md when changing this file. -quickFlavour :: Flavour -quickFlavour = defaultFlavour - { name = "quick" - , extraArgs = quickArgs - , libraryWays = Set.fromList <$> - mconcat - [ pure [vanilla] - , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] ] - , rtsWays = Set.fromList <$> - mconcat - [ pure - [ vanilla, debug ] - , targetSupportsThreadedRts ? pure [ threaded, threadedDebug ] - , notStage0 ? platformSupportsSharedLibs ? pure - [ dynamic, debugDynamic ] - , notStage0 ? platformSupportsSharedLibs ? targetSupportsThreadedRts ? pure [ - threadedDynamic, threadedDebugDynamic - ] - ] } - -quickArgs :: Args -quickArgs = sourceArgs SourceArgs - { hsDefault = mconcat [ pure ["-O0", "-H64m"] ] - , hsLibrary = notStage0 ? arg "-O" - , hsCompiler = stage0 ? arg "-O2" - , hsGhc = stage0 ? arg "-O" } - -quickDebugFlavour :: Flavour -quickDebugFlavour = quickFlavour - { name = "quick-debug" - , ghcDebugged = (>= Stage2) - } diff --git a/hadrian/src/Settings/Flavours/QuickCross.hs b/hadrian/src/Settings/Flavours/QuickCross.hs deleted file mode 100644 index 036301aae075..000000000000 --- a/hadrian/src/Settings/Flavours/QuickCross.hs +++ /dev/null @@ -1,41 +0,0 @@ -module Settings.Flavours.QuickCross (quickCrossFlavour) where - -import qualified Data.Set as Set - -import Expression -import Flavour -import Oracles.Flag -import {-# SOURCE #-} Settings.Default - --- Please update doc/flavours.md when changing this file. -quickCrossFlavour :: Flavour -quickCrossFlavour = defaultFlavour - { name = "quick-cross" - , extraArgs = quickCrossArgs - , dynamicGhcPrograms = pure False - , libraryWays = Set.fromList <$> - mconcat - [ pure [vanilla] - , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] ] - , rtsWays = Set.fromList <$> - mconcat - [ pure - [ vanilla, debug ] - , targetSupportsThreadedRts ? pure [threaded, threadedDebug] - , notStage0 ? platformSupportsSharedLibs ? pure - [ dynamic, debugDynamic ] - , notStage0 ? platformSupportsSharedLibs ? targetSupportsThreadedRts ? pure [ - threadedDynamic, threadedDebugDynamic - ] - ] } - -quickCrossArgs :: Args -quickCrossArgs = sourceArgs SourceArgs - { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] - ] - , hsLibrary = notStage0 ? mconcat [ arg "-O", arg "-fllvm" ] - , hsCompiler = stage0 ? arg "-O2" - , hsGhc = mconcat - [ stage0 ? arg "-O" - , stage1 ? mconcat [ arg "-O0", arg "-fllvm" ] ] } diff --git a/hadrian/src/Settings/Flavours/Quickest.hs b/hadrian/src/Settings/Flavours/Quickest.hs deleted file mode 100644 index 9eed80116b23..000000000000 --- a/hadrian/src/Settings/Flavours/Quickest.hs +++ /dev/null @@ -1,26 +0,0 @@ -module Settings.Flavours.Quickest (quickestFlavour) where - -import qualified Data.Set as Set - -import Expression -import Flavour -import Oracles.Flag -import {-# SOURCE #-} Settings.Default - --- Please update doc/flavours.md when changing this file. -quickestFlavour :: Flavour -quickestFlavour = defaultFlavour - { name = "quickest" - , extraArgs = quickestArgs - , libraryWays = pure (Set.fromList [vanilla]) - , rtsWays = pure (Set.fromList [vanilla]) <> (targetSupportsThreadedRts ? pure (Set.fromList [threaded])) - , dynamicGhcPrograms = return False } - -quickestArgs :: Args -quickestArgs = sourceArgs SourceArgs - { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] - ] - , hsLibrary = mempty - , hsCompiler = stage0 ? arg "-O" - , hsGhc = stage0 ? arg "-O" } diff --git a/hadrian/src/Settings/Flavours/Release.hs b/hadrian/src/Settings/Flavours/Release.hs deleted file mode 100644 index 20ddce750147..000000000000 --- a/hadrian/src/Settings/Flavours/Release.hs +++ /dev/null @@ -1,16 +0,0 @@ -module Settings.Flavours.Release where - -import Settings.Flavours.Performance -import Flavour - -releaseFlavour :: Flavour -releaseFlavour = - -- 1. These interface files will be distributed and the source files never recompiled. - disableSelfRecompInfo - -- 2. Include documentation in the interface for tools such as haddock and HLS to use - $ enableHaddock - -- 3. Include unit id hashes - $ enableHashUnitIds - -- 4. Include hie files (#16901) - -- $ enableHieFiles - $ performanceFlavour { name = "release" } diff --git a/hadrian/src/Settings/Flavours/Validate.hs b/hadrian/src/Settings/Flavours/Validate.hs deleted file mode 100644 index b322e7663608..000000000000 --- a/hadrian/src/Settings/Flavours/Validate.hs +++ /dev/null @@ -1,64 +0,0 @@ -module Settings.Flavours.Validate (validateFlavour, slowValidateFlavour, - quickValidateFlavour) where - -import qualified Data.Set as Set - -import Expression -import Flavour -import Oracles.Flag -import {-# SOURCE #-} Settings.Default - --- Please update doc/flavours.md when changing this file. -validateFlavour :: Flavour -validateFlavour = enableLinting $ werror $ defaultFlavour - { name = "validate" - , extraArgs = validateArgs <> defaultHaddockExtraArgs - , libraryWays = Set.fromList <$> - mconcat [ pure [vanilla] - , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] - ] - , rtsWays = Set.fromList <$> - mconcat [ pure [vanilla, debug] - , targetSupportsThreadedRts ? pure [threaded, threadedDebug] - , notStage0 ? platformSupportsSharedLibs ? pure - [ dynamic, debugDynamic - ] - , notStage0 ? platformSupportsSharedLibs ? targetSupportsThreadedRts ? pure - [ threadedDynamic, threadedDebugDynamic ] - ] - , ghcDebugAssertions = (<= Stage1) - } - -validateArgs :: Args -validateArgs = sourceArgs SourceArgs - { hsDefault = mconcat [ stage0 ? pure ["-O0", "-H64m"] - -- See #11487 - , notStage0 ? arg "-fllvm-fill-undef-with-garbage" - , notStage0 ? arg "-dno-debug-output" - , notStage0 ? arg "-fcheck-prim-bounds" - ] - , hsLibrary = pure ["-O"] - , hsCompiler = mconcat [ stage0 ? pure ["-O2"] - , notStage0 ? pure ["-O" ] - ] - , hsGhc = pure ["-O"] } - - -slowValidateFlavour :: Flavour -slowValidateFlavour = validateFlavour - { name = "slow-validate" - , ghcDebugAssertions = const True - } - -quickValidateArgs :: Args -quickValidateArgs = sourceArgs SourceArgs - { hsDefault = mempty - , hsLibrary = pure [ "-O" ] - , hsCompiler = mconcat [ stage0 ? arg "-O2", notStage0 ? arg "-O"] - , hsGhc = pure [ "-O", "-hide-all-packages" ] - } - -quickValidateFlavour :: Flavour -quickValidateFlavour = werror $ validateFlavour - { name = "quick-validate" - , extraArgs = quickValidateArgs } diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs deleted file mode 100644 index d799b3d05235..000000000000 --- a/hadrian/src/Settings/Packages.hs +++ /dev/null @@ -1,537 +0,0 @@ -module Settings.Packages (packageArgs) where - -import Expression -import Flavour -import Oracles.Setting -import Oracles.Flag -import Packages -import Settings -import Settings.Builders.Common (wayCcArgs) - -import GHC.Toolchain.Target -import GHC.Platform.ArchOS -import Data.Version.Extra -import Settings.Program (ghcWithInterpreter) - --- | Package-specific command-line arguments. -packageArgs :: Args -packageArgs = do - stage <- getStage - path <- getBuildPath - compilerPath <- expr $ buildPath (vanillaContext stage compiler) - - let -- Do not bind the result to a Boolean: this forces the configure rule - -- immediately and may lead to cyclic dependencies. - -- See: https://gitlab.haskell.org/ghc/ghc/issues/16809. - cross = flag CrossCompiling - - -- Check if the bootstrap compiler has the same version as the one we - -- are building. This is used to build cross-compilers - bootCross = (==) <$> ghcVersionStage (stage0InTree) <*> ghcVersionStage Stage1 - - compilerStageOption f = buildingCompilerStage' . f =<< expr flavour - - cursesIncludeDir <- getSetting CursesIncludeDir - cursesLibraryDir <- getSetting CursesLibDir - ffiIncludeDir <- getSetting FfiIncludeDir - ffiLibraryDir <- getSetting FfiLibDir - stageVersion <- readVersion <$> (expr $ ghcVersionStage stage) - - mconcat - --------------------------------- base --------------------------------- - [ package base ? mconcat - [ -- This fixes the 'unknown symbol stat' issue. - -- See: https://github.com/snowleopard/hadrian/issues/259. - builder (Ghc CompileCWithGhc) ? arg "-optc-O2" ] - - --------------------------------- cabal -------------------------------- - -- Cabal is a large library and slow to compile. Moreover, we build it - -- for Stage0 only so we can link ghc-pkg against it, so there is little - -- reason to spend the effort to optimise it. - , package cabal ? - stage0 ? builder Ghc ? arg "-O0" - - ------------------------------- compiler ------------------------------- - , package compiler ? mconcat - [ builder Alex ? arg "--latin1" - - , builder (Ghc CompileHs) ? mconcat - [ compilerStageOption ghcDebugAssertions ? arg "-DDEBUG" - - , inputs ["**/GHC.hs", "**/GHC/Driver/Make.hs"] ? arg "-fprof-auto" - , input "**/Parser.hs" ? - pure ["-fno-ignore-interface-pragmas", "-fcmm-sink"] - -- Enable -haddock and -Winvalid-haddock for the compiler - , arg "-haddock" - , notStage0 ? arg "-Winvalid-haddock" - -- These files take a very long time to compile with -O1, - -- so we use -O0 for them just in Stage0 to speed up the - -- build but not affect Stage1+ executables - , inputs ["**/GHC/Hs/Instances.hs", "**/GHC/Driver/Session.hs"] ? stage0 ? - pure ["-O0"] ] - - , builder (Cabal Setup) ? mconcat - [ arg "--disable-library-for-ghci" - , anyTargetOs [OSOpenBSD] ? arg "--ld-options=-E" - , compilerStageOption ghcProfiled ? arg "--ghc-pkg-option=--force" ] - - , builder (Cabal Flags) ? mconcat - -- For the ghc library, internal-interpreter only makes - -- sense when we're not cross compiling. For cross GHC, - -- external interpreter is used for loading target code - -- and internal interpreter is supposed to load native - -- code for plugins (!7377), however it's unfinished work - -- (#14335) and completely untested in CI for cross - -- backends at the moment, so we might as well disable it - -- for cross GHC. - [ andM [expr (ghcWithInterpreter stage), notCross] `cabalFlag` "internal-interpreter" - , notM cross `cabalFlag` "terminfo" - , arg "-build-tool-depends" - , flag UseLibzstd `cabalFlag` "with-libzstd" - -- ROMES: While the boot compiler is not updated wrt -this-unit-id - -- not being fixed to `ghc`, when building stage0, we must set - -- -this-unit-id to `ghc` because the boot compiler expects that. - -- We do it through a cabal flag in ghc.cabal - , stageVersion < makeVersion [9,8,1] ? arg "+hadrian-stage0" - , flag StaticLibzstd `cabalFlag` "static-libzstd" - , stage0 `cabalFlag` "bootstrap" - ] - - , builder (Haddock BuildPackage) ? arg ("--optghc=-I" ++ path) ] - - ---------------------------------- ghc --------------------------------- - , package ghc ? mconcat - [ builder Ghc ? mconcat - [ arg ("-I" ++ compilerPath) - , compilerStageOption ghcDebugAssertions ? arg "-DDEBUG" ] - - , builder (Cabal Flags) ? mconcat - [ (expr (ghcWithInterpreter stage)) `cabalFlag` "internal-interpreter" - , ifM stage0 - -- We build a threaded stage 1 if the bootstrapping compiler - -- supports it. - (threadedBootstrapper `cabalFlag` "threaded") - - -- We build a threaded stage N, N>1 if the configuration calls - -- for it. - (compilerStageOption ghcThreaded `cabalFlag` "threaded") - ] - ] - - -------------------------------- ghcPkg -------------------------------- - , package ghcPkg ? - builder (Cabal Flags) ? notM cross `cabalFlag` "terminfo" - - -------------------------------- ghcBoot ------------------------------ - , package ghcBoot ? - builder (Cabal Flags) ? (stage0 `cabalFlag` "bootstrap") - - --------------------------------- ghci --------------------------------- - , package ghci ? mconcat - [ - -- The use case here is that we want to build @iserv-proxy@ for the - -- cross compiler. That one needs to be compiled by the bootstrap - -- compiler as it needs to run on the host. Hence @iserv@ needs - -- @GHCi.TH@, @GHCi.Message@, @GHCi.Run@, and @GHCi.Server@ from - -- @ghci@. And those are behind the @-finternal-interpreter@ flag. - -- - -- But it may not build if we have made some changes to ghci's - -- dependencies (see #16051). - -- - -- To fix this properly Hadrian would need to: - -- * first build a compiler for the build platform (stage1 is enough) - -- * use it as a bootstrap compiler to build the stage1 cross-compiler - -- - -- The issue is that "configure" would have to be executed twice (for - -- the build platform and for the cross-platform) and Hadrian would - -- need to be fixed to support two different stage1 compilers. - -- - -- The workaround we use is to check if the bootstrap compiler has - -- the same version as the one we are building. In this case we can - -- avoid the first step above and directly build with - -- `-finternal-interpreter`. - -- - -- TODO: Note that in that case we also do not need to build most of - -- the Stage1 libraries, as we already know that the bootstrap - -- compiler comes with the same versions as the one we are building. - -- - builder (Cabal Setup) ? cabalExtraDirs ffiIncludeDir ffiLibraryDir - , builder (Cabal Flags) ? mconcat - [ ifM stage0 - (andM [cross, bootCross] `cabalFlag` "internal-interpreter") - (arg "internal-interpreter") - , stage0 `cabalFlag` "bootstrap" - ] - - ] - - , package unix ? builder (Cabal Flags) ? arg "+os-string" - , package directory ? builder (Cabal Flags) ? arg "+os-string" - , package win32 ? builder (Cabal Flags) ? arg "+os-string" - - --------------------------------- iserv -------------------------------- - -- Add -Wl,--export-dynamic enables GHCi to load dynamic objects that - -- refer to the RTS. This is harmless if you don't use it (adds a bit - -- of overhead to startup and increases the binary sizes) but if you - -- need it there's no alternative. - -- - -- The Solaris linker does not support --export-dynamic option. It also - -- does not need it since it exports all dynamic symbols by default - , package iserv - ? expr isElfTarget - ? notM (expr $ anyTargetOs [OSFreeBSD, OSSolaris2])? mconcat - [ builder (Ghc LinkHs) ? arg "-optl-Wl,--export-dynamic" ] - - -------------------------------- haddock ------------------------------- - , package haddockApi ? - builder (Cabal Flags) ? arg "in-ghc-tree" - - ---------------------------- ghc-boot-th-next -------------------------- - , package ghcBootThNext ? - builder (Cabal Flags) ? stage0 `cabalFlag` "bootstrap" - - ---------------------------------- text -------------------------------- - , package text ? - ifM (textWithSIMDUTF <$> expr flavour) - (builder (Cabal Flags) ? arg "+simdutf") - (builder (Cabal Flags) ? arg "-simdutf") - - ------------------------------- haskeline ------------------------------ - -- Hadrian doesn't currently support packages containing both libraries - -- and executables. This flag disables the latter. - , package haskeline ? - builder (Cabal Flags) ? arg "-examples" - -- Don't depend upon terminfo when cross-compiling to avoid unnecessary - -- dependencies. - -- TODO: Perhaps the user should rather be responsible for this? - , package haskeline ? - builder (Cabal Flags) ? notM cross `cabalFlag` "terminfo" - - -------------------------------- terminfo ------------------------------ - , package terminfo ? - builder (Cabal Setup) ? cabalExtraDirs cursesIncludeDir cursesLibraryDir - - -------------------------------- hsc2hs -------------------------------- - , package hsc2hs ? - builder (Cabal Flags) ? arg "in-ghc-tree" - - ------------------------------ ghc-internal ------------------------------ - , ghcInternalArgs - - ---------------------------------- rts --------------------------------- - , package rts ? rtsPackageArgs -- RTS deserves a separate function - - -------------------------------- runGhc -------------------------------- - , package runGhc ? - builder Ghc ? input "**/Main.hs" ? - (\version -> ["-cpp", "-DVERSION=" ++ show version]) <$> getSetting ProjectVersion - - --------------------------------- genprimopcode ------------------------ - , package genprimopcode - ? builder (Cabal Flags) ? arg "-build-tool-depends" - - --------------------------------- hpcBin ---------------------------------- - , package hpcBin - ? builder (Cabal Flags) ? arg "-build-tool-depends" - - ] - -ghcInternalArgs :: Args -ghcInternalArgs = package ghcInternal ? do - -- These are only used for non-in-tree builds. - librariesGmp <- getSetting GmpLibDir - includesGmp <- getSetting GmpIncludeDir - - backend <- getBignumBackend - check <- getBignumCheck - - mconcat - [ -- select bignum backend - builder (Cabal Flags) ? arg ("bignum-" <> backend) - - , -- check the selected backend against native backend - builder (Cabal Flags) ? check `cabalFlag` "bignum-check" - - -- backend specific - , case backend of - "gmp" -> mconcat - [ builder (Cabal Setup) ? mconcat - - -- enable GMP backend: configure script will produce - -- `ghc-internal.buildinfo` and `include/HsIntegerGmp.h` - [ arg "--configure-option=--with-gmp" - - -- enable in-tree support: don't depend on external "gmp" - -- library - , flag GmpInTree ? arg "--configure-option=--with-intree-gmp" - - -- prefer framework over library (on Darwin) - , flag GmpFrameworkPref ? - arg "--configure-option=--with-gmp-framework-preferred" - - -- Ensure that the ghc-internal package registration includes - -- knowledge of the system gmp's library and include directories. - , notM (flag GmpInTree) ? cabalExtraDirs includesGmp librariesGmp - ] - ] - _ -> mempty - - , builder (Cabal Flags) ? flag NeedLibatomic `cabalFlag` "need-atomic" - - , builder (Cc CompileC) ? (not <$> flag CcLlvmBackend) ? - input "**/cbits/atomic.c" ? arg "-Wno-sync-nand" - - ] - --- | RTS-specific command line arguments. -rtsPackageArgs :: Args -rtsPackageArgs = package rts ? do - projectVersion <- getSetting ProjectVersion - buildPlatform <- queryBuild targetPlatformTriple - buildArch <- queryBuild queryArch - buildOs <- queryBuild queryOS - buildVendor <- queryBuild queryVendor - targetPlatform <- queryTarget targetPlatformTriple - targetArch <- queryTarget queryArch - targetOs <- queryTarget queryOS - targetVendor <- queryTarget queryVendor - ghcUnreg <- queryTarget tgtUnregisterised - ghcEnableTNC <- queryTarget tgtTablesNextToCode - rtsWays <- getRtsWays - way <- getWay - path <- getBuildPath - top <- expr topDirectory - useSystemFfi <- getFlag UseSystemFfi - ffiIncludeDir <- getSetting FfiIncludeDir - ffiLibraryDir <- getSetting FfiLibDir - libdwIncludeDir <- getSetting LibdwIncludeDir - libdwLibraryDir <- getSetting LibdwLibDir - libnumaIncludeDir <- getSetting LibnumaIncludeDir - libnumaLibraryDir <- getSetting LibnumaLibDir - libzstdIncludeDir <- getSetting LibZstdIncludeDir - libzstdLibraryDir <- getSetting LibZstdLibDir - - x86 <- queryTarget (\ tgt -> archOS_arch (tgtArchOs tgt) `elem` [ ArchX86, ArchX86_64 ]) - - -- Arguments passed to GHC when compiling C and .cmm sources. - let ghcArgs = mconcat - [ arg "-Irts" - , arg $ "-I" ++ path - , way `elem` [debug, debugDynamic] ? pure [ "-DTICKY_TICKY" - , "-optc-DTICKY_TICKY"] - , Profiling `wayUnit` way ? arg "-DPROFILING" - , Threaded `wayUnit` way ? arg "-DTHREADED_RTS" - , notM targetSupportsSMP ? arg "-optc-DNOSMP" - - -- See Note [AutoApply.cmm for vectors] in genapply/Main.hs - -- - -- In particular, we **do not** pass -mavx when compiling - -- AutoApply_V16.cmm, as that would lock out targets with SSE2 but not AVX. - , inputs ["**/AutoApply_V32.cmm"] ? pure [ "-mavx2" | x86 ] - , inputs ["**/AutoApply_V64.cmm"] ? pure [ "-mavx512f" | x86 ] - - , inputs ["**/Jumps_V32.cmm"] ? pure [ "-mavx2" | x86 ] - , inputs ["**/Jumps_V64.cmm"] ? pure [ "-mavx512f" | x86 ] - ] - - let cArgs = mconcat - [ rtsWarnings - , wayCcArgs - , arg "-fomit-frame-pointer" - -- RTS *must* be compiled with optimisations. The INLINE_HEADER macro - -- requires that functions are inlined to work as expected. Inlining - -- only happens for optimised builds. Otherwise we can assume that - -- there is a non-inlined variant to use instead. But RTS does not - -- provide non-inlined alternatives and hence needs the function to - -- be inlined. See https://github.com/snowleopard/hadrian/issues/90. - , arg "-O2" - - , arg "-Irts" - , arg $ "-I" ++ path - - , notM targetSupportsSMP ? arg "-DNOSMP" - - , Debug `wayUnit` way ? pure [ "-DDEBUG" - , "-fno-omit-frame-pointer" - , "-g3" - , "-O0" ] - -- Set the namespace for the rts fs functions - , arg $ "-DFS_NAMESPACE=rts" - - , arg $ "-DCOMPILING_RTS" - - , inputs ["**/RtsMessages.c", "**/Trace.c"] ? - pure - ["-DProjectVersion=" ++ show projectVersion - , "-DRtsWay=\"rts_" ++ show way ++ "\"" - ] - - , input "**/RtsUtils.c" ? pure - [ "-DProjectVersion=" ++ show projectVersion - -- the RTS' host is the compiler's target (the target should be - -- per stage ideally...) - , "-DHostPlatform=" ++ show targetPlatform - , "-DHostArch=" ++ show targetArch - , "-DHostOS=" ++ show targetOs - , "-DHostVendor=" ++ show targetVendor - , "-DBuildPlatform=" ++ show buildPlatform - , "-DBuildArch=" ++ show buildArch - , "-DBuildOS=" ++ show buildOs - , "-DBuildVendor=" ++ show buildVendor - , "-DGhcUnregisterised=" ++ show (yesNo ghcUnreg) - , "-DTablesNextToCode=" ++ show (yesNo ghcEnableTNC) - , "-DRtsWay=\"rts_" ++ show way ++ "\"" - ] - - -- We're after pure performance here. So make sure fast math and - -- vectorization is enabled. - , input "**/Hash.c" ? pure [ "-O3" ] - - , inputs ["**/Evac.c", "**/Evac_thr.c"] ? arg "-funroll-loops" - - , speedHack ? - inputs [ "**/Evac.c", "**/Evac_thr.c" - , "**/Scav.c", "**/Scav_thr.c" - , "**/Compact.c", "**/GC.c" ] ? arg "-fno-PIC" - -- @-static@ is necessary for these bits, as otherwise the NCG - -- generates dynamic references. - , speedHack ? - inputs [ "**/Updates.c", "**/StgMiscClosures.c" - , "**/Jumps_D.c", "**/Jumps_V16.c", "**/Jumps_V32.c", "**/Jumps_V64.c" - , "**/PrimOps.c", "**/Apply.c" - , "**/AutoApply.c" - , "**/AutoApply_V16.c" - , "**/AutoApply_V32.c" - , "**/AutoApply_V64.c" ] ? pure ["-fno-PIC", "-static"] - - -- See Note [AutoApply.cmm for vectors] in genapply/Main.hs - , inputs ["**/AutoApply_V32.c"] ? pure [ "-mavx2" | x86 ] - , inputs ["**/AutoApply_V64.c"] ? pure [ "-mavx512f" | x86 ] - - , inputs ["**/Jumps_V32.c"] ? pure [ "-mavx2" | x86 ] - , inputs ["**/Jumps_V64.c"] ? pure [ "-mavx512f" | x86 ] - - -- inlining warnings happen in Compact - , inputs ["**/Compact.c"] ? arg "-Wno-inline" - - -- emits warnings about call-clobbered registers on x86_64 - , inputs [ "**/StgCRun.c" - , "**/win32/ConsoleHandler.c", "**/win32/ThrIOManager.c"] ? arg "-w" - -- The above warning suppression flags are a temporary kludge. - -- While working on this module you are encouraged to remove it and fix - -- any warnings in the module. See: - -- https://gitlab.haskell.org/ghc/ghc/wikis/working-conventions#Warnings - - , (not <$> flag CcLlvmBackend) ? - inputs ["**/Compact.c"] ? arg "-finline-limit=2500" - - , input "**/RetainerProfile.c" ? flag CcLlvmBackend ? - arg "-Wno-incompatible-pointer-types" - ] - - mconcat - [ builder (Cabal Flags) ? mconcat - [ any (wayUnit Profiling) rtsWays `cabalFlag` "profiling" - , any (wayUnit Debug) rtsWays `cabalFlag` "debug" - , any (wayUnit Dynamic) rtsWays `cabalFlag` "dynamic" - , any (wayUnit Threaded) rtsWays `cabalFlag` "threaded" - , flag UseLibm `cabalFlag` "libm" - , flag UseLibrt `cabalFlag` "librt" - , flag UseLibdl `cabalFlag` "libdl" - , useSystemFfi `cabalFlag` "use-system-libffi" - , useLibffiForAdjustors `cabalFlag` "libffi-adjustors" - , flag UseLibpthread `cabalFlag` "need-pthread" - , flag UseLibbfd `cabalFlag` "libbfd" - , flag NeedLibatomic `cabalFlag` "need-atomic" - , flag UseLibdw `cabalFlag` "libdw" - , flag UseLibnuma `cabalFlag` "libnuma" - , flag UseLibzstd `cabalFlag` "libzstd" - , flag StaticLibzstd `cabalFlag` "static-libzstd" - , queryTargetTarget tgtSymbolsHaveLeadingUnderscore `cabalFlag` "leading-underscore" - , ghcUnreg `cabalFlag` "unregisterised" - , ghcEnableTNC `cabalFlag` "tables-next-to-code" - , Debug `wayUnit` way `cabalFlag` "find-ptr" - ] - , builder (Cabal Setup) ? mconcat - [ cabalExtraDirs libdwIncludeDir libdwLibraryDir - , cabalExtraDirs libnumaIncludeDir libnumaLibraryDir - , cabalExtraDirs libzstdIncludeDir libzstdLibraryDir - , useSystemFfi ? cabalExtraDirs ffiIncludeDir ffiLibraryDir - ] - , builder (Cc (FindCDependencies CDep)) ? cArgs - , builder (Cc (FindCDependencies CxxDep)) ? cArgs - , builder (Ghc CompileCWithGhc) ? map ("-optc" ++) <$> cArgs - , builder (Ghc CompileCppWithGhc) ? map ("-optcxx" ++) <$> cArgs - , builder Ghc ? ghcArgs - - , builder HsCpp ? pure - [ "-DTOP=" ++ show top ] - - , builder HsCpp ? flag UseLibdw ? arg "-DUSE_LIBDW" ] - --- Compile various performance-critical pieces *without* -fPIC -dynamic --- even when building a shared library. If we don't do this, then the --- GC runs about 50% slower on x86 due to the overheads of PIC. The --- cost of doing this is a little runtime linking and less sharing, but --- not much. --- --- On x86_64 this doesn't work, because all objects in a shared library --- must be compiled with -fPIC (since the 32-bit relocations generated --- by the default small memory can't be resolved at runtime). So we --- only do this on i386. --- --- This apparently doesn't work on OS X (Darwin) nor on Solaris. --- On Darwin we get errors of the form --- --- ld: absolute addressing (perhaps -mdynamic-no-pic) used in _stg_ap_0_fast --- from rts/dist-install/build/Apply.dyn_o not allowed in slidable image --- --- and lots of these warnings: --- --- ld: warning codegen in _stg_ap_pppv_fast (offset 0x0000005E) prevents image --- from loading in dyld shared cache --- --- On Solaris we get errors like: --- --- Text relocation remains referenced --- against symbol offset in file --- .rodata (section) 0x11 rts/dist-install/build/Apply.dyn_o --- ... --- ld: fatal: relocations remain against allocatable but non-writable sections --- collect2: ld returned 1 exit status -speedHack :: Action Bool -speedHack = do - i386 <- anyTargetArch [ArchX86] - goodOS <- not <$> anyTargetOs [OSSolaris2] - return $ i386 && goodOS - --- See @rts/ghc.mk@. -rtsWarnings :: Args -rtsWarnings = mconcat - [ arg "-Wall" - , arg "-Wextra" - , arg "-Wstrict-prototypes" - , arg "-Wmissing-prototypes" - , arg "-Wmissing-declarations" - , arg "-Winline" - , arg "-Wpointer-arith" - , arg "-Wmissing-noreturn" - , arg "-Wnested-externs" - , arg "-Wredundant-decls" - , arg "-Wundef" - , arg "-fno-strict-aliasing" ] - --- | Expands to Cabal `--extra-lib-dirs` and `--extra-include-dirs` flags if --- the respective paths are not null. -cabalExtraDirs :: FilePath -- ^ include path - -> FilePath -- ^ libraries path - -> Args -cabalExtraDirs include lib = mconcat - [ extraDirFlag "--extra-lib-dirs" lib - , extraDirFlag "--extra-include-dirs" include - ] - where - extraDirFlag :: String -> FilePath -> Args - extraDirFlag flag dir - | null dir = mempty - | otherwise = arg (flag++"="++dir) diff --git a/hadrian/src/Settings/Parser.hs b/hadrian/src/Settings/Parser.hs deleted file mode 100644 index f1493cd60d9a..000000000000 --- a/hadrian/src/Settings/Parser.hs +++ /dev/null @@ -1,273 +0,0 @@ -{-# LANGUAGE FlexibleContexts #-} --- | Utilities for implementing key-value settings, as described in Note [Hadrian settings] -module Settings.Parser where - -import Control.Applicative -import Control.Monad.Except -import Control.Monad.State as State -import Data.Either -import Data.List - -import qualified Text.Parsec as Parsec - --- * Raw parsing of @key = value@ or @key += value@ expressions - --- | A 'Key' is parsed from a dot-separated list of words. -type Key = [String] - --- | A 'Val'ue is any 'String'. -type Val = String - --- | 'Equal' when overriding the entire computation of a setting with some --- fresh values, 'PlusEqual' when extending it. -data Op = Equal | PlusEqual - deriving (Eq, Ord, Show) - --- | A 'KeyVal' represents an expression @foo.bar.baz [+]= v@. -data KeyVal = KeyVal Key Op Val - deriving (Eq, Ord, Show) - --- | Pretty-print 'KeyVal's. -ppKeyVals :: [KeyVal] -> String -ppKeyVals = unlines . map ppKeyVal - --- | Pretty-print a 'KeyVal'. -ppKeyVal :: KeyVal -> String -ppKeyVal (KeyVal k op v) = - intercalate "." k ++ " " ++ opstr ++ " " ++ v - - where opstr = case op of - Equal -> "=" - PlusEqual -> "+=" - --- | Remove any string that can be parsed as a 'KeyVal' from the --- given list. -removeKVs :: [String] -> [String] -removeKVs xs = fst (partitionKVs xs) - --- | Try to parse all strings of the given list as 'KeyVal's and keep --- only the successful parses. -parseJustKVs :: [String] -> [KeyVal] -parseJustKVs xs = snd (partitionKVs xs) - --- | Try to parse all strings from the given list as 'KeyVal's and return --- the ones for which parsing fails in the first component of the pair, --- and the successful parses in the second component of the pair. -partitionKVs :: [String] -> ([String], [KeyVal]) -partitionKVs xs = partitionEithers $ - map (\x -> either (const $ Left x) Right $ parseKV x) xs - --- | Try to parse all strings from the input list as 'KeyVal's. -parseKVs :: [String] -> [Either Parsec.ParseError KeyVal] -parseKVs = map parseKV - --- | Try to parse the given string as a 'KeyVal'. -parseKV :: String -> Either Parsec.ParseError KeyVal -parseKV = Parsec.parse parseKeyVal "" - --- | This implements a parser that supports @key = val@, @key = "val"@, --- @key += val@, @key += "val"@ style syntax, where there can be 0 or more --- spaces between the key and the operator, and the operator and the value. -parseKeyVal :: Parsec.Parsec String () KeyVal -parseKeyVal = do - k <- parseKey - skipSpaces - op <- parseOp - skipSpaces - v <- parseValue - return (KeyVal k op v) - - where skipSpaces = Parsec.optional (Parsec.many1 (Parsec.oneOf " \t")) - --- | Parse a dot-separated list of alpha-numerical words that can contain --- dashes, just not at the beginning. -parseKey :: Parsec.Parsec String () Key -parseKey = - Parsec.sepBy1 (starOr $ liftA2 (:) Parsec.alphaNum $ - Parsec.many (Parsec.alphaNum <|> Parsec.char '-') - ) - (Parsec.char '.') - - where starOr :: Parsec.Parsec String () String -> Parsec.Parsec String () String - starOr p = ((\x -> [x]) <$> Parsec.char '*') <|> p - --- | Parse @=@ or @+=@. -parseOp :: Parsec.Parsec String () Op -parseOp = Parsec.choice - [ Parsec.char '=' *> pure Equal - , Parsec.string "+=" *> pure PlusEqual - ] - --- | Parse @some string@ or @\"some string\"@. -parseValue :: Parsec.Parsec String () Val -parseValue = Parsec.optional (Parsec.char '\"') >> Parsec.manyTill Parsec.anyChar ((Parsec.char '\"' >> pure ()) <|> Parsec.eof) - --- * Expressing settings - --- | The current key component must match the given string. -str :: Match f => String -> f () -str = matchString - --- | Like 'str', but returns the second argument insead of @()@. --- --- > val s a = str s *> pure a -val :: Match f => String -> a -> f a -val s a = str s *> pure a - --- | Try and match one of the given "matchers". --- --- > oneOf [str "hello", str "hi"] -- matches "hello" or "hi" -oneOf :: Match f => [f a] -> f a -oneOf = matchOneOf - --- | Try and match one of the given strings, returning the corresponding --- value (the @a@) when the input matches. -choose :: Match f => [(String, a)] -> f a -choose xs = oneOf $ map (uncurry val) xs - --- | Try and match one of the given strings, or @*@, and return --- the corresponding value (@One someValue@ or @Wildcard@ respectively). -wild :: Match f => [(String, a)] -> f (Wildcard a) -wild xs = choose $ ("*", Wildcard) : map (fmap One) xs - --- * Wildcards (@*@) in settings - --- | A @'Wildcard' a@ is either 'Wildcard' or @One x@ where @x :: a@. -data Wildcard a = Wildcard | One a - deriving (Eq, Ord, Show) - --- | Elimination rule for 'Wildcard'. The first argument is returned --- when the input is 'Wildcard', and when it's not the second argument --- is applied to the value wrapped behind 'One'. -wildcard :: b -> (a -> b) -> Wildcard a -> b -wildcard z f x = case x of - Wildcard -> z - One a -> f a - --- * 'Match' class, to interpret settings in various ways - --- 'matchOneOf' is similar in spirit to Alternative's '<|>', --- but we don't really have an identity ('empty'). --- --- 'matchString' on the other hand is just a handy primitive. --- --- Selective functors may be relevant here...? - --- | Equip the 'Applicative' class with a primitive to match a known string, --- and another to try and match a bunch of "alternatives", returning --- the first one that succeeds. -class Applicative f => Match f where - matchString :: String -> f () - matchOneOf :: [f a] -> f a - --- * 'SettingsM' interpretation - -type SettingError = String - -type SettingsM = StateT Key (Either SettingError) - --- | Runs the 'SettingsM' computation, returning the value at the leaf --- when the given 'Key' matches exactly at least one setting, erroring --- out when it is too long or just doesn't match. -runSettingsM :: Key -> SettingsM a -> Either SettingError a -runSettingsM k m = case runStateT m k of - Left err -> Left err - Right (a, []) -> return a - Right (_, xs) -> throwError $ "suffix " ++ show xs ++ " not found in settings" - --- | Stateful manipulation of the remaining key components, --- with errors when strings don't match. -instance Match SettingsM where - matchString = matchStringSettingsM - matchOneOf = matchOneOfSettingsM - -matchStringSettingsM :: String -> SettingsM () -matchStringSettingsM s = do - ks <- State.get - case ks of - [] -> throwError $ "expected " ++ show s ++ ", got nothing" - k:_ - | k == s -> State.modify (drop 1) - | otherwise -> throwError $ "expected " ++ show s ++ ", got " ++ show k - -matchOneOfSettingsM :: [SettingsM a] -> SettingsM a -matchOneOfSettingsM acts = StateT $ \k -> do - firstMatch $ map (($ k) . State.runStateT) acts - - where firstMatch - :: [Either SettingError (a, Key)] - -> Either SettingError (a, Key) - firstMatch [] = throwError "matchOneOf: no match" - firstMatch (Left _ : xs) = firstMatch xs - firstMatch (Right res : _) = return res - --- * Completion interpretation - --- | A tree with values at the leaves ('Pure'), but where we can --- have "linear links" with strings attached. --- --- - @'Known' s t@ nodes are used to represent matching against --- known strings; --- - @'Branch' ts@ nodes are used to represent matching against a list --- of "matchers"; --- - @'Pure' a@ nodes are used to attach values at the leaves, and help --- provide an 'Applicative' interface. -data CompletionTree a - = Known String (CompletionTree a) - | Branch [CompletionTree a] - | Pure a - deriving (Eq, Show) - --- | Traverses 'Known' and 'Branch' nodes, only applying the --- function to values at the leaves, wrapped with 'Pure'. -instance Functor CompletionTree where - fmap f (Known s t) = Known s (fmap f t) - fmap f (Branch ts) = Branch (map (fmap f) ts) - fmap f (Pure a) = Pure (f a) - --- | 'pure' is 'Pure', '<*>' distributes the choices. -instance Applicative CompletionTree where - pure = Pure - - Pure f <*> Pure x = Pure (f x) - Pure f <*> Known s t = Known s (fmap f t) - Pure f <*> Branch xs = Branch (map (fmap f) xs) - Known s t <*> t' = Known s (t <*> t') - Branch ts <*> t' = Branch (map (<*> t') ts) - --- | 'matchString' gets mapped to 'Known', 'matchOneOf' to 'Branch'. -instance Match CompletionTree where - matchString s = Known s (Pure ()) - matchOneOf xs = Branch xs - --- | Enumerate all the keys a completion tree represents, with the corresponding --- leave values. --- --- > enumerate (val "hello" 1)) -- [(1, ["hello"])] -enumerate :: CompletionTree a -> [(a, Key)] -enumerate = go [] - - where go ks (Known s t) = go (s:ks) t - go ks (Branch xs) = concatMap (go ks) xs - go ks (Pure a) = [(a, reverse ks)] - --- | Enumerate all the valid completions for the given input (a partially-written --- setting key). --- --- > complete ["hel"] (val 1 "hello") --- > -- returns [(1, ["hello"])] --- > complete ["foo"] (str "foo" *> oneOf [val "hello" 1, val "world" 2]) --- > -- returns [(1, ["foo", "hello"]), (2, ["foo", "world"])] -complete :: [String] -> CompletionTree a -> [(a, Key)] -complete [] t = enumerate t -complete (k:ks) t = case t of - Known s t' - | k == s -> map (fmap (s:)) (complete ks t') - | (k `isPrefixOf` s) && null ks -> map (fmap (s:)) (enumerate t') - -- TODO: use an Either to indicate suggestions about - -- typos somewhere in the middle (not for the final component) - -- (e.g "You wrote stage1.ghc-bi.ghc.hs.opts but probably - -- meant stage1.ghc-bin.ghc.hs.opts") ? - | otherwise -> [] - Branch ts -> concatMap (complete (k:ks)) ts - Pure a -> return (a, []) diff --git a/hadrian/src/Settings/Program.hs b/hadrian/src/Settings/Program.hs deleted file mode 100644 index 6d5030f90c58..000000000000 --- a/hadrian/src/Settings/Program.hs +++ /dev/null @@ -1,61 +0,0 @@ -module Settings.Program - ( programContext - , ghcWithInterpreter - ) where - -import Base -import Context -import Oracles.Flavour -import Oracles.Flag -import Packages - -import GHC.Platform.ArchOS -import Settings.Builders.Common (anyTargetOs, anyTargetArch, isArmTarget) - --- TODO: there is duplication and inconsistency between this and --- Rules.Program.getProgramContexts. There should only be one way to --- get a context/contexts for a given stage and package. -programContext :: Stage -> Package -> Action Context -programContext stage pkg = do - profiled <- askGhcProfiled stage - dynGhcProgs <- askDynGhcPrograms --dynamicGhcPrograms =<< flavour - return $ Context stage pkg (wayFor profiled dynGhcProgs) Final - - where wayFor prof dyn - | prof && dyn = profilingDynamic - | pkg == ghc && prof && notStage0 stage = profiling - | dyn && notStage0 stage = dynamic - | otherwise = vanilla - - notStage0 (Stage0 {}) = False - notStage0 _ = True - --- | When cross compiling, enable for stage0 to get ghci --- support. But when not cross compiling, disable for --- stage0, otherwise we introduce extra dependencies --- like haskeline etc, and mixing stageBoot/stage0 libs --- can cause extra trouble (e.g. #25406) --- --- Also checks whether the target supports GHCi. -ghcWithInterpreter :: Stage -> Action Bool -ghcWithInterpreter stage = do - is_cross <- flag CrossCompiling - goodOs <- anyTargetOs [ OSMinGW32, OSLinux, OSSolaris2 -- TODO "cygwin32"?, - , OSFreeBSD, OSDragonFly, OSNetBSD, OSOpenBSD - , OSDarwin, OSKFreeBSD - , OSWasi ] - goodArch <- (||) <$> - anyTargetArch [ ArchX86, ArchX86_64, ArchPPC - , ArchAArch64, ArchS390X - , ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2 - , ArchRISCV64, ArchLoongArch64 - , ArchWasm32 ] - <*> isArmTarget - -- The explicit support list is essentially a list of platforms for which - -- the RTS linker has support. If the RTS linker is not supported then we - -- fall back on dynamic linking: - dynamicGhcProgs <- askDynGhcPrograms - - -- Maybe this should just be false for cross compilers. But for now - -- I've kept the old behaviour where it will say yes. (See #25939) - return $ ((goodOs && goodArch) || dynamicGhcProgs) && (stage >= Stage1 || is_cross) diff --git a/hadrian/src/Settings/Warnings.hs b/hadrian/src/Settings/Warnings.hs deleted file mode 100644 index 50bcd82e4838..000000000000 --- a/hadrian/src/Settings/Warnings.hs +++ /dev/null @@ -1,95 +0,0 @@ -module Settings.Warnings (defaultGhcWarningsArgs, ghcWarningsArgs) where - -import Expression -import Oracles.Flag -import Oracles.Setting (isOsxTarget, isWinTarget) -import Packages - --- See @mk/warnings.mk@ for warning-related arguments in the Make build system. - --- | Default Haskell warning-related arguments. -defaultGhcWarningsArgs :: Args -defaultGhcWarningsArgs = mconcat - [ notStage0 ? arg "-Wnoncanonical-monad-instances" - , notM (flag CcLlvmBackend) ? arg "-optc-Wno-error=inline" - , flag CcLlvmBackend ? arg "-optc-Wno-unknown-pragmas" - -- Cabal can seemingly produce filepaths with incorrect case on filesystems - -- with case-insensitive names. Ignore such issues for now as they seem benign. - -- See #17798. - , isOsxTarget ? arg "-optP-Wno-nonportable-include-path" - , isWinTarget ? arg "-optP-Wno-nonportable-include-path" - ] - --- | Package-specific warnings-related arguments, mostly suppressing various warnings. -ghcWarningsArgs :: Args -ghcWarningsArgs = do - mconcat - [ stage0 ? mconcat - [ libraryPackage ? pure [ "-fno-warn-deprecated-flags" ] - , package terminfo ? pure [ "-fno-warn-unused-imports", "-Wno-deriving-typeable"] - , package transformers ? pure [ "-fno-warn-unused-matches" - , "-fno-warn-unused-imports" ] - , package stm ? pure [ "-Wno-deriving-typeable" ] - , package osString ? pure [ "-Wno-deriving-typeable" ] - , package parsec ? pure [ "-Wno-deriving-typeable" ] - , package cabal ? pure [ "-Wno-deriving-typeable" ] - , package cabalSyntax ? pure [ "-Wno-deriving-typeable" ] - , package time ? pure [ "-Wno-deriving-typeable" ] - , package unix ? pure [ "-Wno-deriving-typeable" ] - ] - , notStage0 ? mconcat - [ libraryPackage ? pure [ "-Wno-deprecated-flags" ] - , package ghcInternal ? pure [ "-Wno-trustworthy-safe" ] - , package base ? pure [ "-Wno-trustworthy-safe" ] - , package binary ? pure [ "-Wno-deprecations" ] - , package bytestring ? pure [ "-Wno-inline-rule-shadowing" ] - , package compiler ? pure [ "-Wcpp-undef" ] - , package directory ? pure [ "-Wno-unused-imports" - , "-Wno-deprecations" -- https://gitlab.haskell.org/ghc/ghc/-/issues/24240 - ] - , package fileio ? pure [ "-Wno-unused-imports" ] -- https://github.com/haskell/file-io/issues/30 - , package ghc ? pure [ "-Wcpp-undef" - , "-Wincomplete-uni-patterns" - , "-Wincomplete-record-updates" - ] - , package haddockLibrary ? pure [ "-Wno-unused-imports" ] - , package haddockApi ? pure [ "-Wno-unused-imports" - , "-Wno-deprecations" - , "-Wno-x-partial" ] - , package haskeline ? pure [ "-Wno-deprecations" - , "-Wno-x-partial" - , "-Wno-unused-imports" - , "-Wno-redundant-constraints" - , "-Wno-simplifiable-class-constraints" - , "-Wno-deriving-typeable" ] - , package pretty ? pure [ "-Wno-unused-imports" ] - , package primitive ? pure [ "-Wno-unused-imports" - , "-Wno-deprecations" ] - , package rts ? pure [ "-Wcpp-undef" ] - , package text ? pure [ "-Wno-deprecations" - , "-Wno-deriving-typeable" - , "-Wno-unused-imports" ] - , package terminfo ? pure [ "-Wno-unused-imports", "-Wno-deriving-typeable" ] - , package stm ? pure [ "-Wno-deriving-typeable" ] - , package osString ? pure [ "-Wno-deriving-typeable", "-Wno-unused-imports" ] - , package parsec ? pure [ "-Wno-deriving-typeable" ] - - , package cabal ? pure [ "-Wno-deriving-typeable", "-Wno-incomplete-record-selectors" ] - -- The -Wno-incomplete-record-selectors is due to - -- https://github.com/haskell/cabal/issues/10402 - -- If that ticket is fixed, bwe can remove the flag again - - , package cabalSyntax ? pure [ "-Wno-deriving-typeable" ] - , package time ? pure [ "-Wno-deriving-typeable" ] - , package transformers ? pure [ "-Wno-unused-matches" - , "-Wno-unused-imports" - , "-Wno-redundant-constraints" - , "-Wno-orphans" ] - , package unix ? pure [ "-Wno-deprecations", "-Wno-deriving-typeable" ] - , package win32 ? pure [ "-Wno-trustworthy-safe" - , "-Wno-deprecations" -- https://gitlab.haskell.org/ghc/ghc/-/issues/24240 - , "-Wno-deriving-typeable" - ] - , package xhtml ? pure [ "-Wno-unused-imports" ] - , package containers ? pure [ "-Wno-unused-imports" ] - ] ] diff --git a/hadrian/src/Stage.hs b/hadrian/src/Stage.hs deleted file mode 100644 index fa83889579b3..000000000000 --- a/hadrian/src/Stage.hs +++ /dev/null @@ -1,137 +0,0 @@ -{-# LANGUAGE LambdaCase #-} -module Stage (Stage (..), WhichLibs(..), Inplace(..), isStage0, stage0InTree, stage0Boot, allStages,predStage, succStage, stageString) where - -import Development.Shake.Classes -import GHC.Generics - --- | A stage refers to a certain compiler in GHC's build process. --- --- * Stage0 GlobalLibs is for **executables** which are built with the boot compiler --- and boot compiler packages. For example, this was motivated by needing to --- build hsc2hs, a build dependency of unix with just the boot toolchain. (See #21634) --- --- * Stage 0 (InTreeLibs) is built with the bootstrapping compiler, i.e. the one already --- installed on the user's system. The compiler that is produced during --- stage 0 is called /stage 1 compiler/. Stage0 executables and libraries are --- build against the other libraries (in-tree) built by the stage 0 compiler. --- --- * Stage 1 is built using the stage 1 compiler and all GHC sources. The result --- is called /stage 2 compiler/ and it has all features of the new GHC. --- --- * Stage 2 is built using the stage 2 compiler. The result is a compiler --- fully "built by itself", commonly referred to as /bootstrapping/. --- --- * Stage 3 is built as a self test. The resulting compiler should have --- the same object code as the one built in stage 2, which is a good test --- for the compiler. Since it serves no other purpose than that, the stage 3 --- build is usually omitted in the build process. -data Stage = Stage0 WhichLibs | Stage1 | Stage2 | Stage3 - deriving (Show, Eq, Ord, Generic) - -{- -Note [Inplace vs Final package databases] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -There are two package databases we maintain an "inplace" one and a "final" one. -The inplace one is created by pre-configuring all the packages before doing any -building. All GHC invocations to build .hs files will use an inplace package database -for two reasons. - -1. To increase parallelism -2. ./hadrian/ghci-multi can use the inplace package db to avoid having to build everything - before starting. - -The "inplace" database has .conf files which point directly to the build folders. -The "final" database has a .conf file which points like normall to the install folder. - -Therefore when we are building modules, we can start compiling a module as soon as -all it's dependencies are available in the build folder, rather than waiting for the -whole package to finish, be copied and installed like before. - -Once we need to do a final link then we need to wait for the "final" versions to -be enabled because then we want to make sure to create objects with the right rpaths and -so on. The "final" .conf has dependencies on all the objects in the package (unlike the "inplace" .conf -which has no such dependencies). - --} -data Inplace = Inplace | Final deriving (Show, Eq, Generic) - -instance Binary Inplace -instance Hashable Inplace -instance NFData Inplace - - --- | See Note [Stage 0 build plans] -data WhichLibs = GlobalLibs -- ^ Build build tools against the globally installed libraries - | InTreeLibs -- ^ Build the compiler against the in-tree libraries. - deriving (Show, Eq, Ord, Generic) - -allStages :: [Stage] -allStages = [Stage0 GlobalLibs, Stage0 InTreeLibs, Stage1, Stage2, Stage3] - -stage0InTree, stage0Boot :: Stage -stage0InTree = Stage0 InTreeLibs -stage0Boot = Stage0 GlobalLibs - -isStage0 :: Stage -> Bool -isStage0 Stage0 {} = True -isStage0 _ = False - - -predStage :: Stage -> Stage -predStage Stage1 = stage0InTree -predStage Stage2 = Stage1 -predStage Stage3 = Stage2 -predStage s = error ("predStage: " ++ show s) - -succStage :: Stage -> Stage -succStage (Stage0 {}) = Stage1 -succStage Stage1 = Stage2 -succStage Stage2 = Stage3 -succStage Stage3 = error "succStage: Stage3" - -instance Binary Stage -instance Hashable Stage -instance NFData Stage - -instance Binary WhichLibs -instance Hashable WhichLibs -instance NFData WhichLibs - --- | Prettyprint a 'Stage'. -stageString :: Stage -> String -stageString = \case - Stage0 GlobalLibs -> "stageBoot" - Stage0 InTreeLibs -> "stage0" - Stage1 -> "stage1" - Stage2 -> "stage2" - Stage3 -> "stage3" - -{- -Note [Stage 0 build plans] -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The Stage refers to which compiler we will use to perform the builds. - - Stage0: Build with the boot toolchain - Stage1: Build with compiler built in stage 0 - Stage2: Build with compiler built in stage 1 - -Stage 0 also has two different package databases. - - Stage0 GlobalLibs: Used for building build tool dependencies (hsc2hs, unlit, linters etc) - Mostly using the libraries from the boot compiler. - Stage0 InTreeLibs: Used for building the Stage 1 compiler (ghc executable) and all libraries - needed by that. - -The reason for this split is - -1. bytestring depends on template-haskell so we need to build bytestring with stage0 (and all - packages which depend on it). This includes unix and hence directory (which depends on unix) but - unix depends on hsc2hs (which depends on directory) and you get a loop in the build - rules if you try to build them all in the same package database. - The solution is to build hsc2hs with the global boot libraries in Stage0 GlobalLibs -2. We want to build linters and other build tools which we don't distribute in a separate - package database so they don't end up in the bindist package database. - --} diff --git a/hadrian/src/Target.hs b/hadrian/src/Target.hs deleted file mode 100644 index 3655cd504720..000000000000 --- a/hadrian/src/Target.hs +++ /dev/null @@ -1,40 +0,0 @@ -{-# LANGUAGE LambdaCase #-} - -module Target ( - Target, target, context, builder, inputs, outputs, trackArgument, - module Builder - ) where - -import Data.Char -import Data.List.Extra - -import qualified Hadrian.Target as H -import Hadrian.Target hiding (Target) - -import Builder -import Context - -type Target = H.Target Context Builder - --- | Some arguments do not affect build results and therefore do not need to be --- tracked by the build system. A notable example is "-jN" that controls Make's --- parallelism. Given a 'Target' and an argument, this function should return --- 'True' only if the argument needs to be tracked. -trackArgument :: Target -> String -> Bool -trackArgument target arg = case builder target of - Make _ -> not $ threadArg arg - Ghc _ _ -> not $ verbosityArg arg || diagnosticsColorArg arg - Cabal _ _ -> not $ verbosityArg arg || cabal_configure_ignore arg - _ -> True - where - match_str_num [] rs = all isDigit rs - match_str_num (x:xs) (r:rs) = x == r && match_str_num xs rs - match_str_num (_:_) [] = False - - threadArg s = match_str_num "-j" s || match_str_num "MAKEFLAGS=-j" s || match_str_num "THREADS=" s - verbosityArg s = match_str_num "-v" s - diagnosticsColorArg s = "-fdiagnostics-color=" `isPrefixOf` s -- N.B. #18672 - cabal_configure_ignore = \case - "--configure-option=--quiet" -> True - "--configure-option=--disable-option-checking" -> True - _ -> False diff --git a/hadrian/src/UserSettings.hs b/hadrian/src/UserSettings.hs deleted file mode 100644 index 5920b57f24ad..000000000000 --- a/hadrian/src/UserSettings.hs +++ /dev/null @@ -1,65 +0,0 @@ --- Ensure we don't expose any unfoldings to guarantee quick rebuilds -{-# OPTIONS_GHC -O0 #-} - --- If you want to customise your build you should copy this file from --- hadrian/src/UserSettings.hs to hadrian/UserSettings.hs and edit your copy. --- If you don't copy the file your changes will be tracked by git and you can --- accidentally commit them. --- --- See doc/user-settings.md for instructions, and src/Flavour.hs for auxiliary --- functions for manipulating flavours. --- Please update doc/user-settings.md when committing changes to this file. -module UserSettings ( - userFlavours, userPackages, userDefaultFlavour, - verboseCommand, buildProgressColour, successColour, finalStage - ) where - -import Flavour.Type -import Expression -import {-# SOURCE #-} Settings.Default - --- See doc/user-settings.md for instructions. --- Please update doc/user-settings.md when committing changes to this file. - --- | Name of the default flavour, i.e the one used when no --flavour= --- argument is passed to Hadrian. -userDefaultFlavour :: String -userDefaultFlavour = "default" - --- | User-defined build flavours. See 'userFlavour' as an example. -userFlavours :: [Flavour] -userFlavours = [userFlavour] -- Add more build flavours if need be. - --- | This is an example user-defined build flavour. Feel free to modify it and --- use by passing @--flavour=user@ from the command line. -userFlavour :: Flavour -userFlavour = defaultFlavour { name = "user" } -- Modify other settings here. - --- | Add user-defined packages. Note, this only lets Hadrian know about the --- existence of a new package; to actually build it you need to create a new --- build flavour, modifying the list of packages that are built by default. -userPackages :: [Package] -userPackages = [] - --- | Set to 'True' to print full command lines during the build process. Note: --- this is a 'Predicate', hence you can enable verbose output only for certain --- targets, e.g.: @verboseCommand = package ghcPrim@. -verboseCommand :: Predicate -verboseCommand = do - verbosity <- expr getVerbosity - return $ verbosity >= Verbose - --- | Set colour for build progress messages (e.g. executing a build command). -buildProgressColour :: BuildProgressColour -buildProgressColour = mkBuildProgressColour (Dull Magenta) - --- | Set colour for success messages (e.g. a package is built successfully). -successColour :: SuccessColour -successColour = mkSuccessColour (Dull Green) - --- | Stop after building the StageN compiler. --- For example, setting the 'finalStage' to 'Stage1' will just build the --- 'Stage1' compiler. Setting it to 'Stage3' will build the 'Stage3' --- compiler. Setting it to 'Stage0' will mean nothing gets built at all. -finalStage :: Stage -finalStage = Stage2 diff --git a/hadrian/src/Utilities.hs b/hadrian/src/Utilities.hs deleted file mode 100644 index 2599e740f45b..000000000000 --- a/hadrian/src/Utilities.hs +++ /dev/null @@ -1,71 +0,0 @@ -module Utilities ( - build, buildWithResources, buildWithCmdOptions, - askWithResources, - runBuilder, runBuilderWith, - contextDependencies, stage1Dependencies, - topsortPackages, cabalDependencies - ) where - -import qualified Hadrian.Builder as H -import Hadrian.Haskell.Cabal -import Hadrian.Haskell.Cabal.Type -import Hadrian.Utilities - -import Context -import Expression hiding (stage) -import Settings -import Target - -build :: Target -> Action () -build target = H.build target getArgs - -buildWithResources :: [(Resource, Int)] -> Target -> Action () -buildWithResources rs target = H.buildWithResources rs target getArgs - -buildWithCmdOptions :: [CmdOption] -> Target -> Action () -buildWithCmdOptions opts target = H.buildWithCmdOptions opts target getArgs - -askWithResources :: [(Resource, Int)] -> Target -> Action String -askWithResources rs target = H.askWithResources rs target getArgs - --- TODO: Cache the computation. --- | Given a 'Context' this 'Action' looks up the package dependencies and wraps --- the results in appropriate contexts. --- To compute package dependencies we transitively scan Cabal files using --- 'pkgDependencies' defined in "Hadrian.Haskell.Cabal". -contextDependencies :: Context -> Action [Context] -contextDependencies Context {..} = do - depPkgs <- go [package] - return [ Context stage pkg way iplace | pkg <- depPkgs, pkg /= package ] - where - go pkgs = do - deps <- concatMapM step pkgs - let newPkgs = nubOrd $ sort (deps ++ pkgs) - if pkgs == newPkgs then return pkgs else go newPkgs - step pkg = do - deps <- pkgDependencies pkg - active <- sort <$> stagePackages stage - return $ intersectOrd (compare . pkgName) active deps - -cabalDependencies :: Context -> Action [String] -cabalDependencies ctx = interpretInContext ctx $ getContextData depIds - --- | Lookup dependencies of a 'Package' in the @vanilla Stage1 context@. -stage1Dependencies :: Package -> Action [Package] -stage1Dependencies = - fmap (map Context.package) . contextDependencies . vanillaContext Stage1 - --- HACK (izgzhen), see https://github.com/snowleopard/hadrian/issues/344. --- | Topological sort of packages according to their dependencies. -topsortPackages :: [Package] -> Action [Package] -topsortPackages pkgs = do - elems <- mapM (\p -> (p,) <$> stage1Dependencies p) pkgs - return $ map fst $ topSort elems - where - annotateInDeg es e = - (foldr (\e' s -> if fst e' `elem` snd e then s + 1 else s) (0 :: Int) es, e) - topSort [] = [] - topSort es = - let annotated = map (annotateInDeg es) es - inDegZero = map snd $ filter ((== 0). fst) annotated - in inDegZero ++ topSort (es \\ inDegZero) diff --git a/hadrian/src/Way.hs b/hadrian/src/Way.hs deleted file mode 100644 index 433522e8abc7..000000000000 --- a/hadrian/src/Way.hs +++ /dev/null @@ -1,75 +0,0 @@ -module Way ( - WayUnit (..), Way, wayUnit, addWayUnit, removeWayUnit, wayFromUnits, allWays, - - vanilla, profiling, dynamic, profilingDynamic, threaded, debug, - threadedDebug, threadedProfiling, threadedDynamic, - threadedDebugProfiling, threadedDebugDynamic, threadedProfilingDynamic, threadedDebugProfilingDynamic, - debugProfiling, debugDynamic, debugProfilingDynamic, - - wayPrefix, waySuffix, hisuf, osuf, hcsuf, obootsuf, hibootsuf, ssuf - ) where - -import Way.Type - --- | Build default _vanilla_ way. -vanilla :: Way -vanilla = wayFromUnits [] - --- | Build with profiling. -profiling :: Way -profiling = wayFromUnits [Profiling] - --- | Build with dynamic linking. -dynamic :: Way -dynamic = wayFromUnits [Dynamic] - --- | Build with profiling and dynamic linking. -profilingDynamic :: Way -profilingDynamic = wayFromUnits [Profiling, Dynamic] - --- RTS only ways below. See compiler/GHC/Driver/Session.hs. --- | Build multithreaded RTS. -threaded :: Way -threaded = wayFromUnits [Threaded] - --- | Build RTS with debug information. -debug :: Way -debug = wayFromUnits [Debug] - --- | Various combinations of RTS only ways. -threadedDebug, threadedProfiling, threadedDynamic, - threadedDebugProfiling, threadedDebugDynamic, threadedProfilingDynamic, threadedDebugProfilingDynamic, - debugProfiling, debugDynamic, debugProfilingDynamic :: Way -threadedDebug = wayFromUnits [Threaded, Debug] -threadedProfiling = wayFromUnits [Threaded, Profiling] -threadedDynamic = wayFromUnits [Threaded, Dynamic] -threadedDebugProfiling = wayFromUnits [Threaded, Debug, Profiling] -threadedDebugDynamic = wayFromUnits [Threaded, Debug, Dynamic] -threadedDebugProfilingDynamic = wayFromUnits [Threaded, Debug, Profiling, Dynamic] -threadedProfilingDynamic = wayFromUnits [Threaded, Profiling, Dynamic] -debugProfiling = wayFromUnits [Debug, Profiling] -debugDynamic = wayFromUnits [Debug, Dynamic] -debugProfilingDynamic = wayFromUnits [Debug, Profiling, Dynamic] --- | All ways supported by the build system. -allWays :: [Way] -allWays = - [ vanilla, profiling, dynamic, profilingDynamic, threaded, debug - , threadedDebug, threadedProfiling, threadedDynamic - , threadedDebugProfiling, threadedDebugDynamic, threadedProfilingDynamic - , debugProfiling, debugDynamic ] - -wayPrefix :: Way -> String -wayPrefix way | way == vanilla = "" - | otherwise = show way ++ "_" - -waySuffix :: Way -> String -waySuffix way | way == vanilla = "" - | otherwise = "_" ++ show way - -osuf, ssuf, hisuf, hcsuf, obootsuf, hibootsuf :: Way -> String -osuf = (++ "o" ) . wayPrefix -ssuf = (++ "s" ) . wayPrefix -hisuf = (++ "hi" ) . wayPrefix -hcsuf = (++ "hc" ) . wayPrefix -obootsuf = (++ "o-boot" ) . wayPrefix -hibootsuf = (++ "hi-boot") . wayPrefix diff --git a/hadrian/src/Way/Type.hs b/hadrian/src/Way/Type.hs deleted file mode 100644 index b205390d3774..000000000000 --- a/hadrian/src/Way/Type.hs +++ /dev/null @@ -1,98 +0,0 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE DerivingStrategies #-} -module Way.Type where - -import Data.IntSet (IntSet) -import qualified Data.IntSet as Set -import Data.List -import Data.Maybe -import Development.Shake.Classes -import Hadrian.Utilities - --- Note: order of constructors is important for compatibility with the old build --- system, e.g. we want "thr_p", not "p_thr" (see instance Show Way). --- | A 'WayUnit' is a single way of building source code, for example with --- profiling enabled, or dynamically linked. -data WayUnit = Threaded - | Debug - | Profiling - | Logging - | Dynamic - deriving (Bounded, Enum, Eq, Ord) - --- TODO: get rid of non-derived Show instances -instance Show WayUnit where - show unit = case unit of - Threaded -> "thr" - Debug -> "debug" - Profiling -> "p" - Logging -> "l" - Dynamic -> "dyn" - --- TODO: get rid of non-derived Read instance -instance Read WayUnit where - readsPrec _ = \case - "thr" -> [(Threaded,"")] - "debug" -> [(Debug,"")] - "p" -> [(Profiling,"")] - "l" -> [(Logging,"")] - "dyn" -> [(Dynamic,"")] - _ -> [] - --- | Collection of 'WayUnit's that stands for the different ways source code --- is to be built. -newtype Way = Way IntSet - deriving newtype (Semigroup, Monoid) - -instance Binary Way where - put (Way w) = put w - get = Way <$> get - -instance Hashable Way where - hashWithSalt salt = hashWithSalt salt . show - -instance NFData Way where - rnf (Way s) = s `seq` () - --- | Construct a 'Way' from multiple 'WayUnit's. Inverse of 'wayToUnits'. -wayFromUnits :: [WayUnit] -> Way -wayFromUnits = Way . Set.fromList . map fromEnum - --- | Split a 'Way' into its 'WayUnit' building blocks. --- Inverse of 'wayFromUnits'. -wayToUnits :: Way -> [WayUnit] -wayToUnits (Way set) = map toEnum . Set.elems $ set - --- | Check whether a 'Way' contains a certain 'WayUnit'. -wayUnit :: WayUnit -> Way -> Bool -wayUnit unit (Way set) = fromEnum unit `Set.member` set - --- | Add a 'WayUnit' to a 'Way' -addWayUnit :: WayUnit -> Way -> Way -addWayUnit unit (Way set) = Way . Set.insert (fromEnum unit) $ set - --- | Remove a 'WayUnit' from 'Way'. -removeWayUnit :: WayUnit -> Way -> Way -removeWayUnit unit (Way set) = Way . Set.delete (fromEnum unit) $ set - -instance Show Way where - show way = if null tag then "v" else tag - where - tag = intercalate "_" . map show . wayToUnits $ way - -instance Read Way where - readsPrec _ s = if s == "v" then [(wayFromUnits [], "")] else result - where - uniqueReads token = case reads token of - [(unit, "")] -> Just unit - _ -> Nothing - units = map uniqueReads . words . replaceEq '_' ' ' $ s - result = if Nothing `elem` units - then [] - else [(wayFromUnits . map fromJust $ units, "")] - -instance Eq Way where - Way a == Way b = a == b - -instance Ord Way where - compare (Way a) (Way b) = compare a b diff --git a/hadrian/stack.yaml b/hadrian/stack.yaml deleted file mode 100644 index 2881570f5faa..000000000000 --- a/hadrian/stack.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# GHC's configure script reports that GHC versions 9.10 and greater are required -# to build GHC from source. -resolver: lts-24.2 # GHC 9.10.2 - -packages: -- '.' -- '../utils/ghc-toolchain' -- '../libraries/ghc-platform' - -nix: - enable: false - packages: - - autoconf - - automake - - gcc - - git - - ncurses - - perl - - ghc-toolchain - -extra-deps: -- Cabal-3.14.0.0 -- Cabal-syntax-3.14.0.0 - -# needed due to Hadrian's lower bound on directory -- directory-1.3.9.0 -- file-io-0.1.4 -- filepath-1.4.300.2 -- process-1.6.25.0 -- unix-2.8.5.1 diff --git a/hadrian/stack.yaml.lock b/hadrian/stack.yaml.lock deleted file mode 100644 index 9d3cefdfb8a8..000000000000 --- a/hadrian/stack.yaml.lock +++ /dev/null @@ -1,61 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/topics/lock_files - -packages: -- completed: - hackage: Cabal-3.14.0.0@sha256:604ea78fd41acf5382d3578aad5e90d66065a823fca4207ed144ef209daf3c7f,13720 - pantry-tree: - sha256: 9bd496dbb7d0a1bc1e9147cedbede83003c86ceec66c06594fe292710618bc43 - size: 12219 - original: - hackage: Cabal-3.14.0.0 -- completed: - hackage: Cabal-syntax-3.14.0.0@sha256:6cd7666c675c29981392d031a9ad402f578234b6195a304c886b84510b0c21cd,7380 - pantry-tree: - sha256: 2aed3c4195554d93ed1e25c4bacdf8eb7f3e006622bbd17a2e27d4bd0de0cd32 - size: 10977 - original: - hackage: Cabal-syntax-3.14.0.0 -- completed: - hackage: directory-1.3.9.0@sha256:2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917,3307 - pantry-tree: - sha256: cf35b0c2755674f913078c588c88fc169d928ce09f292c648af9f1dbc3167131 - size: 3386 - original: - hackage: directory-1.3.9.0 -- completed: - hackage: file-io-0.1.4@sha256:e3e1866eab82cb28f6a5f28507643da3987008b737e66a3c7398f39f16d824dc,3251 - pantry-tree: - sha256: f5401e2f822eafa465b8c661303275ebcbfd6c0a34a9943379b8f580da64af03 - size: 858 - original: - hackage: file-io-0.1.4 -- completed: - hackage: filepath-1.4.300.2@sha256:24f794247fcb8d26388aaec87b8e3577649f462a744bb09f01e85a60a435d5ab,6128 - pantry-tree: - sha256: 086c1298421eaf07ca46666938bcb750ccbdcf386410e7d597f76d313d3ce98c - size: 3998 - original: - hackage: filepath-1.4.300.2 -- completed: - hackage: process-1.6.25.0@sha256:9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345,2640 - pantry-tree: - sha256: 9c7927cd4d7f2f4c64251256eb6904800b3922fa5c5424c60f0e08441693e12b - size: 1790 - original: - hackage: process-1.6.25.0 -- completed: - hackage: unix-2.8.5.1@sha256:3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06,9808 - pantry-tree: - sha256: b961320db69795a16c4ef4eebb0a3e7ddbbbe506fa1e22dde95ee8d8501bfbe5 - size: 5821 - original: - hackage: unix-2.8.5.1 -snapshots: -- completed: - sha256: cd28bd74375205718f1d5fa221730a9c17a203059708b1eb95f4b20d68bf82d9 - size: 724943 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/2.yaml - original: lts-24.2