From 393293a518a386e2715f0222fef5d21a8af80495 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 4 Feb 2024 00:07:36 +1300 Subject: [PATCH 001/170] Update nixpkgs pins --- ci.nix | 2 +- flake.lock | 20 ++++++++++---------- flake.nix | 5 +---- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/ci.nix b/ci.nix index 1bd233f88d..9155ad4fd0 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 3 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" diff --git a/flake.lock b/flake.lock index 156bf35e33..79d5d703d0 100644 --- a/flake.lock +++ b/flake.lock @@ -496,11 +496,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1701362232, - "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", + "lastModified": 1705033721, + "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", + "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", "type": "github" }, "original": { @@ -512,11 +512,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1701386440, - "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", + "lastModified": 1706922953, + "narHash": "sha256-45hHA6vQBIcn5bqxi5rtOO+r5rXKSqfWButJJQLHT1s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", + "rev": "4f24018c731df5f1d522aefb0b9c958e2a701552", "type": "github" }, "original": { @@ -544,17 +544,17 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1694822471, - "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", + "lastModified": 1706701482, + "narHash": "sha256-4FF5l9v2lBgOUWzP3DcntfsXvEuao5FhhQcJ4SbwjFE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", + "rev": "269ce7215bb5b436546786e8d354d37903e102a8", "type": "github" }, "original": { "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", - "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 07cda1fec5..64c9f009fe 100644 --- a/flake.nix +++ b/flake.nix @@ -10,10 +10,7 @@ nixpkgs-2211 = { url = "github:NixOS/nixpkgs/nixpkgs-22.11-darwin"; }; nixpkgs-2305 = { url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; }; nixpkgs-2311 = { url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin"; }; - # The libsodium bump in 85c6e70b555fe892a049fa3d9dce000dc23a9562 breaks th-dll tests. - # And later it breaks in th-dll due to some change in the windows libs. We should probably - # drop unsable. - nixpkgs-unstable = { url = "github:NixOS/nixpkgs?rev=47585496bcb13fb72e4a90daeea2f434e2501998"; }; # nixpkgs-unstable }; + nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; ghc98X = { flake = false; url = "git+https://gitlab.haskell.org/ghc/ghc?ref=ghc-9.8&submodules=1"; From 92288a7b365ad6fe6eddd4d939477bfb5845f354 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 17:51:15 +1300 Subject: [PATCH 002/170] Remove sphinx override --- overlays/bootstrap.nix | 2 +- overlays/default.nix | 2 -- overlays/sphinx.nix | 26 -------------------------- 3 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 overlays/sphinx.nix diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 902c5d363a..2e4bb1bcbf 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -76,7 +76,7 @@ in { materialized = ../materialized/happy-1.20.0; }; }; - sphinx = with final.buildPackages; python3Packages.sphinx_1_7_9 or sphinx_5; + sphinx = final.buildPackages.sphinx; D5123-patch = final.fetchpatch rec { # https://phabricator.haskell.org/D5123 url = "http://tarballs.nixos.org/sha256/${sha256}"; diff --git a/overlays/default.nix b/overlays/default.nix index ab72c50da0..72c9717d5a 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -77,7 +77,6 @@ let armv6l-linux = import ./armv6l-linux.nix; musl = import ./musl.nix; android = import ./android.nix; - sphinx = import ./sphinx.nix; tools = import ./tools.nix; emscripten = import ./emscripten.nix; nix-prefetch-git-minimal = import ./nix-prefetch-git-minimal.nix; @@ -127,7 +126,6 @@ let hydra # Restore nixpkgs haskell and haskellPackages (_: prev: { inherit (prev.haskell-nix-prev) haskell haskellPackages; }) - sphinx dummy-ghc-data cacheCompilerDeps default-setup diff --git a/overlays/sphinx.nix b/overlays/sphinx.nix deleted file mode 100644 index dce4d1fdd2..0000000000 --- a/overlays/sphinx.nix +++ /dev/null @@ -1,26 +0,0 @@ -_: prev: { - # Most GHC builds aren't compatible with sphinx 6+ - sphinx_5 = prev.sphinx.overridePythonAttrs(_: rec { - version = "5.3.0"; - - src = prev.fetchFromGitHub { - owner = "sphinx-doc"; - repo = "sphinx"; - rev = "refs/tags/v${version}"; - postFetch = '' - # Change ä to æ in file names, since ä can be encoded multiple ways on different - # filesystems, leading to different hashes on different platforms. - cd "$out"; - mv tests/roots/test-images/{testimäge,testimæge}.png - sed -i 's/testimäge/testimæge/g' tests/{test_build*.py,roots/test-images/index.rst} - ''; - hash = "sha256-80bVg1rfBebgSOKbWkzP84vpm39iLgM8lWlVD64nSsQ="; - }; - - # Some tests require network access - doCheck = false; - - pythonImportsCheck = [ "sphinx" ]; - }); - -} From 5d94a906abb3eff46f0091d0ebc5dd26934ac70b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 17:53:04 +1300 Subject: [PATCH 003/170] Boot with ghc 8.10.7 --- overlays/bootstrap.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 2e4bb1bcbf..8b771824cb 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1,14 +1,6 @@ final: prev: let - # For each architecture, what GHC version we should use for bootstrapping. - buildBootstrapper = - if final.stdenv.buildPlatform.isAarch64 && final.stdenv.buildPlatform.isDarwin - then { - compilerNixName = "ghc8107"; - } - else { - compilerNixName = "ghc884"; - }; + buildBootstrapper.compilerNixName = "ghc8107"; latestVer = { "8.4" = "8.4.4"; "8.6" = "8.6.5"; From 56b38ec3c1fe632e9ec8d7147b1d804eb7554d34 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 17:53:39 +1300 Subject: [PATCH 004/170] Patch code in case we decide to run sphinx doc generation --- overlays/bootstrap.nix | 3 +++ overlays/patches/ghc/docs-sphinx-7-ghc98.patch | 8 ++++++++ overlays/patches/ghc/docs-sphinx-7.patch | 8 ++++++++ 3 files changed, 19 insertions(+) create mode 100644 overlays/patches/ghc/docs-sphinx-7-ghc98.patch create mode 100644 overlays/patches/ghc/docs-sphinx-7.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 8b771824cb..4b0677547e 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -266,6 +266,9 @@ in { # Fix the bad fixups: https://gitlab.haskell.org/ghc/ghc/-/commit/2adc050857a9c1b992040fbfd55fbe65b2851b19 ++ final.lib.optional (versionAtLeast "9.6" && versionLessThan "9.6.4" && final.stdenv.targetPlatform.isAarch64) ./patches/ghc/2adc050857a9c1b992040fbfd55fbe65b2851b19.patch ++ final.lib.optional (versionAtLeast "8.10.7" && versionLessThan "9.0" && final.stdenv.targetPlatform.isAarch64 && final.stdenv.targetPlatform.isMusl && final.stdenv.targetPlatform != final.stdenv.hostPlatform) ./patches/ghc/ghc-8.10-aarch64-musl-gettimeofday.patch + + ++ until "9.8" ./patches/ghc/docs-sphinx-7.patch + ++ fromUntil "9.8" "9.9" ./patches/ghc/docs-sphinx-7-ghc98.patch ; in ({ ghc865 = final.callPackage ../compiler/ghc (traceWarnOld "8.6" { diff --git a/overlays/patches/ghc/docs-sphinx-7-ghc98.patch b/overlays/patches/ghc/docs-sphinx-7-ghc98.patch new file mode 100644 index 0000000000..3fc1a0f215 --- /dev/null +++ b/overlays/patches/ghc/docs-sphinx-7-ghc98.patch @@ -0,0 +1,8 @@ +Fix build of docs after sphinx update. +https://github.com/sphinx-doc/sphinx/pull/11381 +https://gitlab.haskell.org/ghc/ghc/-/issues/24129 +--- a/docs/users_guide/rtd-theme/layout.html ++++ b/docs/users_guide/rtd-theme/layout.html +@@ -28 +28 @@ +- ++ diff --git a/overlays/patches/ghc/docs-sphinx-7.patch b/overlays/patches/ghc/docs-sphinx-7.patch new file mode 100644 index 0000000000..bc2edd9b94 --- /dev/null +++ b/overlays/patches/ghc/docs-sphinx-7.patch @@ -0,0 +1,8 @@ +Fix build of docs after sphinx update. + https://github.com/sphinx-doc/sphinx/pull/11381 + https://gitlab.haskell.org/ghc/ghc/-/issues/24129 + --- a/docs/users_guide/rtd-theme/layout.html + +++ b/docs/users_guide/rtd-theme/layout.html + @@ -67 +67 @@ + - + + From fad197b0d80f5ea7859652310d6c09f599fa09e1 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 17:54:11 +1300 Subject: [PATCH 005/170] Bump nixpkgs pins again --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 79d5d703d0..e19db5549f 100644 --- a/flake.lock +++ b/flake.lock @@ -512,11 +512,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1706922953, - "narHash": "sha256-45hHA6vQBIcn5bqxi5rtOO+r5rXKSqfWButJJQLHT1s=", + "lastModified": 1707169231, + "narHash": "sha256-zbVwA8bBELZB3QHLfmvravpzKt5G8jI3AQIDKI8j68w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4f24018c731df5f1d522aefb0b9c958e2a701552", + "rev": "447fd4d28bb55d208a7a5a779e9414bd626e549d", "type": "github" }, "original": { @@ -544,11 +544,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1706701482, - "narHash": "sha256-4FF5l9v2lBgOUWzP3DcntfsXvEuao5FhhQcJ4SbwjFE=", + "lastModified": 1707205916, + "narHash": "sha256-fmRJilYGlB7VCt3XsdYxrA0u8e/K84O5xYucerUY0iM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "269ce7215bb5b436546786e8d354d37903e102a8", + "rev": "8cc79aa39bbc6eaedaf286ae655b224c71e02907", "type": "github" }, "original": { From 7c96a946424caa59c3ad8c24a3f6402c47d89a30 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 17:54:43 +1300 Subject: [PATCH 006/170] Remove reference to old pkg --- lib/pkgconf-nixpkgs-map.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pkgconf-nixpkgs-map.nix b/lib/pkgconf-nixpkgs-map.nix index c93123a483..ca88811d17 100644 --- a/lib/pkgconf-nixpkgs-map.nix +++ b/lib/pkgconf-nixpkgs-map.nix @@ -571,7 +571,7 @@ pkgs: "alure" = [ "alure" ]; "alure-static" = [ "alure" ]; "aml" = [ "aml" ]; - "amtk-5" = [ "amtk" ]; +# "amtk-5" = [ "amtk" ]; "anthy" = [ "anthy" ]; "apk" = [ "apk-tools" ]; "libapngasm" = [ "apngasm" ]; From 1402b84595bc95f2caceef66ce8691b2ffe46cc4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 17:57:38 +1300 Subject: [PATCH 007/170] Bump pinned haskellNix in nix-tools subdir --- nix-tools/flake.lock | 159 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 133 insertions(+), 26 deletions(-) diff --git a/nix-tools/flake.lock b/nix-tools/flake.lock index 99d8bdd43b..97c4a924f0 100644 --- a/nix-tools/flake.lock +++ b/nix-tools/flake.lock @@ -117,14 +117,14 @@ "type": "github" } }, - "ghc980": { + "ghc98X": { "flake": false, "locked": { - "lastModified": 1692910316, - "narHash": "sha256-Qv8I3GzzIIN32RTEKI38BW5nO1f7j6Xm+dDeDUyYZWo=", + "lastModified": 1696643148, + "narHash": "sha256-E02DfgISH7EvvNAu0BHiPvl1E5FGMDi0pWdNZtIBC9I=", "ref": "ghc-9.8", - "rev": "249aa8193e4c5c1ee46ce29b39d2fffa57de7904", - "revCount": 61566, + "rev": "443e870d977b1ab6fc05f47a9a17bc49296adbd6", + "revCount": 61642, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -139,11 +139,11 @@ "ghc99": { "flake": false, "locked": { - "lastModified": 1695427505, - "narHash": "sha256-j0hXl6uEI+Uwf37z3WLuQZN4S0XqGtiepELv2Gl2aHU=", + "lastModified": 1701580282, + "narHash": "sha256-drA01r3JrXnkKyzI+owMZGxX0JameMzjK0W5jJE/+V4=", "ref": "refs/heads/master", - "rev": "b8e4fe2318798185228fb5f8214ba2384ac95b4f", - "revCount": 61951, + "rev": "f5eb0f2982e9cf27515e892c4bdf634bcfb28459", + "revCount": 62197, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -157,11 +157,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1695774158, - "narHash": "sha256-P9zifDVeDpv94NbwxVd6IQD2oggMa47CaBTjKAMPXqY=", + "lastModified": 1707265293, + "narHash": "sha256-VsAnKIZsKgkZBt3bT764KriFzPXVgxNneyA2EsUKlqU=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "ad01b49b5be1112aed7ad135bf667b7b92169ce1", + "rev": "f121b959b34d8ffa8f03cf7942dcb6b5e8766dc1", "type": "github" }, "original": { @@ -179,15 +179,20 @@ "cardano-shell": "cardano-shell", "flake-compat": "flake-compat", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", - "ghc980": "ghc980", + "ghc98X": "ghc98X", "ghc99": "ghc99", "hackage": "hackage", "hls-1.10": "hls-1.10", "hls-2.0": "hls-2.0", "hls-2.2": "hls-2.2", + "hls-2.3": "hls-2.3", + "hls-2.4": "hls-2.4", + "hls-2.5": "hls-2.5", + "hls-2.6": "hls-2.6", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", + "nix-tools-static": "nix-tools-static", "nixpkgs": [ "haskellNix", "nixpkgs-unstable" @@ -198,16 +203,17 @@ "nixpkgs-2205": "nixpkgs-2205", "nixpkgs-2211": "nixpkgs-2211", "nixpkgs-2305": "nixpkgs-2305", + "nixpkgs-2311": "nixpkgs-2311", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" }, "locked": { - "lastModified": 1695872581, - "narHash": "sha256-dGlLZsQItpgwnM0C6AFgEh9nbW/7FXICV/xkym4vQ3U=", + "lastModified": 1707266987, + "narHash": "sha256-Mi88DMfS9bG09R8shvsYK3YdeP718Oc7QSHE54AABYY=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "1adcf2606e4dc674541a6856a7e22ca95d09e0cc", + "rev": "a06f3887280b2394b1061c3ccebd4c598dbbed4a", "type": "github" }, "original": { @@ -267,6 +273,74 @@ "type": "github" } }, + "hls-2.3": { + "flake": false, + "locked": { + "lastModified": 1695910642, + "narHash": "sha256-tR58doOs3DncFehHwCLczJgntyG/zlsSd7DgDgMPOkI=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "458ccdb55c9ea22cd5d13ec3051aaefb295321be", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.3.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, + "hls-2.4": { + "flake": false, + "locked": { + "lastModified": 1699862708, + "narHash": "sha256-YHXSkdz53zd0fYGIYOgLt6HrA0eaRJi9mXVqDgmvrjk=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "54507ef7e85fa8e9d0eb9a669832a3287ffccd57", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.4.0.1", + "repo": "haskell-language-server", + "type": "github" + } + }, + "hls-2.5": { + "flake": false, + "locked": { + "lastModified": 1701080174, + "narHash": "sha256-fyiR9TaHGJIIR0UmcCb73Xv9TJq3ht2ioxQ2mT7kVdc=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "27f8c3d3892e38edaef5bea3870161815c4d014c", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.5.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, + "hls-2.6": { + "flake": false, + "locked": { + "lastModified": 1705325287, + "narHash": "sha256-+P87oLdlPyMw8Mgoul7HMWdEvWP/fNlo8jyNtwME8E8=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "6e0b342fa0327e628610f2711f8c3e4eaaa08b1e", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.6.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -360,6 +434,23 @@ "type": "github" } }, + "nix-tools-static": { + "flake": false, + "locked": { + "lastModified": 1706266250, + "narHash": "sha256-9t+GRk3eO9muCtKdNAwBtNBZ5dH1xHcnS17WaQyftwA=", + "owner": "input-output-hk", + "repo": "haskell-nix-example", + "rev": "580cb6db546a7777dad3b9c0fa487a366c045c4e", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "nix", + "repo": "haskell-nix-example", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1657693803, @@ -458,11 +549,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1695416179, - "narHash": "sha256-610o1+pwbSu+QuF3GE0NU5xQdTHM3t9wyYhB9l94Cd8=", + "lastModified": 1701362232, + "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "715d72e967ec1dd5ecc71290ee072bcaf5181ed6", + "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", "type": "github" }, "original": { @@ -472,6 +563,22 @@ "type": "github" } }, + "nixpkgs-2311": { + "locked": { + "lastModified": 1701386440, + "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-23.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -490,17 +597,17 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1695318763, - "narHash": "sha256-FHVPDRP2AfvsxAdc+AsgFJevMz5VBmnZglFUMlxBkcY=", + "lastModified": 1694822471, + "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e12483116b3b51a185a33a272bf351e357ba9a99", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", "repo": "nixpkgs", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, @@ -533,11 +640,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1695773356, - "narHash": "sha256-pNc857f4JgtrS4TZR2/GLu0N4VESNGAOSYK6lZVyUM4=", + "lastModified": 1707264537, + "narHash": "sha256-W1IpctMpZQxrBCekk10C4y5DsdqD/yIsjV1qfwBIv/4=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "bb18dc10e65c84525d17ac7f3985f47c6517e694", + "rev": "7e739a020559b3df5500aaaecff743ec27738e0f", "type": "github" }, "original": { From 7f98399e24852a9a31eb1e5854800ccb744700d9 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 18:03:27 +1300 Subject: [PATCH 008/170] Remove sphinx dependency and don't build docs for old GHCs --- compiler/ghc/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index df8b927f65..ac62e7a1bd 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -141,9 +141,6 @@ let CrossCompilePrefix = ${targetPrefix} '' + lib.optionalString isCrossTarget '' Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"} - '' - # GHC 9.0.1 fails to compile for musl unless HADDOC_DOCS = NO - + lib.optionalString (isCrossTarget || (targetPlatform.isMusl && builtins.compareVersions ghc-version "9.0.1" >= 0)) '' HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO BUILD_SPHINX_PDF = NO @@ -474,7 +471,7 @@ stdenv.mkDerivation (rec { dontAddExtraLibs = true; nativeBuildInputs = [ - perl autoconf automake m4 python3 sphinx + perl autoconf automake m4 python3 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour ] ++ lib.optional (patches != []) autoreconfHook; From b5871a94262c0214483fdf29bc965ed29ec03af8 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 18:05:23 +1300 Subject: [PATCH 009/170] Add materialized files --- .../hadrian/.plan.nix/hadrian.nix | 162 +++++++++++++++++ .../hadrian/cabal-files/Cabal-syntax.nix | 55 ++++++ .../hadrian/cabal-files/Cabal.nix | 56 ++++++ .../hadrian/cabal-files/QuickCheck.nix | 119 +++++++++++++ .../hadrian/cabal-files/clock.nix | 59 +++++++ .../hadrian/cabal-files/extra.nix | 58 ++++++ .../hadrian/cabal-files/filepattern.nix | 56 ++++++ .../hadrian/cabal-files/hashable.nix | 82 +++++++++ .../hadrian/cabal-files/heaps.nix | 38 ++++ .../hadrian/cabal-files/js-dgtable.nix | 47 +++++ .../hadrian/cabal-files/js-flot.nix | 47 +++++ .../hadrian/cabal-files/js-jquery.nix | 48 +++++ .../hadrian/cabal-files/primitive.nix | 73 ++++++++ .../hadrian/cabal-files/random.nix | 113 ++++++++++++ .../hadrian/cabal-files/shake.nix | 132 ++++++++++++++ .../hadrian/cabal-files/splitmix.nix | 139 +++++++++++++++ .../cabal-files/unordered-containers.nix | 78 +++++++++ .../hadrian/cabal-files/utf8-string.nix | 51 ++++++ .../ghc964/hadrian-ghc96/hadrian/default.nix | 148 ++++++++++++++++ .../hadrian/.plan.nix/hadrian.nix | 165 ++++++++++++++++++ .../hadrian/cabal-files/Cabal-syntax.nix | 55 ++++++ .../hadrian/cabal-files/Cabal.nix | 56 ++++++ .../hadrian/cabal-files/QuickCheck.nix | 119 +++++++++++++ .../hadrian/cabal-files/base16-bytestring.nix | 68 ++++++++ .../hadrian/cabal-files/clock.nix | 59 +++++++ .../hadrian/cabal-files/cryptohash-sha256.nix | 84 +++++++++ .../hadrian/cabal-files/extra.nix | 58 ++++++ .../hadrian/cabal-files/filepattern.nix | 56 ++++++ .../hadrian/cabal-files/hashable.nix | 82 +++++++++ .../hadrian/cabal-files/heaps.nix | 38 ++++ .../hadrian/cabal-files/js-dgtable.nix | 47 +++++ .../hadrian/cabal-files/js-flot.nix | 47 +++++ .../hadrian/cabal-files/js-jquery.nix | 48 +++++ .../hadrian/cabal-files/primitive.nix | 73 ++++++++ .../hadrian/cabal-files/random.nix | 113 ++++++++++++ .../hadrian/cabal-files/shake.nix | 132 ++++++++++++++ .../hadrian/cabal-files/splitmix.nix | 139 +++++++++++++++ .../cabal-files/unordered-containers.nix | 78 +++++++++ .../hadrian/cabal-files/utf8-string.nix | 51 ++++++ .../ghc964/hadrian-ghc98/hadrian/default.nix | 154 ++++++++++++++++ 40 files changed, 3283 insertions(+) create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/clock.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/extra.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/filepattern.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/hashable.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/heaps.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-flot.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/primitive.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/random.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/shake.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/splitmix.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix create mode 100644 materialized/ghc964/hadrian-ghc96/hadrian/default.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/clock.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/extra.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/filepattern.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/hashable.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/heaps.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-flot.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/primitive.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/random.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/shake.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/splitmix.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix create mode 100644 materialized/ghc964/hadrian-ghc98/hadrian/default.nix diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix b/materialized/ghc964/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix new file mode 100644 index 0000000000..ade1f3d512 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix @@ -0,0 +1,162 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + { + flags = { threaded = true; selftest = true; }; + package = { + specVersion = "1.18"; + identifier = { name = "hadrian"; version = "0.1.0.0"; }; + license = "BSD-3-Clause"; + copyright = "Andrey Mokhov 2014-2017"; + maintainer = "Andrey Mokhov , github: @snowleopard"; + author = "Andrey Mokhov , github: @snowleopard"; + homepage = ""; + url = ""; + synopsis = "GHC build system"; + description = ""; + buildType = "Simple"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = [ "LICENSE" ]; + dataDir = "."; + dataFiles = []; + extraSrcFiles = []; + extraTmpFiles = []; + extraDocFiles = [ "README.md" ]; + }; + components = { + exes = { + "hadrian" = { + depends = [ + (hsPkgs."Cabal" or (errorHandler.buildDepError "Cabal")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + (hsPkgs."shake" or (errorHandler.buildDepError "shake")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ (pkgs.lib).optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + buildable = true; + 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/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" + "Rules" + "Rules/BinaryDist" + "Rules/CabalReinstall" + "Rules/Clean" + "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/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" + ] ++ (pkgs.lib).optional (flags.selftest) "Rules/Selftest"; + hsSourceDirs = [ "." "src" ]; + mainPath = ([ + "Main.hs" + ] ++ (pkgs.lib).optional (flags.threaded) "") ++ (pkgs.lib).optional (flags.selftest) ""; + }; + }; + }; + } // rec { src = (pkgs.lib).mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix new file mode 100644 index 0000000000..3993fc7083 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix @@ -0,0 +1,55 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.22"; + identifier = { name = "Cabal-syntax"; version = "3.8.1.0"; }; + license = "BSD-3-Clause"; + copyright = "2003-2022, Cabal Development Team (see AUTHORS file)"; + maintainer = "cabal-devel@haskell.org"; + author = "Cabal Development Team "; + homepage = "http://www.haskell.org/cabal/"; + url = ""; + synopsis = "A library for working with .cabal files"; + description = "This library provides tools for reading and manipulating the .cabal file\nformat."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."array" or (errorHandler.buildDepError "array")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + (hsPkgs."pretty" or (errorHandler.buildDepError "pretty")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ] ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); + buildable = true; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/Cabal-syntax-3.8.1.0.tar.gz"; + sha256 = "07e8ddb19fe01781485f1522b6afc22aba680b0ab28ebe6bbfb84a2dd698ce0f"; + }); + }) // { + package-description-override = "cabal-version: 1.22\r\nname: Cabal-syntax\r\nversion: 3.8.1.0\r\nx-revision: 3\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A library for working with .cabal files\r\ndescription:\r\n This library provides tools for reading and manipulating the .cabal file\r\n format.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal-syntax\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.9 && < 5,\r\n binary >= 0.7 && < 0.9,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n mtl >= 2.1 && < 2.4,\r\n parsec >= 3.1.13.0 && < 3.2,\r\n pretty >= 1.1.1 && < 1.2,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n time >= 1.4.0.1 && < 1.13,\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7)\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc < 8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack\r\n Distribution.CabalSpecVersion\r\n Distribution.Compat.Binary\r\n Distribution.Compat.CharParsing\r\n Distribution.Compat.DList\r\n Distribution.Compat.Exception\r\n Distribution.Compat.Graph\r\n Distribution.Compat.Lens\r\n Distribution.Compat.MonadFail\r\n Distribution.Compat.Newtype\r\n Distribution.Compat.NonEmptySet\r\n Distribution.Compat.Parsing\r\n Distribution.Compat.Prelude\r\n Distribution.Compat.Semigroup\r\n Distribution.Compat.Typeable\r\n Distribution.Compiler\r\n Distribution.FieldGrammar\r\n Distribution.FieldGrammar.Class\r\n Distribution.FieldGrammar.FieldDescrs\r\n Distribution.FieldGrammar.Newtypes\r\n Distribution.FieldGrammar.Parsec\r\n Distribution.FieldGrammar.Pretty\r\n Distribution.Fields\r\n Distribution.Fields.ConfVar\r\n Distribution.Fields.Field\r\n Distribution.Fields.Lexer\r\n Distribution.Fields.LexerMonad\r\n Distribution.Fields.ParseResult\r\n Distribution.Fields.Parser\r\n Distribution.Fields.Pretty\r\n Distribution.InstalledPackageInfo\r\n Distribution.License\r\n Distribution.ModuleName\r\n Distribution.Package\r\n Distribution.PackageDescription\r\n Distribution.PackageDescription.Configuration\r\n Distribution.PackageDescription.FieldGrammar\r\n Distribution.PackageDescription.Parsec\r\n Distribution.PackageDescription.PrettyPrint\r\n Distribution.PackageDescription.Quirks\r\n Distribution.PackageDescription.Utils\r\n Distribution.Parsec\r\n Distribution.Parsec.Error\r\n Distribution.Parsec.FieldLineStream\r\n Distribution.Parsec.Position\r\n Distribution.Parsec.Warning\r\n Distribution.Pretty\r\n Distribution.SPDX\r\n Distribution.SPDX.License\r\n Distribution.SPDX.LicenseExceptionId\r\n Distribution.SPDX.LicenseExpression\r\n Distribution.SPDX.LicenseId\r\n Distribution.SPDX.LicenseListVersion\r\n Distribution.SPDX.LicenseReference\r\n Distribution.System\r\n Distribution.Text\r\n Distribution.Types.AbiDependency\r\n Distribution.Types.AbiHash\r\n Distribution.Types.Benchmark\r\n Distribution.Types.Benchmark.Lens\r\n Distribution.Types.BenchmarkInterface\r\n Distribution.Types.BenchmarkType\r\n Distribution.Types.BuildInfo\r\n Distribution.Types.BuildInfo.Lens\r\n Distribution.Types.BuildType\r\n Distribution.Types.Component\r\n Distribution.Types.ComponentId\r\n Distribution.Types.ComponentName\r\n Distribution.Types.ComponentRequestedSpec\r\n Distribution.Types.CondTree\r\n Distribution.Types.Condition\r\n Distribution.Types.ConfVar\r\n Distribution.Types.Dependency\r\n Distribution.Types.DependencyMap\r\n Distribution.Types.ExeDependency\r\n Distribution.Types.Executable\r\n Distribution.Types.Executable.Lens\r\n Distribution.Types.ExecutableScope\r\n Distribution.Types.ExposedModule\r\n Distribution.Types.Flag\r\n Distribution.Types.ForeignLib\r\n Distribution.Types.ForeignLib.Lens\r\n Distribution.Types.ForeignLibOption\r\n Distribution.Types.ForeignLibType\r\n Distribution.Types.GenericPackageDescription\r\n Distribution.Types.GenericPackageDescription.Lens\r\n Distribution.Types.HookedBuildInfo\r\n Distribution.Types.IncludeRenaming\r\n Distribution.Types.InstalledPackageInfo\r\n Distribution.Types.InstalledPackageInfo.Lens\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar\r\n Distribution.Types.LegacyExeDependency\r\n Distribution.Types.Lens\r\n Distribution.Types.Library\r\n Distribution.Types.Library.Lens\r\n Distribution.Types.LibraryName\r\n Distribution.Types.LibraryVisibility\r\n Distribution.Types.Mixin\r\n Distribution.Types.Module\r\n Distribution.Types.ModuleReexport\r\n Distribution.Types.ModuleRenaming\r\n Distribution.Types.MungedPackageId\r\n Distribution.Types.MungedPackageName\r\n Distribution.Types.PackageDescription\r\n Distribution.Types.PackageDescription.Lens\r\n Distribution.Types.PackageId\r\n Distribution.Types.PackageId.Lens\r\n Distribution.Types.PackageName\r\n Distribution.Types.PackageVersionConstraint\r\n Distribution.Types.PkgconfigDependency\r\n Distribution.Types.PkgconfigName\r\n Distribution.Types.PkgconfigVersion\r\n Distribution.Types.PkgconfigVersionRange\r\n Distribution.Types.SetupBuildInfo\r\n Distribution.Types.SetupBuildInfo.Lens\r\n Distribution.Types.SourceRepo\r\n Distribution.Types.SourceRepo.Lens\r\n Distribution.Types.TestSuite\r\n Distribution.Types.TestSuite.Lens\r\n Distribution.Types.TestSuiteInterface\r\n Distribution.Types.TestType\r\n Distribution.Types.UnitId\r\n Distribution.Types.UnqualComponentName\r\n Distribution.Types.Version\r\n Distribution.Types.VersionInterval\r\n Distribution.Types.VersionInterval.Legacy\r\n Distribution.Types.VersionRange\r\n Distribution.Types.VersionRange.Internal\r\n Distribution.Utils.Base62\r\n Distribution.Utils.Generic\r\n Distribution.Utils.MD5\r\n Distribution.Utils.Path\r\n Distribution.Utils.ShortText\r\n Distribution.Utils.String\r\n Distribution.Utils.Structured\r\n Distribution.Version\r\n Language.Haskell.Extension\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal.nix new file mode 100644 index 0000000000..22899ece21 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal.nix @@ -0,0 +1,56 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.22"; + identifier = { name = "Cabal"; version = "3.8.1.0"; }; + license = "BSD-3-Clause"; + copyright = "2003-2022, Cabal Development Team (see AUTHORS file)"; + maintainer = "cabal-devel@haskell.org"; + author = "Cabal Development Team "; + homepage = "http://www.haskell.org/cabal/"; + url = ""; + synopsis = "A framework for packaging Haskell software"; + description = "The Haskell Common Architecture for Building Applications and\nLibraries: a framework defining a common interface for authors to more\neasily build their Haskell applications in a portable way.\n\nThe Haskell Cabal is part of a larger infrastructure for distributing,\norganizing, and cataloging Haskell libraries and tools."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ([ + (hsPkgs."Cabal-syntax" or (errorHandler.buildDepError "Cabal-syntax")) + (hsPkgs."array" or (errorHandler.buildDepError "array")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."pretty" or (errorHandler.buildDepError "pretty")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); + buildable = true; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/Cabal-3.8.1.0.tar.gz"; + sha256 = "7464cbe6c2f3d7e5d0232023a1a7330621f8b24853cb259fc89a2af85b736608"; + }); + }) // { + package-description-override = "cabal-version: 1.22\r\nname: Cabal\r\nversion: 3.8.1.0\r\nx-revision: 2\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A framework for packaging Haskell software\r\ndescription:\r\n The Haskell Common Architecture for Building Applications and\r\n Libraries: a framework defining a common interface for authors to more\r\n easily build their Haskell applications in a portable way.\r\n .\r\n The Haskell Cabal is part of a larger infrastructure for distributing,\r\n organizing, and cataloging Haskell libraries and tools.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n-- If we use a new Cabal feature, this needs to be changed to Custom so\r\n-- we can bootstrap.\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n Cabal-syntax >= 3.8 && < 3.9,\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.6 && < 5,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n pretty >= 1.1.1 && < 1.2,\r\n process >= 1.2.1.0 && < 1.7,\r\n time >= 1.4.0.1 && < 1.13\r\n\r\n -- PR #8802: moved conditional process lower bound to cabal-install package\r\n if impl(ghc >=8.2)\r\n build-depends: process >= 1.2.1.0\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc <8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack.Configure\r\n Distribution.Backpack.ComponentsGraph\r\n Distribution.Backpack.ConfiguredComponent\r\n Distribution.Backpack.DescribeUnitId\r\n Distribution.Backpack.FullUnitId\r\n Distribution.Backpack.LinkedComponent\r\n Distribution.Backpack.ModSubst\r\n Distribution.Backpack.ModuleShape\r\n Distribution.Backpack.PreModuleShape\r\n Distribution.Utils.IOData\r\n Distribution.Utils.LogProgress\r\n Distribution.Utils.MapAccum\r\n Distribution.Compat.CreatePipe\r\n Distribution.Compat.Directory\r\n Distribution.Compat.Environment\r\n Distribution.Compat.FilePath\r\n Distribution.Compat.Internal.TempFile\r\n Distribution.Compat.ResponseFile\r\n Distribution.Compat.Prelude.Internal\r\n Distribution.Compat.Process\r\n Distribution.Compat.Stack\r\n Distribution.Compat.Time\r\n Distribution.Make\r\n Distribution.PackageDescription.Check\r\n Distribution.ReadE\r\n Distribution.Simple\r\n Distribution.Simple.Bench\r\n Distribution.Simple.Build\r\n Distribution.Simple.Build.Macros\r\n Distribution.Simple.Build.PathsModule\r\n Distribution.Simple.BuildPaths\r\n Distribution.Simple.BuildTarget\r\n Distribution.Simple.BuildToolDepends\r\n Distribution.Simple.CCompiler\r\n Distribution.Simple.Command\r\n Distribution.Simple.Compiler\r\n Distribution.Simple.Configure\r\n Distribution.Simple.Flag\r\n Distribution.Simple.GHC\r\n Distribution.Simple.GHCJS\r\n Distribution.Simple.Haddock\r\n Distribution.Simple.Glob\r\n Distribution.Simple.HaskellSuite\r\n Distribution.Simple.Hpc\r\n Distribution.Simple.Install\r\n Distribution.Simple.InstallDirs\r\n Distribution.Simple.InstallDirs.Internal\r\n Distribution.Simple.LocalBuildInfo\r\n Distribution.Simple.PackageDescription\r\n Distribution.Simple.PackageIndex\r\n Distribution.Simple.PreProcess\r\n Distribution.Simple.PreProcess.Unlit\r\n Distribution.Simple.Program\r\n Distribution.Simple.Program.Ar\r\n Distribution.Simple.Program.Builtin\r\n Distribution.Simple.Program.Db\r\n Distribution.Simple.Program.Find\r\n Distribution.Simple.Program.GHC\r\n Distribution.Simple.Program.HcPkg\r\n Distribution.Simple.Program.Hpc\r\n Distribution.Simple.Program.Internal\r\n Distribution.Simple.Program.Ld\r\n Distribution.Simple.Program.ResponseFile\r\n Distribution.Simple.Program.Run\r\n Distribution.Simple.Program.Script\r\n Distribution.Simple.Program.Strip\r\n Distribution.Simple.Program.Types\r\n Distribution.Simple.Register\r\n Distribution.Simple.Setup\r\n Distribution.Simple.ShowBuildInfo\r\n Distribution.Simple.SrcDist\r\n Distribution.Simple.Test\r\n Distribution.Simple.Test.ExeV10\r\n Distribution.Simple.Test.LibV09\r\n Distribution.Simple.Test.Log\r\n Distribution.Simple.UHC\r\n Distribution.Simple.UserHooks\r\n Distribution.Simple.Utils\r\n Distribution.TestSuite\r\n Distribution.Types.AnnotatedId\r\n Distribution.Types.ComponentInclude\r\n Distribution.Types.DumpBuildInfo\r\n Distribution.Types.PackageName.Magic\r\n Distribution.Types.ComponentLocalBuildInfo\r\n Distribution.Types.LocalBuildInfo\r\n Distribution.Types.TargetInfo\r\n Distribution.Types.GivenComponent\r\n Distribution.Utils.Json\r\n Distribution.Utils.NubList\r\n Distribution.Utils.Progress\r\n Distribution.Verbosity\r\n Distribution.Verbosity.Internal\r\n\r\n -- We reexport all of Cabal-syntax to aid in compatibility for downstream\r\n -- users. In the future we may opt to deprecate some or all of these exports.\r\n -- See haskell/Cabal#7974.\r\n reexported-modules:\r\n Distribution.Backpack,\r\n Distribution.CabalSpecVersion,\r\n Distribution.Compat.Binary,\r\n Distribution.Compat.CharParsing,\r\n Distribution.Compat.DList,\r\n Distribution.Compat.Exception,\r\n Distribution.Compat.Graph,\r\n Distribution.Compat.Lens,\r\n Distribution.Compat.MonadFail,\r\n Distribution.Compat.Newtype,\r\n Distribution.Compat.NonEmptySet,\r\n Distribution.Compat.Parsing,\r\n Distribution.Compat.Prelude,\r\n Distribution.Compat.Semigroup,\r\n Distribution.Compat.Typeable,\r\n Distribution.Compiler,\r\n Distribution.FieldGrammar,\r\n Distribution.FieldGrammar.Class,\r\n Distribution.FieldGrammar.FieldDescrs,\r\n Distribution.FieldGrammar.Newtypes,\r\n Distribution.FieldGrammar.Parsec,\r\n Distribution.FieldGrammar.Pretty,\r\n Distribution.Fields,\r\n Distribution.Fields.ConfVar,\r\n Distribution.Fields.Field,\r\n Distribution.Fields.Lexer,\r\n Distribution.Fields.LexerMonad,\r\n Distribution.Fields.ParseResult,\r\n Distribution.Fields.Parser,\r\n Distribution.Fields.Pretty,\r\n Distribution.InstalledPackageInfo,\r\n Distribution.License,\r\n Distribution.ModuleName,\r\n Distribution.Package,\r\n Distribution.PackageDescription,\r\n Distribution.PackageDescription.Configuration,\r\n Distribution.PackageDescription.FieldGrammar,\r\n Distribution.PackageDescription.Parsec,\r\n Distribution.PackageDescription.PrettyPrint,\r\n Distribution.PackageDescription.Quirks,\r\n Distribution.PackageDescription.Utils,\r\n Distribution.Parsec,\r\n Distribution.Parsec.Error,\r\n Distribution.Parsec.FieldLineStream,\r\n Distribution.Parsec.Position,\r\n Distribution.Parsec.Warning,\r\n Distribution.Pretty,\r\n Distribution.SPDX,\r\n Distribution.SPDX.License,\r\n Distribution.SPDX.LicenseExceptionId,\r\n Distribution.SPDX.LicenseExpression,\r\n Distribution.SPDX.LicenseId,\r\n Distribution.SPDX.LicenseListVersion,\r\n Distribution.SPDX.LicenseReference,\r\n Distribution.System,\r\n Distribution.Text,\r\n Distribution.Types.AbiDependency,\r\n Distribution.Types.AbiHash,\r\n Distribution.Types.Benchmark,\r\n Distribution.Types.Benchmark.Lens,\r\n Distribution.Types.BenchmarkInterface,\r\n Distribution.Types.BenchmarkType,\r\n Distribution.Types.BuildInfo,\r\n Distribution.Types.BuildInfo.Lens,\r\n Distribution.Types.BuildType,\r\n Distribution.Types.Component,\r\n Distribution.Types.ComponentId,\r\n Distribution.Types.ComponentName,\r\n Distribution.Types.ComponentRequestedSpec,\r\n Distribution.Types.CondTree,\r\n Distribution.Types.Condition,\r\n Distribution.Types.ConfVar,\r\n Distribution.Types.Dependency,\r\n Distribution.Types.DependencyMap,\r\n Distribution.Types.ExeDependency,\r\n Distribution.Types.Executable,\r\n Distribution.Types.Executable.Lens,\r\n Distribution.Types.ExecutableScope,\r\n Distribution.Types.ExposedModule,\r\n Distribution.Types.Flag,\r\n Distribution.Types.ForeignLib,\r\n Distribution.Types.ForeignLib.Lens,\r\n Distribution.Types.ForeignLibOption,\r\n Distribution.Types.ForeignLibType,\r\n Distribution.Types.GenericPackageDescription,\r\n Distribution.Types.GenericPackageDescription.Lens,\r\n Distribution.Types.HookedBuildInfo,\r\n Distribution.Types.IncludeRenaming,\r\n Distribution.Types.InstalledPackageInfo,\r\n Distribution.Types.InstalledPackageInfo.Lens,\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar,\r\n Distribution.Types.LegacyExeDependency,\r\n Distribution.Types.Lens,\r\n Distribution.Types.Library,\r\n Distribution.Types.Library.Lens,\r\n Distribution.Types.LibraryName,\r\n Distribution.Types.LibraryVisibility,\r\n Distribution.Types.Mixin,\r\n Distribution.Types.Module,\r\n Distribution.Types.ModuleReexport,\r\n Distribution.Types.ModuleRenaming,\r\n Distribution.Types.MungedPackageId,\r\n Distribution.Types.MungedPackageName,\r\n Distribution.Types.PackageDescription,\r\n Distribution.Types.PackageDescription.Lens,\r\n Distribution.Types.PackageId,\r\n Distribution.Types.PackageId.Lens,\r\n Distribution.Types.PackageName,\r\n Distribution.Types.PackageVersionConstraint,\r\n Distribution.Types.PkgconfigDependency,\r\n Distribution.Types.PkgconfigName,\r\n Distribution.Types.PkgconfigVersion,\r\n Distribution.Types.PkgconfigVersionRange,\r\n Distribution.Types.SetupBuildInfo,\r\n Distribution.Types.SetupBuildInfo.Lens,\r\n Distribution.Types.SourceRepo,\r\n Distribution.Types.SourceRepo.Lens,\r\n Distribution.Types.TestSuite,\r\n Distribution.Types.TestSuite.Lens,\r\n Distribution.Types.TestSuiteInterface,\r\n Distribution.Types.TestType,\r\n Distribution.Types.UnitId,\r\n Distribution.Types.UnqualComponentName,\r\n Distribution.Types.Version,\r\n Distribution.Types.VersionInterval,\r\n Distribution.Types.VersionInterval.Legacy,\r\n Distribution.Types.VersionRange,\r\n Distribution.Types.VersionRange.Internal,\r\n Distribution.Utils.Base62,\r\n Distribution.Utils.Generic,\r\n Distribution.Utils.MD5,\r\n Distribution.Utils.Path,\r\n Distribution.Utils.ShortText,\r\n Distribution.Utils.String,\r\n Distribution.Utils.Structured,\r\n Distribution.Version,\r\n Language.Haskell.Extension\r\n\r\n -- Parsec parser-related modules\r\n build-depends:\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7),\r\n mtl >= 2.1 && < 2.4,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n parsec >= 3.1.13.0 && < 3.2\r\n\r\n other-modules:\r\n Distribution.Backpack.PreExistingComponent\r\n Distribution.Backpack.ReadyComponent\r\n Distribution.Backpack.MixLink\r\n Distribution.Backpack.ModuleScope\r\n Distribution.Backpack.UnifyM\r\n Distribution.Backpack.Id\r\n Distribution.Utils.UnionFind\r\n Distribution.Compat.Async\r\n Distribution.Compat.CopyFile\r\n Distribution.Compat.GetShortPathName\r\n Distribution.Compat.SnocList\r\n Distribution.GetOpt\r\n Distribution.Lex\r\n Distribution.Simple.Build.Macros.Z\r\n Distribution.Simple.Build.PathsModule.Z\r\n Distribution.Simple.GHC.EnvironmentParser\r\n Distribution.Simple.GHC.Internal\r\n Distribution.Simple.GHC.ImplInfo\r\n Distribution.ZinzaPrelude\r\n Paths_Cabal\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n LambdaCase\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix new file mode 100644 index 0000000000..31390ca93b --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix @@ -0,0 +1,119 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { templatehaskell = true; old-random = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "QuickCheck"; version = "2.14.3"; }; + license = "BSD-3-Clause"; + copyright = "2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone"; + maintainer = "Nick Smallbone "; + author = "Koen Claessen "; + homepage = "https://github.com/nick8325/quickcheck"; + url = ""; + synopsis = "Automatic testing of Haskell programs"; + description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ((((((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + ] ++ [ + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]) ++ (pkgs.lib).optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ (pkgs.lib).optionals (compiler.isGhc && true) [ + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ]) ++ (pkgs.lib).optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ (pkgs.lib).optionals (compiler.isUhc && true) [ + (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) + (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) + ]; + buildable = true; + }; + tests = { + "test-quickcheck" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell then false else true; + }; + "test-quickcheck-gcoarbitrary" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + then false + else true; + }; + "test-quickcheck-generators" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell then false else true; + }; + "test-quickcheck-gshrink" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + then false + else true; + }; + "test-quickcheck-terminal" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + then false + else true; + }; + "test-quickcheck-monadfix" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + then false + else true; + }; + "test-quickcheck-split" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + "test-quickcheck-misc" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + then false + else true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; + sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; + }); + }) // { + package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/clock.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/clock.nix new file mode 100644 index 0000000000..4831499489 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/clock.nix @@ -0,0 +1,59 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { llvm = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "clock"; version = "0.8.4"; }; + license = "BSD-3-Clause"; + copyright = "Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; + maintainer = "Cetin Sert , Elefunc, Inc."; + author = "Cetin Sert , Elefunc, Inc."; + homepage = "https://github.com/corsis/clock"; + url = ""; + synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; + description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + ]; + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; + sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/extra.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/extra.nix new file mode 100644 index 0000000000..450be82c4b --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/extra.nix @@ -0,0 +1,58 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "extra"; version = "1.7.14"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2014-2023"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/extra#readme"; + url = ""; + synopsis = "Extra functions I use."; + description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + tests = { + "extra-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) + ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; + sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/filepattern.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/filepattern.nix new file mode 100644 index 0000000000..13bbd09e88 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/filepattern.nix @@ -0,0 +1,56 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "filepattern"; version = "0.1.3"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2011-2022"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell , Evan Rutledge Borden "; + homepage = "https://github.com/ndmitchell/filepattern#readme"; + url = ""; + synopsis = "File path glob-like matching"; + description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + ]; + buildable = true; + }; + tests = { + "filepattern-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; + sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/hashable.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/hashable.nix new file mode 100644 index 0000000000..09de9076b1 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/hashable.nix @@ -0,0 +1,82 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { integer-gmp = true; random-initial-seed = false; }; + package = { + specVersion = "1.12"; + identifier = { name = "hashable"; version = "1.4.3.0"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = "Milan Straka \nJohan Tibell "; + homepage = "http://github.com/haskell-unordered-containers/hashable"; + url = ""; + synopsis = "A class for types that can be converted to a hash value"; + description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = (([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && (compiler.version).ge "9" + then [ + (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) + ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + else if flags.integer-gmp + then [ + (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) + ] + else [ + (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) + ]); + buildable = true; + }; + tests = { + "hashable-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + "hashable-examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; + sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/heaps.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/heaps.nix new file mode 100644 index 0000000000..dc77aed1f4 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/heaps.nix @@ -0,0 +1,38 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "heaps"; version = "0.4"; }; + license = "BSD-3-Clause"; + copyright = "(c) 2010-2015 Edward A. Kmett"; + maintainer = "Edward A. Kmett "; + author = "Edward A. Kmett"; + homepage = "http://github.com/ekmett/heaps/"; + url = ""; + synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; + description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; + sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; + }); + }) // { + package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix new file mode 100644 index 0000000000..0237404c41 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix @@ -0,0 +1,47 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "js-dgtable"; version = "0.5.2"; }; + license = "MIT"; + copyright = "Neil Mitchell 2019"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-dgtable#readme"; + url = ""; + synopsis = "Obtain minified jquery.dgtable code"; + description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-dgtable-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; + sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; + }); + }) // { + package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-flot.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-flot.nix new file mode 100644 index 0000000000..ba292fc8b2 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-flot.nix @@ -0,0 +1,47 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "js-flot"; version = "0.8.3"; }; + license = "MIT"; + copyright = "Neil Mitchell 2014"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-flot#readme"; + url = ""; + synopsis = "Obtain minified flot code"; + description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-flot-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; + sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix new file mode 100644 index 0000000000..9ecdc931ed --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix @@ -0,0 +1,48 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "js-jquery"; version = "3.3.1"; }; + license = "MIT"; + copyright = "Neil Mitchell 2014-2018"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-jquery#readme"; + url = ""; + synopsis = "Obtain minified jQuery code"; + description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-jquery-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; + sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; + }); + }) // { + package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/primitive.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/primitive.nix new file mode 100644 index 0000000000..1216d7e6c5 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/primitive.nix @@ -0,0 +1,73 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "2.0"; + identifier = { name = "primitive"; version = "0.9.0.0"; }; + license = "BSD-3-Clause"; + copyright = "(c) Roman Leshchinskiy 2009-2012"; + maintainer = "libraries@haskell.org"; + author = "Roman Leshchinskiy "; + homepage = "https://github.com/haskell/primitive"; + url = ""; + synopsis = "Primitive memory-related operations"; + description = "This package provides various primitive memory-related operations."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + buildable = true; + }; + tests = { + "test-qc" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."quickcheck-classes-base" or (errorHandler.buildDepError "quickcheck-classes-base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; + sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; + }); + }) // { + package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/random.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/random.nix new file mode 100644 index 0000000000..fed649a35c --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/random.nix @@ -0,0 +1,113 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "random"; version = "1.2.1.1"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "core-libraries-committee@haskell.org"; + author = ""; + homepage = ""; + url = ""; + synopsis = "Pseudo-random number generation"; + description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + buildable = true; + }; + tests = { + "legacy-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]; + buildable = true; + }; + "doctests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) + ] ++ (pkgs.lib).optionals (compiler.isGhc && (compiler.version).ge "8.2" && (compiler.isGhc && (compiler.version).lt "8.10")) [ + (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "spec" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."smallcheck" or (errorHandler.buildDepError "smallcheck")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + "spec-inspection" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + buildable = true; + }; + }; + benchmarks = { + "legacy-bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) + (hsPkgs."split" or (errorHandler.buildDepError "split")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ]; + buildable = true; + }; + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; + sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/shake.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/shake.nix new file mode 100644 index 0000000000..e7eb5c6647 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/shake.nix @@ -0,0 +1,132 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { portable = false; cloud = false; embed-files = false; }; + package = { + specVersion = "1.18"; + identifier = { name = "shake"; version = "0.19.7"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2011-2022"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://shakebuild.com"; + url = ""; + synopsis = "Build system library, like Make, but more accurate dependencies."; + description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ (pkgs.lib).optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]; + buildable = true; + }; + exes = { + "shake" = { + depends = (((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ (pkgs.lib).optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + }; + tests = { + "shake-test" = { + depends = (((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ (pkgs.lib).optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; + sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/splitmix.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/splitmix.nix new file mode 100644 index 0000000000..81fc69bf5c --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/splitmix.nix @@ -0,0 +1,139 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { optimised-mixer = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "splitmix"; version = "0.1.0.5"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = ""; + homepage = ""; + url = ""; + synopsis = "Fast Splittable PRNG"; + description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ] ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) ((pkgs.lib).optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + buildable = true; + }; + tests = { + "examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat" or (errorHandler.buildDepError "base-compat")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."math-functions" or (errorHandler.buildDepError "math-functions")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + ]; + buildable = true; + }; + "montecarlo-pi" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "montecarlo-pi-32" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-dieharder" = { + depends = [ + (hsPkgs."async" or (errorHandler.buildDepError "async")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "splitmix-testu01" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; + buildable = if !system.isLinux then false else true; + }; + "initialization" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + }; + benchmarks = { + "comparison" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + ]; + buildable = true; + }; + "simple-sum" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "range" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ (pkgs.lib).optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; + sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix new file mode 100644 index 0000000000..43e48286c4 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix @@ -0,0 +1,78 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { debug = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "unordered-containers"; version = "0.2.19.1"; }; + license = "BSD-3-Clause"; + copyright = "2010-2014 Johan Tibell\n2010 Edward Z. Yang"; + maintainer = "simon.jakobi@gmail.com, David.Feuer@gmail.com"; + author = "Johan Tibell"; + homepage = "https://github.com/haskell-unordered-containers/unordered-containers"; + url = ""; + synopsis = "Efficient hashing-based container types"; + description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]; + buildable = true; + }; + tests = { + "unordered-containers-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ChasingBottoms" or (errorHandler.buildDepError "ChasingBottoms")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."hashmap" or (errorHandler.buildDepError "hashmap")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; + sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; + }); + }) // { + package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix new file mode 100644 index 0000000000..ac9bde4057 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix @@ -0,0 +1,51 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "utf8-string"; version = "1.0.2"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "emertens@galois.com"; + author = "Eric Mertens"; + homepage = "https://github.com/glguy/utf8-string/"; + url = ""; + synopsis = "Support for reading and writing UTF8 Strings"; + description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ]; + buildable = true; + }; + tests = { + "unit-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; + sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; + }); + }) // { + package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/default.nix b/materialized/ghc964/hadrian-ghc96/hadrian/default.nix new file mode 100644 index 0000000000..8f84d14f0c --- /dev/null +++ b/materialized/ghc964/hadrian-ghc96/hadrian/default.nix @@ -0,0 +1,148 @@ +{ + pkgs = hackage: + { + packages = { + Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; + bytestring.revision = (((hackage.bytestring)."0.11.5.3").revisions).default; + exceptions.revision = (((hackage.exceptions)."0.10.7").revisions).default; + directory.revision = (((hackage.directory)."1.3.8.1").revisions).default; + filepath.revision = (((hackage.filepath)."1.4.200.1").revisions).default; + mtl.revision = (((hackage.mtl)."2.3.1").revisions).default; + ghc-bignum.revision = (((hackage.ghc-bignum)."1.3").revisions).default; + ghc-prim.revision = (((hackage.ghc-prim)."0.10.0").revisions).default; + parsec.revision = (((hackage.parsec)."3.1.16.1").revisions).default; + js-flot.revision = import ./cabal-files/js-flot.nix; + utf8-string.revision = import ./cabal-files/utf8-string.nix; + Cabal.revision = import ./cabal-files/Cabal.nix; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + containers.revision = (((hackage.containers)."0.6.7").revisions).default; + clock.revision = import ./cabal-files/clock.nix; + clock.flags.llvm = false; + stm.revision = (((hackage.stm)."2.5.1.0").revisions).default; + heaps.revision = import ./cabal-files/heaps.nix; + base.revision = (((hackage.base)."4.18.2.0").revisions).default; + time.revision = (((hackage.time)."1.12.2").revisions).default; + random.revision = import ./cabal-files/random.nix; + primitive.revision = import ./cabal-files/primitive.nix; + deepseq.revision = (((hackage.deepseq)."1.4.8.1").revisions).default; + js-jquery.revision = import ./cabal-files/js-jquery.nix; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; + rts.revision = (((hackage.rts)."1.0.2").revisions).default; + template-haskell.revision = (((hackage.template-haskell)."2.20.0.0").revisions).default; + binary.revision = (((hackage.binary)."0.8.9.1").revisions).default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.portable = false; + shake.flags.cloud = false; + shake.flags.embed-files = false; + process.revision = (((hackage.process)."1.6.17.0").revisions).default; + unix.revision = (((hackage.unix)."2.8.4.0").revisions).default; + transformers.revision = (((hackage.transformers)."0.6.1.0").revisions).default; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + QuickCheck.revision = import ./cabal-files/QuickCheck.nix; + QuickCheck.flags.old-random = false; + QuickCheck.flags.templatehaskell = true; + extra.revision = import ./cabal-files/extra.nix; + text.revision = (((hackage.text)."2.0.2").revisions).default; + array.revision = (((hackage.array)."0.5.6.0").revisions).default; + ghc-boot-th.revision = (((hackage.ghc-boot-th)."9.6.4").revisions).default; + filepattern.revision = import ./cabal-files/filepattern.nix; + pretty.revision = (((hackage.pretty)."1.1.3.6").revisions).default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; + }; + compiler = { + version = "9.6.4"; + nix-name = "ghc964"; + packages = { + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "array" = "0.5.6.0"; + "mtl" = "2.3.1"; + "parsec" = "3.1.16.1"; + "bytestring" = "0.11.5.3"; + "filepath" = "1.4.200.1"; + "stm" = "2.5.1.0"; + "ghc-prim" = "0.10.0"; + "ghc-boot-th" = "9.6.4"; + "base" = "4.18.2.0"; + "time" = "1.12.2"; + "process" = "1.6.17.0"; + "ghc-bignum" = "1.3"; + "directory" = "1.3.8.1"; + "exceptions" = "0.10.7"; + "rts" = "1.0.2"; + "transformers" = "0.6.1.0"; + "template-haskell" = "2.20.0.0"; + "deepseq" = "1.4.8.1"; + "unix" = "2.8.4.0"; + "binary" = "0.8.9.1"; + "containers" = "0.6.7"; + }; + }; + }; + extras = hackage: + { packages = { hadrian = ./.plan.nix/hadrian.nix; }; }; + modules = [ + ({ lib, ... }: + { + packages = { + "hadrian" = { + flags = { + "threaded" = lib.mkOverride 900 true; + "selftest" = lib.mkOverride 900 true; + }; + }; + }; + }) + ({ lib, ... }: + { + packages = { + "shake".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "heaps".components.library.planned = lib.mkOverride 900 true; + "extra".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "utf8-string".components.library.planned = lib.mkOverride 900 true; + "Cabal".components.library.planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "exceptions".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; + "filepattern".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "rts".components.library.planned = lib.mkOverride 900 true; + "unix".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix b/materialized/ghc964/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix new file mode 100644 index 0000000000..9c366cea6d --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix @@ -0,0 +1,165 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + { + flags = { threaded = true; selftest = true; }; + package = { + specVersion = "1.18"; + identifier = { name = "hadrian"; version = "0.1.0.0"; }; + license = "BSD-3-Clause"; + copyright = "Andrey Mokhov 2014-2017"; + maintainer = "Andrey Mokhov , github: @snowleopard"; + author = "Andrey Mokhov , github: @snowleopard"; + homepage = ""; + url = ""; + synopsis = "GHC build system"; + description = ""; + buildType = "Simple"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = [ "LICENSE" ]; + dataDir = "."; + dataFiles = []; + extraSrcFiles = []; + extraTmpFiles = []; + extraDocFiles = [ "README.md" ]; + }; + components = { + exes = { + "hadrian" = { + depends = [ + (hsPkgs."Cabal" or (errorHandler.buildDepError "Cabal")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + (hsPkgs."shake" or (errorHandler.buildDepError "shake")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + ] ++ (pkgs.lib).optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + buildable = true; + 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" + "Rules" + "Rules/BinaryDist" + "Rules/CabalReinstall" + "Rules/Clean" + "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/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" + ] ++ (pkgs.lib).optional (flags.selftest) "Rules/Selftest"; + hsSourceDirs = [ "." "src" ]; + mainPath = ([ + "Main.hs" + ] ++ (pkgs.lib).optional (flags.threaded) "") ++ (pkgs.lib).optional (flags.selftest) ""; + }; + }; + }; + } // rec { src = (pkgs.lib).mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix new file mode 100644 index 0000000000..3993fc7083 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix @@ -0,0 +1,55 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.22"; + identifier = { name = "Cabal-syntax"; version = "3.8.1.0"; }; + license = "BSD-3-Clause"; + copyright = "2003-2022, Cabal Development Team (see AUTHORS file)"; + maintainer = "cabal-devel@haskell.org"; + author = "Cabal Development Team "; + homepage = "http://www.haskell.org/cabal/"; + url = ""; + synopsis = "A library for working with .cabal files"; + description = "This library provides tools for reading and manipulating the .cabal file\nformat."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."array" or (errorHandler.buildDepError "array")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + (hsPkgs."pretty" or (errorHandler.buildDepError "pretty")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ] ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); + buildable = true; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/Cabal-syntax-3.8.1.0.tar.gz"; + sha256 = "07e8ddb19fe01781485f1522b6afc22aba680b0ab28ebe6bbfb84a2dd698ce0f"; + }); + }) // { + package-description-override = "cabal-version: 1.22\r\nname: Cabal-syntax\r\nversion: 3.8.1.0\r\nx-revision: 3\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A library for working with .cabal files\r\ndescription:\r\n This library provides tools for reading and manipulating the .cabal file\r\n format.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal-syntax\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.9 && < 5,\r\n binary >= 0.7 && < 0.9,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n mtl >= 2.1 && < 2.4,\r\n parsec >= 3.1.13.0 && < 3.2,\r\n pretty >= 1.1.1 && < 1.2,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n time >= 1.4.0.1 && < 1.13,\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7)\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc < 8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack\r\n Distribution.CabalSpecVersion\r\n Distribution.Compat.Binary\r\n Distribution.Compat.CharParsing\r\n Distribution.Compat.DList\r\n Distribution.Compat.Exception\r\n Distribution.Compat.Graph\r\n Distribution.Compat.Lens\r\n Distribution.Compat.MonadFail\r\n Distribution.Compat.Newtype\r\n Distribution.Compat.NonEmptySet\r\n Distribution.Compat.Parsing\r\n Distribution.Compat.Prelude\r\n Distribution.Compat.Semigroup\r\n Distribution.Compat.Typeable\r\n Distribution.Compiler\r\n Distribution.FieldGrammar\r\n Distribution.FieldGrammar.Class\r\n Distribution.FieldGrammar.FieldDescrs\r\n Distribution.FieldGrammar.Newtypes\r\n Distribution.FieldGrammar.Parsec\r\n Distribution.FieldGrammar.Pretty\r\n Distribution.Fields\r\n Distribution.Fields.ConfVar\r\n Distribution.Fields.Field\r\n Distribution.Fields.Lexer\r\n Distribution.Fields.LexerMonad\r\n Distribution.Fields.ParseResult\r\n Distribution.Fields.Parser\r\n Distribution.Fields.Pretty\r\n Distribution.InstalledPackageInfo\r\n Distribution.License\r\n Distribution.ModuleName\r\n Distribution.Package\r\n Distribution.PackageDescription\r\n Distribution.PackageDescription.Configuration\r\n Distribution.PackageDescription.FieldGrammar\r\n Distribution.PackageDescription.Parsec\r\n Distribution.PackageDescription.PrettyPrint\r\n Distribution.PackageDescription.Quirks\r\n Distribution.PackageDescription.Utils\r\n Distribution.Parsec\r\n Distribution.Parsec.Error\r\n Distribution.Parsec.FieldLineStream\r\n Distribution.Parsec.Position\r\n Distribution.Parsec.Warning\r\n Distribution.Pretty\r\n Distribution.SPDX\r\n Distribution.SPDX.License\r\n Distribution.SPDX.LicenseExceptionId\r\n Distribution.SPDX.LicenseExpression\r\n Distribution.SPDX.LicenseId\r\n Distribution.SPDX.LicenseListVersion\r\n Distribution.SPDX.LicenseReference\r\n Distribution.System\r\n Distribution.Text\r\n Distribution.Types.AbiDependency\r\n Distribution.Types.AbiHash\r\n Distribution.Types.Benchmark\r\n Distribution.Types.Benchmark.Lens\r\n Distribution.Types.BenchmarkInterface\r\n Distribution.Types.BenchmarkType\r\n Distribution.Types.BuildInfo\r\n Distribution.Types.BuildInfo.Lens\r\n Distribution.Types.BuildType\r\n Distribution.Types.Component\r\n Distribution.Types.ComponentId\r\n Distribution.Types.ComponentName\r\n Distribution.Types.ComponentRequestedSpec\r\n Distribution.Types.CondTree\r\n Distribution.Types.Condition\r\n Distribution.Types.ConfVar\r\n Distribution.Types.Dependency\r\n Distribution.Types.DependencyMap\r\n Distribution.Types.ExeDependency\r\n Distribution.Types.Executable\r\n Distribution.Types.Executable.Lens\r\n Distribution.Types.ExecutableScope\r\n Distribution.Types.ExposedModule\r\n Distribution.Types.Flag\r\n Distribution.Types.ForeignLib\r\n Distribution.Types.ForeignLib.Lens\r\n Distribution.Types.ForeignLibOption\r\n Distribution.Types.ForeignLibType\r\n Distribution.Types.GenericPackageDescription\r\n Distribution.Types.GenericPackageDescription.Lens\r\n Distribution.Types.HookedBuildInfo\r\n Distribution.Types.IncludeRenaming\r\n Distribution.Types.InstalledPackageInfo\r\n Distribution.Types.InstalledPackageInfo.Lens\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar\r\n Distribution.Types.LegacyExeDependency\r\n Distribution.Types.Lens\r\n Distribution.Types.Library\r\n Distribution.Types.Library.Lens\r\n Distribution.Types.LibraryName\r\n Distribution.Types.LibraryVisibility\r\n Distribution.Types.Mixin\r\n Distribution.Types.Module\r\n Distribution.Types.ModuleReexport\r\n Distribution.Types.ModuleRenaming\r\n Distribution.Types.MungedPackageId\r\n Distribution.Types.MungedPackageName\r\n Distribution.Types.PackageDescription\r\n Distribution.Types.PackageDescription.Lens\r\n Distribution.Types.PackageId\r\n Distribution.Types.PackageId.Lens\r\n Distribution.Types.PackageName\r\n Distribution.Types.PackageVersionConstraint\r\n Distribution.Types.PkgconfigDependency\r\n Distribution.Types.PkgconfigName\r\n Distribution.Types.PkgconfigVersion\r\n Distribution.Types.PkgconfigVersionRange\r\n Distribution.Types.SetupBuildInfo\r\n Distribution.Types.SetupBuildInfo.Lens\r\n Distribution.Types.SourceRepo\r\n Distribution.Types.SourceRepo.Lens\r\n Distribution.Types.TestSuite\r\n Distribution.Types.TestSuite.Lens\r\n Distribution.Types.TestSuiteInterface\r\n Distribution.Types.TestType\r\n Distribution.Types.UnitId\r\n Distribution.Types.UnqualComponentName\r\n Distribution.Types.Version\r\n Distribution.Types.VersionInterval\r\n Distribution.Types.VersionInterval.Legacy\r\n Distribution.Types.VersionRange\r\n Distribution.Types.VersionRange.Internal\r\n Distribution.Utils.Base62\r\n Distribution.Utils.Generic\r\n Distribution.Utils.MD5\r\n Distribution.Utils.Path\r\n Distribution.Utils.ShortText\r\n Distribution.Utils.String\r\n Distribution.Utils.Structured\r\n Distribution.Version\r\n Language.Haskell.Extension\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal.nix new file mode 100644 index 0000000000..22899ece21 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal.nix @@ -0,0 +1,56 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.22"; + identifier = { name = "Cabal"; version = "3.8.1.0"; }; + license = "BSD-3-Clause"; + copyright = "2003-2022, Cabal Development Team (see AUTHORS file)"; + maintainer = "cabal-devel@haskell.org"; + author = "Cabal Development Team "; + homepage = "http://www.haskell.org/cabal/"; + url = ""; + synopsis = "A framework for packaging Haskell software"; + description = "The Haskell Common Architecture for Building Applications and\nLibraries: a framework defining a common interface for authors to more\neasily build their Haskell applications in a portable way.\n\nThe Haskell Cabal is part of a larger infrastructure for distributing,\norganizing, and cataloging Haskell libraries and tools."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ([ + (hsPkgs."Cabal-syntax" or (errorHandler.buildDepError "Cabal-syntax")) + (hsPkgs."array" or (errorHandler.buildDepError "array")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."pretty" or (errorHandler.buildDepError "pretty")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); + buildable = true; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/Cabal-3.8.1.0.tar.gz"; + sha256 = "7464cbe6c2f3d7e5d0232023a1a7330621f8b24853cb259fc89a2af85b736608"; + }); + }) // { + package-description-override = "cabal-version: 1.22\r\nname: Cabal\r\nversion: 3.8.1.0\r\nx-revision: 2\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A framework for packaging Haskell software\r\ndescription:\r\n The Haskell Common Architecture for Building Applications and\r\n Libraries: a framework defining a common interface for authors to more\r\n easily build their Haskell applications in a portable way.\r\n .\r\n The Haskell Cabal is part of a larger infrastructure for distributing,\r\n organizing, and cataloging Haskell libraries and tools.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n-- If we use a new Cabal feature, this needs to be changed to Custom so\r\n-- we can bootstrap.\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n Cabal-syntax >= 3.8 && < 3.9,\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.6 && < 5,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n pretty >= 1.1.1 && < 1.2,\r\n process >= 1.2.1.0 && < 1.7,\r\n time >= 1.4.0.1 && < 1.13\r\n\r\n -- PR #8802: moved conditional process lower bound to cabal-install package\r\n if impl(ghc >=8.2)\r\n build-depends: process >= 1.2.1.0\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc <8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack.Configure\r\n Distribution.Backpack.ComponentsGraph\r\n Distribution.Backpack.ConfiguredComponent\r\n Distribution.Backpack.DescribeUnitId\r\n Distribution.Backpack.FullUnitId\r\n Distribution.Backpack.LinkedComponent\r\n Distribution.Backpack.ModSubst\r\n Distribution.Backpack.ModuleShape\r\n Distribution.Backpack.PreModuleShape\r\n Distribution.Utils.IOData\r\n Distribution.Utils.LogProgress\r\n Distribution.Utils.MapAccum\r\n Distribution.Compat.CreatePipe\r\n Distribution.Compat.Directory\r\n Distribution.Compat.Environment\r\n Distribution.Compat.FilePath\r\n Distribution.Compat.Internal.TempFile\r\n Distribution.Compat.ResponseFile\r\n Distribution.Compat.Prelude.Internal\r\n Distribution.Compat.Process\r\n Distribution.Compat.Stack\r\n Distribution.Compat.Time\r\n Distribution.Make\r\n Distribution.PackageDescription.Check\r\n Distribution.ReadE\r\n Distribution.Simple\r\n Distribution.Simple.Bench\r\n Distribution.Simple.Build\r\n Distribution.Simple.Build.Macros\r\n Distribution.Simple.Build.PathsModule\r\n Distribution.Simple.BuildPaths\r\n Distribution.Simple.BuildTarget\r\n Distribution.Simple.BuildToolDepends\r\n Distribution.Simple.CCompiler\r\n Distribution.Simple.Command\r\n Distribution.Simple.Compiler\r\n Distribution.Simple.Configure\r\n Distribution.Simple.Flag\r\n Distribution.Simple.GHC\r\n Distribution.Simple.GHCJS\r\n Distribution.Simple.Haddock\r\n Distribution.Simple.Glob\r\n Distribution.Simple.HaskellSuite\r\n Distribution.Simple.Hpc\r\n Distribution.Simple.Install\r\n Distribution.Simple.InstallDirs\r\n Distribution.Simple.InstallDirs.Internal\r\n Distribution.Simple.LocalBuildInfo\r\n Distribution.Simple.PackageDescription\r\n Distribution.Simple.PackageIndex\r\n Distribution.Simple.PreProcess\r\n Distribution.Simple.PreProcess.Unlit\r\n Distribution.Simple.Program\r\n Distribution.Simple.Program.Ar\r\n Distribution.Simple.Program.Builtin\r\n Distribution.Simple.Program.Db\r\n Distribution.Simple.Program.Find\r\n Distribution.Simple.Program.GHC\r\n Distribution.Simple.Program.HcPkg\r\n Distribution.Simple.Program.Hpc\r\n Distribution.Simple.Program.Internal\r\n Distribution.Simple.Program.Ld\r\n Distribution.Simple.Program.ResponseFile\r\n Distribution.Simple.Program.Run\r\n Distribution.Simple.Program.Script\r\n Distribution.Simple.Program.Strip\r\n Distribution.Simple.Program.Types\r\n Distribution.Simple.Register\r\n Distribution.Simple.Setup\r\n Distribution.Simple.ShowBuildInfo\r\n Distribution.Simple.SrcDist\r\n Distribution.Simple.Test\r\n Distribution.Simple.Test.ExeV10\r\n Distribution.Simple.Test.LibV09\r\n Distribution.Simple.Test.Log\r\n Distribution.Simple.UHC\r\n Distribution.Simple.UserHooks\r\n Distribution.Simple.Utils\r\n Distribution.TestSuite\r\n Distribution.Types.AnnotatedId\r\n Distribution.Types.ComponentInclude\r\n Distribution.Types.DumpBuildInfo\r\n Distribution.Types.PackageName.Magic\r\n Distribution.Types.ComponentLocalBuildInfo\r\n Distribution.Types.LocalBuildInfo\r\n Distribution.Types.TargetInfo\r\n Distribution.Types.GivenComponent\r\n Distribution.Utils.Json\r\n Distribution.Utils.NubList\r\n Distribution.Utils.Progress\r\n Distribution.Verbosity\r\n Distribution.Verbosity.Internal\r\n\r\n -- We reexport all of Cabal-syntax to aid in compatibility for downstream\r\n -- users. In the future we may opt to deprecate some or all of these exports.\r\n -- See haskell/Cabal#7974.\r\n reexported-modules:\r\n Distribution.Backpack,\r\n Distribution.CabalSpecVersion,\r\n Distribution.Compat.Binary,\r\n Distribution.Compat.CharParsing,\r\n Distribution.Compat.DList,\r\n Distribution.Compat.Exception,\r\n Distribution.Compat.Graph,\r\n Distribution.Compat.Lens,\r\n Distribution.Compat.MonadFail,\r\n Distribution.Compat.Newtype,\r\n Distribution.Compat.NonEmptySet,\r\n Distribution.Compat.Parsing,\r\n Distribution.Compat.Prelude,\r\n Distribution.Compat.Semigroup,\r\n Distribution.Compat.Typeable,\r\n Distribution.Compiler,\r\n Distribution.FieldGrammar,\r\n Distribution.FieldGrammar.Class,\r\n Distribution.FieldGrammar.FieldDescrs,\r\n Distribution.FieldGrammar.Newtypes,\r\n Distribution.FieldGrammar.Parsec,\r\n Distribution.FieldGrammar.Pretty,\r\n Distribution.Fields,\r\n Distribution.Fields.ConfVar,\r\n Distribution.Fields.Field,\r\n Distribution.Fields.Lexer,\r\n Distribution.Fields.LexerMonad,\r\n Distribution.Fields.ParseResult,\r\n Distribution.Fields.Parser,\r\n Distribution.Fields.Pretty,\r\n Distribution.InstalledPackageInfo,\r\n Distribution.License,\r\n Distribution.ModuleName,\r\n Distribution.Package,\r\n Distribution.PackageDescription,\r\n Distribution.PackageDescription.Configuration,\r\n Distribution.PackageDescription.FieldGrammar,\r\n Distribution.PackageDescription.Parsec,\r\n Distribution.PackageDescription.PrettyPrint,\r\n Distribution.PackageDescription.Quirks,\r\n Distribution.PackageDescription.Utils,\r\n Distribution.Parsec,\r\n Distribution.Parsec.Error,\r\n Distribution.Parsec.FieldLineStream,\r\n Distribution.Parsec.Position,\r\n Distribution.Parsec.Warning,\r\n Distribution.Pretty,\r\n Distribution.SPDX,\r\n Distribution.SPDX.License,\r\n Distribution.SPDX.LicenseExceptionId,\r\n Distribution.SPDX.LicenseExpression,\r\n Distribution.SPDX.LicenseId,\r\n Distribution.SPDX.LicenseListVersion,\r\n Distribution.SPDX.LicenseReference,\r\n Distribution.System,\r\n Distribution.Text,\r\n Distribution.Types.AbiDependency,\r\n Distribution.Types.AbiHash,\r\n Distribution.Types.Benchmark,\r\n Distribution.Types.Benchmark.Lens,\r\n Distribution.Types.BenchmarkInterface,\r\n Distribution.Types.BenchmarkType,\r\n Distribution.Types.BuildInfo,\r\n Distribution.Types.BuildInfo.Lens,\r\n Distribution.Types.BuildType,\r\n Distribution.Types.Component,\r\n Distribution.Types.ComponentId,\r\n Distribution.Types.ComponentName,\r\n Distribution.Types.ComponentRequestedSpec,\r\n Distribution.Types.CondTree,\r\n Distribution.Types.Condition,\r\n Distribution.Types.ConfVar,\r\n Distribution.Types.Dependency,\r\n Distribution.Types.DependencyMap,\r\n Distribution.Types.ExeDependency,\r\n Distribution.Types.Executable,\r\n Distribution.Types.Executable.Lens,\r\n Distribution.Types.ExecutableScope,\r\n Distribution.Types.ExposedModule,\r\n Distribution.Types.Flag,\r\n Distribution.Types.ForeignLib,\r\n Distribution.Types.ForeignLib.Lens,\r\n Distribution.Types.ForeignLibOption,\r\n Distribution.Types.ForeignLibType,\r\n Distribution.Types.GenericPackageDescription,\r\n Distribution.Types.GenericPackageDescription.Lens,\r\n Distribution.Types.HookedBuildInfo,\r\n Distribution.Types.IncludeRenaming,\r\n Distribution.Types.InstalledPackageInfo,\r\n Distribution.Types.InstalledPackageInfo.Lens,\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar,\r\n Distribution.Types.LegacyExeDependency,\r\n Distribution.Types.Lens,\r\n Distribution.Types.Library,\r\n Distribution.Types.Library.Lens,\r\n Distribution.Types.LibraryName,\r\n Distribution.Types.LibraryVisibility,\r\n Distribution.Types.Mixin,\r\n Distribution.Types.Module,\r\n Distribution.Types.ModuleReexport,\r\n Distribution.Types.ModuleRenaming,\r\n Distribution.Types.MungedPackageId,\r\n Distribution.Types.MungedPackageName,\r\n Distribution.Types.PackageDescription,\r\n Distribution.Types.PackageDescription.Lens,\r\n Distribution.Types.PackageId,\r\n Distribution.Types.PackageId.Lens,\r\n Distribution.Types.PackageName,\r\n Distribution.Types.PackageVersionConstraint,\r\n Distribution.Types.PkgconfigDependency,\r\n Distribution.Types.PkgconfigName,\r\n Distribution.Types.PkgconfigVersion,\r\n Distribution.Types.PkgconfigVersionRange,\r\n Distribution.Types.SetupBuildInfo,\r\n Distribution.Types.SetupBuildInfo.Lens,\r\n Distribution.Types.SourceRepo,\r\n Distribution.Types.SourceRepo.Lens,\r\n Distribution.Types.TestSuite,\r\n Distribution.Types.TestSuite.Lens,\r\n Distribution.Types.TestSuiteInterface,\r\n Distribution.Types.TestType,\r\n Distribution.Types.UnitId,\r\n Distribution.Types.UnqualComponentName,\r\n Distribution.Types.Version,\r\n Distribution.Types.VersionInterval,\r\n Distribution.Types.VersionInterval.Legacy,\r\n Distribution.Types.VersionRange,\r\n Distribution.Types.VersionRange.Internal,\r\n Distribution.Utils.Base62,\r\n Distribution.Utils.Generic,\r\n Distribution.Utils.MD5,\r\n Distribution.Utils.Path,\r\n Distribution.Utils.ShortText,\r\n Distribution.Utils.String,\r\n Distribution.Utils.Structured,\r\n Distribution.Version,\r\n Language.Haskell.Extension\r\n\r\n -- Parsec parser-related modules\r\n build-depends:\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7),\r\n mtl >= 2.1 && < 2.4,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n parsec >= 3.1.13.0 && < 3.2\r\n\r\n other-modules:\r\n Distribution.Backpack.PreExistingComponent\r\n Distribution.Backpack.ReadyComponent\r\n Distribution.Backpack.MixLink\r\n Distribution.Backpack.ModuleScope\r\n Distribution.Backpack.UnifyM\r\n Distribution.Backpack.Id\r\n Distribution.Utils.UnionFind\r\n Distribution.Compat.Async\r\n Distribution.Compat.CopyFile\r\n Distribution.Compat.GetShortPathName\r\n Distribution.Compat.SnocList\r\n Distribution.GetOpt\r\n Distribution.Lex\r\n Distribution.Simple.Build.Macros.Z\r\n Distribution.Simple.Build.PathsModule.Z\r\n Distribution.Simple.GHC.EnvironmentParser\r\n Distribution.Simple.GHC.Internal\r\n Distribution.Simple.GHC.ImplInfo\r\n Distribution.ZinzaPrelude\r\n Paths_Cabal\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n LambdaCase\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix new file mode 100644 index 0000000000..31390ca93b --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix @@ -0,0 +1,119 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { templatehaskell = true; old-random = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "QuickCheck"; version = "2.14.3"; }; + license = "BSD-3-Clause"; + copyright = "2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone"; + maintainer = "Nick Smallbone "; + author = "Koen Claessen "; + homepage = "https://github.com/nick8325/quickcheck"; + url = ""; + synopsis = "Automatic testing of Haskell programs"; + description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ((((((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + ] ++ [ + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]) ++ (pkgs.lib).optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ (pkgs.lib).optionals (compiler.isGhc && true) [ + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ]) ++ (pkgs.lib).optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ (pkgs.lib).optionals (compiler.isUhc && true) [ + (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) + (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) + ]; + buildable = true; + }; + tests = { + "test-quickcheck" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell then false else true; + }; + "test-quickcheck-gcoarbitrary" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + then false + else true; + }; + "test-quickcheck-generators" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell then false else true; + }; + "test-quickcheck-gshrink" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + then false + else true; + }; + "test-quickcheck-terminal" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + then false + else true; + }; + "test-quickcheck-monadfix" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + then false + else true; + }; + "test-quickcheck-split" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + "test-quickcheck-misc" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + then false + else true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; + sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; + }); + }) // { + package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix new file mode 100644 index 0000000000..32303af324 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix @@ -0,0 +1,68 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.12"; + identifier = { name = "base16-bytestring"; version = "1.0.2.0"; }; + license = "BSD-3-Clause"; + copyright = "Copyright 2011 MailRank, Inc.;\nCopyright 2010-2020 Bryan O'Sullivan et al."; + maintainer = "Herbert Valerio Riedel ,\nMikhail Glushenkov ,\nEmily Pillmore "; + author = "Bryan O'Sullivan "; + homepage = "http://github.com/haskell/base16-bytestring"; + url = ""; + synopsis = "RFC 4648-compliant Base16 encodings for ByteStrings"; + description = "This package provides support for encoding and decoding binary data according\nto @base16@ (see also ) for\nstrict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n\nSee the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\nprovides an uniform API providing conversion paths between more binary and textual types."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ]; + buildable = true; + }; + tests = { + "test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/base16-bytestring-1.0.2.0.tar.gz"; + sha256 = "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: base16-bytestring\nversion: 1.0.2.0\nx-revision: 1\nsynopsis: RFC 4648-compliant Base16 encodings for ByteStrings\ndescription:\n This package provides support for encoding and decoding binary data according\n to @base16@ (see also ) for\n strict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n .\n See the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\n provides an uniform API providing conversion paths between more binary and textual types.\n\nhomepage: http://github.com/haskell/base16-bytestring\nbug-reports: http://github.com/haskell/base16-bytestring/issues\nlicense: BSD3\nlicense-file: LICENSE\ncopyright:\n Copyright 2011 MailRank, Inc.;\n Copyright 2010-2020 Bryan O'Sullivan et al.\n\nauthor: Bryan O'Sullivan \nmaintainer:\n Herbert Valerio Riedel ,\n Mikhail Glushenkov ,\n Emily Pillmore \n\ncategory: Data\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.3\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n\nsource-repository head\n type: git\n location: http://github.com/haskell/base16-bytestring\n\nlibrary\n other-modules: Data.ByteString.Base16.Internal\n exposed-modules:\n Data.ByteString.Base16\n Data.ByteString.Base16.Lazy\n\n build-depends:\n base >=4.9 && <5\n , bytestring >=0.9 && <0.13\n\n ghc-options: -Wall -funbox-strict-fields\n default-language: Haskell2010\n\ntest-suite test\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends:\n base\n , base16-bytestring\n , bytestring\n , HUnit\n , QuickCheck\n , test-framework\n , test-framework-hunit\n , test-framework-quickcheck2\n\n default-language: Haskell2010\n\nbenchmark bench\n type: exitcode-stdio-1.0\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n build-depends:\n base >=4 && <5\n , base16-bytestring\n , bytestring\n , criterion\n , deepseq\n\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/clock.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/clock.nix new file mode 100644 index 0000000000..4831499489 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/clock.nix @@ -0,0 +1,59 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { llvm = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "clock"; version = "0.8.4"; }; + license = "BSD-3-Clause"; + copyright = "Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; + maintainer = "Cetin Sert , Elefunc, Inc."; + author = "Cetin Sert , Elefunc, Inc."; + homepage = "https://github.com/corsis/clock"; + url = ""; + synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; + description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + ]; + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; + sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix new file mode 100644 index 0000000000..e764a8cdfa --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix @@ -0,0 +1,84 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { exe = false; use-cbits = true; }; + package = { + specVersion = "2.0"; + identifier = { name = "cryptohash-sha256"; version = "0.11.102.1"; }; + license = "BSD-3-Clause"; + copyright = "Vincent Hanquez, Herbert Valerio Riedel"; + maintainer = "Herbert Valerio Riedel "; + author = ""; + homepage = "https://github.com/hvr/cryptohash-sha256"; + url = ""; + synopsis = "Fast, pure and practical SHA-256 implementation"; + description = "A practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n\n\nAdditionally, this package provides support for\n\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n\n=== Relationship to the @cryptohash@ package and its API\n\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + ] ++ (if flags.use-cbits + then [ + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ] + else [ + (hsPkgs."cryptohash-sha256-pure" or (errorHandler.buildDepError "cryptohash-sha256-pure")) + ]); + buildable = true; + }; + exes = { + "sha256sum" = { + depends = (pkgs.lib).optionals (flags.exe) [ + (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + ]; + buildable = if flags.exe then true else false; + }; + }; + tests = { + "test-sha256" = { + depends = [ + (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + (hsPkgs."SHA" or (errorHandler.buildDepError "SHA")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench-sha256" = { + depends = [ + (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) + (hsPkgs."SHA" or (errorHandler.buildDepError "SHA")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/cryptohash-sha256-0.11.102.1.tar.gz"; + sha256 = "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6"; + }); + }) // { + package-description-override = "cabal-version: 2.0\nname: cryptohash-sha256\nversion: 0.11.102.1\nx-revision: 3\n\nsynopsis: Fast, pure and practical SHA-256 implementation\ndescription: {\n\nA practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n.\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n.\n\n.\nAdditionally, this package provides support for\n.\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n.\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n.\n=== Relationship to the @cryptohash@ package and its API\n.\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n.\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).\n\n}\n\nlicense: BSD3\nlicense-file: LICENSE\ncopyright: Vincent Hanquez, Herbert Valerio Riedel\nmaintainer: Herbert Valerio Riedel \nhomepage: https://github.com/hvr/cryptohash-sha256\nbug-reports: https://github.com/hvr/cryptohash-sha256/issues\ncategory: Data, Cryptography\nbuild-type: Simple\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.2\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n\nextra-source-files: cbits/hs_sha256.h\n changelog.md\n\nsource-repository head\n type: git\n location: https://github.com/hvr/cryptohash-sha256.git\n\nflag exe\n description: Enable building @sha256sum@ executable\n manual: True\n default: False\n\nflag use-cbits\n description: Use fast optimized C routines via FFI; if flag is disabled falls back to non-FFI Haskell optimized implementation.\n manual: True\n default: True\n\nlibrary\n default-language: Haskell2010\n\n ghc-options: -Wall\n\n build-depends: base >= 4.5 && < 4.20\n\n exposed-modules: Crypto.Hash.SHA256\n\n if flag(use-cbits)\n build-depends: bytestring ^>= 0.9.2.0 || ^>= 0.10.0.0 || ^>= 0.11.0.0 || ^>= 0.12.0.2\n\n other-extensions: BangPatterns\n CApiFFI\n CPP\n Trustworthy\n Unsafe\n\n hs-source-dirs: src\n other-modules: Crypto.Hash.SHA256.FFI\n Compat\n include-dirs: cbits\n else\n hs-source-dirs: src-pure\n build-depends: cryptohash-sha256-pure ^>= 0.1.0\n\nexecutable sha256sum\n default-language: Haskell2010\n hs-source-dirs: src-exe\n main-is: sha256sum.hs\n ghc-options: -Wall -threaded\n if flag(exe)\n other-extensions: RecordWildCards\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n else\n buildable: False\n\ntest-suite test-sha256\n default-language: Haskell2010\n other-extensions: OverloadedStrings\n type: exitcode-stdio-1.0\n hs-source-dirs: src-tests\n main-is: test-sha256.hs\n ghc-options: -Wall -threaded\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n , SHA ^>= 1.6.4\n , tasty ^>= 1.4 || ^>= 1.5\n , tasty-quickcheck ^>= 0.10\n , tasty-hunit ^>= 0.10\n\nbenchmark bench-sha256\n default-language: Haskell2010\n other-extensions: BangPatterns\n type: exitcode-stdio-1.0\n main-is: bench-sha256.hs\n hs-source-dirs: src-bench\n build-depends: cryptohash-sha256\n , SHA ^>= 1.6.4\n , base\n , bytestring\n , criterion ^>= 1.5 || ^>=1.6\n\n -- not yet public\n -- build-depends: cryptohash-sha256-pure ^>= 0.1.0\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/extra.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/extra.nix new file mode 100644 index 0000000000..450be82c4b --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/extra.nix @@ -0,0 +1,58 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "extra"; version = "1.7.14"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2014-2023"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/extra#readme"; + url = ""; + synopsis = "Extra functions I use."; + description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + tests = { + "extra-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) + ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; + sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/filepattern.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/filepattern.nix new file mode 100644 index 0000000000..13bbd09e88 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/filepattern.nix @@ -0,0 +1,56 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "filepattern"; version = "0.1.3"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2011-2022"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell , Evan Rutledge Borden "; + homepage = "https://github.com/ndmitchell/filepattern#readme"; + url = ""; + synopsis = "File path glob-like matching"; + description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + ]; + buildable = true; + }; + tests = { + "filepattern-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; + sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/hashable.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/hashable.nix new file mode 100644 index 0000000000..09de9076b1 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/hashable.nix @@ -0,0 +1,82 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { integer-gmp = true; random-initial-seed = false; }; + package = { + specVersion = "1.12"; + identifier = { name = "hashable"; version = "1.4.3.0"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = "Milan Straka \nJohan Tibell "; + homepage = "http://github.com/haskell-unordered-containers/hashable"; + url = ""; + synopsis = "A class for types that can be converted to a hash value"; + description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = (([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && (compiler.version).ge "9" + then [ + (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) + ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + else if flags.integer-gmp + then [ + (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) + ] + else [ + (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) + ]); + buildable = true; + }; + tests = { + "hashable-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + "hashable-examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; + sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/heaps.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/heaps.nix new file mode 100644 index 0000000000..dc77aed1f4 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/heaps.nix @@ -0,0 +1,38 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "heaps"; version = "0.4"; }; + license = "BSD-3-Clause"; + copyright = "(c) 2010-2015 Edward A. Kmett"; + maintainer = "Edward A. Kmett "; + author = "Edward A. Kmett"; + homepage = "http://github.com/ekmett/heaps/"; + url = ""; + synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; + description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; + sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; + }); + }) // { + package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix new file mode 100644 index 0000000000..0237404c41 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix @@ -0,0 +1,47 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "js-dgtable"; version = "0.5.2"; }; + license = "MIT"; + copyright = "Neil Mitchell 2019"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-dgtable#readme"; + url = ""; + synopsis = "Obtain minified jquery.dgtable code"; + description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-dgtable-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; + sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; + }); + }) // { + package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-flot.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-flot.nix new file mode 100644 index 0000000000..ba292fc8b2 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-flot.nix @@ -0,0 +1,47 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "js-flot"; version = "0.8.3"; }; + license = "MIT"; + copyright = "Neil Mitchell 2014"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-flot#readme"; + url = ""; + synopsis = "Obtain minified flot code"; + description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-flot-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; + sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix new file mode 100644 index 0000000000..9ecdc931ed --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix @@ -0,0 +1,48 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "js-jquery"; version = "3.3.1"; }; + license = "MIT"; + copyright = "Neil Mitchell 2014-2018"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-jquery#readme"; + url = ""; + synopsis = "Obtain minified jQuery code"; + description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-jquery-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; + sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; + }); + }) // { + package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/primitive.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/primitive.nix new file mode 100644 index 0000000000..1216d7e6c5 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/primitive.nix @@ -0,0 +1,73 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "2.0"; + identifier = { name = "primitive"; version = "0.9.0.0"; }; + license = "BSD-3-Clause"; + copyright = "(c) Roman Leshchinskiy 2009-2012"; + maintainer = "libraries@haskell.org"; + author = "Roman Leshchinskiy "; + homepage = "https://github.com/haskell/primitive"; + url = ""; + synopsis = "Primitive memory-related operations"; + description = "This package provides various primitive memory-related operations."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + buildable = true; + }; + tests = { + "test-qc" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."quickcheck-classes-base" or (errorHandler.buildDepError "quickcheck-classes-base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; + sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; + }); + }) // { + package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/random.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/random.nix new file mode 100644 index 0000000000..fed649a35c --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/random.nix @@ -0,0 +1,113 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "random"; version = "1.2.1.1"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "core-libraries-committee@haskell.org"; + author = ""; + homepage = ""; + url = ""; + synopsis = "Pseudo-random number generation"; + description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + buildable = true; + }; + tests = { + "legacy-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]; + buildable = true; + }; + "doctests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) + ] ++ (pkgs.lib).optionals (compiler.isGhc && (compiler.version).ge "8.2" && (compiler.isGhc && (compiler.version).lt "8.10")) [ + (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "spec" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."smallcheck" or (errorHandler.buildDepError "smallcheck")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + "spec-inspection" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + buildable = true; + }; + }; + benchmarks = { + "legacy-bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) + (hsPkgs."split" or (errorHandler.buildDepError "split")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ]; + buildable = true; + }; + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; + sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/shake.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/shake.nix new file mode 100644 index 0000000000..e7eb5c6647 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/shake.nix @@ -0,0 +1,132 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { portable = false; cloud = false; embed-files = false; }; + package = { + specVersion = "1.18"; + identifier = { name = "shake"; version = "0.19.7"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2011-2022"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://shakebuild.com"; + url = ""; + synopsis = "Build system library, like Make, but more accurate dependencies."; + description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ (pkgs.lib).optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]; + buildable = true; + }; + exes = { + "shake" = { + depends = (((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ (pkgs.lib).optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + }; + tests = { + "shake-test" = { + depends = (((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ (pkgs.lib).optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; + sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/splitmix.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/splitmix.nix new file mode 100644 index 0000000000..81fc69bf5c --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/splitmix.nix @@ -0,0 +1,139 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { optimised-mixer = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "splitmix"; version = "0.1.0.5"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = ""; + homepage = ""; + url = ""; + synopsis = "Fast Splittable PRNG"; + description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ] ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) ((pkgs.lib).optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + buildable = true; + }; + tests = { + "examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat" or (errorHandler.buildDepError "base-compat")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."math-functions" or (errorHandler.buildDepError "math-functions")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + ]; + buildable = true; + }; + "montecarlo-pi" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "montecarlo-pi-32" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-dieharder" = { + depends = [ + (hsPkgs."async" or (errorHandler.buildDepError "async")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "splitmix-testu01" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; + buildable = if !system.isLinux then false else true; + }; + "initialization" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + }; + benchmarks = { + "comparison" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + ]; + buildable = true; + }; + "simple-sum" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "range" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ (pkgs.lib).optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; + sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix new file mode 100644 index 0000000000..43e48286c4 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix @@ -0,0 +1,78 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { debug = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "unordered-containers"; version = "0.2.19.1"; }; + license = "BSD-3-Clause"; + copyright = "2010-2014 Johan Tibell\n2010 Edward Z. Yang"; + maintainer = "simon.jakobi@gmail.com, David.Feuer@gmail.com"; + author = "Johan Tibell"; + homepage = "https://github.com/haskell-unordered-containers/unordered-containers"; + url = ""; + synopsis = "Efficient hashing-based container types"; + description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]; + buildable = true; + }; + tests = { + "unordered-containers-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ChasingBottoms" or (errorHandler.buildDepError "ChasingBottoms")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."hashmap" or (errorHandler.buildDepError "hashmap")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; + sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; + }); + }) // { + package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix new file mode 100644 index 0000000000..ac9bde4057 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix @@ -0,0 +1,51 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "utf8-string"; version = "1.0.2"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "emertens@galois.com"; + author = "Eric Mertens"; + homepage = "https://github.com/glguy/utf8-string/"; + url = ""; + synopsis = "Support for reading and writing UTF8 Strings"; + description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ]; + buildable = true; + }; + tests = { + "unit-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; + sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; + }); + }) // { + package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/default.nix b/materialized/ghc964/hadrian-ghc98/hadrian/default.nix new file mode 100644 index 0000000000..1eab6d9b04 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc98/hadrian/default.nix @@ -0,0 +1,154 @@ +{ + pkgs = hackage: + { + packages = { + Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; + bytestring.revision = (((hackage.bytestring)."0.11.5.3").revisions).default; + exceptions.revision = (((hackage.exceptions)."0.10.7").revisions).default; + directory.revision = (((hackage.directory)."1.3.8.1").revisions).default; + filepath.revision = (((hackage.filepath)."1.4.200.1").revisions).default; + mtl.revision = (((hackage.mtl)."2.3.1").revisions).default; + ghc-bignum.revision = (((hackage.ghc-bignum)."1.3").revisions).default; + ghc-prim.revision = (((hackage.ghc-prim)."0.10.0").revisions).default; + base16-bytestring.revision = import ./cabal-files/base16-bytestring.nix; + parsec.revision = (((hackage.parsec)."3.1.16.1").revisions).default; + js-flot.revision = import ./cabal-files/js-flot.nix; + utf8-string.revision = import ./cabal-files/utf8-string.nix; + Cabal.revision = import ./cabal-files/Cabal.nix; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + containers.revision = (((hackage.containers)."0.6.7").revisions).default; + clock.revision = import ./cabal-files/clock.nix; + clock.flags.llvm = false; + stm.revision = (((hackage.stm)."2.5.1.0").revisions).default; + heaps.revision = import ./cabal-files/heaps.nix; + base.revision = (((hackage.base)."4.18.2.0").revisions).default; + time.revision = (((hackage.time)."1.12.2").revisions).default; + random.revision = import ./cabal-files/random.nix; + primitive.revision = import ./cabal-files/primitive.nix; + deepseq.revision = (((hackage.deepseq)."1.4.8.1").revisions).default; + js-jquery.revision = import ./cabal-files/js-jquery.nix; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; + rts.revision = (((hackage.rts)."1.0.2").revisions).default; + template-haskell.revision = (((hackage.template-haskell)."2.20.0.0").revisions).default; + binary.revision = (((hackage.binary)."0.8.9.1").revisions).default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.portable = false; + shake.flags.cloud = false; + shake.flags.embed-files = false; + process.revision = (((hackage.process)."1.6.17.0").revisions).default; + unix.revision = (((hackage.unix)."2.8.4.0").revisions).default; + transformers.revision = (((hackage.transformers)."0.6.1.0").revisions).default; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + QuickCheck.revision = import ./cabal-files/QuickCheck.nix; + QuickCheck.flags.old-random = false; + QuickCheck.flags.templatehaskell = true; + extra.revision = import ./cabal-files/extra.nix; + text.revision = (((hackage.text)."2.0.2").revisions).default; + array.revision = (((hackage.array)."0.5.6.0").revisions).default; + ghc-boot-th.revision = (((hackage.ghc-boot-th)."9.6.4").revisions).default; + filepattern.revision = import ./cabal-files/filepattern.nix; + pretty.revision = (((hackage.pretty)."1.1.3.6").revisions).default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; + cryptohash-sha256.revision = import ./cabal-files/cryptohash-sha256.nix; + cryptohash-sha256.flags.exe = false; + cryptohash-sha256.flags.use-cbits = true; + }; + compiler = { + version = "9.6.4"; + nix-name = "ghc964"; + packages = { + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "array" = "0.5.6.0"; + "mtl" = "2.3.1"; + "parsec" = "3.1.16.1"; + "bytestring" = "0.11.5.3"; + "filepath" = "1.4.200.1"; + "stm" = "2.5.1.0"; + "ghc-prim" = "0.10.0"; + "ghc-boot-th" = "9.6.4"; + "base" = "4.18.2.0"; + "time" = "1.12.2"; + "process" = "1.6.17.0"; + "ghc-bignum" = "1.3"; + "directory" = "1.3.8.1"; + "exceptions" = "0.10.7"; + "rts" = "1.0.2"; + "transformers" = "0.6.1.0"; + "template-haskell" = "2.20.0.0"; + "deepseq" = "1.4.8.1"; + "unix" = "2.8.4.0"; + "binary" = "0.8.9.1"; + "containers" = "0.6.7"; + }; + }; + }; + extras = hackage: + { packages = { hadrian = ./.plan.nix/hadrian.nix; }; }; + modules = [ + ({ lib, ... }: + { + packages = { + "hadrian" = { + flags = { + "threaded" = lib.mkOverride 900 true; + "selftest" = lib.mkOverride 900 true; + }; + }; + }; + }) + ({ lib, ... }: + { + packages = { + "shake".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "base16-bytestring".components.library.planned = lib.mkOverride 900 true; + "heaps".components.library.planned = lib.mkOverride 900 true; + "extra".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "utf8-string".components.library.planned = lib.mkOverride 900 true; + "Cabal".components.library.planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "cryptohash-sha256".components.library.planned = lib.mkOverride 900 true; + "exceptions".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; + "filepattern".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "rts".components.library.planned = lib.mkOverride 900 true; + "unix".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; + } \ No newline at end of file From 6d2eceade67662a80a908726d3b0c237b2f75c60 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 18:09:59 +1300 Subject: [PATCH 010/170] Remove broken assert --- compiler/ghc/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index ac62e7a1bd..a534738646 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -244,8 +244,6 @@ let then "ghc928" else "ghc962"; in - assert (buildPackages.haskell.compiler ? ${compiler-nix-name} - || throw "Expected pkgs.haskell.compiler.${compiler-nix-name} for building hadrian"); buildPackages.pinned-haskell-nix.tool compiler-nix-name "hadrian" { compilerSelection = p: p.haskell.compiler; index-state = buildPackages.haskell-nix.internalHackageIndexState; From 0ffc1998e9386fc38b81370047fa68af68e872d0 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 18:44:15 +1300 Subject: [PATCH 011/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 9155ad4fd0..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From a4b3ae79863d0371c57015d2073dd47daf150202 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 21:57:24 +1300 Subject: [PATCH 012/170] Fix patch --- overlays/bootstrap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 4b0677547e..76a0cf6157 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -267,7 +267,7 @@ in { ++ final.lib.optional (versionAtLeast "9.6" && versionLessThan "9.6.4" && final.stdenv.targetPlatform.isAarch64) ./patches/ghc/2adc050857a9c1b992040fbfd55fbe65b2851b19.patch ++ final.lib.optional (versionAtLeast "8.10.7" && versionLessThan "9.0" && final.stdenv.targetPlatform.isAarch64 && final.stdenv.targetPlatform.isMusl && final.stdenv.targetPlatform != final.stdenv.hostPlatform) ./patches/ghc/ghc-8.10-aarch64-musl-gettimeofday.patch - ++ until "9.8" ./patches/ghc/docs-sphinx-7.patch + ++ fromUntil "9.0" "9.8" ./patches/ghc/docs-sphinx-7.patch ++ fromUntil "9.8" "9.9" ./patches/ghc/docs-sphinx-7-ghc98.patch ; in ({ From 43709b5fd24ff7100555e712c88e7434b303ac1b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 22:21:03 +1300 Subject: [PATCH 013/170] ifdLevel 0 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..9155ad4fd0 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 130497cad474c7c3591a7a4b184dfb54fd3c19ec Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 7 Feb 2024 23:44:22 +1300 Subject: [PATCH 014/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 9155ad4fd0..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 8da9453c50be36adbbb69ac5e04748de1e210d99 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 8 Feb 2024 17:19:38 +1300 Subject: [PATCH 015/170] ifdLevel 0 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..9155ad4fd0 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From df1f0ea554670861b34de2ca92722a020d8c6a60 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 10 Feb 2024 22:53:24 +1300 Subject: [PATCH 016/170] bump pins (including ghc99) --- flake.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 26d57e0ac4..1ad739377e 100644 --- a/flake.lock +++ b/flake.lock @@ -139,11 +139,11 @@ "ghc99": { "flake": false, "locked": { - "lastModified": 1701580282, - "narHash": "sha256-drA01r3JrXnkKyzI+owMZGxX0JameMzjK0W5jJE/+V4=", + "lastModified": 1707392382, + "narHash": "sha256-tbqsKyUc4fgGRNQ2G8f2PajI9KqfQgsF3AQpSb2pDS8=", "ref": "refs/heads/master", - "rev": "f5eb0f2982e9cf27515e892c4bdf634bcfb28459", - "revCount": 62197, + "rev": "9f987235c8f20df55b9b16c8f9e0232288c9faeb", + "revCount": 62384, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -512,11 +512,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1707169231, - "narHash": "sha256-zbVwA8bBELZB3QHLfmvravpzKt5G8jI3AQIDKI8j68w=", + "lastModified": 1707442183, + "narHash": "sha256-e4mBVnw9lsd+ZHaU5JAaydh6Rk/W97YHTkqVvspW3kk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "447fd4d28bb55d208a7a5a779e9414bd626e549d", + "rev": "9d7a44754fae79c6b0821cbb0407418f79d24cc0", "type": "github" }, "original": { @@ -544,11 +544,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1707205916, - "narHash": "sha256-fmRJilYGlB7VCt3XsdYxrA0u8e/K84O5xYucerUY0iM=", + "lastModified": 1707451808, + "narHash": "sha256-UwDBUNHNRsYKFJzyTMVMTF5qS4xeJlWoeyJf+6vvamU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8cc79aa39bbc6eaedaf286ae655b224c71e02907", + "rev": "442d407992384ed9c0e6d352de75b69079904e4e", "type": "github" }, "original": { From 679f09e37b0779fba62478b7453bc773b95ebb48 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 11 Feb 2024 00:02:01 +1300 Subject: [PATCH 017/170] Fix disabling docs --- compiler/ghc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index a534738646..cd46db1181 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -141,6 +141,7 @@ let CrossCompilePrefix = ${targetPrefix} '' + lib.optionalString isCrossTarget '' Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"} + '' + '' HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO BUILD_SPHINX_PDF = NO From f77b1f7b5e93b45c0df7287797824d5e49327603 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 12 Feb 2024 14:31:24 +1300 Subject: [PATCH 018/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 9155ad4fd0..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From e97780ef0105b5b9994190c3dbb1f2c56c51f0a2 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 12 Feb 2024 22:09:32 +1300 Subject: [PATCH 019/170] Try building ghc 9.2.8 with 9.2.8 --- overlays/bootstrap.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 76a0cf6157..bcd56403c6 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -719,7 +719,9 @@ in { extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc928; }; bootPkgs = bootPkgs // { - ghc = final.buildPackages.buildPackages.haskell-nix.compiler.ghc8107; + ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform + then final.buildPackages.buildPackages.haskell-nix.compiler.ghc928 + else final.buildPackages.buildPackages.haskell.compiler.ghc928; }; inherit sphinx; From 72b5e600938b746f042042819c6f1520ff81dda8 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 12 Feb 2024 22:10:02 +1300 Subject: [PATCH 020/170] ifdLevel 0 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..9155ad4fd0 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From d4be16dfdfac70f5842da39cf80aa9a45469e7ad Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 12 Feb 2024 22:26:14 +1300 Subject: [PATCH 021/170] Try ghc902 to boot native ghc928 --- overlays/bootstrap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index bcd56403c6..bbe71032fc 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -721,7 +721,7 @@ in { bootPkgs = bootPkgs // { ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform then final.buildPackages.buildPackages.haskell-nix.compiler.ghc928 - else final.buildPackages.buildPackages.haskell.compiler.ghc928; + else final.buildPackages.buildPackages.haskell.compiler.ghc902; }; inherit sphinx; From 8d051f4cf64d893541a4b98464efc5f617620ee4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 12 Feb 2024 22:58:11 +1300 Subject: [PATCH 022/170] Try haskell.nix ghc902 to boot native ghc928 --- overlays/bootstrap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index bbe71032fc..9092d101e2 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -721,7 +721,7 @@ in { bootPkgs = bootPkgs // { ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform then final.buildPackages.buildPackages.haskell-nix.compiler.ghc928 - else final.buildPackages.buildPackages.haskell.compiler.ghc902; + else final.buildPackages.buildPackages.haskell-nix.compiler.ghc902; }; inherit sphinx; From 7dd05cb0ac2f7b4f63fcb5656ec1e16989492926 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 14 Feb 2024 18:17:21 +1300 Subject: [PATCH 023/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 9155ad4fd0..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 6eb8d87f81a29d4ac6c8a2d47f4cb374fcafb801 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 14 Feb 2024 20:48:41 +1300 Subject: [PATCH 024/170] Stick with haskell.nix ghc 8.10.7 for building 9.2.8 --- overlays/bootstrap.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 9092d101e2..76a0cf6157 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -719,9 +719,7 @@ in { extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc928; }; bootPkgs = bootPkgs // { - ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform - then final.buildPackages.buildPackages.haskell-nix.compiler.ghc928 - else final.buildPackages.buildPackages.haskell-nix.compiler.ghc902; + ghc = final.buildPackages.buildPackages.haskell-nix.compiler.ghc8107; }; inherit sphinx; From bf74d6101ce3c4f429d923229ab6ecb57575f6eb Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 14 Feb 2024 21:45:24 +1300 Subject: [PATCH 025/170] Bump ghc99 --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 5fcef46dac..8b1b67b164 100644 --- a/flake.lock +++ b/flake.lock @@ -139,11 +139,11 @@ "ghc99": { "flake": false, "locked": { - "lastModified": 1707392382, - "narHash": "sha256-tbqsKyUc4fgGRNQ2G8f2PajI9KqfQgsF3AQpSb2pDS8=", + "lastModified": 1707894839, + "narHash": "sha256-18EZrV9RL1tW1j6U9mijTcZT8C00Ojl+8clIVAQCVSI=", "ref": "refs/heads/master", - "rev": "9f987235c8f20df55b9b16c8f9e0232288c9faeb", - "revCount": 62384, + "rev": "de589554386fc173a9019922851c05bb727e3450", + "revCount": 62421, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" From 2e53c7286f2eef64c9c06e2f06cc758e7420c218 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 14 Feb 2024 23:27:38 +1300 Subject: [PATCH 026/170] Fix hash for linux --- flake.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 8b1b67b164..554ab73f7c 100644 --- a/flake.lock +++ b/flake.lock @@ -140,7 +140,7 @@ "flake": false, "locked": { "lastModified": 1707894839, - "narHash": "sha256-18EZrV9RL1tW1j6U9mijTcZT8C00Ojl+8clIVAQCVSI=", + "narHash": "sha256-UWP6iOMZBYxcoJd9M03GirLAkeQp0n6i+u+hNw4gy5o=", "ref": "refs/heads/master", "rev": "de589554386fc173a9019922851c05bb727e3450", "revCount": 62421, From 2fb4ac3dbbdf936192dfe5918873e5756b542004 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 15 Feb 2024 08:12:47 +1300 Subject: [PATCH 027/170] Use ghc 9.6.4 to build git ghc commits --- overlays/bootstrap.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 76a0cf6157..1be478efef 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1065,8 +1065,9 @@ in { bootPkgs = bootPkgsGhc94 // { ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform - then final.buildPackages.buildPackages.haskell-nix.compiler.ghc963 + then final.buildPackages.buildPackages.haskell-nix.compiler.ghc964 else final.buildPackages.buildPackages.haskell.compiler.ghc981 + or final.buildPackages.buildPackages.haskell.compiler.ghc964 or final.buildPackages.buildPackages.haskell.compiler.ghc963 or final.buildPackages.buildPackages.haskell.compiler.ghc962 or final.buildPackages.buildPackages.haskell.compiler.ghc945 From 44edaa84360dff53535ba74f505a8ab581762a81 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 15 Feb 2024 12:14:08 +1300 Subject: [PATCH 028/170] Disable ghc-iserv-prof for ghc HEAD for now --- compiler/ghc/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index cd46db1181..d3158e5393 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -769,10 +769,17 @@ stdenv.mkDerivation (rec { ${hadrian}/bin/hadrian ${hadrianArgs} stage1:lib:terminfo '' + lib.optionalString (installStage1 && !haskell-nix.haskellLib.isCrossTarget) '' ${hadrian}/bin/hadrian ${hadrianArgs} stage2:exe:iserv - # I don't seem to be able to build _build/stage1/lib/bin/ghc-iserv-prof - # by asking hadrian for this. The issue is likely that the profiling way - # is probably missing from hadrian m( - ${hadrian}/bin/hadrian ${hadrianArgs} _build/stage1/lib/bin/ghc-iserv-prof + ${ + # This work around for building `ghc-iserv-prof` does not work with the current ghc HEAD + lib.optionalString (builtins.compareVersions ghc-version "9.9" >= 0) + + # I don't seem to be able to build _build/stage1/lib/bin/ghc-iserv-prof + # by asking hadrian for this. The issue is likely that the profiling way + # is probably missing from hadrian m( + '' + ${hadrian}/bin/hadrian ${hadrianArgs} _build/stage1/lib/bin/ghc-iserv-prof + '' + } pushd _build/stage1/bin for exe in *; do mv $exe ${targetPrefix}$exe From 4801ceef1a0711ce7347ec6ff16a8b1e8696ed70 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 15 Feb 2024 12:43:43 +1300 Subject: [PATCH 029/170] Fix logic --- compiler/ghc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index d3158e5393..d10afa202b 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -771,7 +771,7 @@ stdenv.mkDerivation (rec { ${hadrian}/bin/hadrian ${hadrianArgs} stage2:exe:iserv ${ # This work around for building `ghc-iserv-prof` does not work with the current ghc HEAD - lib.optionalString (builtins.compareVersions ghc-version "9.9" >= 0) + lib.optionalString (builtins.compareVersions ghc-version "9.9" < 0) # I don't seem to be able to build _build/stage1/lib/bin/ghc-iserv-prof # by asking hadrian for this. The issue is likely that the profiling way From e41ac8737c0684b8877d837b19aa483cca1688bd Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 15 Feb 2024 14:57:29 +1300 Subject: [PATCH 030/170] ifdLevel 2 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..e636156d0d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 2 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 441e22c94e3b8c816eaa25018d57513b83b12c08 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 25 Feb 2024 16:49:31 +1300 Subject: [PATCH 031/170] Bump pins --- ci.nix | 2 +- flake.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ci.nix b/ci.nix index e636156d0d..9155ad4fd0 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 2 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" diff --git a/flake.lock b/flake.lock index 9cdddc2e76..483db84cd9 100644 --- a/flake.lock +++ b/flake.lock @@ -139,11 +139,11 @@ "ghc99": { "flake": false, "locked": { - "lastModified": 1707894839, - "narHash": "sha256-UWP6iOMZBYxcoJd9M03GirLAkeQp0n6i+u+hNw4gy5o=", + "lastModified": 1708819824, + "narHash": "sha256-Axn2VmdUiNCJnul27zi0uBCWpKnDLNHQ2qSiG+X3gfU=", "ref": "refs/heads/master", - "rev": "de589554386fc173a9019922851c05bb727e3450", - "revCount": 62421, + "rev": "294c93a580e85e242d90349ae92fa6a7818002bb", + "revCount": 62485, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -512,11 +512,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1707442183, - "narHash": "sha256-e4mBVnw9lsd+ZHaU5JAaydh6Rk/W97YHTkqVvspW3kk=", + "lastModified": 1708760845, + "narHash": "sha256-xkSxjVuYLQGvteX4CCuC4c5daBwMKIDAvp0Mvvg2spE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9d7a44754fae79c6b0821cbb0407418f79d24cc0", + "rev": "79032939bc8d409bcc16121c4ad694ca862895e4", "type": "github" }, "original": { @@ -544,11 +544,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1707451808, - "narHash": "sha256-UwDBUNHNRsYKFJzyTMVMTF5qS4xeJlWoeyJf+6vvamU=", + "lastModified": 1708751719, + "narHash": "sha256-0uWOKSpXJXmXswOvDM5Vk3blB74apFB6rNGWV5IjoN0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "442d407992384ed9c0e6d352de75b69079904e4e", + "rev": "f63ce824cd2f036216eb5f637dfef31e1a03ee89", "type": "github" }, "original": { From 25bad1a8da372a2ce9da2a4d67f689df8d57c0f9 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 25 Feb 2024 16:50:38 +1300 Subject: [PATCH 032/170] Fix for libsodium 1.0.19 --- test/cabal.project.local | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/cabal.project.local b/test/cabal.project.local index 1c3258d630..c7d9c463ef 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -22,6 +22,12 @@ repository ghcjs-overlay key-threshold: 0 --sha256: sha256-mZT7c+xR5cUTjLdCqOxpprjYL3kr/+9rmumtXvWAQlM= +source-repository-package + type: git + location: https://github.com/hamishmack/hs-libsodium.git + tag: c094f210f3bd34d97204451ea57855a5d17e2086 + --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= + if !impl(ghc>=9.8) && !os(ghcjs) active-repositories: hackage.haskell.org From bac2ac5d39299e4646032ab8890e0a81d647e905 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 25 Feb 2024 18:08:57 +1300 Subject: [PATCH 033/170] Fix hash --- flake.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 483db84cd9..2f9b010f14 100644 --- a/flake.lock +++ b/flake.lock @@ -140,7 +140,7 @@ "flake": false, "locked": { "lastModified": 1708819824, - "narHash": "sha256-Axn2VmdUiNCJnul27zi0uBCWpKnDLNHQ2qSiG+X3gfU=", + "narHash": "sha256-0JpAnmpQnCwyyDFybtgM491c5Wt1AZpaw/32b58e8+c=", "ref": "refs/heads/master", "rev": "294c93a580e85e242d90349ae92fa6a7818002bb", "revCount": 62485, From 47e030dba11dad6f235217bf513b631e2c9b4497 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 25 Feb 2024 18:23:32 +1300 Subject: [PATCH 034/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 9155ad4fd0..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From ec488d8ee723d3d14d0b70de9329eb9afa2ff30b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 00:00:51 +1300 Subject: [PATCH 035/170] ifdLevel 2 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..e636156d0d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 2 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From c48497f5c96a9f461f55e3c42c1afdd4ef80f986 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 00:22:00 +1300 Subject: [PATCH 036/170] ifdLevel 3 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index e636156d0d..1bd233f88d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 2 +{ ifdLevel ? 3 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From ad6263d42cd3e55f22e38ab26e9484a6b3bf25b4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 09:51:47 +1300 Subject: [PATCH 037/170] Bump iserv-proxy --- flake.lock | 20 ++++++++++---------- flake.nix | 4 +--- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 2f9b010f14..34ed4beebf 100644 --- a/flake.lock +++ b/flake.lock @@ -330,18 +330,18 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1691634696, - "narHash": "sha256-MZH2NznKC/gbgBu8NgIibtSUZeJ00HTLJ0PlWKCBHb0=", - "ref": "hkm/remote-iserv", - "rev": "43a979272d9addc29fbffc2e8542c5d96e993d73", - "revCount": 14, - "type": "git", - "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + "lastModified": 1708894040, + "narHash": "sha256-Rv+PajrnuJ6AeyhtqzMN+bcR8z9+aEnrUass+N951CQ=", + "owner": "stable-haskell", + "repo": "iserv-proxy", + "rev": "2f2a318fd8837f8063a0d91f329aeae29055fba9", + "type": "github" }, "original": { - "ref": "hkm/remote-iserv", - "type": "git", - "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + "owner": "stable-haskell", + "ref": "iserv-syms", + "repo": "iserv-proxy", + "type": "github" } }, "lowdown-src": { diff --git a/flake.nix b/flake.nix index 64c9f009fe..87e769e82c 100644 --- a/flake.nix +++ b/flake.nix @@ -76,9 +76,7 @@ flake = false; }; iserv-proxy = { - type = "git"; - url = "https://gitlab.haskell.org/hamishmack/iserv-proxy.git"; - ref = "hkm/remote-iserv"; + url = "github:stable-haskell/iserv-proxy?ref=iserv-syms"; flake = false; }; }; From e7e815d1c6a22e8590e7decb0cf57b7a0743df0a Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Wed, 29 Nov 2023 06:07:15 +0000 Subject: [PATCH 038/170] Let's try using it directly. --- overlays/haskell.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/overlays/haskell.nix b/overlays/haskell.nix index fc3d71ab9a..b1275d6043 100644 --- a/overlays/haskell.nix +++ b/overlays/haskell.nix @@ -1047,18 +1047,9 @@ final: prev: { exes = pkgs: (pkgs.haskell-nix.cabalProject' ({pkgs, ...}: { name = "iserv-proxy"; inherit compiler-nix-name; - src = - # Instead of using `sources.iserv-proxy` pull the pin from - # the flake.lock file and use `pkgs.fetchgit`. - # Unlike `sources.iserv-proxy`, this works even when using: - # --option restrict-eval true - let - pins = (__fromJSON (__readFile ../flake.lock)).nodes; - iservProxyPin = pins.iserv-proxy.locked; - in pkgs.fetchgit { - inherit (iservProxyPin) url rev; - sha256 = iservProxyPin.narHash; - }; + + src = sources.iserv-proxy; + index-state = final.haskell-nix.internalHackageIndexState; modules = [{ config = { From f16c67210d87885fc41eb0ddbe8e0cb0060b3e93 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 17:37:12 +1300 Subject: [PATCH 039/170] Add os-string package for ghc head --- modules/component-driver.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/component-driver.nix b/modules/component-driver.nix index 402b44911d..e4b91411f5 100644 --- a/modules/component-driver.nix +++ b/modules/component-driver.nix @@ -79,6 +79,8 @@ in "stm" "exceptions"] ++ lib.optionals (builtins.compareVersions config.compiler.version "9.8.1" >= 0) [ "semaphore-compat"] + ++ lib.optionals (builtins.compareVersions config.compiler.version "9.9" >= 0) [ + "os-string"] ) ++ lib.optionals (!config.reinstallableLibGhc || __elem config.compiler.nix-name ["ghc865"]) [ "ghc-heap" From 2d10ee144d355598a0c7c02d487afe564e30fdc4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 17:37:41 +1300 Subject: [PATCH 040/170] Fix winePackage.minimal --- overlays/wine.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/overlays/wine.nix b/overlays/wine.nix index af5e7d864e..a4c5cb8462 100644 --- a/overlays/wine.nix +++ b/overlays/wine.nix @@ -6,6 +6,7 @@ _final: prev: { winePackages = prev.winePackages // { minimal = prev.winePackages.minimal.overrideAttrs (oldAttrs: { patches = oldAttrs.patches or [] ++ [ ./patches/wine-add-dll-directory.patch ]; + configureFlags = oldAttrs.configureFlags or [] ++ [ "--without-x" ]; }); }; } From 8fbb35f9bc394313c6f3995c1522f5f9cc6b379c Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 17:38:20 +1300 Subject: [PATCH 041/170] Update hackage-head --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index c7d9c463ef..36394084ec 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -13,7 +13,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-Bkn2Etb0JVmb7tM7jxuIoYLFnSp7acqraEYVq0I5oUM= + --sha256: sha256-O1iYD+4QPpVFz6e3Z03aa5ec1Ih73VWWYm+ZEFvRe7A= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/91f4ce9bea0e7f739b7495647c3f72a308ed1c6f From 10ce7fc66d1aee20ecf20cf15c81f93c623f7ea5 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 17:40:44 +1300 Subject: [PATCH 042/170] Disable plugin test for ghc head --- test/cabal.project.local | 2 ++ test/plugin/default.nix | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 36394084ec..ceb4a3c1a8 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -4,6 +4,8 @@ if impl(ghc>=9.8) -- be very careful to only extend it for absolutely necessary packages -- otherwise we risk running into broken build-plans down the line. allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq +if impl(ghc > 9.9) + allow-newer: *:containers, *:Cabal repository head.hackage.ghc.haskell.org url: https://ghc.gitlab.haskell.org/head.hackage/ diff --git a/test/plugin/default.nix b/test/plugin/default.nix index c5bb06787b..073c4cd2a7 100644 --- a/test/plugin/default.nix +++ b/test/plugin/default.nix @@ -6,6 +6,7 @@ let project = project' { inherit compiler-nix-name evalPackages; src = testSrc "plugin"; + cabalProjectLocal = builtins.readFile ../cabal.project.local; modules = [{ reinstallableLibGhc = builtins.compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.8.1" < 0; }]; @@ -20,7 +21,7 @@ in recurseIntoAttrs { # Not sure why this breaks for ghc 8.10.7 meta.disabled = compiler-nix-name == "ghc8107" - || compiler-nix-name == "ghc9920231203" + || compiler-nix-name == "ghc9920240225" # undefined symbol: hs_atomics_primops_store_load_barrier || stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isGhcjs || stdenv.hostPlatform.isWindows From b14df42a74454562ab31de0181a79f55a225dd56 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 20:20:15 +1300 Subject: [PATCH 043/170] Fix for emscripten in nixpkgs-unstable --- builder/comp-builder.nix | 6 +++--- lib/ghcjs-project.nix | 2 +- overlays/bootstrap.nix | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index 04d9ad73c0..e909511ec8 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -1,4 +1,4 @@ -{ pkgs, stdenv, buildPackages, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, haddockBuilder, ghcForComponent, hsPkgs, compiler, runCommand, libffi, gmp, windows, zlib, ncurses, nodejs, nonReinstallablePkgs }@defaults: +{ pkgs, stdenv, buildPackages, pkgsBuildBuild, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, haddockBuilder, ghcForComponent, hsPkgs, compiler, runCommand, libffi, gmp, windows, zlib, ncurses, nodejs, nonReinstallablePkgs }@defaults: lib.makeOverridable ( let self = { componentId @@ -194,8 +194,8 @@ let ++ lib.optional (!stdenv.hostPlatform.isGhcjs && builtins.compareVersions defaults.ghc.version "9.8" >= 0) "--with-ld=${stdenv.cc.bintools.targetPrefix}ld" ++ lib.optionals (stdenv.hostPlatform.isGhcjs) [ - "--with-gcc=${buildPackages.emscripten}/bin/emcc" - "--with-ld=${buildPackages.emscripten}/bin/emcc" + "--with-gcc=${pkgsBuildBuild.emscripten}/bin/emcc" + "--with-ld=${pkgsBuildBuild.emscripten}/bin/emcc" ] ++ [ # other flags (disableFeature dontStrip "executable-stripping") diff --git a/lib/ghcjs-project.nix b/lib/ghcjs-project.nix index 34660e7212..8dee6c5c0c 100644 --- a/lib/ghcjs-project.nix +++ b/lib/ghcjs-project.nix @@ -74,7 +74,7 @@ let cabal-install ]; - inherit (pkgs.buildPackages) emscriptenupstream emscripten emsdk; + inherit (pkgs.pkgsBuildBuild) emscriptenupstream emscripten emsdk; # Inputs needed to boot the GHCJS compiler bootInputs = with pkgs.buildPackages; [ diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index bf3aae4b68..40be8ca834 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -1138,7 +1138,7 @@ in { extraConfigureFlags = [ "--ghcjs" "--with-ghcjs=${targetPrefix}ghc" "--with-ghcjs-pkg=${targetPrefix}ghc-pkg" - "--with-gcc=${final.buildPackages.emscripten}/bin/emcc" + "--with-gcc=${final.pkgsBuildBuild.emscripten}/bin/emcc" ]; }; # note: we'll use the buildGHCs `hsc2hs`, ghcjss wrapper just horribly breaks in this nix setup. @@ -1172,7 +1172,7 @@ in { extraConfigureFlags = [ "--ghcjs" "--with-ghcjs=${targetPrefix}ghc" "--with-ghcjs-pkg=${targetPrefix}ghc-pkg" - "--with-gcc=${final.buildPackages.emscripten}/bin/emcc" + "--with-gcc=${final.pkgsBuildBuild.emscripten}/bin/emcc" ]; }; # note: we'll use the buildGHCs `hsc2hs`, ghcjss wrapper just horribly breaks in this nix setup. @@ -1206,7 +1206,7 @@ in { extraConfigureFlags = [ "--ghcjs" "--with-ghcjs=${targetPrefix}ghc" "--with-ghcjs-pkg=${targetPrefix}ghc-pkg" - "--with-gcc=${final.buildPackages.emscripten}/bin/emcc" + "--with-gcc=${final.pkgsBuildBuild.emscripten}/bin/emcc" ]; }; # note: we'll use the buildGHCs `hsc2hs`, ghcjss wrapper just horribly breaks in this nix setup. @@ -1240,7 +1240,7 @@ in { extraConfigureFlags = [ "--ghcjs" "--with-ghcjs=${targetPrefix}ghc" "--with-ghcjs-pkg=${targetPrefix}ghc-pkg" - "--with-gcc=${final.buildPackages.emscripten}/bin/emcc" + "--with-gcc=${final.pkgsBuildBuild.emscripten}/bin/emcc" ]; }; # note: we'll use the buildGHCs `hsc2hs`, ghcjss wrapper just horribly breaks in this nix setup. @@ -1274,7 +1274,7 @@ in { extraConfigureFlags = [ "--ghcjs" "--with-ghcjs=${targetPrefix}ghc" "--with-ghcjs-pkg=${targetPrefix}ghc-pkg" - "--with-gcc=${final.buildPackages.emscripten}/bin/emcc" + "--with-gcc=${final.pkgsBuildBuild.emscripten}/bin/emcc" ]; }; # note: we'll use the buildGHCs `hsc2hs`, ghcjss wrapper just horribly breaks in this nix setup. From 4d963ee2738930f2351ccb39c160a2caba564cf0 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 20:33:29 +1300 Subject: [PATCH 044/170] Fix for ghc 9.8.1 --- test/cabal.project.local | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index ceb4a3c1a8..800d5a667a 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -3,9 +3,9 @@ if impl(ghc>=9.8) -- being shipped with a newer compiler. If you extend this -- be very careful to only extend it for absolutely necessary packages -- otherwise we risk running into broken build-plans down the line. - allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq + allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq, *:Cabal if impl(ghc > 9.9) - allow-newer: *:containers, *:Cabal + allow-newer: *:containers repository head.hackage.ghc.haskell.org url: https://ghc.gitlab.haskell.org/head.hackage/ From 87f01b2ffb991ca28d834d7d1cc7fa5bb0ee1715 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 21:27:02 +1300 Subject: [PATCH 045/170] Keep haddock but not sphinx docs --- compiler/ghc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index d10afa202b..a7cfdc3fe0 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -141,8 +141,8 @@ let CrossCompilePrefix = ${targetPrefix} '' + lib.optionalString isCrossTarget '' Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"} - '' + '' HADDOCK_DOCS = NO + '' + '' BUILD_SPHINX_HTML = NO BUILD_SPHINX_PDF = NO '' + lib.optionalString enableRelocatedStaticLibs '' From b8312de35277d68a4d759396ce66bf7616a59229 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 21:27:29 +1300 Subject: [PATCH 046/170] ifdLevel 0 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 1bd233f88d..9155ad4fd0 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 3 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 3382eab0ee42af7a388c1d1b96bcae5063132dcf Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 Feb 2024 21:34:40 +1300 Subject: [PATCH 047/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 9155ad4fd0..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From cca7f1f7fc5829deca26078446e16428ad346ee3 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 27 Feb 2024 13:25:22 +1300 Subject: [PATCH 048/170] Fix for musl --- compiler/ghc/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index a7cfdc3fe0..e297f65ce1 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -141,6 +141,7 @@ let CrossCompilePrefix = ${targetPrefix} '' + lib.optionalString isCrossTarget '' Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"} + '' + lib.optionalString (isCrossTarget || targetPlatform.isMusl) '' HADDOCK_DOCS = NO '' + '' BUILD_SPHINX_HTML = NO @@ -470,7 +471,7 @@ stdenv.mkDerivation (rec { dontAddExtraLibs = true; nativeBuildInputs = [ - perl autoconf automake m4 python3 + perl autoconf automake m4 python3 sphinx ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour ] ++ lib.optional (patches != []) autoreconfHook; From 5a7fa2301f3c281cf1ec217f4df004ac183f8529 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 27 Feb 2024 13:40:34 +1300 Subject: [PATCH 049/170] ifdLevel 2 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..e636156d0d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 2 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 13c0f58eb8e00e1fd2cf957f215b717a53427bf9 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 27 Feb 2024 16:57:49 +1300 Subject: [PATCH 050/170] ifdLevel 0 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index e636156d0d..9155ad4fd0 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 2 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From be176030e0b1c0ca7b6662fe4e0a247ded5c3f54 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 27 Feb 2024 17:01:08 +1300 Subject: [PATCH 051/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 9155ad4fd0..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From dcb0f5e2afa0376fb8efaae2ac886e357385943b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 28 Feb 2024 08:47:56 +1300 Subject: [PATCH 052/170] ifdLevel 2 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..e636156d0d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 2 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 768b2985d688d66c45b27d967f9b3dc1928a61f0 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 28 Feb 2024 17:38:29 +1300 Subject: [PATCH 053/170] ifdLevel 3 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index e636156d0d..1bd233f88d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 2 +{ ifdLevel ? 3 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 9b8207d0ab72c1c0317d8737bbed09def4518262 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 28 Feb 2024 23:00:49 +1300 Subject: [PATCH 054/170] Update hackage head --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 800d5a667a..497c08b7f0 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -15,7 +15,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-O1iYD+4QPpVFz6e3Z03aa5ec1Ih73VWWYm+ZEFvRe7A= + --sha256: sha256-ez/5hpSnuVaiHYGsxsB5T/rwbMpzeAR2XLiWscurcYQ= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/91f4ce9bea0e7f739b7495647c3f72a308ed1c6f From da12e7f59b29ecd32dc9460e178753b1d479e7d7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 29 Feb 2024 10:31:58 +1300 Subject: [PATCH 055/170] Fix for ghc head --- test/cabal.project.local | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cabal.project.local b/test/cabal.project.local index 497c08b7f0..a1e2b4bbe3 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -6,6 +6,7 @@ if impl(ghc>=9.8) allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq, *:Cabal if impl(ghc > 9.9) allow-newer: *:containers + constraints: os-string >=2.0.2 repository head.hackage.ghc.haskell.org url: https://ghc.gitlab.haskell.org/head.hackage/ From 5ce18d02f580b7de4df9d5eceb7feb05b0c54c51 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 29 Feb 2024 14:22:17 +1300 Subject: [PATCH 056/170] Better fix for `os-string` --- modules/configuration-nix.nix | 8 ++++++++ test/cabal.project.local | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/configuration-nix.nix b/modules/configuration-nix.nix index 169118c715..ed0a3767fd 100644 --- a/modules/configuration-nix.nix +++ b/modules/configuration-nix.nix @@ -168,6 +168,14 @@ in { packages.ghci.flags.ghci = true; packages.ghci.flags.internal-interpreter = true; + # These flags are set by hadrian. This would be fine if: + # * Haskell.nix respected `pre-existing` packages in `plan.json` and used the hadrian built version. + # * If `plan.json` included the flag settings used by `pre-existing` packages. + # For now the work around is to set the flags that hadrian does (see hadrian/src/Settings/Packages.hs). + packages.unix.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; }; + packages.directory.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; }; + packages.win32.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; }; + # See https://github.com/Bodigrim/bitvec/pull/61 packages.bitvec.patches = [ (fromUntil "1.1.3.0" "1.1.3.0.1" ../patches/bitvec-gmp-fix.patch) diff --git a/test/cabal.project.local b/test/cabal.project.local index a1e2b4bbe3..497c08b7f0 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -6,7 +6,6 @@ if impl(ghc>=9.8) allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq, *:Cabal if impl(ghc > 9.9) allow-newer: *:containers - constraints: os-string >=2.0.2 repository head.hackage.ghc.haskell.org url: https://ghc.gitlab.haskell.org/head.hackage/ From efb0e300ed275129d437ce5c4992b91a9a028670 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 29 Feb 2024 15:50:58 +1300 Subject: [PATCH 057/170] Workaround for https://github.com/haskell/cabal/issues/5444 --- lib/call-cabal-project-to-nix.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/call-cabal-project-to-nix.nix b/lib/call-cabal-project-to-nix.nix index 4c5a31e88c..4e866da839 100644 --- a/lib/call-cabal-project-to-nix.nix +++ b/lib/call-cabal-project-to-nix.nix @@ -257,12 +257,10 @@ let echo >> ./cabal.project '' + # Add replacement `source-repository-package` blocks pointing to the minimal git repos + # Using `optional-packages:` to work around https://github.com/haskell/cabal/issues/5444 ( pkgs.lib.strings.concatMapStrings (f: '' - echo "source-repository-package" >> ./cabal.project - echo " type: git" >> ./cabal.project - echo " location: file://${f.location}" >> ./cabal.project - echo " subdir: ${builtins.concatStringsSep " " f.subdirs}" >> ./cabal.project - echo " tag: ${f.tag}" >> ./cabal.project + echo "optional-packages:" >> ./cabal.project + echo " ${f.location}/${builtins.concatStringsSep " " f.subdirs}" >> ./cabal.project '') sourceReposEval )); # This will be used to replace refernces to the minimal git repos with just the index From 9e9c0a8d197db64734258959c3683cc9a99c011b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 2 Mar 2024 11:38:30 +1300 Subject: [PATCH 058/170] Conditional source-repository-package support --- lib/cabal-project-parser.nix | 28 ++++++++++----------- lib/call-cabal-project-to-nix.nix | 42 ++++++++++++++++++------------- test/unit.nix | 23 ++++++++++------- 3 files changed, 52 insertions(+), 41 deletions(-) diff --git a/lib/cabal-project-parser.nix b/lib/cabal-project-parser.nix index 25a97b4e4e..4ca7c5401f 100644 --- a/lib/cabal-project-parser.nix +++ b/lib/cabal-project-parser.nix @@ -94,32 +94,32 @@ let # Parse a source-repository-package and return data of `type: git` repositories # See tests/unit.nix for examples of input and output. - parseSourceRepositoryPackageBlock = cabalProjectFileName: sha256map: block: + parseSourceRepositoryPackageBlock = cabalProjectFileName: sha256map: source-repo-override: indentation: block: let - x = span (pkgs.lib.strings.hasPrefix " ") (pkgs.lib.splitString "\n" block); + x = span (pkgs.lib.strings.hasPrefix (indentation + " ")) (pkgs.lib.splitString "\n" block); attrs = parseBlockLines x.fst; + overrideSourceRepo = sourceRepo: (source-repo-override.${sourceRepo.url} or (pkgs.lib.id)) sourceRepo; in if attrs."type" or "" != "git" then { - sourceRepo = []; - otherText = "\nsource-repository-package\n" + block; + followingText = "\n" + indentation + "source-repository-package\n" + block; } else { - sourceRepo = extractSourceRepoPackageData cabalProjectFileName sha256map attrs; - otherText = pkgs.lib.strings.concatStringsSep "\n" x.snd; + inherit indentation; + sourceRepo = overrideSourceRepo (extractSourceRepoPackageData cabalProjectFileName sha256map attrs); + followingText = pkgs.lib.strings.concatStringsSep "\n" x.snd; }; parseSourceRepositoryPackages = cabalProjectFileName: sha256map: source-repo-override: projectFile: let - blocks = pkgs.lib.splitString "\nsource-repository-package\n" ("\n" + projectFile); - initialText = pkgs.lib.lists.take 1 blocks; - repoBlocks = builtins.map (parseSourceRepositoryPackageBlock cabalProjectFileName sha256map) (pkgs.lib.lists.drop 1 blocks); - overrideSourceRepo = sourceRepo: (source-repo-override.${sourceRepo.url} or (pkgs.lib.id)) sourceRepo; + splitResult = builtins.split "\n( *)source-repository-package\n" ("\n" + projectFile); + # Construct a list of strings with just the indentation amounts for each map + indentations = builtins.concatLists (builtins.filter builtins.isList splitResult); + blocks = builtins.filter builtins.isString (pkgs.lib.lists.drop 1 splitResult); in { - sourceRepos = pkgs.lib.lists.map (block: overrideSourceRepo block.sourceRepo) repoBlocks; - otherText = pkgs.lib.strings.concatStringsSep "\n" ( - initialText - ++ (builtins.map (x: x.otherText) repoBlocks)); + initialText = builtins.head splitResult; + sourceRepos = pkgs.lib.zipListsWith (parseSourceRepositoryPackageBlock cabalProjectFileName sha256map source-repo-override) + indentations blocks; }; # Parse and replace repository diff --git a/lib/call-cabal-project-to-nix.nix b/lib/call-cabal-project-to-nix.nix index 4e866da839..8866464393 100644 --- a/lib/call-cabal-project-to-nix.nix +++ b/lib/call-cabal-project-to-nix.nix @@ -230,9 +230,22 @@ let sourceRepoPackageResult = pkgs.haskell-nix.haskellLib.parseSourceRepositoryPackages cabalProjectFileName sha256map source-repo-override projectFile; - # Parse the `repository` blocks - repoResult = pkgs.haskell-nix.haskellLib.parseRepositories - evalPackages cabalProjectFileName sha256map inputMap cabal-install nix-tools sourceRepoPackageResult.otherText; + sourceRepoFixedProjectFile = + sourceRepoPackageResult.initialText + + pkgs.lib.strings.concatMapStrings (block: + if block ? sourceRepo + then + let + f = fetchPackageRepo evalPackages.fetchgit block.sourceRepo; + in '' + ${block.indentation}source-repository-package + ${block.indentation} type: git + ${block.indentation} location: file://${f.location} + ${block.indentation} subdir: ${builtins.concatStringsSep " " f.subdirs} + ${block.indentation} tag: ${f.tag} + '' + block.followingText + else block.followingText + ) sourceRepoPackageResult.sourceRepos; # we need the repository content twice: # * at eval time (below to build the fixed project file) @@ -243,26 +256,19 @@ let # on the target system would use, so that the derivation is unaffected # and, say, a linux release build job can identify the derivation # as built by a darwin builder, and fetch it from a cache - sourceReposEval = builtins.map (fetchPackageRepo evalPackages.fetchgit) sourceRepoPackageResult.sourceRepos; - sourceReposBuild = builtins.map (x: (fetchPackageRepo pkgs.fetchgit x).fetched) sourceRepoPackageResult.sourceRepos; + sourceReposEval = builtins.map (x: (fetchPackageRepo evalPackages.fetchgit x.sourceRepo)) sourceRepoPackageResult.sourceRepos; + sourceReposBuild = builtins.map (x: (fetchPackageRepo pkgs.fetchgit x.sourceRepo).fetched) sourceRepoPackageResult.sourceRepos; + + # Parse the `repository` blocks + repoResult = pkgs.haskell-nix.haskellLib.parseRepositories + evalPackages cabalProjectFileName sha256map inputMap cabal-install nix-tools sourceRepoFixedProjectFile; in { sourceRepos = sourceReposBuild; inherit (repoResult) repos extra-hackages; makeFixedProjectFile = '' - cp -f ${evalPackages.writeText "cabal.project" sourceRepoPackageResult.otherText} ./cabal.project - '' + - pkgs.lib.optionalString (builtins.length sourceReposEval != 0) ('' + cp -f ${evalPackages.writeText "cabal.project" sourceRepoFixedProjectFile} ./cabal.project chmod +w -R ./cabal.project - # The newline here is important in case cabal.project does not have one at the end - echo >> ./cabal.project - '' + - # Add replacement `source-repository-package` blocks pointing to the minimal git repos - # Using `optional-packages:` to work around https://github.com/haskell/cabal/issues/5444 - ( pkgs.lib.strings.concatMapStrings (f: '' - echo "optional-packages:" >> ./cabal.project - echo " ${f.location}/${builtins.concatStringsSep " " f.subdirs}" >> ./cabal.project - '') sourceReposEval - )); + ''; # This will be used to replace refernces to the minimal git repos with just the index # of the repo. The index will be used in lib/import-and-filter-project.nix to # lookup the correct repository in `sourceReposBuild`. This avoids having diff --git a/test/unit.nix b/test/unit.nix index d8a3a7fe99..d61d444d05 100644 --- a/test/unit.nix +++ b/test/unit.nix @@ -58,7 +58,7 @@ lib.runTests { }; testParseBlock1 = { - expr = __toJSON (haskellLib.parseSourceRepositoryPackageBlock "cabal.project" {} '' + expr = __toJSON (haskellLib.parseSourceRepositoryPackageBlock "cabal.project" {} {} "" '' type: git location: https://github.com/input-output-hk/haskell.nix.git tag: 487eea1c249537d34c27f6143dff2b9d5586c657 @@ -66,13 +66,14 @@ lib.runTests { -- end of block ''); expected = __toJSON { - otherText = "-- end of block\n"; + followingText = "-- end of block\n"; + indentation = ""; sourceRepo = testRepoData // { subdirs = ["."]; }; }; }; testParseBlock2 = { - expr = __toJSON (haskellLib.parseSourceRepositoryPackageBlock "cabal.project" {} '' + expr = __toJSON (haskellLib.parseSourceRepositoryPackageBlock "cabal.project" {} {} "" '' type: git location: https://github.com/input-output-hk/haskell.nix.git tag: 487eea1c249537d34c27f6143dff2b9d5586c657 @@ -81,13 +82,14 @@ lib.runTests { -- end of block ''); expected = __toJSON { - otherText = "-- end of block\n"; + followingText = "-- end of block\n"; + indentation = ""; sourceRepo = testRepoData // { subdirs = ["dir"]; }; }; }; testParseBlock3 = { - expr = __toJSON (haskellLib.parseSourceRepositoryPackageBlock "cabal.project" {} '' + expr = __toJSON (haskellLib.parseSourceRepositoryPackageBlock "cabal.project" {} {} "" '' type: git location: https://github.com/input-output-hk/haskell.nix.git tag: 487eea1c249537d34c27f6143dff2b9d5586c657 @@ -96,13 +98,14 @@ lib.runTests { -- end of block ''); expected = __toJSON { - otherText = "-- end of block\n"; + followingText = "-- end of block\n"; + indentation = ""; sourceRepo = testRepoData // { subdirs = ["dir1" "dir2"]; }; }; }; testParseBlock4 = { - expr = __toJSON (haskellLib.parseSourceRepositoryPackageBlock "cabal.project" {} '' + expr = __toJSON (haskellLib.parseSourceRepositoryPackageBlock "cabal.project" {} {} "" '' type: git location: https://github.com/input-output-hk/haskell.nix.git tag: 487eea1c249537d34c27f6143dff2b9d5586c657 @@ -113,7 +116,8 @@ lib.runTests { -- end of block ''); expected = __toJSON { - otherText = "-- end of block\n"; + followingText = "-- end of block\n"; + indentation = ""; sourceRepo = testRepoData // { subdirs = ["dir1" "dir2"]; }; }; }; @@ -131,7 +135,7 @@ lib.runTests { }) vers ) x.hackage; }; - in rec { + result = rec { expr = __toJSON (removeNix (haskellLib.parseRepositoryBlock evalPackages "cabal.project" {} {} evalPackages.haskell-nix.cabal-install.${compiler-nix-name} evalPackages.haskell-nix.nix-tools '' @@ -321,4 +325,5 @@ lib.runTests { }; }; }; + in __trace (__toJSON result) result; } From 996f79e1dd81b7a530db47c4b1fe92730cec1d84 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 2 Mar 2024 23:48:28 +1300 Subject: [PATCH 059/170] Add missing \n --- lib/call-cabal-project-to-nix.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/call-cabal-project-to-nix.nix b/lib/call-cabal-project-to-nix.nix index 8866464393..cacf6382ee 100644 --- a/lib/call-cabal-project-to-nix.nix +++ b/lib/call-cabal-project-to-nix.nix @@ -238,6 +238,7 @@ let let f = fetchPackageRepo evalPackages.fetchgit block.sourceRepo; in '' + ${block.indentation}source-repository-package ${block.indentation} type: git ${block.indentation} location: file://${f.location} From b0366507825ad30f6e97415edfa1f3639e592863 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 3 Mar 2024 12:43:59 +1300 Subject: [PATCH 060/170] Avoid libsodium on ghcjs and update hackage head --- test/cabal.project.local | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 497c08b7f0..b90384af7c 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -15,7 +15,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-ez/5hpSnuVaiHYGsxsB5T/rwbMpzeAR2XLiWscurcYQ= + --sha256: sha256-csVZDS5FTqjGgRztX4tfpJTboKiIUkOwbHgOheqeCTI= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/91f4ce9bea0e7f739b7495647c3f72a308ed1c6f @@ -24,11 +24,12 @@ repository ghcjs-overlay key-threshold: 0 --sha256: sha256-mZT7c+xR5cUTjLdCqOxpprjYL3kr/+9rmumtXvWAQlM= -source-repository-package - type: git - location: https://github.com/hamishmack/hs-libsodium.git - tag: c094f210f3bd34d97204451ea57855a5d17e2086 - --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= +if !os(ghcjs) + source-repository-package + type: git + location: https://github.com/hamishmack/hs-libsodium.git + tag: c094f210f3bd34d97204451ea57855a5d17e2086 + --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= if !impl(ghc>=9.8) && !os(ghcjs) active-repositories: hackage.haskell.org From db3ef953f13bb7af72a59d30097fb02ab4e6b481 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 3 Mar 2024 20:31:22 +1300 Subject: [PATCH 061/170] Updte head.hackage sha256 --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index b90384af7c..3826749ec7 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -15,7 +15,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-csVZDS5FTqjGgRztX4tfpJTboKiIUkOwbHgOheqeCTI= + --sha256: sha256-KlOL1t9pUKO+yYwuu1a+LqCsHdrirVOMxUr0ThwpNx8= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/91f4ce9bea0e7f739b7495647c3f72a308ed1c6f From cb91f3d12c4e7676cc3b0b770d3906875a32a1da Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 3 Mar 2024 22:54:37 +1300 Subject: [PATCH 062/170] Updte head.hackage sha256 --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 3826749ec7..188b07c03d 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -15,7 +15,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-KlOL1t9pUKO+yYwuu1a+LqCsHdrirVOMxUr0ThwpNx8= + --sha256: sha256-DLJ+biiBJ30Qj2hF0LAYJdTaPWgZ72S02MSmBk00Yuw= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/91f4ce9bea0e7f739b7495647c3f72a308ed1c6f From a89252da5f7a892b5975889f8353306dd01ff982 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 4 Mar 2024 19:12:35 +1300 Subject: [PATCH 063/170] Fix code coverage for ghc HEAD --- test/coverage/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/coverage/default.nix b/test/coverage/default.nix index 287c26c378..71635e51e5 100644 --- a/test/coverage/default.nix +++ b/test/coverage/default.nix @@ -86,7 +86,7 @@ in recurseIntoAttrs ({ ${concatStringsSep "\n" (map (project: '' pkga_basedir="${project.hsPkgs.pkga.coverageReport}/share/hpc/vanilla" - findFileExistsNonEmpty "$pkga_basedir/mix/pkga-0.1.0.0/" "PkgA.mix" + findFileExistsNonEmpty $pkga_basedir/mix/pkga-0.1.0.0* "PkgA.mix" dirExists "$pkga_basedir/tix/pkga-0.1.0.0" dirExists "$pkga_basedir/html/pkga-0.1.0.0" @@ -95,8 +95,8 @@ in recurseIntoAttrs ({ libTix="$pkgb_basedir/tix/pkgb-0.1.0.0/pkgb-0.1.0.0.tix" fileExistsNonEmpty "$testTix" fileExistsNonEmpty "$libTix" - findFileExistsNonEmpty "$pkgb_basedir/mix/pkgb-0.1.0.0/" "ConduitExample.mix" - findFileExistsNonEmpty "$pkgb_basedir/mix/pkgb-0.1.0.0/" "PkgB.mix" + findFileExistsNonEmpty $pkgb_basedir/mix/pkgb-0.1.0.0* "ConduitExample.mix" + findFileExistsNonEmpty $pkgb_basedir/mix/pkgb-0.1.0.0* "PkgB.mix" fileExistsNonEmpty "$pkgb_basedir/html/pkgb-0.1.0.0/hpc_index.html" filesizeTestsTix=$(command stat --format '%s' "$testTix") From 9568cd5631eefddf131a5dff577fddb031f840a9 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 4 Mar 2024 19:13:02 +1300 Subject: [PATCH 064/170] Fix code coverage for ghc HEAD --- builder/comp-builder.nix | 2 +- lib/cover-project.nix | 4 ++-- lib/cover.nix | 21 +++++++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index e909511ec8..ab8a84a2c2 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -635,7 +635,7 @@ let '')) + (lib.optionalString doCoverage '' mkdir -p $out/share - cp -r dist/hpc $out/share + cp -r dist/${lib.optionalString (builtins.compareVersions defaults.ghc.version "9.9" >= 0) "build/extra-compilation-artifacts/"}hpc $out/share cp dist/setup-config $out/ '') } diff --git a/lib/cover-project.nix b/lib/cover-project.nix index 68a4625fac..b2e9b2fdbe 100644 --- a/lib/cover-project.nix +++ b/lib/cover-project.nix @@ -82,8 +82,8 @@ in pkgs.runCommand "project-coverage-report" fi # Copy mix, tix, and html information over from each report - if [ -d "$report/share/hpc/vanilla/mix/$identifier" ]; then - cp -Rn $report/share/hpc/vanilla/mix/$identifier $out/share/hpc/vanilla/mix/ + if [ -d $report/share/hpc/vanilla/mix/$identifier* ]; then + cp -Rn $report/share/hpc/vanilla/mix/$identifier* $out/share/hpc/vanilla/mix fi cp -R $report/share/hpc/vanilla/tix/* $out/share/hpc/vanilla/tix/ cp -R $report/share/hpc/vanilla/html/* $out/share/hpc/vanilla/html/ diff --git a/lib/cover.nix b/lib/cover.nix index bfb7a3be40..f63e67e8d2 100644 --- a/lib/cover.nix +++ b/lib/cover.nix @@ -16,9 +16,6 @@ }: let - mixDir = l: "${l}/share/hpc/vanilla/mix/${l.identifier.name}-${l.identifier.version}"; - mixDirs = map mixDir mixLibraries; - srcDirs = map (l: l.srcSubDirPath) mixLibraries; in pkgs.runCommand (name + "-coverage-report") @@ -49,13 +46,21 @@ in pkgs.runCommand (name + "-coverage-report") } local mixDirArgs=$(mktemp) ${ # Copy out mix files used for this report - lib.concatStrings (map (mixDir: '' - local dir=${mixDir} - echo --hpcdir=$dir >> $mixDirArgs + lib.concatStrings (map (l: '' + local dir=${l}/share/hpc/vanilla/mix/${l.identifier.name}-${l.identifier.version} if [ -d $dir ]; then - cp -R "$dir" $out/share/hpc/vanilla/mix/ + echo --hpcdir=$dir >> $mixDirArgs + if [ -d $dir ]; then + cp -R $dir $out/share/hpc/vanilla/mix/ + fi + else + dir=${l}/share/hpc/vanilla/mix + echo --hpcdir=$dir >> $mixDirArgs + if [ -d $dir ]; then + cp -R $dir/* $out/share/hpc/vanilla/mix/ + fi fi - '') mixDirs) + '') mixLibraries) } local includeArgs=$(mktemp) find $out/share/hpc/vanilla/mix/ -type f \ From 155adfa2bc2e2200b1eb0664dfa21273d8313ae2 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 5 Mar 2024 11:24:50 +1300 Subject: [PATCH 065/170] Fix code coverage for ghc HEAD --- lib/cover-project.nix | 6 +++--- lib/cover.nix | 16 ++++++---------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/lib/cover-project.nix b/lib/cover-project.nix index b2e9b2fdbe..ae6bcb6036 100644 --- a/lib/cover-project.nix +++ b/lib/cover-project.nix @@ -82,9 +82,9 @@ in pkgs.runCommand "project-coverage-report" fi # Copy mix, tix, and html information over from each report - if [ -d $report/share/hpc/vanilla/mix/$identifier* ]; then - cp -Rn $report/share/hpc/vanilla/mix/$identifier* $out/share/hpc/vanilla/mix - fi + for f in $report/share/hpc/vanilla/mix/$identifier*; do + cp -Rn $f $out/share/hpc/vanilla/mix + done cp -R $report/share/hpc/vanilla/tix/* $out/share/hpc/vanilla/tix/ cp -R $report/share/hpc/vanilla/html/* $out/share/hpc/vanilla/html/ '') coverageReports)} diff --git a/lib/cover.nix b/lib/cover.nix index f63e67e8d2..3c2843c47f 100644 --- a/lib/cover.nix +++ b/lib/cover.nix @@ -47,18 +47,14 @@ in pkgs.runCommand (name + "-coverage-report") local mixDirArgs=$(mktemp) ${ # Copy out mix files used for this report lib.concatStrings (map (l: '' - local dir=${l}/share/hpc/vanilla/mix/${l.identifier.name}-${l.identifier.version} + local mixDir=${l}/share/hpc/vanilla/mix + local dir=$mixDir/${l.identifier.name}-${l.identifier.version} if [ -d $dir ]; then echo --hpcdir=$dir >> $mixDirArgs - if [ -d $dir ]; then - cp -R $dir $out/share/hpc/vanilla/mix/ - fi - else - dir=${l}/share/hpc/vanilla/mix - echo --hpcdir=$dir >> $mixDirArgs - if [ -d $dir ]; then - cp -R $dir/* $out/share/hpc/vanilla/mix/ - fi + cp -R $dir $out/share/hpc/vanilla/mix/ + elif [ -n "$(ls -A $mixDir)" ]; then + echo --hpcdir=$mixDir >> $mixDirArgs + cp -R $mixDir/* $out/share/hpc/vanilla/mix/ fi '') mixLibraries) } From f4e23a531e8bdda412b2d0e8233ef8ad57f96045 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 5 Mar 2024 18:40:59 +1300 Subject: [PATCH 066/170] Updte head.hackage sha256 --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 188b07c03d..27af9237e0 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -15,7 +15,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-DLJ+biiBJ30Qj2hF0LAYJdTaPWgZ72S02MSmBk00Yuw= + --sha256: sha256-pGSForabkSuCBSYiE9BUEdDloEb3ILNPxH0doFjT4XY= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/91f4ce9bea0e7f739b7495647c3f72a308ed1c6f From ace89d95cb667a606f9bab67f70f3817edc635fb Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 5 Mar 2024 23:24:31 +1300 Subject: [PATCH 067/170] Fixes for latest ghc 9.9 --- builder/hspkg-builder.nix | 2 +- builder/setup-builder.nix | 31 ++++++++++++++------- compiler/ghc/default.nix | 4 +++ modules/configuration-nix.nix | 10 +++++++ overlays/default-setup.nix | 3 +- overlays/ghc-packages.nix | 3 ++ overlays/patches/ghc/ghc-9.9-setup-hs.patch | 13 +++++++++ test/cabal.project.local | 2 +- 8 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 overlays/patches/ghc/ghc-9.9-setup-hs.patch diff --git a/builder/hspkg-builder.nix b/builder/hspkg-builder.nix index 0343de69a8..922ad283a5 100644 --- a/builder/hspkg-builder.nix +++ b/builder/hspkg-builder.nix @@ -46,7 +46,7 @@ let pkgconfig = if components ? library then components.library.pkgconfig or [] else []; }; inherit package name src flags patches defaultSetupSrc; - inherit (pkg) preUnpack postUnpack; + inherit (pkg) preUnpack postUnpack prePatch postPatch; } // lib.optionalAttrs (package.buildType != "Custom") { nonReinstallablePkgs = ["base" "Cabal"]; }); diff --git a/builder/setup-builder.nix b/builder/setup-builder.nix index 00cb937aaa..6fbc88287b 100644 --- a/builder/setup-builder.nix +++ b/builder/setup-builder.nix @@ -3,7 +3,7 @@ let self = { component, package, name, src, enableDWARF ? false, flags ? {}, revision ? null, patches ? [], defaultSetupSrc , preUnpack ? component.preUnpack, postUnpack ? component.postUnpack -, prePatch ? null, postPatch ? null +, prePatch ? component.prePatch, postPatch ? component.postPatch , preBuild ? component.preBuild , postBuild ? component.postBuild , preInstall ? component.preInstall , postInstall ? component.postInstall , cleanSrc ? haskellLib.cleanCabalComponent package component "setup" src @@ -24,9 +24,22 @@ let inherit fullName flags component enableDWARF nonReinstallablePkgs; }; hooks = haskellLib.optionalHooks { + prePatch = + # If the package is in a sub directory `cd` there first. + # In some cases the `cleanSrc.subDir` will be empty and the `.cabal` + # file will be in the root of `src` (`cleanSrc.root`). This + # will happen when: + # * the .cabal file is in the projects `src.origSrc or src` + # * the package src was overridden with a value that does not + # include an `origSubDir` + (lib.optionalString (cleanSrc'.subDir != "") '' + cd ${lib.removePrefix "/" cleanSrc'.subDir} + '' + ) + lib.optionalString (prePatch != null) "\n${prePatch}"; + inherit preUnpack postUnpack - prePatch postPatch + postPatch preBuild postBuild preInstall postInstall ; @@ -109,14 +122,12 @@ let diff ./Setup $out/bin/Setup ''; } - // (lib.optionalAttrs (cleanSrc'.subDir != "") { - prePatch = - # If the package is in a sub directory `cd` there first - '' - cd ${lib.removePrefix "/" cleanSrc'.subDir} - ''; - }) - // (lib.optionalAttrs (patches != []) { patches = map (p: if builtins.isFunction p then p { inherit (package.identifier) version; } else p) patches; }) + // lib.optionalAttrs (patches != []) { + patches = map (p: + if builtins.isFunction p + then p { inherit (package.identifier) version; } + else p) patches; + } // hooks ); in drv; in self diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index e297f65ce1..26b2773782 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -545,6 +545,10 @@ stdenv.mkDerivation (rec { mkdir -p $generated/compiler/stage2/build/GHC/Settings cp _build/stage1/compiler/build/GHC/Settings/Config.hs $generated/compiler/stage2/build/GHC/Settings fi + if [[ -f _build/stage1/compiler/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs ]]; then + mkdir -p $generated/compiler/stage2/build/compiler/GHC/CmmToLlvm/Version + cp _build/stage1/compiler/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs $generated/compiler/stage2/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs + fi cp _build/stage1/compiler/build/*.hs-incl $generated/compiler/stage2/build || true '' # Save generated files for needed when building ghc-boot diff --git a/modules/configuration-nix.nix b/modules/configuration-nix.nix index ed0a3767fd..30c4856ead 100644 --- a/modules/configuration-nix.nix +++ b/modules/configuration-nix.nix @@ -68,6 +68,16 @@ in { (config.hsPkgs.buildPackages.happy.components.exes.happy or pkgs.buildPackages.happy) ]); + packages.ghc.prePatch = '' + cp -L Setup.hs Setup.hs.temp + rm Setup.hs + mv Setup.hs.temp Setup.hs + chmod +w Setup.hs + ''; + packages.ghc.patches = [ + (fromUntil "9.9" "9.10" ../overlays/patches/ghc/ghc-9.9-setup-hs.patch) + ]; + # Remove dependency on hsc2hs (hsc2hs should be in ghc derivation) packages.mintty.components.library.build-tools = pkgs.lib.mkForce []; diff --git a/overlays/default-setup.nix b/overlays/default-setup.nix index 2484ede7a0..e68bbd7d9c 100644 --- a/overlays/default-setup.nix +++ b/overlays/default-setup.nix @@ -59,9 +59,10 @@ let build-tools = []; platforms = null; + preUnpack = null; postUnpack = null; + prePatch = null; postPatch = null; preBuild = null; postBuild = null; preInstall = null; postInstall = null; - preUnpack = null; postUnpack = null; }; package = { identifier = { diff --git a/overlays/ghc-packages.nix b/overlays/ghc-packages.nix index 2e23de2b8b..058f3f4b22 100644 --- a/overlays/ghc-packages.nix +++ b/overlays/ghc-packages.nix @@ -172,6 +172,9 @@ in rec { if [[ -f ${ghc.generated}/compiler/stage2/build/GHC/Settings/Config.hs ]]; then ln -s ${ghc.generated}/compiler/stage2/build/GHC/Settings/Config.hs $out/compiler/GHC/Settings fi + if [[ -f ${ghc.generated}/compiler/stage2/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs ]]; then + ln -s ${ghc.generated}/compiler/stage2/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs $out/compiler/GHC/CmmToLlvm/Version + fi ln -s ${ghc.generated}/includes/dist-derivedconstants/header/* $out/compiler ln -s ${ghc.generated}/compiler/stage2/build/*.hs-incl $out/compiler ''); diff --git a/overlays/patches/ghc/ghc-9.9-setup-hs.patch b/overlays/patches/ghc/ghc-9.9-setup-hs.patch new file mode 100644 index 0000000000..8b0932d868 --- /dev/null +++ b/overlays/patches/ghc/ghc-9.9-setup-hs.patch @@ -0,0 +1,13 @@ +diff --git a/Setup.hs b/Setup.hs +index c7c0850383..ea2d6cc561 100644 +--- a/Setup.hs ++++ b/Setup.hs +@@ -77,7 +77,7 @@ ghcAutogen verbosity lbi@LocalBuildInfo{..} = do + -- Call genprimopcode to generate *.hs-incl + forM_ primopIncls $ \(file,command) -> do + contents <- readProcess "genprimopcode" [command] primopsStr +- rewriteFileEx verbosity (buildDir file) contents ++ rewriteFileEx verbosity (buildDir lbi file) contents + + -- Write GHC.Platform.Constants + let platformConstantsPath = autogenPackageModulesDir lbi "GHC/Platform/Constants.hs" diff --git a/test/cabal.project.local b/test/cabal.project.local index 27af9237e0..beb97e2752 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -15,7 +15,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-pGSForabkSuCBSYiE9BUEdDloEb3ILNPxH0doFjT4XY= + --sha256: sha256-DmhgvEa6WKkdDtVhibY4cRki6PwN3SVVgBQOsEOi5v4= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/91f4ce9bea0e7f739b7495647c3f72a308ed1c6f From beb1ab5c8c4490c5080d310330c4948003a4d24e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 5 Mar 2024 23:26:17 +1300 Subject: [PATCH 068/170] ifdLevel 0 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 1bd233f88d..9155ad4fd0 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 3 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 9553926359ce79285d8821ea05769cf522cda2d3 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 5 Mar 2024 23:27:22 +1300 Subject: [PATCH 069/170] Bump ghc99 pin --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index d4c4aac81a..d9c3bc6f53 100644 --- a/flake.lock +++ b/flake.lock @@ -139,11 +139,11 @@ "ghc99": { "flake": false, "locked": { - "lastModified": 1708819824, - "narHash": "sha256-0JpAnmpQnCwyyDFybtgM491c5Wt1AZpaw/32b58e8+c=", + "lastModified": 1709600354, + "narHash": "sha256-aebL+jM4R//+57FGqNWR38XCmKbM/3nCNXTx4QxV0Z0=", "ref": "refs/heads/master", - "rev": "294c93a580e85e242d90349ae92fa6a7818002bb", - "revCount": 62485, + "rev": "82ccb8012ba532f0fa06dc6ff96d33217560088a", + "revCount": 62515, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" From f008b9afd6acf4fe20791f637df6ae2dfa1ebbe6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 5 Mar 2024 23:27:53 +1300 Subject: [PATCH 070/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 9155ad4fd0..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From f92cb1663bf8eed7473bcf405963c9dd34341e73 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 5 Mar 2024 23:55:22 +1300 Subject: [PATCH 071/170] ifdLevel 2 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..e636156d0d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 2 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 4fb329c6445d312bbd04cde6dc892d8be9422e5b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 5 Mar 2024 23:55:56 +1300 Subject: [PATCH 072/170] ifdLevel 3 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index e636156d0d..1bd233f88d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 2 +{ ifdLevel ? 3 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 0c5033a32b30f59c9661dd83db130315b0f992d7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 6 Mar 2024 00:47:33 +1300 Subject: [PATCH 073/170] Fix paths --- compiler/ghc/default.nix | 6 +++--- overlays/ghc-packages.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 26b2773782..c4ac812d68 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -545,9 +545,9 @@ stdenv.mkDerivation (rec { mkdir -p $generated/compiler/stage2/build/GHC/Settings cp _build/stage1/compiler/build/GHC/Settings/Config.hs $generated/compiler/stage2/build/GHC/Settings fi - if [[ -f _build/stage1/compiler/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs ]]; then - mkdir -p $generated/compiler/stage2/build/compiler/GHC/CmmToLlvm/Version - cp _build/stage1/compiler/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs $generated/compiler/stage2/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs + if [[ -f _build/stage1/compiler/build/GHC/CmmToLlvm/Version/Bounds.hs ]]; then + mkdir -p $generated/compiler/stage2/build/GHC/CmmToLlvm/Version + cp _build/stage1/compiler/build/GHC/CmmToLlvm/Version/Bounds.hs $generated/compiler/stage2/build/GHC/CmmToLlvm/Version/Bounds.hs fi cp _build/stage1/compiler/build/*.hs-incl $generated/compiler/stage2/build || true '' diff --git a/overlays/ghc-packages.nix b/overlays/ghc-packages.nix index 058f3f4b22..86ef0a678e 100644 --- a/overlays/ghc-packages.nix +++ b/overlays/ghc-packages.nix @@ -172,8 +172,8 @@ in rec { if [[ -f ${ghc.generated}/compiler/stage2/build/GHC/Settings/Config.hs ]]; then ln -s ${ghc.generated}/compiler/stage2/build/GHC/Settings/Config.hs $out/compiler/GHC/Settings fi - if [[ -f ${ghc.generated}/compiler/stage2/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs ]]; then - ln -s ${ghc.generated}/compiler/stage2/build/compiler/GHC/CmmToLlvm/Version/Bounds.hs $out/compiler/GHC/CmmToLlvm/Version + if [[ -f ${ghc.generated}/compiler/stage2/build/GHC/CmmToLlvm/Version/Bounds.hs ]]; then + ln -s ${ghc.generated}/compiler/stage2/build/GHC/CmmToLlvm/Version/Bounds.hs $out/compiler/GHC/CmmToLlvm/Version fi ln -s ${ghc.generated}/includes/dist-derivedconstants/header/* $out/compiler ln -s ${ghc.generated}/compiler/stage2/build/*.hs-incl $out/compiler From b5bfdac58e4d2d91718cd035fe11912d7f9edbfb Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 6 Mar 2024 00:48:09 +1300 Subject: [PATCH 074/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 1bd233f88d..92b09b65c2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 3 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From b80eaa2bca1ccf745dea5dc3558c14d784be5c59 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 6 Mar 2024 11:52:59 +1300 Subject: [PATCH 075/170] Fix paths --- compiler/ghc/default.nix | 6 +++--- overlays/ghc-packages.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index c4ac812d68..d4c0059fdb 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -545,9 +545,9 @@ stdenv.mkDerivation (rec { mkdir -p $generated/compiler/stage2/build/GHC/Settings cp _build/stage1/compiler/build/GHC/Settings/Config.hs $generated/compiler/stage2/build/GHC/Settings fi - if [[ -f _build/stage1/compiler/build/GHC/CmmToLlvm/Version/Bounds.hs ]]; then - mkdir -p $generated/compiler/stage2/build/GHC/CmmToLlvm/Version - cp _build/stage1/compiler/build/GHC/CmmToLlvm/Version/Bounds.hs $generated/compiler/stage2/build/GHC/CmmToLlvm/Version/Bounds.hs + if [[ -f compiler/GHC/CmmToLlvm/Version/Bounds.hs ]]; then + mkdir -p $generated/compiler/GHC/CmmToLlvm/Version + cp compiler/GHC/CmmToLlvm/Version/Bounds.hs $generated/compiler/GHC/CmmToLlvm/Version/Bounds.hs fi cp _build/stage1/compiler/build/*.hs-incl $generated/compiler/stage2/build || true '' diff --git a/overlays/ghc-packages.nix b/overlays/ghc-packages.nix index 86ef0a678e..4087f56a61 100644 --- a/overlays/ghc-packages.nix +++ b/overlays/ghc-packages.nix @@ -172,8 +172,8 @@ in rec { if [[ -f ${ghc.generated}/compiler/stage2/build/GHC/Settings/Config.hs ]]; then ln -s ${ghc.generated}/compiler/stage2/build/GHC/Settings/Config.hs $out/compiler/GHC/Settings fi - if [[ -f ${ghc.generated}/compiler/stage2/build/GHC/CmmToLlvm/Version/Bounds.hs ]]; then - ln -s ${ghc.generated}/compiler/stage2/build/GHC/CmmToLlvm/Version/Bounds.hs $out/compiler/GHC/CmmToLlvm/Version + if [[ -f ${ghc.generated}/compiler/GHC/CmmToLlvm/Version/Bounds.hs ]]; then + ln -s ${ghc.generated}/compiler/GHC/CmmToLlvm/Version/Bounds.hs $out/compiler/GHC/CmmToLlvm/Version fi ln -s ${ghc.generated}/includes/dist-derivedconstants/header/* $out/compiler ln -s ${ghc.generated}/compiler/stage2/build/*.hs-incl $out/compiler From 670dc851d98201e3bff0a65fd346c4a04f70b3c6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 6 Mar 2024 12:58:13 +1300 Subject: [PATCH 076/170] ifdLevel 2 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 92b09b65c2..e636156d0d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 2 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From e1276c80988fa59f7093038145d965b43f6a4277 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 6 Mar 2024 12:58:49 +1300 Subject: [PATCH 077/170] ifdLevel 3 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index e636156d0d..1bd233f88d 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 2 +{ ifdLevel ? 3 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 82a2c7f13756704231c5c8235d47ae196873e3b9 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 7 Mar 2024 00:08:35 +1300 Subject: [PATCH 078/170] Fix for ghc 8.10 --- modules/configuration-nix.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/configuration-nix.nix b/modules/configuration-nix.nix index 30c4856ead..d6890d26ec 100644 --- a/modules/configuration-nix.nix +++ b/modules/configuration-nix.nix @@ -68,12 +68,13 @@ in { (config.hsPkgs.buildPackages.happy.components.exes.happy or pkgs.buildPackages.happy) ]); - packages.ghc.prePatch = '' - cp -L Setup.hs Setup.hs.temp - rm Setup.hs - mv Setup.hs.temp Setup.hs - chmod +w Setup.hs - ''; + packages.ghc.prePatch = + pkgs.lib.optionalString (builtins.compareVersions config.compiler.version "9.9" > 0) '' + cp -L Setup.hs Setup.hs.temp + rm Setup.hs + mv Setup.hs.temp Setup.hs + chmod +w Setup.hs + ''; packages.ghc.patches = [ (fromUntil "9.9" "9.10" ../overlays/patches/ghc/ghc-9.9-setup-hs.patch) ]; From dd6360d224558cb8fbc62207429b0c185faaa9ae Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 7 Mar 2024 09:04:17 +1300 Subject: [PATCH 079/170] Exclude plugin test --- test/plugin/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin/default.nix b/test/plugin/default.nix index 073c4cd2a7..a98dcf06cf 100644 --- a/test/plugin/default.nix +++ b/test/plugin/default.nix @@ -21,7 +21,7 @@ in recurseIntoAttrs { # Not sure why this breaks for ghc 8.10.7 meta.disabled = compiler-nix-name == "ghc8107" - || compiler-nix-name == "ghc9920240225" # undefined symbol: hs_atomics_primops_store_load_barrier + || compiler-nix-name == "ghc9920240305" # undefined symbol: hs_atomics_primops_store_load_barrier || stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isGhcjs || stdenv.hostPlatform.isWindows From 60cfcfed76a757d9b80deb425cea5fbfd901f03a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 17 Mar 2024 17:46:34 +1300 Subject: [PATCH 080/170] ifdLevel 0 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 267ed37ca8..75286cd955 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 3 +{ ifdLevel ? 0 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 65e6c43391cae1d9091a525a70e02a16db3995b4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 17 Mar 2024 20:03:01 +1300 Subject: [PATCH 081/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 75286cd955..6718eb01d2 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 0 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 4ff5abc9dde973a2ed5ad433eca2877132af4a2e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 17 Mar 2024 23:44:03 +1300 Subject: [PATCH 082/170] ifdLevel 2 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 6718eb01d2..3894974a01 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 2 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 8782e4bf74c357eef26da1f92fae2268fbddf27f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 17 Mar 2024 23:44:51 +1300 Subject: [PATCH 083/170] ifdLevel 3 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 3894974a01..267ed37ca8 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 2 +{ ifdLevel ? 3 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 95e49b6e2afab3738c11741598d122c6997e9400 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 18 Mar 2024 11:33:55 +1300 Subject: [PATCH 084/170] Remove patch replaced by ghc source patch --- modules/configuration-nix.nix | 11 ----------- overlays/patches/ghc/ghc-9.9-setup-hs.patch | 13 ------------- 2 files changed, 24 deletions(-) delete mode 100644 overlays/patches/ghc/ghc-9.9-setup-hs.patch diff --git a/modules/configuration-nix.nix b/modules/configuration-nix.nix index 4d2c4599ce..0e07cd99b3 100644 --- a/modules/configuration-nix.nix +++ b/modules/configuration-nix.nix @@ -68,17 +68,6 @@ in { (config.hsPkgs.buildPackages.happy.components.exes.happy or pkgs.buildPackages.happy) ]); - packages.ghc.prePatch = - pkgs.lib.optionalString (builtins.compareVersions config.compiler.version "9.9" > 0) '' - cp -L Setup.hs Setup.hs.temp - rm Setup.hs - mv Setup.hs.temp Setup.hs - chmod +w Setup.hs - ''; - packages.ghc.patches = [ - (fromUntil "9.9" "9.10" ../overlays/patches/ghc/ghc-9.9-setup-hs.patch) - ]; - # Remove dependency on hsc2hs (hsc2hs should be in ghc derivation) packages.mintty.components.library.build-tools = pkgs.lib.mkForce []; diff --git a/overlays/patches/ghc/ghc-9.9-setup-hs.patch b/overlays/patches/ghc/ghc-9.9-setup-hs.patch deleted file mode 100644 index 8b0932d868..0000000000 --- a/overlays/patches/ghc/ghc-9.9-setup-hs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Setup.hs b/Setup.hs -index c7c0850383..ea2d6cc561 100644 ---- a/Setup.hs -+++ b/Setup.hs -@@ -77,7 +77,7 @@ ghcAutogen verbosity lbi@LocalBuildInfo{..} = do - -- Call genprimopcode to generate *.hs-incl - forM_ primopIncls $ \(file,command) -> do - contents <- readProcess "genprimopcode" [command] primopsStr -- rewriteFileEx verbosity (buildDir file) contents -+ rewriteFileEx verbosity (buildDir lbi file) contents - - -- Write GHC.Platform.Constants - let platformConstantsPath = autogenPackageModulesDir lbi "GHC/Platform/Constants.hs" From c66cbd30536d544b355fd43970068b5562e4ed5b Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 23 Mar 2024 09:15:16 +0000 Subject: [PATCH 085/170] Always build mingwW64 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 267ed37ca8..a5c701bc5c 100644 --- a/ci.nix +++ b/ci.nix @@ -88,7 +88,7 @@ || (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"]) )) { inherit (lib.systems.examples) ghcjs; - } // lib.optionalAttrs (nixpkgsName != "unstable" + } // lib.optionalAttrs (true # (nixpkgsName != "unsable" || nixpkgs == "unstable") && (__match ".*llvm" compiler-nix-name == null) && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884"]) || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity From 95a4a74b635dac73e84f9d248dd636e5f2767ba2 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 23 Mar 2024 09:15:47 +0000 Subject: [PATCH 086/170] Drop bad hack --- overlays/windows.nix | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/overlays/windows.nix b/overlays/windows.nix index f975182615..c818ec04aa 100644 --- a/overlays/windows.nix +++ b/overlays/windows.nix @@ -27,28 +27,7 @@ final: prev: configureFlags = (drv.configureFlags or []) ++ [ "--enable-static --disable-shared" ]; }); - # This work around still seems to be needed for GHC <9.4 to build - # on windows, however it does not work on nixpkgs >= 23.11 and it breaks - # all windows builds (including GHC >9.4). In particular `windows.mcfgthreads` - # fails to build. - # We are using the `glibc.version` to determine if the fix will work. - # `prev.lib.version` (the nixpkgs version) is not granular enough - # (all the unstable release leading up to 23.11 have the same version as 23.11) - # and the newer version of `glibc` in nixpkgs 23.11 might be the - # change that caused this to break. - - # For now we have set it to be left out for nixpkgs >= 23.11 - # This means if we want to cross compile for windows and - # use nixpkgs >= 23.11, we will need to use GHC >9.4. - - # GHC <9.4 does not work with binutils 2.38 from newer nixpkgs. - # GHC >=9.4 will use clang/llvm instead. - binutils-unwrapped = - if final.stdenv.targetPlatform.isWindows && builtins.compareVersions prev.pkgsBuildBuild.glibc.version "2.38" < 0 - then (import prev.haskell-nix.sources.nixpkgs-2111 { inherit (prev) system; }) - .pkgsCross.mingwW64.buildPackages.binutils-unwrapped - else prev.binutils-unwrapped; haskell-nix = prev.haskell-nix // ({ defaultModules = prev.haskell-nix.defaultModules ++ [ From 52d807d878ed935b13a15763584b5b8d6098d8a8 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sun, 24 Mar 2024 11:25:51 +0000 Subject: [PATCH 087/170] Try to fix windows ASLR. Since binutils 2.36, it defaults to building ASLR for windows. This somehow seems to break with libffi and ghc. Not quite clear why exactly, however reverting back to non ASLR does fix it for us for now. --- overlays/mingw_w64.nix | 7 ++++++- overlays/windows.nix | 12 ++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/overlays/mingw_w64.nix b/overlays/mingw_w64.nix index b23fe4cd39..1d53c0b363 100644 --- a/overlays/mingw_w64.nix +++ b/overlays/mingw_w64.nix @@ -31,10 +31,12 @@ let # due to a too large environment. unset configureFlags unset configurePhase + WINEPREFIX=''${WINEPREFIX:-$(mktemp -d)} + REMOTE_ISERV=''${REMOTE_ISERV:-$(mktemp -d)} PORT=$((5000 + $RANDOM % 5000)) (>&2 echo "---> Starting ${interpreter.exeName} on port $PORT") REMOTE_ISERV=$(mktemp -d) - ln -s ${interpreter.override { enableDebugRTS = true; }}/bin/* $REMOTE_ISERV + ln -s ${interpreter.override { enableDebugRTS = true; setupBuildFlags = ["--ghc-option=-optl-Wl,--disable-dynamicbase,--disable-high-entropy-va,--image-base=0x400000" ];}}/bin/* $REMOTE_ISERV # See coment in comp-builder.nix for where this comes from and why it's here # TODO use `LINK_DLL_FOLDERS` here once it is in all the nixpkgs we want to support. for p in $pkgsHostTargetAsString; do @@ -50,6 +52,9 @@ let ln -s "$l" "''${l#lib}" done ) + echo "To re-use the same wine-prefix and remote-iserv, set the following environment variables:" + echo "export WINEPREFIX=$WINEPREFIX" + echo "export REMOTE_ISERV=$REMOTE_ISERV" # Not sure why this `unset` helps. It might avoids some kind of overflow issue. We see `wine` fail to start when building `cardano-wallet-cli` test `unit`. unset pkgsHostTargetAsString unset LINK_DLL_FOLDERS diff --git a/overlays/windows.nix b/overlays/windows.nix index c818ec04aa..fcff3462eb 100644 --- a/overlays/windows.nix +++ b/overlays/windows.nix @@ -22,13 +22,21 @@ final: prev: # TODO update stdenv.cc so that the wrapper adds -D_UCRT for libc=="ucrt" mingw_w64_pthreads = prev.windows.mingw_w64_pthreads.overrideAttrs { CPPFLAGS = "-D_UCRT"; }; }; +} // prev.lib.optionalAttrs prev.stdenv.hostPlatform.isWindows { + # If we build libffi with high entropy, we keep running into + # + # > Mingw-w64 runtime failure: + # > 32 bit pseudo relocation at 0000000140117CE6 out of range, targeting 00006FFFFFF18160, yielding the value 00006FFEBFE00476. + # + # This however also means, pretty much all of our haskell packages will need to be built with this as well. + libffi = prev.libffi.overrideAttrs (_: { + LDFLAGS = "-Wl,--disable-dynamicbase,--disable-high-entropy-va,--image-base=0x400000"; + }); } // { libmpc = if !prev.stdenv.hostPlatform.isWindows then prev.libmpc else prev.libmpc.overrideAttrs (drv: { configureFlags = (drv.configureFlags or []) ++ [ "--enable-static --disable-shared" ]; }); - - haskell-nix = prev.haskell-nix // ({ defaultModules = prev.haskell-nix.defaultModules ++ [ ({ pkgs, buildModules, config, lib, ... }: From 7a3a9ff8f10f7842a08c0c20895f7caa06b68e2a Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Fri, 5 Apr 2024 11:39:46 +0800 Subject: [PATCH 088/170] Update pkgconf-nixpkgs-map.nix Handle `throw`. --- lib/pkgconf-nixpkgs-map.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/pkgconf-nixpkgs-map.nix b/lib/pkgconf-nixpkgs-map.nix index a490dfc3be..ae94f99491 100644 --- a/lib/pkgconf-nixpkgs-map.nix +++ b/lib/pkgconf-nixpkgs-map.nix @@ -6,15 +6,15 @@ pkgs: # Only include derivations that exist in the current pkgs. # This allows us to use this mapping to be used in allPkgConfigWrapper. - # See ./overlas + # See ./overlays lookupAttrsIn = x: __mapAttrs (_pname: names: - # The first entry is should be used for the version by allPkgConfigWrapper - # so we need it to be present. - if __length names != 0 && x ? ${__head names} - then - pkgs.lib.concatMap ( - name: if x ? ${name} then [ x.${name} ] else []) names - else []); + # The first entry is should be used for the version by allPkgConfigWrapper + # so we need it to be present. + with pkgs.lib; optionals (__length names != 0 && x ? ${__head names}) + (concatMap + (name: optionals (x ? ${name}) + (let p = __tryEval (x.${name}); in optionals p.success p.value)) + names)); in lookupAttrsIn pkgs ({ # Based on https://github.com/NixOS/cabal2nix/blob/11c68fdc79461fb74fa1dfe2217c3709168ad752/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs#L23 From e7fec914e2ca4e78884d6c1f5e9dde1f11be29bb Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Fri, 5 Apr 2024 03:59:26 +0000 Subject: [PATCH 089/170] Fixup throw catch --- lib/pkgconf-nixpkgs-map.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pkgconf-nixpkgs-map.nix b/lib/pkgconf-nixpkgs-map.nix index ae94f99491..f662dafccb 100644 --- a/lib/pkgconf-nixpkgs-map.nix +++ b/lib/pkgconf-nixpkgs-map.nix @@ -10,10 +10,10 @@ pkgs: lookupAttrsIn = x: __mapAttrs (_pname: names: # The first entry is should be used for the version by allPkgConfigWrapper # so we need it to be present. - with pkgs.lib; optionals (__length names != 0 && x ? ${__head names}) + with lib; optionals (__length names != 0 && x ? ${__head names}) (concatMap (name: optionals (x ? ${name}) - (let p = __tryEval (x.${name}); in optionals p.success p.value)) + (let p = __tryEval (x.${name}); in optional p.success p.value)) names)); in lookupAttrsIn pkgs ({ # Based on https://github.com/NixOS/cabal2nix/blob/11c68fdc79461fb74fa1dfe2217c3709168ad752/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs#L23 From 969b3009d88de140cc439725d9848310a7dec43b Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Fri, 5 Apr 2024 04:07:43 +0000 Subject: [PATCH 090/170] Add back in libsodium. --- test/cabal.project.local | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/cabal.project.local b/test/cabal.project.local index aef6a4052e..48f09acd9c 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -27,6 +27,15 @@ repository ghcjs-overlay key-threshold: 0 --sha256: sha256-mZT7c+xR5cUTjLdCqOxpprjYL3kr/+9rmumtXvWAQlM= +-- This is needed because nixpkgs has 1.0.19, and libsodium has +-- too tight bounds <1.0.18. +if !os(ghcjs) + source-repository-package + type: git + location: https://github.com/hamishmack/hs-libsodium.git + tag: c094f210f3bd34d97204451ea57855a5d17e2086 + --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= + if !impl(ghc>=9.11) && !os(ghcjs) active-repositories: hackage.haskell.org From d9dc867c091f1b1495736fc926f9ec825e55afe1 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Tue, 9 Apr 2024 07:01:27 +0000 Subject: [PATCH 091/170] [win] fix Error: CFI instruction used without previous .cfi_startproc --- BUGLOG | 35 ++++++++++ overlays/bootstrap.nix | 1 + ...e0c06e038448a63aa9bd7f163b23d824ba4b.patch | 66 +++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 BUGLOG create mode 100644 overlays/patches/ghc/5b08e0c06e038448a63aa9bd7f163b23d824ba4b.patch diff --git a/BUGLOG b/BUGLOG new file mode 100644 index 0000000000..5d781b522a --- /dev/null +++ b/BUGLOG @@ -0,0 +1,35 @@ +This file contains bugs we find while working on haskell.nix. The format is as +follow: + +YYYY-MM-DD: nix-job name + + + + + +-------------------------------------------------------------------------------- +2024-04-09 x86_64-linux.R2305.ghc8107.mingwW64.ghc + +/build/ghc62733_0/ghc_1.s:50:0: error: + Error: CFI instruction used without previous .cfi_startproc + | +50 | .cfi_escape 0x16, 0x07, 0x04, 0x77, 152, 65 + | ^ +`x86_64-w64-mingw32-cc' failed in phase `Assembler'. (Exit code: 1) +make[1]: *** [rts/ghc.mk:325: rts/dist/build/StgCRun.o] Error 1 + +The source for this is +> https://github.com/ghc/ghc/blob/1f02b7430b2fbab403d7ffdde9cfd006e884678e/rts/StgCRun.c#L433 + +It appears that GCC C17 12.2.0 does _not_ emit .cfi_startproc / .cfi_endprocs +whereas GCC C17 13.2.0 _does_. Specificall x86_64-w64-mingw32-cc. So this might +be a cross compilation issue. + +The -g is hardcoded in +https://github.com/ghc/ghc/blob/1f02b7430b2fbab403d7ffdde9cfd006e884678e/mk/config.mk.in#L361 + +Turns out, this was disabled for anything but linux in https://github.com/ghc/ghc/commit/5b08e0c06e038448a63aa9bd7f163b23d824ba4b, +hence we backport that patch to GHC-8.10 when targeting windows (to prevent mass rebuilds for +other archs). + +-------------------------------------------------------------------------------- diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 1307108768..82771193f7 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -253,6 +253,7 @@ in { ++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.4" && final.stdenv.targetPlatform != final.stdenv.hostPlatform) ./patches/ghc/ghc-make-stage-1-lib-ghc.patch ++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && final.stdenv.targetPlatform.isAarch64) ./patches/ghc/ghc-8.10-better-symbol-addr-debug.patch ++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && final.stdenv.targetPlatform.isAarch64) ./patches/ghc/ghc-8.10-aarch64-handle-none-rela.patch + ++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && final.stdenv.targetPlatform.isWindows) ./patches/ghc/5b08e0c06e038448a63aa9bd7f163b23d824ba4b.patch ++ final.lib.optional (versionAtLeast "9.0" && final.stdenv.targetPlatform.isAarch64) ./patches/ghc/ghc-9.0-better-symbol-addr-debug.patch ++ final.lib.optional (versionAtLeast "9.0" && final.stdenv.targetPlatform.isAarch64) ./patches/ghc/ghc-9.0-aarch64-handle-none-rela.patch ++ final.lib.optional (versionAtLeast "9.6.3" && versionLessThan "9.6.4" && final.stdenv.targetPlatform.isWindows) ./patches/ghc/ghc-9.6-hadrian-splitsections.patch diff --git a/overlays/patches/ghc/5b08e0c06e038448a63aa9bd7f163b23d824ba4b.patch b/overlays/patches/ghc/5b08e0c06e038448a63aa9bd7f163b23d824ba4b.patch new file mode 100644 index 0000000000..5ed25cb5ec --- /dev/null +++ b/overlays/patches/ghc/5b08e0c06e038448a63aa9bd7f163b23d824ba4b.patch @@ -0,0 +1,66 @@ +From 5b08e0c06e038448a63aa9bd7f163b23d824ba4b Mon Sep 17 00:00:00 2001 +From: Ben Gamari +Date: Mon, 3 Feb 2020 09:27:42 -0500 +Subject: [PATCH] StgCRun: Enable unwinding only on Linux + +It's broken on macOS due and SmartOS due to assembler differences +(#15207) so let's be conservative in enabling it. Also, refactor things +to make the intent clearer. +--- + rts/StgCRun.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/rts/StgCRun.c b/rts/StgCRun.c +index 2600f1e569ca..55a3bf0c2d97 100644 +--- a/rts/StgCRun.c ++++ b/rts/StgCRun.c +@@ -29,6 +29,13 @@ + #include "PosixSource.h" + #include "ghcconfig.h" + ++// Enable DWARF Call-Frame Information (used for stack unwinding) on Linux. ++// This is not supported on Darwin and SmartOS due to assembler differences ++// (#15207). ++#if defined(linux_HOST_OS) ++#define ENABLE_UNWINDING ++#endif ++ + #if defined(sparc_HOST_ARCH) || defined(USE_MINIINTERPRETER) + /* include Stg.h first because we want real machine regs in here: we + * have to get the value of R1 back from Stg land to C land intact. +@@ -405,7 +412,7 @@ StgRunIsImplementedInAssembler(void) + "movq %%xmm15,136(%%rax)\n\t" + #endif + +-#if !defined(darwin_HOST_OS) ++#if defined(ENABLE_UNWINDING) + /* + * Let the unwinder know where we saved the registers + * See Note [Unwinding foreign exports on x86-64]. +@@ -444,7 +451,7 @@ StgRunIsImplementedInAssembler(void) + #error "RSP_DELTA too big" + #endif + "\n\t" +-#endif /* !defined(darwin_HOST_OS) */ ++#endif /* defined(ENABLE_UNWINDING) */ + + /* + * Set BaseReg +@@ -519,7 +526,7 @@ StgRunIsImplementedInAssembler(void) + "i"(RESERVED_C_STACK_BYTES + STG_RUN_STACK_FRAME_SIZE + /* rip relative to cfa */) + +-#if !defined(darwin_HOST_OS) ++#if defined(ENABLE_UNWINDING) + , "i"((RSP_DELTA & 127) | (128 * ((RSP_DELTA >> 7) > 0))) + /* signed LEB128-encoded delta from rsp - byte 1 */ + #if (RSP_DELTA >> 7) > 0 +@@ -538,7 +545,7 @@ StgRunIsImplementedInAssembler(void) + #endif + #undef RSP_DELTA + +-#endif /* !defined(darwin_HOST_OS) */ ++#endif /* defined(ENABLE_UNWINDING) */ + + ); + /* From 0cca66ede61653cfc081cd12a3e3248c291a753a Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 13 Apr 2024 03:20:29 +0000 Subject: [PATCH 092/170] Fixup windows relocs --- ci.nix | 2 +- overlays/bootstrap.nix | 7 ++ .../patches/ghc/windows-pseudo-pic-8.10.patch | 98 +++++++++++++++++++ .../patches/ghc/windows-pseudo-pic-9.2.patch | 98 +++++++++++++++++++ overlays/patches/ghc/windows-pseudo-pic.patch | 98 +++++++++++++++++++ 5 files changed, 302 insertions(+), 1 deletion(-) create mode 100644 overlays/patches/ghc/windows-pseudo-pic-8.10.patch create mode 100644 overlays/patches/ghc/windows-pseudo-pic-9.2.patch create mode 100644 overlays/patches/ghc/windows-pseudo-pic.patch diff --git a/ci.nix b/ci.nix index a5c701bc5c..166df45e61 100644 --- a/ci.nix +++ b/ci.nix @@ -88,7 +88,7 @@ || (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"]) )) { inherit (lib.systems.examples) ghcjs; - } // lib.optionalAttrs (true # (nixpkgsName != "unsable" || nixpkgs == "unstable") + } // lib.optionalAttrs ((nixpkgsName != "unsable" || nixpkgName == "unstable") # build mingw for all for now. && (__match ".*llvm" compiler-nix-name == null) && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884"]) || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 82771193f7..952a99fb6e 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -279,6 +279,13 @@ in { ++ final.lib.optional (versionAtLeast "9.6" && versionLessThan "9.8" && (final.stdenv.targetPlatform.isWindows || final.stdenv.targetPlatform.isMusl)) ./patches/ghc/ghc-9.6-0006-Adds-support-for-Hidden-symbols.patch ++ final.lib.optional (versionAtLeast "9.6" && versionLessThan "9.8" && (final.stdenv.targetPlatform.isWindows || final.stdenv.targetPlatform.isMusl)) ./patches/ghc/ghc-9.6-0006-Adds-support-for-Hidden-symbols-2.patch ++ fromUntil "9.9" "9.12" ./patches/ghc/ghc-9.9-Cabal-3.11.patch + + # This patch will make windows stop emitting absolute relocations. This is one way in which binutils 2.36+ (with ASLR enabled), will just choke on the + # assembly we generate because it's always absolute (32bit) addressing modes. + # GHC from 9.6+ seems to have https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7449, which should fix this as well. + ++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && (final.stdenv.targetPlatform.isWindows)) ./patches/ghc/windows-pseudo-pic-8.10.patch + ++ final.lib.optional (versionAtLeast "9.0" && versionLessThan "9.2" && (final.stdenv.targetPlatform.isWindows)) ./patches/ghc/windows-pseudo-pic.patch + ++ final.lib.optional (versionAtLeast "9.2" && versionLessThan "9.4" && (final.stdenv.targetPlatform.isWindows)) ./patches/ghc/windows-pseudo-pic-9.2.patch ; in ({ ghc865 = final.callPackage ../compiler/ghc (traceWarnOld "8.6" { diff --git a/overlays/patches/ghc/windows-pseudo-pic-8.10.patch b/overlays/patches/ghc/windows-pseudo-pic-8.10.patch new file mode 100644 index 0000000000..ccc31ca95a --- /dev/null +++ b/overlays/patches/ghc/windows-pseudo-pic-8.10.patch @@ -0,0 +1,98 @@ +diff --git a/compiler/nativeGen/AsmCodeGen.hs b/compiler/nativeGen/AsmCodeGen.hs +index 7357273..196acc8 100644 +--- a/compiler/nativeGen/AsmCodeGen.hs ++++ b/compiler/nativeGen/AsmCodeGen.hs +@@ -321,6 +321,13 @@ nativeCodeGen' dflags this_mod modLoc ncgImpl h us cmms + -- Pretty if it weren't for the fact that we do lots of little + -- printDocs here (in order to do codegen in constant space). + bufh <- newBufHandle h ++ let Module _u nm = this_mod ++ -- emit file prolue. Including file meta inforamtion. e.g. The ++ -- current name of the compile file. This may show up during linking, ++ -- and thus having the proper file name is essential. ++ _ <- emitNativeCode dflags bufh $ ++ text "\t.file \"" <> ftext (moduleNameFS nm) <> text ".hs\"" ++ + let ngs0 = NGS [] [] [] [] [] [] emptyUFM mapEmpty + (ngs, us', a) <- cmmNativeGenStream dflags this_mod modLoc ncgImpl bufh us + cmms ngs0 +diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs +index 7ea68e1..af8cba2 100644 +--- a/compiler/nativeGen/PIC.hs ++++ b/compiler/nativeGen/PIC.hs +@@ -156,10 +156,17 @@ cmmMakeDynamicReference dflags referenceKind lbl + cmmMakePicReference :: DynFlags -> CLabel -> CmmExpr + cmmMakePicReference dflags lbl + +- -- Windows doesn't need PIC, +- -- everything gets relocated at runtime ++ -- Windows used to be absolute 32bit only (small code model) ++ -- however with ASLR, and high entropy base images, we assume ++ -- everything to be RIP relative. This basically for windows ++ -- we want always PIC relative addressing. + | OSMinGW32 <- platformOS $ targetPlatform dflags +- = CmmLit $ CmmLabel lbl ++ = CmmMachOp (MO_Add (wordWidth dflags)) ++ [ CmmReg (CmmGlobal PicBaseReg) ++ , CmmLit $ picRelative dflags ++ (platformArch $ targetPlatform dflags) ++ (platformOS $ targetPlatform dflags) ++ lbl ] + + | OSAIX <- platformOS $ targetPlatform dflags + = CmmMachOp (MO_Add W32) +@@ -453,6 +460,8 @@ picRelative _ arch os lbl + + in result + ++picRelative _ ArchX86_64 OSMinGW32 lbl = CmmLabel lbl ++ + picRelative _ _ _ _ + = panic "PositionIndependentCode.picRelative undefined for this platform" + +diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs +index e319931..3909a23 100644 +--- a/compiler/nativeGen/X86/CodeGen.hs ++++ b/compiler/nativeGen/X86/CodeGen.hs +@@ -343,6 +343,13 @@ stmtToInstrs bid stmt = do + lbl <- mkAsmTempLabel <$> getUniqueM + return $ unitOL $ UNWIND lbl tbl + ++ CmmAssign reg src@(CmmLit lit) ++ | isFloatType ty -> assignReg_FltCode format reg src ++ | is32Bit && isWord64 ty -> assignReg_I64Code reg src ++ | otherwise -> assignReg_IntCode format reg src ++ where ty = cmmRegType dflags reg ++ format = cmmTypeFormat ty ++ + CmmAssign reg src + | isFloatType ty -> assignReg_FltCode format reg src + | is32Bit && isWord64 ty -> assignReg_I64Code reg src +@@ -350,6 +357,13 @@ stmtToInstrs bid stmt = do + where ty = cmmRegType dflags reg + format = cmmTypeFormat ty + ++ CmmStore addr src@(CmmLit lit) ++ | isFloatType ty -> assignMem_FltCode format addr src ++ | is32Bit && isWord64 ty -> assignMem_I64Code addr src ++ | otherwise -> assignMem_IntCode format addr src ++ where ty = cmmExprType dflags src ++ format = cmmTypeFormat ty ++ + CmmStore addr src + | isFloatType ty -> assignMem_FltCode format addr src + | is32Bit && isWord64 ty -> assignMem_I64Code addr src +@@ -3409,7 +3423,12 @@ outOfLineCmmOp bid mop res args + genSwitch :: DynFlags -> CmmExpr -> SwitchTargets -> NatM InstrBlock + + genSwitch dflags expr targets +- | positionIndependent dflags ++ -- Windows is a bit odd. It's virtually PIC on x86_64, by preference of ++ -- %rip relative addressing to produce the appropriate IMAGE relative ++ -- relocations. Absolute relocations start to fail with binutils switching ++ -- to default to high entropy ASLR and dynamic base. For most things, we can ++ -- simply consider Windows to be PIC on x86_64. ++ | positionIndependent dflags || (platformOS $ targetPlatform dflags) == OSMinGW32 + = do + (reg,e_code) <- getNonClobberedReg (cmmOffset dflags expr offset) + -- getNonClobberedReg because it needs to survive across t_code diff --git a/overlays/patches/ghc/windows-pseudo-pic-9.2.patch b/overlays/patches/ghc/windows-pseudo-pic-9.2.patch new file mode 100644 index 0000000000..fd16df747f --- /dev/null +++ b/overlays/patches/ghc/windows-pseudo-pic-9.2.patch @@ -0,0 +1,98 @@ +diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs +index 23175a1..d812289 100644 +--- a/compiler/GHC/CmmToAsm.hs ++++ b/compiler/GHC/CmmToAsm.hs +@@ -333,6 +333,13 @@ nativeCodeGen' dflags this_mod modLoc ncgImpl h us cmms + -- Pretty if it weren't for the fact that we do lots of little + -- printDocs here (in order to do codegen in constant space). + bufh <- newBufHandle h ++ let Module _u nm = (ncgThisModule config) ++ -- emit file prolue. Including file meta inforamtion. e.g. The ++ -- current name of the compile file. This may show up during linking, ++ -- and thus having the proper file name is essential. ++ _ <- emitNativeCode logger dflags config bufh $ ++ text "\t.file \"" <> ftext (moduleNameFS nm) <> text ".hs\"" ++ + let ngs0 = NGS [] [] [] [] [] [] emptyUFM mapEmpty + (ngs, us', a) <- cmmNativeGenStream dflags this_mod modLoc ncgImpl bufh us + cmms ngs0 +diff --git a/compiler/GHC/CmmToAsm/PIC.hs b/compiler/GHC/CmmToAsm/PIC.hs +index 1eb5f14..e74848f 100644 +--- a/compiler/GHC/CmmToAsm/PIC.hs ++++ b/compiler/GHC/CmmToAsm/PIC.hs +@@ -156,10 +156,17 @@ cmmMakeDynamicReference config referenceKind lbl + + cmmMakePicReference :: NCGConfig -> CLabel -> CmmExpr + cmmMakePicReference config lbl +- -- Windows doesn't need PIC, +- -- everything gets relocated at runtime ++ -- Windows used to be absolute 32bit only (small code model) ++ -- however with ASLR, and high entropy base images, we assume ++ -- everything to be RIP relative. This basically for windows ++ -- we want always PIC relative addressing. + | OSMinGW32 <- platformOS platform +- = CmmLit $ CmmLabel lbl ++ = CmmMachOp (MO_Add (wordWidth platform)) ++ [ CmmReg (CmmGlobal PicBaseReg) ++ , CmmLit $ picRelative (wordWidth platform) ++ (platformArch platform) ++ (platformOS platform) ++ lbl ] + + | OSAIX <- platformOS platform + = CmmMachOp (MO_Add W32) +@@ -454,6 +461,8 @@ picRelative _ arch os lbl + + in result + ++picRelative _ ArchX86_64 OSMinGW32 lbl = CmmLabel lbl ++ + picRelative _ _ _ _ + = panic "GHC.CmmToAsm.PIC.picRelative undefined for this platform" + +diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs +index 2cce508..376ebf0 100644 +--- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs ++++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs +@@ -338,6 +338,13 @@ stmtToInstrs bid stmt = do + lbl <- mkAsmTempLabel <$> getUniqueM + return $ unitOL $ UNWIND lbl tbl + ++ CmmAssign reg src@(CmmLit lit) ++ | isFloatType ty -> assignReg_FltCode format reg src ++ | is32Bit && isWord64 ty -> assignReg_I64Code reg src ++ | otherwise -> assignReg_IntCode format reg src ++ where ty = cmmRegType platform reg ++ format = cmmTypeFormat ty ++ + CmmAssign reg src + | isFloatType ty -> assignReg_FltCode format reg src + | is32Bit && isWord64 ty -> assignReg_I64Code reg src +@@ -345,6 +352,13 @@ stmtToInstrs bid stmt = do + where ty = cmmRegType platform reg + format = cmmTypeFormat ty + ++ CmmStore addr src@(CmmLit lit) _alignment ++ | isFloatType ty -> assignMem_FltCode format addr src ++ | is32Bit && isWord64 ty -> assignMem_I64Code addr src ++ | otherwise -> assignMem_IntCode format addr src ++ where ty = cmmExprType platform src ++ format = cmmTypeFormat ty ++ + CmmStore addr src _alignment + | isFloatType ty -> assignMem_FltCode format addr src + | is32Bit && isWord64 ty -> assignMem_I64Code addr src +@@ -3443,7 +3457,12 @@ genSwitch :: CmmExpr -> SwitchTargets -> NatM InstrBlock + genSwitch expr targets = do + config <- getConfig + let platform = ncgPlatform config +- if ncgPIC config ++ -- Windows is a bit odd. It's virtually PIC on x86_64, by preference of ++ -- %rip relative addressing to produce the appropriate IMAGE relative ++ -- relocations. Absolute relocations start to fail with binutils switching ++ -- to default to high entropy ASLR and dynamic base. For most things, we can ++ -- simply consider Windows to be PIC on x86_64. ++ if ncgPIC config || (platformOS platform) == OSMinGW32 + then do + (reg,e_code) <- getNonClobberedReg (cmmOffset platform expr offset) + -- getNonClobberedReg because it needs to survive across t_code \ No newline at end of file diff --git a/overlays/patches/ghc/windows-pseudo-pic.patch b/overlays/patches/ghc/windows-pseudo-pic.patch new file mode 100644 index 0000000000..fb383174e2 --- /dev/null +++ b/overlays/patches/ghc/windows-pseudo-pic.patch @@ -0,0 +1,98 @@ +diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs +index 23175a1..d812289 100644 +--- a/compiler/GHC/CmmToAsm.hs ++++ b/compiler/GHC/CmmToAsm.hs +@@ -333,6 +333,13 @@ nativeCodeGen' dflags this_mod modLoc ncgImpl h us cmms + -- Pretty if it weren't for the fact that we do lots of little + -- printDocs here (in order to do codegen in constant space). + bufh <- newBufHandle h ++ let Module _u nm = this_mod ++ -- emit file prolue. Including file meta inforamtion. e.g. The ++ -- current name of the compile file. This may show up during linking, ++ -- and thus having the proper file name is essential. ++ _ <- emitNativeCode dflags bufh $ ++ text "\t.file \"" <> ftext (moduleNameFS nm) <> text ".hs\"" ++ + let ngs0 = NGS [] [] [] [] [] [] emptyUFM mapEmpty + (ngs, us', a) <- cmmNativeGenStream dflags this_mod modLoc ncgImpl bufh us + cmms ngs0 +diff --git a/compiler/GHC/CmmToAsm/PIC.hs b/compiler/GHC/CmmToAsm/PIC.hs +index 1eb5f14..e74848f 100644 +--- a/compiler/GHC/CmmToAsm/PIC.hs ++++ b/compiler/GHC/CmmToAsm/PIC.hs +@@ -156,10 +156,17 @@ cmmMakeDynamicReference config referenceKind lbl + + cmmMakePicReference :: NCGConfig -> CLabel -> CmmExpr + cmmMakePicReference config lbl +- -- Windows doesn't need PIC, +- -- everything gets relocated at runtime ++ -- Windows used to be absolute 32bit only (small code model) ++ -- however with ASLR, and high entropy base images, we assume ++ -- everything to be RIP relative. This basically for windows ++ -- we want always PIC relative addressing. + | OSMinGW32 <- platformOS platform +- = CmmLit $ CmmLabel lbl ++ = CmmMachOp (MO_Add (wordWidth platform)) ++ [ CmmReg (CmmGlobal PicBaseReg) ++ , CmmLit $ picRelative (wordWidth platform) ++ (platformArch platform) ++ (platformOS platform) ++ lbl ] + + | OSAIX <- platformOS platform + = CmmMachOp (MO_Add W32) +@@ -454,6 +461,8 @@ picRelative _ arch os lbl + + in result + ++picRelative _ ArchX86_64 OSMinGW32 lbl = CmmLabel lbl ++ + picRelative _ _ _ _ + = panic "GHC.CmmToAsm.PIC.picRelative undefined for this platform" + +diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs +index 2cce508..376ebf0 100644 +--- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs ++++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs +@@ -338,6 +338,13 @@ stmtToInstrs bid stmt = do + lbl <- mkAsmTempLabel <$> getUniqueM + return $ unitOL $ UNWIND lbl tbl + ++ CmmAssign reg src@(CmmLit lit) ++ | isFloatType ty -> assignReg_FltCode format reg src ++ | is32Bit && isWord64 ty -> assignReg_I64Code reg src ++ | otherwise -> assignReg_IntCode format reg src ++ where ty = cmmRegType platform reg ++ format = cmmTypeFormat ty ++ + CmmAssign reg src + | isFloatType ty -> assignReg_FltCode format reg src + | is32Bit && isWord64 ty -> assignReg_I64Code reg src +@@ -345,6 +352,13 @@ stmtToInstrs bid stmt = do + where ty = cmmRegType platform reg + format = cmmTypeFormat ty + ++ CmmStore addr src@(CmmLit lit) ++ | isFloatType ty -> assignMem_FltCode format addr src ++ | is32Bit && isWord64 ty -> assignMem_I64Code addr src ++ | otherwise -> assignMem_IntCode format addr src ++ where ty = cmmExprType platform src ++ format = cmmTypeFormat ty ++ + CmmStore addr src + | isFloatType ty -> assignMem_FltCode format addr src + | is32Bit && isWord64 ty -> assignMem_I64Code addr src +@@ -3443,7 +3457,12 @@ genSwitch :: CmmExpr -> SwitchTargets -> NatM InstrBlock + genSwitch expr targets = do + config <- getConfig + let platform = ncgPlatform config +- if ncgPIC config ++ -- Windows is a bit odd. It's virtually PIC on x86_64, by preference of ++ -- %rip relative addressing to produce the appropriate IMAGE relative ++ -- relocations. Absolute relocations start to fail with binutils switching ++ -- to default to high entropy ASLR and dynamic base. For most things, we can ++ -- simply consider Windows to be PIC on x86_64. ++ if ncgPIC config || (platformOS platform) == OSMinGW32 + then do + (reg,e_code) <- getNonClobberedReg (cmmOffset platform expr offset) + -- getNonClobberedReg because it needs to survive across t_code \ No newline at end of file From 60a8c4e264d92ffda998ee3b4d48da5f935f52eb Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 13 Apr 2024 03:27:49 +0000 Subject: [PATCH 093/170] Fix spelling mistake --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 166df45e61..0f633239f3 100644 --- a/ci.nix +++ b/ci.nix @@ -88,7 +88,7 @@ || (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"]) )) { inherit (lib.systems.examples) ghcjs; - } // lib.optionalAttrs ((nixpkgsName != "unsable" || nixpkgName == "unstable") # build mingw for all for now. + } // lib.optionalAttrs ((nixpkgsName != "unsable" || nixpkgsName == "unstable") # build mingw for all for now. && (__match ".*llvm" compiler-nix-name == null) && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884"]) || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity From 36565bc3adc66f6c91dc8590110b40d8f8443833 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 13 Apr 2024 03:31:50 +0000 Subject: [PATCH 094/170] Update lock files --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 0e010de2c5..d3774aeda4 100644 --- a/flake.lock +++ b/flake.lock @@ -495,11 +495,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1708760845, - "narHash": "sha256-xkSxjVuYLQGvteX4CCuC4c5daBwMKIDAvp0Mvvg2spE=", + "lastModified": 1712867921, + "narHash": "sha256-edTFV4KldkCMdViC/rmpJa7oLIU8SE/S35lh/ukC7bg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "79032939bc8d409bcc16121c4ad694ca862895e4", + "rev": "51651a540816273b67bc4dedea2d37d116c5f7fe", "type": "github" }, "original": { @@ -527,11 +527,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1708751719, - "narHash": "sha256-0uWOKSpXJXmXswOvDM5Vk3blB74apFB6rNGWV5IjoN0=", + "lastModified": 1712883908, + "narHash": "sha256-icE1IJE9fHcbDfJ0+qWoDdcBXUoZCcIJxME4lMHwvSM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f63ce824cd2f036216eb5f637dfef31e1a03ee89", + "rev": "a0c9e3aee1000ac2bfb0e5b98c94c946a5d180a9", "type": "github" }, "original": { From a951839ed2cafddef5aeb8f52c5fbd0e240205d9 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 13 Apr 2024 03:31:55 +0000 Subject: [PATCH 095/170] Add BUGLOG --- BUGLOG | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/BUGLOG b/BUGLOG index 5d781b522a..52f1714a9e 100644 --- a/BUGLOG +++ b/BUGLOG @@ -33,3 +33,32 @@ hence we backport that patch to GHC-8.10 when targeting windows (to prevent mass other archs). -------------------------------------------------------------------------------- +2024-04-10 x86_64-linux.R2305.ghc902.mingwW64.ghc + +make[1]: *** [utils/hsc2hs/ghc.mk:22: utils/hsc2hs/dist-install/build/tmp/hsc2hs.exe] Error 1 +utils/runghc/dist-install/build/Main.o:fake:(.text+0x2a): relocation truncated to fit: R_X86_64_32S against `.text' +utils/runghc/dist-install/build/Main.o:fake:(.text+0x46): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32 against `.data' +utils/runghc/dist-install/build/Main.o:fake:(.text+0x8b): relocation truncated to fit: R_X86_64_32S against symbol `stg_bh_upd_frame_info' defined in .text section in /build/ghc-9.0.2/rts/dist/build/libHSrts.a(Updates.o) +utils/runghc/dist-install/build/Main.o:fake:(.text+0x95): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32 against `.rdata' +utils/runghc/dist-install/build/Main.o:fake:(.text+0xe3): relocation truncated to fit: R_X86_64_32S against symbol `stg_bh_upd_frame_info' defined in .text section in /build/ghc-9.0.2/rts/dist/build/libHSrts.a(Updates.o) +utils/runghc/dist-install/build/Main.o:fake:(.text+0xed): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32 against `.rdata' +utils/runghc/dist-install/build/Main.o:fake:(.text+0x13b): relocation truncated to fit: R_X86_64_32S against symbol `stg_bh_upd_frame_info' defined in .text section in /build/ghc-9.0.2/rts/dist/build/libHSrts.a(Updates.o) +utils/runghc/dist-install/build/Main.o:fake:(.text+0x145): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32 against `.rdata' +utils/runghc/dist-install/build/Main.o:fake:(.text+0x193): relocation truncated to fit: R_X86_64_32S against symbol `stg_bh_upd_frame_info' defined in .text section in /build/ghc-9.0.2/rts/dist/build/libHSrts.a(Updates.o) +utils/runghc/dist-install/build/Main.o:fake:(.text+0x19d): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32 against `.rdata' +utils/runghc/dist-install/build/Main.o:fake:(.text+0x1eb): additional relocation overflows omitted from the output + +We notice `fake`, which is GHC failing to provide .file identifier in the source. +We also see lots of R_X64_64_32S relocations, which are signed 32bit relocations. +These fall with ASLR and high entropy base images from later binutils. + +The underlying issue is that GHC emits _absolute_ label loads (mov $... reg), instead +of %rpi or other relative loads. This then leads to the linker emitting 32bit +absolute relocation. With the final image being potentially loaded into high memory +(e.g. dynamic base, and the base image being set to some high address), the linker +starts falling over itself, because it simply can't resolve those absolute addresses +in the 32bit slots. + +This was fixed in GHC upstream in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7449, +while the patch in haskell.nix is a bit more pedestrian and just sets PIC on windows to +always be on, and then uses the PIC pipeline. \ No newline at end of file From c1b966c54c74d6ec0cc1fcf14cdd1a76ac2a04ad Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 13 Apr 2024 12:37:26 +0000 Subject: [PATCH 096/170] Bump LLVM. There is no 9 left in nixpkgs. --- overlays/bootstrap.nix | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 952a99fb6e..e630b627b5 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -412,8 +412,8 @@ in { inherit sphinx; useLLVM = !final.stdenv.targetPlatform.isx86; - buildLlvmPackages = final.buildPackages.llvmPackages_9; - llvmPackages = final.llvmPackages_9; + buildLlvmPackages = final.buildPackages.llvmPackages_12; + llvmPackages = final.llvmPackages_12; src-spec = rec { version = "8.10.1"; @@ -434,8 +434,8 @@ in { inherit sphinx; useLLVM = !final.stdenv.targetPlatform.isx86; - buildLlvmPackages = final.buildPackages.llvmPackages_9; - llvmPackages = final.llvmPackages_9; + buildLlvmPackages = final.buildPackages.llvmPackages_12; + llvmPackages = final.llvmPackages_12; src-spec = rec { version = "8.10.2"; @@ -456,8 +456,8 @@ in { inherit sphinx; useLLVM = !final.stdenv.targetPlatform.isx86; - buildLlvmPackages = final.buildPackages.llvmPackages_9; - llvmPackages = final.llvmPackages_9; + buildLlvmPackages = final.buildPackages.llvmPackages_12; + llvmPackages = final.llvmPackages_12; src-spec = rec { version = "8.10.3"; @@ -478,8 +478,8 @@ in { inherit sphinx; useLLVM = !final.stdenv.targetPlatform.isx86; - buildLlvmPackages = final.buildPackages.llvmPackages_9; - llvmPackages = final.llvmPackages_9; + buildLlvmPackages = final.buildPackages.llvmPackages_12; + llvmPackages = final.llvmPackages_12; src-spec = rec { version = "8.10.4"; @@ -500,8 +500,8 @@ in { inherit sphinx; useLLVM = !final.stdenv.targetPlatform.isx86; - buildLlvmPackages = final.buildPackages.llvmPackages_9; - llvmPackages = final.llvmPackages_9; + buildLlvmPackages = final.buildPackages.llvmPackages_12; + llvmPackages = final.llvmPackages_12; src-spec = rec { version = "8.10.5"; @@ -522,8 +522,8 @@ in { inherit sphinx; useLLVM = !final.stdenv.targetPlatform.isx86; - buildLlvmPackages = final.buildPackages.llvmPackages_9; - llvmPackages = final.llvmPackages_9; + buildLlvmPackages = final.buildPackages.llvmPackages_12; + llvmPackages = final.llvmPackages_12; src-spec = rec { version = "8.10.6"; @@ -566,8 +566,8 @@ in { inherit sphinx; useLLVM = !final.stdenv.targetPlatform.isx86; - buildLlvmPackages = final.buildPackages.llvmPackages_9; - llvmPackages = final.llvmPackages_9; + buildLlvmPackages = final.buildPackages.llvmPackages_12; + llvmPackages = final.llvmPackages_12; src-spec = rec { version = "9.0.1"; @@ -588,8 +588,8 @@ in { inherit sphinx; useLLVM = !final.stdenv.targetPlatform.isx86; - buildLlvmPackages = final.buildPackages.llvmPackages_9; - llvmPackages = final.llvmPackages_9; + buildLlvmPackages = final.buildPackages.llvmPackages_12; + llvmPackages = final.llvmPackages_12; src-spec = rec { version = "9.0.2"; From 4d2710e3d38bcf7a8a4ec048cdef2a0d1d389d22 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sun, 14 Apr 2024 11:49:21 +0000 Subject: [PATCH 097/170] ifdLevel 1 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 0f633239f3..5c5829e08e 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 3 +{ ifdLevel ? 1 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From f5a8eb39b570f8fe97c672b21feee691333c9765 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sun, 14 Apr 2024 12:26:47 +0000 Subject: [PATCH 098/170] Make libcxxabi mapping work across multiple nixpkgs --- compiler/ghc/default.nix | 22 +++++++++++++++++++--- lib/system-nixpkgs-map.nix | 6 +++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index cc4fdb3b3d..7991557db5 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -671,11 +671,16 @@ stdenv.mkDerivation (rec { ${hadrian}/bin/hadrian ${hadrianArgs} _build/stage0/compiler/build/$a cp _build/stage0/compiler/build/$a compiler/GHC/Builtin/$a done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin && (__tryEval libcxxabi).success '' substituteInPlace mk/system-cxx-std-lib-1.0.conf \ --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib' find . -name 'system*.conf*' cat mk/system-cxx-std-lib-1.0.conf + '' + lib.optionalString stdenv.isDarwin && !(__tryEval libcxxabi).success '' + substituteInPlace mk/system-cxx-std-lib-1.0.conf \ + --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib' + find . -name 'system*.conf*' + cat mk/system-cxx-std-lib-1.0.conf '' + lib.optionalString (installStage1 && stdenv.targetPlatform.isMusl) '' substituteInPlace hadrian/cfg/system.config \ --replace 'cross-compiling = YES' \ @@ -756,11 +761,16 @@ stdenv.mkDerivation (rec { export XATTR=$(mktemp -d)/nothing ''; } // lib.optionalAttrs useHadrian { - postConfigure = lib.optionalString stdenv.isDarwin '' + postConfigure = lib.optionalString (stdenv.isDarwin && (__tryEval libcxxabi).success) '' substituteInPlace mk/system-cxx-std-lib-1.0.conf \ --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib' find . -name 'system*.conf*' cat mk/system-cxx-std-lib-1.0.conf + '' + lib.optionalString (stdenv.isDarwin && !(__tryEval libcxxabi).success) '' + substituteInPlace mk/system-cxx-std-lib-1.0.conf \ + --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib' + find . -name 'system*.conf*' + cat mk/system-cxx-std-lib-1.0.conf '' + lib.optionalString (installStage1 && !haskell-nix.haskellLib.isCrossTarget && stdenv.targetPlatform.isMusl) '' substituteInPlace hadrian/cfg/system.config \ --replace 'cross-compiling = YES' \ @@ -820,12 +830,18 @@ stdenv.mkDerivation (rec { ${hadrian}/bin/hadrian ${hadrianArgs} binary-dist-dir cd _build/bindist/ghc-* ./configure --prefix=$out ${lib.concatStringsSep " " configureFlags} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString (stdenv.isDarwin && (__tryEval libcxxabi).success) '' substituteInPlace mk/system-cxx-std-lib-1.0.conf \ --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib' substituteInPlace lib/package.conf.d/system-cxx-std-lib-1.0.conf \ --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib' ''} + ${lib.optionalString (stdenv.isDarwin && !(__tryEval libcxxabi).success) '' + substituteInPlace mk/system-cxx-std-lib-1.0.conf \ + --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib' + substituteInPlace lib/package.conf.d/system-cxx-std-lib-1.0.conf \ + --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib' + ''} mkdir -p utils cp -r ../../../utils/completion utils make install diff --git a/lib/system-nixpkgs-map.nix b/lib/system-nixpkgs-map.nix index 4f7ed6e965..cd975836f8 100644 --- a/lib/system-nixpkgs-map.nix +++ b/lib/system-nixpkgs-map.nix @@ -21,7 +21,11 @@ in # -- linux { crypto = [ openssl ]; "c++" = [ libcxx ]; - "c++abi" = [ libcxxabi ]; + # at some point this happened: + # + # error: 'libcxxabi' was merged into 'libcxx' + # + "c++abi" = [ if (__tryEval libcxxabi).success then libcxxabi else libcxx ]; system-cxx-std-lib = []; "stdc++" = gcclibs; "stdc++-6" = gcclibs; From 987ae45c17271f4bc4b147975caaa269d984ce3a Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sun, 14 Apr 2024 23:38:28 +0000 Subject: [PATCH 099/170] fix if --- lib/system-nixpkgs-map.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system-nixpkgs-map.nix b/lib/system-nixpkgs-map.nix index cd975836f8..99f64fb701 100644 --- a/lib/system-nixpkgs-map.nix +++ b/lib/system-nixpkgs-map.nix @@ -25,7 +25,7 @@ in # # error: 'libcxxabi' was merged into 'libcxx' # - "c++abi" = [ if (__tryEval libcxxabi).success then libcxxabi else libcxx ]; + "c++abi" = if (__tryEval libcxxabi).success then [ libcxxabi ] else [ libcxx ]; system-cxx-std-lib = []; "stdc++" = gcclibs; "stdc++-6" = gcclibs; From 40a6da88fe1cdb31bab857ddf228ea1d64d91d9f Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Mon, 15 Apr 2024 01:05:16 +0000 Subject: [PATCH 100/170] fix parens --- compiler/ghc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 7991557db5..898552f89f 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -671,12 +671,12 @@ stdenv.mkDerivation (rec { ${hadrian}/bin/hadrian ${hadrianArgs} _build/stage0/compiler/build/$a cp _build/stage0/compiler/build/$a compiler/GHC/Builtin/$a done - '' + lib.optionalString stdenv.isDarwin && (__tryEval libcxxabi).success '' + '' + lib.optionalString (stdenv.isDarwin && (__tryEval libcxxabi).success) '' substituteInPlace mk/system-cxx-std-lib-1.0.conf \ --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib' find . -name 'system*.conf*' cat mk/system-cxx-std-lib-1.0.conf - '' + lib.optionalString stdenv.isDarwin && !(__tryEval libcxxabi).success '' + '' + lib.optionalString (stdenv.isDarwin && !(__tryEval libcxxabi).success) '' substituteInPlace mk/system-cxx-std-lib-1.0.conf \ --replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib' find . -name 'system*.conf*' From 448ca1b8838bf23e1669c5c445d90d3dbc8e2080 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Mon, 15 Apr 2024 07:27:04 +0000 Subject: [PATCH 101/170] ifdLevel 2 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 5c5829e08e..df3ce557f1 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 1 +{ ifdLevel ? 2 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 6239a5be81bffe0ddf6687aedf12bdc2557d5535 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Mon, 15 Apr 2024 08:32:42 +0000 Subject: [PATCH 102/170] ifdLevel 3 --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index df3ce557f1..0f633239f3 100644 --- a/ci.nix +++ b/ci.nix @@ -1,6 +1,6 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! -{ ifdLevel ? 2 +{ ifdLevel ? 3 , checkMaterialization ? false , system ? builtins.currentSystem , evalSystem ? builtins.currentSystem or "x86_64-linux" From 15ade65b6924bf92af29647508bd77c2684c2d6f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 16 Apr 2024 10:07:17 +1200 Subject: [PATCH 103/170] head.hackage still needed for text-short See https://github.com/haskell-hvr/text-short/issues/45 --- test/cabal.project.local | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 48f09acd9c..238db5aebb 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -36,14 +36,14 @@ if !os(ghcjs) tag: c094f210f3bd34d97204451ea57855a5d17e2086 --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= -if !impl(ghc>=9.11) && !os(ghcjs) +if !impl(ghc>=9.10) && !os(ghcjs) active-repositories: hackage.haskell.org -if impl(ghc>=9.11) && !os(ghcjs) +if impl(ghc>=9.10) && !os(ghcjs) active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override if !impl(ghc>=9.10) && os(ghcjs) active-repositories: hackage.haskell.org, ghcjs-overlay:override -if impl(ghc>=9.11) && os(ghcjs) +if impl(ghc>=9.10) && os(ghcjs) active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override, ghcjs-overlay:override From 5e82728628bf00b0c6e718d8668baa1a697ac31b Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Tue, 16 Apr 2024 05:59:36 +0000 Subject: [PATCH 104/170] disable c++ as one breaking issue --- test/th-dlls/cabal.project | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/th-dlls/cabal.project b/test/th-dlls/cabal.project index f686c244f5..e780e52e1d 100644 --- a/test/th-dlls/cabal.project +++ b/test/th-dlls/cabal.project @@ -3,4 +3,9 @@ packages: . -- network-3.1.3.0 results in: unknown symbol `socketpair' -- See https://github.com/haskell/network/issues/550 constraints: network <3.1.3.0 || >3.1.3.0 + , text source + , text -simdutf + +package text + flags: -simdutf From d667a884229a514981bb22ac8b5655554b05c574 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 17 May 2024 22:22:08 +1200 Subject: [PATCH 105/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 6d741ec7af..1beb9e7c7a 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From 839db495dc39d7bff64066a6b022545ff0efe3ae Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 20 May 2024 17:33:24 +1200 Subject: [PATCH 106/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1beb9e7c7a..c9773254f7 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From 7b4e8ccdbd977de723e47f9b1fd88bfe15f9fa72 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 May 2024 12:17:25 +1200 Subject: [PATCH 107/170] Use nixpkgs ghc964 to build hadrian when possible --- compiler/ghc/default.nix | 5 +- .../hadrian/.plan.nix/hadrian.nix | 161 +++++++++++++++ .../hadrian/cabal-files/Cabal-syntax.nix | 55 +++++ .../hadrian/cabal-files/Cabal.nix | 56 +++++ .../hadrian/cabal-files/QuickCheck.nix | 119 +++++++++++ .../hadrian/cabal-files/clock.nix | 59 ++++++ .../hadrian/cabal-files/directory.nix | 57 +++++ .../hadrian/cabal-files/exceptions.nix | 73 +++++++ .../hadrian/cabal-files/extra.nix | 58 ++++++ .../hadrian/cabal-files/filepath.nix | 97 +++++++++ .../hadrian/cabal-files/filepattern.nix | 56 +++++ .../hadrian/cabal-files/hashable.nix | 82 ++++++++ .../hadrian/cabal-files/heaps.nix | 38 ++++ .../hadrian/cabal-files/js-dgtable.nix | 47 +++++ .../hadrian/cabal-files/js-flot.nix | 47 +++++ .../hadrian/cabal-files/js-jquery.nix | 48 +++++ .../hadrian-ghc94/hadrian/cabal-files/mtl.nix | 41 ++++ .../hadrian/cabal-files/parsec.nix | 84 ++++++++ .../hadrian/cabal-files/primitive.nix | 73 +++++++ .../hadrian/cabal-files/process.nix | 61 ++++++ .../hadrian/cabal-files/random.nix | 113 ++++++++++ .../hadrian/cabal-files/shake.nix | 132 ++++++++++++ .../hadrian/cabal-files/splitmix.nix | 139 +++++++++++++ .../hadrian/cabal-files/transformers.nix | 40 ++++ .../hadrian/cabal-files/unix.nix | 168 +++++++++++++++ .../cabal-files/unordered-containers.nix | 78 +++++++ .../hadrian/cabal-files/utf8-string.nix | 51 +++++ .../ghc964/hadrian-ghc94/hadrian/default.nix | 142 +++++++++++++ .../hadrian/.plan.nix/hadrian.nix | 13 +- .../hadrian/cabal-files/Cabal-syntax.nix | 16 +- .../hadrian/cabal-files/Cabal.nix | 16 +- .../hadrian/cabal-files/QuickCheck.nix | 64 +++--- .../hadrian/cabal-files/clock.nix | 22 +- .../hadrian/cabal-files/extra.nix | 20 +- .../hadrian/cabal-files/filepattern.nix | 20 +- .../hadrian/cabal-files/hashable.nix | 30 +-- .../hadrian/cabal-files/heaps.nix | 14 +- .../hadrian/cabal-files/js-dgtable.nix | 18 +- .../hadrian/cabal-files/js-flot.nix | 18 +- .../hadrian/cabal-files/js-jquery.nix | 18 +- .../hadrian/cabal-files/primitive.nix | 24 +-- .../hadrian/cabal-files/random.nix | 42 ++-- .../hadrian/cabal-files/shake.nix | 36 ++-- .../hadrian/cabal-files/splitmix.nix | 56 ++--- .../cabal-files/unordered-containers.nix | 24 +-- .../hadrian/cabal-files/utf8-string.nix | 20 +- .../ghc964/hadrian-ghc96/hadrian/default.nix | 188 ++++++++--------- .../hadrian/.plan.nix/hadrian.nix | 13 +- .../hadrian/cabal-files/Cabal-syntax.nix | 16 +- .../hadrian/cabal-files/Cabal.nix | 16 +- .../hadrian/cabal-files/QuickCheck.nix | 64 +++--- .../hadrian/cabal-files/base16-bytestring.nix | 24 +-- .../hadrian/cabal-files/clock.nix | 22 +- .../hadrian/cabal-files/cryptohash-sha256.nix | 34 +-- .../hadrian/cabal-files/extra.nix | 20 +- .../hadrian/cabal-files/filepattern.nix | 20 +- .../hadrian/cabal-files/hashable.nix | 30 +-- .../hadrian/cabal-files/heaps.nix | 14 +- .../hadrian/cabal-files/js-dgtable.nix | 18 +- .../hadrian/cabal-files/js-flot.nix | 18 +- .../hadrian/cabal-files/js-jquery.nix | 18 +- .../hadrian/cabal-files/primitive.nix | 24 +-- .../hadrian/cabal-files/random.nix | 42 ++-- .../hadrian/cabal-files/shake.nix | 36 ++-- .../hadrian/cabal-files/splitmix.nix | 56 ++--- .../cabal-files/unordered-containers.nix | 24 +-- .../hadrian/cabal-files/utf8-string.nix | 20 +- .../ghc964/hadrian-ghc98/hadrian/default.nix | 194 +++++++++--------- .../hadrian/.plan.nix/ghc-platform.nix | 41 ++++ .../hadrian/.plan.nix/ghc-toolchain.nix | 70 +++++++ .../hadrian/.plan.nix/hadrian.nix | 169 +++++++++++++++ .../hadrian/cabal-files/QuickCheck.nix | 119 +++++++++++ .../hadrian/cabal-files/base16-bytestring.nix | 68 ++++++ .../hadrian/cabal-files/clock.nix | 59 ++++++ .../hadrian/cabal-files/cryptohash-sha256.nix | 84 ++++++++ .../hadrian/cabal-files/extra.nix | 58 ++++++ .../hadrian/cabal-files/filepattern.nix | 56 +++++ .../hadrian/cabal-files/hashable.nix | 82 ++++++++ .../hadrian/cabal-files/heaps.nix | 38 ++++ .../hadrian/cabal-files/js-dgtable.nix | 47 +++++ .../hadrian/cabal-files/js-flot.nix | 47 +++++ .../hadrian/cabal-files/js-jquery.nix | 48 +++++ .../hadrian/cabal-files/primitive.nix | 73 +++++++ .../hadrian/cabal-files/random.nix | 113 ++++++++++ .../hadrian/cabal-files/shake.nix | 132 ++++++++++++ .../hadrian/cabal-files/splitmix.nix | 139 +++++++++++++ .../cabal-files/unordered-containers.nix | 78 +++++++ .../hadrian/cabal-files/utf8-string.nix | 51 +++++ .../ghc964/hadrian-ghc99/hadrian/default.nix | 166 +++++++++++++++ 89 files changed, 4609 insertions(+), 691 deletions(-) create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/.plan.nix/hadrian.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/Cabal-syntax.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/Cabal.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/QuickCheck.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/clock.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/directory.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/exceptions.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/extra.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/filepath.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/filepattern.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/hashable.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/heaps.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-dgtable.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-flot.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-jquery.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/mtl.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/parsec.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/primitive.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/process.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/random.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/shake.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/splitmix.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/transformers.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/unix.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/unordered-containers.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/utf8-string.nix create mode 100644 materialized/ghc964/hadrian-ghc94/hadrian/default.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/clock.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/extra.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/filepattern.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/hashable.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/heaps.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-flot.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/primitive.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/random.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/shake.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/splitmix.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix create mode 100644 materialized/ghc964/hadrian-ghc99/hadrian/default.nix diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 6353f9d28b..68f7bb9c6c 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -251,7 +251,9 @@ let compiler-nix-name = if builtins.compareVersions ghc-version "9.4.7" < 0 then "ghc928" - else "ghc962"; + else if buildPackages.haskell.compiler ? ghc964 + then "ghc964" + else "ghc962"; in buildPackages.haskell-nix.tool compiler-nix-name "hadrian" { compilerSelection = p: p.haskell.compiler; @@ -267,6 +269,7 @@ let else if builtins.compareVersions ghc-version "9.9" < 0 then ../../materialized/${compiler-nix-name}/hadrian-ghc98 else ../../materialized/${compiler-nix-name}/hadrian-ghc99; + checkMaterialization = true; modules = [{ reinstallableLibGhc = false; # Apply the patches in a way that does not require using something diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/.plan.nix/hadrian.nix b/materialized/ghc964/hadrian-ghc94/hadrian/.plan.nix/hadrian.nix new file mode 100644 index 0000000000..6a031230a6 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/.plan.nix/hadrian.nix @@ -0,0 +1,161 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + { + flags = { threaded = true; selftest = true; }; + package = { + specVersion = "1.18"; + identifier = { name = "hadrian"; version = "0.1.0.0"; }; + license = "BSD-3-Clause"; + copyright = "Andrey Mokhov 2014-2017"; + maintainer = "Andrey Mokhov , github: @snowleopard"; + author = "Andrey Mokhov , github: @snowleopard"; + homepage = ""; + url = ""; + synopsis = "GHC build system"; + description = ""; + buildType = "Simple"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = [ "LICENSE" ]; + dataDir = "."; + dataFiles = []; + extraSrcFiles = []; + extraTmpFiles = []; + extraDocFiles = [ "README.md" ]; + }; + components = { + exes = { + "hadrian" = { + depends = [ + (hsPkgs."Cabal" or (errorHandler.buildDepError "Cabal")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + (hsPkgs."shake" or (errorHandler.buildDepError "shake")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ pkgs.lib.optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + buildable = true; + 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/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" + "Rules" + "Rules/BinaryDist" + "Rules/CabalReinstall" + "Rules/Clean" + "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/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" + ] ++ pkgs.lib.optional (flags.selftest) "Rules/Selftest"; + hsSourceDirs = [ "." "src" ]; + mainPath = ([ + "Main.hs" + ] ++ pkgs.lib.optional (flags.threaded) "") ++ pkgs.lib.optional (flags.selftest) ""; + }; + }; + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/Cabal-syntax.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/Cabal-syntax.nix new file mode 100644 index 0000000000..dabbcbdee8 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/Cabal-syntax.nix @@ -0,0 +1,55 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.22"; + identifier = { name = "Cabal-syntax"; version = "3.8.1.0"; }; + license = "BSD-3-Clause"; + copyright = "2003-2022, Cabal Development Team (see AUTHORS file)"; + maintainer = "cabal-devel@haskell.org"; + author = "Cabal Development Team "; + homepage = "http://www.haskell.org/cabal/"; + url = ""; + synopsis = "A library for working with .cabal files"; + description = "This library provides tools for reading and manipulating the .cabal file\nformat."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."array" or (errorHandler.buildDepError "array")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + (hsPkgs."pretty" or (errorHandler.buildDepError "pretty")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ] ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); + buildable = true; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/Cabal-syntax-3.8.1.0.tar.gz"; + sha256 = "07e8ddb19fe01781485f1522b6afc22aba680b0ab28ebe6bbfb84a2dd698ce0f"; + }); + }) // { + package-description-override = "cabal-version: 1.22\r\nname: Cabal-syntax\r\nversion: 3.8.1.0\r\nx-revision: 3\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A library for working with .cabal files\r\ndescription:\r\n This library provides tools for reading and manipulating the .cabal file\r\n format.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal-syntax\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.9 && < 5,\r\n binary >= 0.7 && < 0.9,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n mtl >= 2.1 && < 2.4,\r\n parsec >= 3.1.13.0 && < 3.2,\r\n pretty >= 1.1.1 && < 1.2,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n time >= 1.4.0.1 && < 1.13,\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7)\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc < 8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack\r\n Distribution.CabalSpecVersion\r\n Distribution.Compat.Binary\r\n Distribution.Compat.CharParsing\r\n Distribution.Compat.DList\r\n Distribution.Compat.Exception\r\n Distribution.Compat.Graph\r\n Distribution.Compat.Lens\r\n Distribution.Compat.MonadFail\r\n Distribution.Compat.Newtype\r\n Distribution.Compat.NonEmptySet\r\n Distribution.Compat.Parsing\r\n Distribution.Compat.Prelude\r\n Distribution.Compat.Semigroup\r\n Distribution.Compat.Typeable\r\n Distribution.Compiler\r\n Distribution.FieldGrammar\r\n Distribution.FieldGrammar.Class\r\n Distribution.FieldGrammar.FieldDescrs\r\n Distribution.FieldGrammar.Newtypes\r\n Distribution.FieldGrammar.Parsec\r\n Distribution.FieldGrammar.Pretty\r\n Distribution.Fields\r\n Distribution.Fields.ConfVar\r\n Distribution.Fields.Field\r\n Distribution.Fields.Lexer\r\n Distribution.Fields.LexerMonad\r\n Distribution.Fields.ParseResult\r\n Distribution.Fields.Parser\r\n Distribution.Fields.Pretty\r\n Distribution.InstalledPackageInfo\r\n Distribution.License\r\n Distribution.ModuleName\r\n Distribution.Package\r\n Distribution.PackageDescription\r\n Distribution.PackageDescription.Configuration\r\n Distribution.PackageDescription.FieldGrammar\r\n Distribution.PackageDescription.Parsec\r\n Distribution.PackageDescription.PrettyPrint\r\n Distribution.PackageDescription.Quirks\r\n Distribution.PackageDescription.Utils\r\n Distribution.Parsec\r\n Distribution.Parsec.Error\r\n Distribution.Parsec.FieldLineStream\r\n Distribution.Parsec.Position\r\n Distribution.Parsec.Warning\r\n Distribution.Pretty\r\n Distribution.SPDX\r\n Distribution.SPDX.License\r\n Distribution.SPDX.LicenseExceptionId\r\n Distribution.SPDX.LicenseExpression\r\n Distribution.SPDX.LicenseId\r\n Distribution.SPDX.LicenseListVersion\r\n Distribution.SPDX.LicenseReference\r\n Distribution.System\r\n Distribution.Text\r\n Distribution.Types.AbiDependency\r\n Distribution.Types.AbiHash\r\n Distribution.Types.Benchmark\r\n Distribution.Types.Benchmark.Lens\r\n Distribution.Types.BenchmarkInterface\r\n Distribution.Types.BenchmarkType\r\n Distribution.Types.BuildInfo\r\n Distribution.Types.BuildInfo.Lens\r\n Distribution.Types.BuildType\r\n Distribution.Types.Component\r\n Distribution.Types.ComponentId\r\n Distribution.Types.ComponentName\r\n Distribution.Types.ComponentRequestedSpec\r\n Distribution.Types.CondTree\r\n Distribution.Types.Condition\r\n Distribution.Types.ConfVar\r\n Distribution.Types.Dependency\r\n Distribution.Types.DependencyMap\r\n Distribution.Types.ExeDependency\r\n Distribution.Types.Executable\r\n Distribution.Types.Executable.Lens\r\n Distribution.Types.ExecutableScope\r\n Distribution.Types.ExposedModule\r\n Distribution.Types.Flag\r\n Distribution.Types.ForeignLib\r\n Distribution.Types.ForeignLib.Lens\r\n Distribution.Types.ForeignLibOption\r\n Distribution.Types.ForeignLibType\r\n Distribution.Types.GenericPackageDescription\r\n Distribution.Types.GenericPackageDescription.Lens\r\n Distribution.Types.HookedBuildInfo\r\n Distribution.Types.IncludeRenaming\r\n Distribution.Types.InstalledPackageInfo\r\n Distribution.Types.InstalledPackageInfo.Lens\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar\r\n Distribution.Types.LegacyExeDependency\r\n Distribution.Types.Lens\r\n Distribution.Types.Library\r\n Distribution.Types.Library.Lens\r\n Distribution.Types.LibraryName\r\n Distribution.Types.LibraryVisibility\r\n Distribution.Types.Mixin\r\n Distribution.Types.Module\r\n Distribution.Types.ModuleReexport\r\n Distribution.Types.ModuleRenaming\r\n Distribution.Types.MungedPackageId\r\n Distribution.Types.MungedPackageName\r\n Distribution.Types.PackageDescription\r\n Distribution.Types.PackageDescription.Lens\r\n Distribution.Types.PackageId\r\n Distribution.Types.PackageId.Lens\r\n Distribution.Types.PackageName\r\n Distribution.Types.PackageVersionConstraint\r\n Distribution.Types.PkgconfigDependency\r\n Distribution.Types.PkgconfigName\r\n Distribution.Types.PkgconfigVersion\r\n Distribution.Types.PkgconfigVersionRange\r\n Distribution.Types.SetupBuildInfo\r\n Distribution.Types.SetupBuildInfo.Lens\r\n Distribution.Types.SourceRepo\r\n Distribution.Types.SourceRepo.Lens\r\n Distribution.Types.TestSuite\r\n Distribution.Types.TestSuite.Lens\r\n Distribution.Types.TestSuiteInterface\r\n Distribution.Types.TestType\r\n Distribution.Types.UnitId\r\n Distribution.Types.UnqualComponentName\r\n Distribution.Types.Version\r\n Distribution.Types.VersionInterval\r\n Distribution.Types.VersionInterval.Legacy\r\n Distribution.Types.VersionRange\r\n Distribution.Types.VersionRange.Internal\r\n Distribution.Utils.Base62\r\n Distribution.Utils.Generic\r\n Distribution.Utils.MD5\r\n Distribution.Utils.Path\r\n Distribution.Utils.ShortText\r\n Distribution.Utils.String\r\n Distribution.Utils.Structured\r\n Distribution.Version\r\n Language.Haskell.Extension\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/Cabal.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/Cabal.nix new file mode 100644 index 0000000000..be0b5019d9 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/Cabal.nix @@ -0,0 +1,56 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.22"; + identifier = { name = "Cabal"; version = "3.8.1.0"; }; + license = "BSD-3-Clause"; + copyright = "2003-2022, Cabal Development Team (see AUTHORS file)"; + maintainer = "cabal-devel@haskell.org"; + author = "Cabal Development Team "; + homepage = "http://www.haskell.org/cabal/"; + url = ""; + synopsis = "A framework for packaging Haskell software"; + description = "The Haskell Common Architecture for Building Applications and\nLibraries: a framework defining a common interface for authors to more\neasily build their Haskell applications in a portable way.\n\nThe Haskell Cabal is part of a larger infrastructure for distributing,\norganizing, and cataloging Haskell libraries and tools."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ([ + (hsPkgs."Cabal-syntax" or (errorHandler.buildDepError "Cabal-syntax")) + (hsPkgs."array" or (errorHandler.buildDepError "array")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."pretty" or (errorHandler.buildDepError "pretty")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); + buildable = true; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/Cabal-3.8.1.0.tar.gz"; + sha256 = "7464cbe6c2f3d7e5d0232023a1a7330621f8b24853cb259fc89a2af85b736608"; + }); + }) // { + package-description-override = "cabal-version: 1.22\r\nname: Cabal\r\nversion: 3.8.1.0\r\nx-revision: 2\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A framework for packaging Haskell software\r\ndescription:\r\n The Haskell Common Architecture for Building Applications and\r\n Libraries: a framework defining a common interface for authors to more\r\n easily build their Haskell applications in a portable way.\r\n .\r\n The Haskell Cabal is part of a larger infrastructure for distributing,\r\n organizing, and cataloging Haskell libraries and tools.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n-- If we use a new Cabal feature, this needs to be changed to Custom so\r\n-- we can bootstrap.\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n Cabal-syntax >= 3.8 && < 3.9,\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.6 && < 5,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n pretty >= 1.1.1 && < 1.2,\r\n process >= 1.2.1.0 && < 1.7,\r\n time >= 1.4.0.1 && < 1.13\r\n\r\n -- PR #8802: moved conditional process lower bound to cabal-install package\r\n if impl(ghc >=8.2)\r\n build-depends: process >= 1.2.1.0\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc <8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack.Configure\r\n Distribution.Backpack.ComponentsGraph\r\n Distribution.Backpack.ConfiguredComponent\r\n Distribution.Backpack.DescribeUnitId\r\n Distribution.Backpack.FullUnitId\r\n Distribution.Backpack.LinkedComponent\r\n Distribution.Backpack.ModSubst\r\n Distribution.Backpack.ModuleShape\r\n Distribution.Backpack.PreModuleShape\r\n Distribution.Utils.IOData\r\n Distribution.Utils.LogProgress\r\n Distribution.Utils.MapAccum\r\n Distribution.Compat.CreatePipe\r\n Distribution.Compat.Directory\r\n Distribution.Compat.Environment\r\n Distribution.Compat.FilePath\r\n Distribution.Compat.Internal.TempFile\r\n Distribution.Compat.ResponseFile\r\n Distribution.Compat.Prelude.Internal\r\n Distribution.Compat.Process\r\n Distribution.Compat.Stack\r\n Distribution.Compat.Time\r\n Distribution.Make\r\n Distribution.PackageDescription.Check\r\n Distribution.ReadE\r\n Distribution.Simple\r\n Distribution.Simple.Bench\r\n Distribution.Simple.Build\r\n Distribution.Simple.Build.Macros\r\n Distribution.Simple.Build.PathsModule\r\n Distribution.Simple.BuildPaths\r\n Distribution.Simple.BuildTarget\r\n Distribution.Simple.BuildToolDepends\r\n Distribution.Simple.CCompiler\r\n Distribution.Simple.Command\r\n Distribution.Simple.Compiler\r\n Distribution.Simple.Configure\r\n Distribution.Simple.Flag\r\n Distribution.Simple.GHC\r\n Distribution.Simple.GHCJS\r\n Distribution.Simple.Haddock\r\n Distribution.Simple.Glob\r\n Distribution.Simple.HaskellSuite\r\n Distribution.Simple.Hpc\r\n Distribution.Simple.Install\r\n Distribution.Simple.InstallDirs\r\n Distribution.Simple.InstallDirs.Internal\r\n Distribution.Simple.LocalBuildInfo\r\n Distribution.Simple.PackageDescription\r\n Distribution.Simple.PackageIndex\r\n Distribution.Simple.PreProcess\r\n Distribution.Simple.PreProcess.Unlit\r\n Distribution.Simple.Program\r\n Distribution.Simple.Program.Ar\r\n Distribution.Simple.Program.Builtin\r\n Distribution.Simple.Program.Db\r\n Distribution.Simple.Program.Find\r\n Distribution.Simple.Program.GHC\r\n Distribution.Simple.Program.HcPkg\r\n Distribution.Simple.Program.Hpc\r\n Distribution.Simple.Program.Internal\r\n Distribution.Simple.Program.Ld\r\n Distribution.Simple.Program.ResponseFile\r\n Distribution.Simple.Program.Run\r\n Distribution.Simple.Program.Script\r\n Distribution.Simple.Program.Strip\r\n Distribution.Simple.Program.Types\r\n Distribution.Simple.Register\r\n Distribution.Simple.Setup\r\n Distribution.Simple.ShowBuildInfo\r\n Distribution.Simple.SrcDist\r\n Distribution.Simple.Test\r\n Distribution.Simple.Test.ExeV10\r\n Distribution.Simple.Test.LibV09\r\n Distribution.Simple.Test.Log\r\n Distribution.Simple.UHC\r\n Distribution.Simple.UserHooks\r\n Distribution.Simple.Utils\r\n Distribution.TestSuite\r\n Distribution.Types.AnnotatedId\r\n Distribution.Types.ComponentInclude\r\n Distribution.Types.DumpBuildInfo\r\n Distribution.Types.PackageName.Magic\r\n Distribution.Types.ComponentLocalBuildInfo\r\n Distribution.Types.LocalBuildInfo\r\n Distribution.Types.TargetInfo\r\n Distribution.Types.GivenComponent\r\n Distribution.Utils.Json\r\n Distribution.Utils.NubList\r\n Distribution.Utils.Progress\r\n Distribution.Verbosity\r\n Distribution.Verbosity.Internal\r\n\r\n -- We reexport all of Cabal-syntax to aid in compatibility for downstream\r\n -- users. In the future we may opt to deprecate some or all of these exports.\r\n -- See haskell/Cabal#7974.\r\n reexported-modules:\r\n Distribution.Backpack,\r\n Distribution.CabalSpecVersion,\r\n Distribution.Compat.Binary,\r\n Distribution.Compat.CharParsing,\r\n Distribution.Compat.DList,\r\n Distribution.Compat.Exception,\r\n Distribution.Compat.Graph,\r\n Distribution.Compat.Lens,\r\n Distribution.Compat.MonadFail,\r\n Distribution.Compat.Newtype,\r\n Distribution.Compat.NonEmptySet,\r\n Distribution.Compat.Parsing,\r\n Distribution.Compat.Prelude,\r\n Distribution.Compat.Semigroup,\r\n Distribution.Compat.Typeable,\r\n Distribution.Compiler,\r\n Distribution.FieldGrammar,\r\n Distribution.FieldGrammar.Class,\r\n Distribution.FieldGrammar.FieldDescrs,\r\n Distribution.FieldGrammar.Newtypes,\r\n Distribution.FieldGrammar.Parsec,\r\n Distribution.FieldGrammar.Pretty,\r\n Distribution.Fields,\r\n Distribution.Fields.ConfVar,\r\n Distribution.Fields.Field,\r\n Distribution.Fields.Lexer,\r\n Distribution.Fields.LexerMonad,\r\n Distribution.Fields.ParseResult,\r\n Distribution.Fields.Parser,\r\n Distribution.Fields.Pretty,\r\n Distribution.InstalledPackageInfo,\r\n Distribution.License,\r\n Distribution.ModuleName,\r\n Distribution.Package,\r\n Distribution.PackageDescription,\r\n Distribution.PackageDescription.Configuration,\r\n Distribution.PackageDescription.FieldGrammar,\r\n Distribution.PackageDescription.Parsec,\r\n Distribution.PackageDescription.PrettyPrint,\r\n Distribution.PackageDescription.Quirks,\r\n Distribution.PackageDescription.Utils,\r\n Distribution.Parsec,\r\n Distribution.Parsec.Error,\r\n Distribution.Parsec.FieldLineStream,\r\n Distribution.Parsec.Position,\r\n Distribution.Parsec.Warning,\r\n Distribution.Pretty,\r\n Distribution.SPDX,\r\n Distribution.SPDX.License,\r\n Distribution.SPDX.LicenseExceptionId,\r\n Distribution.SPDX.LicenseExpression,\r\n Distribution.SPDX.LicenseId,\r\n Distribution.SPDX.LicenseListVersion,\r\n Distribution.SPDX.LicenseReference,\r\n Distribution.System,\r\n Distribution.Text,\r\n Distribution.Types.AbiDependency,\r\n Distribution.Types.AbiHash,\r\n Distribution.Types.Benchmark,\r\n Distribution.Types.Benchmark.Lens,\r\n Distribution.Types.BenchmarkInterface,\r\n Distribution.Types.BenchmarkType,\r\n Distribution.Types.BuildInfo,\r\n Distribution.Types.BuildInfo.Lens,\r\n Distribution.Types.BuildType,\r\n Distribution.Types.Component,\r\n Distribution.Types.ComponentId,\r\n Distribution.Types.ComponentName,\r\n Distribution.Types.ComponentRequestedSpec,\r\n Distribution.Types.CondTree,\r\n Distribution.Types.Condition,\r\n Distribution.Types.ConfVar,\r\n Distribution.Types.Dependency,\r\n Distribution.Types.DependencyMap,\r\n Distribution.Types.ExeDependency,\r\n Distribution.Types.Executable,\r\n Distribution.Types.Executable.Lens,\r\n Distribution.Types.ExecutableScope,\r\n Distribution.Types.ExposedModule,\r\n Distribution.Types.Flag,\r\n Distribution.Types.ForeignLib,\r\n Distribution.Types.ForeignLib.Lens,\r\n Distribution.Types.ForeignLibOption,\r\n Distribution.Types.ForeignLibType,\r\n Distribution.Types.GenericPackageDescription,\r\n Distribution.Types.GenericPackageDescription.Lens,\r\n Distribution.Types.HookedBuildInfo,\r\n Distribution.Types.IncludeRenaming,\r\n Distribution.Types.InstalledPackageInfo,\r\n Distribution.Types.InstalledPackageInfo.Lens,\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar,\r\n Distribution.Types.LegacyExeDependency,\r\n Distribution.Types.Lens,\r\n Distribution.Types.Library,\r\n Distribution.Types.Library.Lens,\r\n Distribution.Types.LibraryName,\r\n Distribution.Types.LibraryVisibility,\r\n Distribution.Types.Mixin,\r\n Distribution.Types.Module,\r\n Distribution.Types.ModuleReexport,\r\n Distribution.Types.ModuleRenaming,\r\n Distribution.Types.MungedPackageId,\r\n Distribution.Types.MungedPackageName,\r\n Distribution.Types.PackageDescription,\r\n Distribution.Types.PackageDescription.Lens,\r\n Distribution.Types.PackageId,\r\n Distribution.Types.PackageId.Lens,\r\n Distribution.Types.PackageName,\r\n Distribution.Types.PackageVersionConstraint,\r\n Distribution.Types.PkgconfigDependency,\r\n Distribution.Types.PkgconfigName,\r\n Distribution.Types.PkgconfigVersion,\r\n Distribution.Types.PkgconfigVersionRange,\r\n Distribution.Types.SetupBuildInfo,\r\n Distribution.Types.SetupBuildInfo.Lens,\r\n Distribution.Types.SourceRepo,\r\n Distribution.Types.SourceRepo.Lens,\r\n Distribution.Types.TestSuite,\r\n Distribution.Types.TestSuite.Lens,\r\n Distribution.Types.TestSuiteInterface,\r\n Distribution.Types.TestType,\r\n Distribution.Types.UnitId,\r\n Distribution.Types.UnqualComponentName,\r\n Distribution.Types.Version,\r\n Distribution.Types.VersionInterval,\r\n Distribution.Types.VersionInterval.Legacy,\r\n Distribution.Types.VersionRange,\r\n Distribution.Types.VersionRange.Internal,\r\n Distribution.Utils.Base62,\r\n Distribution.Utils.Generic,\r\n Distribution.Utils.MD5,\r\n Distribution.Utils.Path,\r\n Distribution.Utils.ShortText,\r\n Distribution.Utils.String,\r\n Distribution.Utils.Structured,\r\n Distribution.Version,\r\n Language.Haskell.Extension\r\n\r\n -- Parsec parser-related modules\r\n build-depends:\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7),\r\n mtl >= 2.1 && < 2.4,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n parsec >= 3.1.13.0 && < 3.2\r\n\r\n other-modules:\r\n Distribution.Backpack.PreExistingComponent\r\n Distribution.Backpack.ReadyComponent\r\n Distribution.Backpack.MixLink\r\n Distribution.Backpack.ModuleScope\r\n Distribution.Backpack.UnifyM\r\n Distribution.Backpack.Id\r\n Distribution.Utils.UnionFind\r\n Distribution.Compat.Async\r\n Distribution.Compat.CopyFile\r\n Distribution.Compat.GetShortPathName\r\n Distribution.Compat.SnocList\r\n Distribution.GetOpt\r\n Distribution.Lex\r\n Distribution.Simple.Build.Macros.Z\r\n Distribution.Simple.Build.PathsModule.Z\r\n Distribution.Simple.GHC.EnvironmentParser\r\n Distribution.Simple.GHC.Internal\r\n Distribution.Simple.GHC.ImplInfo\r\n Distribution.ZinzaPrelude\r\n Paths_Cabal\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n LambdaCase\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/QuickCheck.nix new file mode 100644 index 0000000000..62e36aa8b6 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/QuickCheck.nix @@ -0,0 +1,119 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { templatehaskell = true; old-random = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "QuickCheck"; version = "2.14.3"; }; + license = "BSD-3-Clause"; + copyright = "2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone"; + maintainer = "Nick Smallbone "; + author = "Koen Claessen "; + homepage = "https://github.com/nick8325/quickcheck"; + url = ""; + synopsis = "Automatic testing of Haskell programs"; + description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ((((((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + ] ++ [ + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]) ++ pkgs.lib.optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ pkgs.lib.optionals (compiler.isGhc && true) [ + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ]) ++ pkgs.lib.optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ pkgs.lib.optionals (compiler.isUhc && true) [ + (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) + (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) + ]; + buildable = true; + }; + tests = { + "test-quickcheck" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell then false else true; + }; + "test-quickcheck-gcoarbitrary" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") + then false + else true; + }; + "test-quickcheck-generators" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell then false else true; + }; + "test-quickcheck-gshrink" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") + then false + else true; + }; + "test-quickcheck-terminal" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") + then false + else true; + }; + "test-quickcheck-monadfix" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") + then false + else true; + }; + "test-quickcheck-split" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + "test-quickcheck-misc" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") + then false + else true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; + sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; + }); + }) // { + package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/clock.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/clock.nix new file mode 100644 index 0000000000..1db6e2d90d --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/clock.nix @@ -0,0 +1,59 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { llvm = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "clock"; version = "0.8.4"; }; + license = "BSD-3-Clause"; + copyright = "Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; + maintainer = "Cetin Sert , Elefunc, Inc."; + author = "Cetin Sert , Elefunc, Inc."; + homepage = "https://github.com/corsis/clock"; + url = ""; + synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; + description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + ]; + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; + sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/directory.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/directory.nix new file mode 100644 index 0000000000..a93c7eb928 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/directory.nix @@ -0,0 +1,57 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "2.2"; + identifier = { name = "directory"; version = "1.3.8.1"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "libraries@haskell.org"; + author = ""; + homepage = ""; + url = ""; + synopsis = "Platform-agnostic library for filesystem operations"; + description = "This library provides a basic set of operations for manipulating files and\ndirectories in a portable way."; + buildType = "Configure"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + ] ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); + buildable = true; + }; + tests = { + "test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ] ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/directory-1.3.8.1.tar.gz"; + sha256 = "bd8253197587d32d4553070d2de89d3817176860932b0e9ab7bb7ba3759d8e9c"; + }); + }) // { + package-description-override = "cabal-version: 2.2\r\nname: directory\r\nversion: 1.3.8.1\r\nx-revision: 1\r\nlicense: BSD-3-Clause\r\nlicense-file: LICENSE\r\nmaintainer: libraries@haskell.org\r\nbug-reports: https://github.com/haskell/directory/issues\r\nsynopsis: Platform-agnostic library for filesystem operations\r\ndescription:\r\n This library provides a basic set of operations for manipulating files and\r\n directories in a portable way.\r\ncategory: System\r\nbuild-type: Configure\r\ntested-with: GHC == 8.6.5 || == 8.10.7 || == 9.0.2 || == 9.2.4 || == 9.4.3\r\n\r\nextra-tmp-files:\r\n autom4te.cache\r\n config.log\r\n config.status\r\n HsDirectoryConfig.h\r\n\r\nextra-source-files:\r\n HsDirectoryConfig.h.in\r\n README.md\r\n System/Directory/Internal/*.h\r\n changelog.md\r\n configure\r\n configure.ac\r\n directory.buildinfo\r\n tests/*.hs\r\n tests/util.inl\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/directory\r\n\r\nLibrary\r\n default-language: Haskell2010\r\n other-extensions: CApiFFI, CPP\r\n\r\n exposed-modules:\r\n System.Directory\r\n System.Directory.OsPath\r\n System.Directory.Internal\r\n System.Directory.Internal.Prelude\r\n other-modules:\r\n System.Directory.Internal.C_utimensat\r\n System.Directory.Internal.Common\r\n System.Directory.Internal.Config\r\n System.Directory.Internal.Posix\r\n System.Directory.Internal.Windows\r\n\r\n include-dirs: .\r\n\r\n build-depends:\r\n base >= 4.11.0 && < 4.20,\r\n time >= 1.8.0 && < 1.13,\r\n filepath >= 1.4.100 && < 1.5\r\n if os(windows)\r\n build-depends: Win32 >= 2.13.3 && < 2.14\r\n else\r\n build-depends: unix >= 2.8.0 && < 2.9\r\n\r\n ghc-options: -Wall\r\n\r\ntest-suite test\r\n default-language: Haskell2010\r\n other-extensions: BangPatterns, CPP\r\n default-extensions: OverloadedStrings\r\n ghc-options: -Wall\r\n hs-source-dirs: tests\r\n main-is: Main.hs\r\n type: exitcode-stdio-1.0\r\n build-depends: base, directory, filepath, time\r\n if os(windows)\r\n build-depends: Win32\r\n else\r\n build-depends: unix\r\n other-modules:\r\n TestUtils\r\n Util\r\n -- test-modules-begin\r\n CanonicalizePath\r\n CopyFile001\r\n CopyFile002\r\n CopyFileWithMetadata\r\n CreateDirectory001\r\n CreateDirectoryIfMissing001\r\n CurrentDirectory001\r\n Directory001\r\n DoesDirectoryExist001\r\n DoesPathExist\r\n FileTime\r\n FindFile001\r\n GetDirContents001\r\n GetDirContents002\r\n GetFileSize\r\n GetHomeDirectory001\r\n GetHomeDirectory002\r\n GetPermissions001\r\n LongPaths\r\n MakeAbsolute\r\n MinimizeNameConflicts\r\n PathIsSymbolicLink\r\n RemoveDirectoryRecursive001\r\n RemovePathForcibly\r\n RenameDirectory\r\n RenameFile001\r\n RenamePath\r\n Simplify\r\n T8482\r\n WithCurrentDirectory\r\n Xdg\r\n -- test-modules-end\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/exceptions.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/exceptions.nix new file mode 100644 index 0000000000..6c5da3df95 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/exceptions.nix @@ -0,0 +1,73 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { transformers-0-4 = true; }; + package = { + specVersion = "1.10"; + identifier = { name = "exceptions"; version = "0.10.7"; }; + license = "BSD-3-Clause"; + copyright = "Copyright (C) 2013-2015 Edward A. Kmett\nCopyright (C) 2012 Google Inc."; + maintainer = "Edward A. Kmett "; + author = "Edward A. Kmett"; + homepage = "http://github.com/ekmett/exceptions/"; + url = ""; + synopsis = "Extensible optionally-pure exceptions"; + description = "Extensible optionally-pure exceptions."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "8.0")) (hsPkgs."fail" or (errorHandler.buildDepError "fail"))) ++ (if flags.transformers-0-4 + then [ + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ] + else [ + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) + ]); + buildable = true; + }; + tests = { + "exceptions-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ (if flags.transformers-0-4 + then [ + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ] + else [ + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) + ]); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/exceptions-0.10.7.tar.gz"; + sha256 = "9a42ade4c8b53d8da5350e8e0e2929f4ef128c4b8591b120656455310b546049"; + }); + }) // { + package-description-override = "name: exceptions\r\ncategory: Control, Exceptions, Monad\r\nversion: 0.10.7\r\nx-revision: 1\r\ncabal-version: >= 1.10\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Edward A. Kmett\r\nmaintainer: Edward A. Kmett \r\nstability: provisional\r\nhomepage: http://github.com/ekmett/exceptions/\r\nbug-reports: http://github.com/ekmett/exceptions/issues\r\ncopyright: Copyright (C) 2013-2015 Edward A. Kmett\r\n Copyright (C) 2012 Google Inc.\r\nbuild-type: Simple\r\ntested-with: GHC == 7.4.2\r\n , GHC == 7.6.3\r\n , GHC == 7.8.4\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.4\r\n , GHC == 8.10.7\r\n , GHC == 9.0.2\r\n , GHC == 9.2.2\r\nsynopsis: Extensible optionally-pure exceptions\r\ndescription: Extensible optionally-pure exceptions.\r\n\r\nextra-source-files:\r\n .ghci\r\n .gitignore\r\n .vim.custom\r\n AUTHORS.markdown\r\n README.markdown\r\n CHANGELOG.markdown\r\n\r\nsource-repository head\r\n type: git\r\n location: git://github.com/ekmett/exceptions.git\r\n\r\nflag transformers-0-4\r\n description: Use @transformers-0.4@ or later.\r\n default: True\r\n\r\nlibrary\r\n build-depends:\r\n base >= 4.5 && < 5,\r\n stm >= 2.2 && < 3,\r\n template-haskell >= 2.7 && < 2.21,\r\n mtl >= 2.0 && < 2.4\r\n\r\n if !impl(ghc >= 8.0)\r\n build-depends: fail == 4.9.*\r\n\r\n if flag(transformers-0-4)\r\n build-depends:\r\n transformers >= 0.4 && < 0.7\r\n else\r\n build-depends:\r\n transformers >= 0.2 && < 0.4,\r\n transformers-compat >= 0.3 && < 0.8\r\n\r\n exposed-modules:\r\n Control.Monad.Catch\r\n Control.Monad.Catch.Pure\r\n\r\n ghc-options: -Wall -fwarn-tabs -O2\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n\r\ntest-suite exceptions-tests\r\n main-is: Tests.hs\r\n other-modules: Control.Monad.Catch.Tests\r\n hs-source-dirs: tests\r\n ghc-options: -Wall -fwarn-tabs\r\n default-language: Haskell2010\r\n type: exitcode-stdio-1.0\r\n build-depends:\r\n base,\r\n exceptions,\r\n stm,\r\n template-haskell,\r\n mtl >= 2.0,\r\n test-framework >= 0.8 && < 0.9,\r\n test-framework-hunit >= 0.3 && < 0.4,\r\n test-framework-quickcheck2 >= 0.3 && < 0.4,\r\n QuickCheck >= 2.5 && < 2.15\r\n\r\n if flag(transformers-0-4)\r\n build-depends:\r\n transformers >= 0.4 && < 0.7\r\n else\r\n build-depends:\r\n transformers >= 0.2 && < 0.4,\r\n transformers-compat >= 0.3 && < 0.8\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/extra.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/extra.nix new file mode 100644 index 0000000000..41668cf6bc --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/extra.nix @@ -0,0 +1,58 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "extra"; version = "1.7.14"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2014-2023"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/extra#readme"; + url = ""; + synopsis = "Extra functions I use."; + description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + tests = { + "extra-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; + sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/filepath.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/filepath.nix new file mode 100644 index 0000000000..c8384c1597 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/filepath.nix @@ -0,0 +1,97 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { cpphs = false; }; + package = { + specVersion = "2.2"; + identifier = { name = "filepath"; version = "1.4.100.4"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2005-2020, Julain Ospald 2021-2022"; + maintainer = "Julian Ospald "; + author = "Neil Mitchell "; + homepage = "https://github.com/haskell/filepath/blob/master/README.md"; + url = ""; + synopsis = "Library for manipulating FilePaths in a cross platform way."; + description = "This package provides functionality for manipulating @FilePath@ values, and is shipped with . It provides two variants for filepaths:\n\n1. legacy filepaths: @type FilePath = String@\n\n2. operating system abstracted filepaths (@OsPath@): internally unpinned @ShortByteString@ (platform-dependent encoding)\n\nIt is recommended to use @OsPath@ when possible, because it is more correct.\n\nFor each variant there are three main modules:\n\n* \"System.FilePath.Posix\" / \"System.OsPath.Posix\" manipulates POSIX\\/Linux style @FilePath@ values (with @\\/@ as the path separator).\n\n* \"System.FilePath.Windows\" / \"System.OsPath.Windows\" manipulates Windows style @FilePath@ values (with either @\\\\@ or @\\/@ as the path separator, and deals with drives).\n\n* \"System.FilePath\" / \"System.OsPath\" for dealing with current platform-specific filepaths\n\n\"System.OsString\" is like \"System.OsPath\", but more general purpose. Refer to the documentation of\nthose modules for more information.\n\nAn introduction into the new API can be found in this\n.\nCode examples for the new API can be found ."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]; + build-tools = pkgs.lib.optional (flags.cpphs) (hsPkgs.buildPackages.cpphs.components.exes.cpphs or (pkgs.buildPackages.cpphs or (errorHandler.buildToolDepError "cpphs:cpphs"))); + buildable = true; + }; + tests = { + "filepath-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + "filepath-equivalent-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + "bytestring-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + "abstract-filepath" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."quickcheck-classes-base" or (errorHandler.buildDepError "quickcheck-classes-base")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench-filepath" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/filepath-1.4.100.4.tar.gz"; + sha256 = "82876250347c2fdf0f9de5448ce44f02539f37951b671d9a30719a6c4f96e9ad"; + }); + }) // { + package-description-override = "cabal-version: 2.2\nname: filepath\nversion: 1.4.100.4\n\n-- NOTE: Don't forget to update ./changelog.md\nlicense: BSD-3-Clause\nlicense-file: LICENSE\nauthor: Neil Mitchell \nmaintainer: Julian Ospald \ncopyright: Neil Mitchell 2005-2020, Julain Ospald 2021-2022\nbug-reports: https://github.com/haskell/filepath/issues\nhomepage:\n https://github.com/haskell/filepath/blob/master/README.md\n\ncategory: System\nbuild-type: Simple\nsynopsis: Library for manipulating FilePaths in a cross platform way.\ntested-with:\n GHC ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.7\n || ==9.0.2\n || ==9.2.3\n\ndescription:\n This package provides functionality for manipulating @FilePath@ values, and is shipped with . It provides two variants for filepaths:\n .\n 1. legacy filepaths: @type FilePath = String@\n .\n 2. operating system abstracted filepaths (@OsPath@): internally unpinned @ShortByteString@ (platform-dependent encoding)\n .\n It is recommended to use @OsPath@ when possible, because it is more correct.\n .\n For each variant there are three main modules:\n .\n * \"System.FilePath.Posix\" / \"System.OsPath.Posix\" manipulates POSIX\\/Linux style @FilePath@ values (with @\\/@ as the path separator).\n .\n * \"System.FilePath.Windows\" / \"System.OsPath.Windows\" manipulates Windows style @FilePath@ values (with either @\\\\@ or @\\/@ as the path separator, and deals with drives).\n .\n * \"System.FilePath\" / \"System.OsPath\" for dealing with current platform-specific filepaths\n .\n \"System.OsString\" is like \"System.OsPath\", but more general purpose. Refer to the documentation of\n those modules for more information.\n .\n An introduction into the new API can be found in this\n .\n Code examples for the new API can be found .\n\nextra-source-files:\n Generate.hs\n Makefile\n System/FilePath/Internal.hs\n System/OsPath/Common.hs\n System/OsString/Common.hs\n tests/bytestring-tests/Properties/Common.hs\n\nextra-doc-files:\n changelog.md\n HACKING.md\n README.md\n\nflag cpphs\n description: Use cpphs (fixes haddock source links)\n default: False\n manual: True\n\nsource-repository head\n type: git\n location: https://github.com/haskell/filepath\n\nlibrary\n exposed-modules:\n System.FilePath\n System.FilePath.Posix\n System.FilePath.Windows\n System.OsPath\n System.OsPath.Data.ByteString.Short\n System.OsPath.Data.ByteString.Short.Internal\n System.OsPath.Data.ByteString.Short.Word16\n System.OsPath.Encoding\n System.OsPath.Encoding.Internal\n System.OsPath.Internal\n System.OsPath.Posix\n System.OsPath.Posix.Internal\n System.OsPath.Types\n System.OsPath.Windows\n System.OsPath.Windows.Internal\n System.OsString\n System.OsString.Internal\n System.OsString.Internal.Types\n System.OsString.Posix\n System.OsString.Windows\n\n other-extensions:\n CPP\n PatternGuards\n\n if impl(ghc >=7.2)\n other-extensions: Safe\n\n default-language: Haskell2010\n build-depends:\n , base >=4.9 && <4.20\n , bytestring >=0.11.3.0\n , deepseq\n , exceptions\n , template-haskell\n\n ghc-options: -Wall\n\n if flag(cpphs)\n ghc-options: -pgmPcpphs -optP--cpp\n build-tool-depends: cpphs:cpphs -any\n\ntest-suite filepath-tests\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: tests tests/filepath-tests\n other-modules:\n TestGen\n TestUtil\n\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , filepath\n , QuickCheck >=2.7 && <2.15\n\n default-language: Haskell2010\n ghc-options: -Wall\n\ntest-suite filepath-equivalent-tests\n default-language: Haskell2010\n ghc-options: -Wall\n type: exitcode-stdio-1.0\n main-is: TestEquiv.hs\n hs-source-dirs: tests tests/filepath-equivalent-tests\n other-modules:\n Legacy.System.FilePath\n Legacy.System.FilePath.Posix\n Legacy.System.FilePath.Windows\n TestUtil\n\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , filepath\n , QuickCheck >=2.7 && <2.15\n\ntest-suite bytestring-tests\n default-language: Haskell2010\n ghc-options: -Wall\n type: exitcode-stdio-1.0\n main-is: Main.hs\n hs-source-dirs: tests tests/bytestring-tests\n other-modules:\n Properties.ShortByteString\n Properties.ShortByteString.Word16\n TestUtil\n\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , filepath\n , QuickCheck >=2.7 && <2.15\n\ntest-suite abstract-filepath\n default-language: Haskell2010\n ghc-options: -Wall\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: tests tests/abstract-filepath\n other-modules:\n Arbitrary\n EncodingSpec\n OsPathSpec\n TestUtil\n\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , deepseq\n , filepath\n , QuickCheck >=2.7 && <2.15\n , quickcheck-classes-base ^>=0.6.2\n\nbenchmark bench-filepath\n default-language: Haskell2010\n ghc-options: -Wall\n type: exitcode-stdio-1.0\n main-is: BenchFilePath.hs\n hs-source-dirs: bench\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , deepseq\n , filepath\n , tasty-bench\n\n ghc-options: -with-rtsopts=-A32m\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/filepattern.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/filepattern.nix new file mode 100644 index 0000000000..385c502003 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/filepattern.nix @@ -0,0 +1,56 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "filepattern"; version = "0.1.3"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2011-2022"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell , Evan Rutledge Borden "; + homepage = "https://github.com/ndmitchell/filepattern#readme"; + url = ""; + synopsis = "File path glob-like matching"; + description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + ]; + buildable = true; + }; + tests = { + "filepattern-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; + sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/hashable.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/hashable.nix new file mode 100644 index 0000000000..4b125fa0bc --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/hashable.nix @@ -0,0 +1,82 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { integer-gmp = true; random-initial-seed = false; }; + package = { + specVersion = "1.12"; + identifier = { name = "hashable"; version = "1.4.3.0"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = "Milan Straka \nJohan Tibell "; + homepage = "http://github.com/haskell-unordered-containers/hashable"; + url = ""; + synopsis = "A class for types that can be converted to a hash value"; + description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = (([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && compiler.version.ge "9" + then [ + (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + else if flags.integer-gmp + then [ + (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) + ] + else [ + (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) + ]); + buildable = true; + }; + tests = { + "hashable-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + "hashable-examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; + sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/heaps.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/heaps.nix new file mode 100644 index 0000000000..e759e305bf --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/heaps.nix @@ -0,0 +1,38 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "heaps"; version = "0.4"; }; + license = "BSD-3-Clause"; + copyright = "(c) 2010-2015 Edward A. Kmett"; + maintainer = "Edward A. Kmett "; + author = "Edward A. Kmett"; + homepage = "http://github.com/ekmett/heaps/"; + url = ""; + synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; + description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; + sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; + }); + }) // { + package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-dgtable.nix new file mode 100644 index 0000000000..40ea1148c6 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-dgtable.nix @@ -0,0 +1,47 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "js-dgtable"; version = "0.5.2"; }; + license = "MIT"; + copyright = "Neil Mitchell 2019"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-dgtable#readme"; + url = ""; + synopsis = "Obtain minified jquery.dgtable code"; + description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-dgtable-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; + sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; + }); + }) // { + package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-flot.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-flot.nix new file mode 100644 index 0000000000..67980dd7ba --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-flot.nix @@ -0,0 +1,47 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "js-flot"; version = "0.8.3"; }; + license = "MIT"; + copyright = "Neil Mitchell 2014"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-flot#readme"; + url = ""; + synopsis = "Obtain minified flot code"; + description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-flot-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; + sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-jquery.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-jquery.nix new file mode 100644 index 0000000000..05e54a25ab --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/js-jquery.nix @@ -0,0 +1,48 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "js-jquery"; version = "3.3.1"; }; + license = "MIT"; + copyright = "Neil Mitchell 2014-2018"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-jquery#readme"; + url = ""; + synopsis = "Obtain minified jQuery code"; + description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-jquery-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; + sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; + }); + }) // { + package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/mtl.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/mtl.nix new file mode 100644 index 0000000000..36fa049c2d --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/mtl.nix @@ -0,0 +1,41 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "mtl"; version = "2.2.2"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Edward Kmett "; + author = "Andy Gill"; + homepage = "http://github.com/haskell/mtl"; + url = ""; + synopsis = "Monad classes, using functional dependencies"; + description = "Monad classes using functional dependencies, with instances\nfor various monad transformers, inspired by the paper\n/Functional Programming with Overloading and Higher-Order Polymorphism/,\nby Mark P Jones, in /Advanced School of Functional Programming/, 1995\n()."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/mtl-2.2.2.tar.gz"; + sha256 = "8803f48a8ed33296c3a3272f448198737a287ec31baa901af09e2118c829bef6"; + }); + }) // { + package-description-override = "name: mtl\nversion: 2.2.2\ncabal-version: >= 1.10\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Andy Gill\nmaintainer: Edward Kmett \ncategory: Control\nsynopsis: Monad classes, using functional dependencies\nhomepage: http://github.com/haskell/mtl\nbug-reports: http://github.com/haskell/mtl/issues\ndescription:\n Monad classes using functional dependencies, with instances\n for various monad transformers, inspired by the paper\n /Functional Programming with Overloading and Higher-Order Polymorphism/,\n by Mark P Jones, in /Advanced School of Functional Programming/, 1995\n ().\nbuild-type: Simple\nextra-source-files: CHANGELOG.markdown, README.markdown\ntested-with:\n GHC==7.0.4,\n GHC==7.2.2,\n GHC==7.4.2,\n GHC==7.6.3,\n GHC==7.8.4,\n GHC==7.10.3,\n GHC==8.0.2,\n GHC==8.2.2,\n GHC==8.4.1\n\nsource-repository head\n type: git\n location: https://github.com/haskell/mtl.git\n\nLibrary\n exposed-modules:\n Control.Monad.Cont\n Control.Monad.Cont.Class\n Control.Monad.Error\n Control.Monad.Error.Class\n Control.Monad.Except\n Control.Monad.Identity\n Control.Monad.List\n Control.Monad.RWS\n Control.Monad.RWS.Class\n Control.Monad.RWS.Lazy\n Control.Monad.RWS.Strict\n Control.Monad.Reader\n Control.Monad.Reader.Class\n Control.Monad.State\n Control.Monad.State.Class\n Control.Monad.State.Lazy\n Control.Monad.State.Strict\n Control.Monad.Trans\n Control.Monad.Writer\n Control.Monad.Writer.Class\n Control.Monad.Writer.Lazy\n Control.Monad.Writer.Strict\n build-depends: base < 5, transformers >= 0.4 && <0.6\n\n default-language: Haskell2010\n other-extensions:\n CPP\n MultiParamTypeClasses\n FunctionalDependencies\n FlexibleInstances\n UndecidableInstances\n\n -- This is a SafeHaskell safeguard (pun intended) to explicitly declare the API contract of `mtl`\n -- GHC versions before 7.4 were hopelessly broken or incapable of SafeHaskell\n if impl(ghc >= 7.4)\n default-extensions: Safe\n\n ghc-options: -Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations\n\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/parsec.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/parsec.nix new file mode 100644 index 0000000000..d3ce074a87 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/parsec.nix @@ -0,0 +1,84 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.12"; + identifier = { name = "parsec"; version = "3.1.17.0"; }; + license = "BSD-2-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus , Herbert Valerio Riedel "; + author = "Daan Leijen , Paolo Martini , Antoine Latter "; + homepage = "https://github.com/haskell/parsec"; + url = ""; + synopsis = "Monadic parser combinators"; + description = "Parsec is designed from scratch as an industrial-strength parser\nlibrary. It is simple, safe, well documented (on the package\nhomepage), has extensive libraries, good error messages,\nand is fast. It is defined as a monad transformer that can be\nstacked on arbitrary monads, and it is also parametric in the\ninput stream type.\n\nThe main entry point is the \"Text.Parsec\" module which provides\ndefaults for parsing 'Char'acter data.\n\nThe \"Text.ParserCombinators.Parsec\" module hierarchy contains\nthe legacy @parsec-2@ API and may be removed at some point in\nthe future."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ pkgs.lib.optionals (!(compiler.isGhc && compiler.version.ge "8.0")) [ + (hsPkgs."fail" or (errorHandler.buildDepError "fail")) + (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")) + ]; + buildable = true; + }; + tests = { + "parsec-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "8.0")) (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + "parsec-issue127" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + ]; + buildable = true; + }; + "parsec-issue171" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + ]; + buildable = true; + }; + "parsec-issue175" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/parsec-3.1.17.0.tar.gz"; + sha256 = "58c500bec1ec3c849c8243ddfd675a5983b17a8e5da55acea6adade5ae179d36"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: parsec\nversion: 3.1.17.0\n\nsynopsis: Monadic parser combinators\ndescription: Parsec is designed from scratch as an industrial-strength parser\n library. It is simple, safe, well documented (on the package\n homepage), has extensive libraries, good error messages,\n and is fast. It is defined as a monad transformer that can be\n stacked on arbitrary monads, and it is also parametric in the\n input stream type.\n .\n The main entry point is the \"Text.Parsec\" module which provides\n defaults for parsing 'Char'acter data.\n .\n The \"Text.ParserCombinators.Parsec\" module hierarchy contains\n the legacy @parsec-2@ API and may be removed at some point in\n the future.\n\nlicense: BSD2\nlicense-file: LICENSE\nauthor: Daan Leijen , Paolo Martini , Antoine Latter \nmaintainer: Oleg Grenrus , Herbert Valerio Riedel \nhomepage: https://github.com/haskell/parsec\nbug-reports: https://github.com/haskell/parsec/issues\ncategory: Parsing\n\nbuild-type: Simple\ntested-with: GHC ==9.8.1 || ==9.6.2 || ==9.4.7 || ==9.2.8 || ==9.0.2 || ==8.10.7 || ==8.8.4 || ==8.6.5 || ==8.4.4 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2\n\nextra-source-files: ChangeLog.md, README.md\n\nsource-repository head\n type: git\n location: https://github.com/haskell/parsec\n\nlibrary\n hs-source-dirs: src\n exposed-modules:\n Text.Parsec\n Text.Parsec.String\n Text.Parsec.ByteString\n Text.Parsec.ByteString.Lazy\n Text.Parsec.Text\n Text.Parsec.Text.Lazy\n Text.Parsec.Pos\n Text.Parsec.Error\n Text.Parsec.Prim\n Text.Parsec.Char\n Text.Parsec.Combinator\n Text.Parsec.Token\n Text.Parsec.Expr\n Text.Parsec.Language\n Text.Parsec.Perm\n Text.ParserCombinators.Parsec\n Text.ParserCombinators.Parsec.Char\n Text.ParserCombinators.Parsec.Combinator\n Text.ParserCombinators.Parsec.Error\n Text.ParserCombinators.Parsec.Expr\n Text.ParserCombinators.Parsec.Language\n Text.ParserCombinators.Parsec.Perm\n Text.ParserCombinators.Parsec.Pos\n Text.ParserCombinators.Parsec.Prim\n Text.ParserCombinators.Parsec.Token\n\n build-depends:\n base >= 4.5.1.0 && < 4.20,\n mtl >= 2.1.3.1 && < 2.4,\n bytestring >= 0.9.2.1 && < 0.13,\n text (>= 1.2.3.0 && < 1.3)\n || (>= 2.0 && < 2.2)\n\n default-language: Haskell2010\n other-extensions:\n CPP\n DeriveDataTypeable\n ExistentialQuantification\n FlexibleContexts\n FlexibleInstances\n FunctionalDependencies\n MultiParamTypeClasses\n PolymorphicComponents\n StandaloneDeriving\n Safe\n Trustworthy\n UndecidableInstances\n\n ghc-options: -Wall\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wno-trustworthy-safe\n if impl(ghc < 8.8)\n ghc-options: -Wnoncanonical-monadfail-instances\n else\n -- provide/emulate `Control.Monad.Fail` and `Semigroup` API for pre-GHC8\n build-depends: fail == 4.9.*, semigroups >= 0.18 && < 0.21\n\n if impl(ghc >= 7.10)\n ghc-options: -fno-warn-trustworthy-safe\n\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n -- https://gitlab.haskell.org/ghc/ghc/-/issues/22728\n -- if impl(ghc >= 9.0)\n -- -- ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite parsec-tests\n type: exitcode-stdio-1.0\n\n hs-source-dirs: test\n main-is: Main.hs\n other-modules:\n Bugs\n Bugs.Bug2\n Bugs.Bug6\n Bugs.Bug9\n Bugs.Bug35\n Features\n Features.Feature80\n Features.Feature150\n Util\n\n build-depends:\n base,\n mtl,\n parsec,\n -- dependencies whose version bounds are not inherited via lib:parsec\n tasty >= 1.4 && < 1.6,\n tasty-hunit >= 0.10 && < 0.11\n\n default-language: Haskell2010\n\n ghc-options: -Wall\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances\n else\n build-depends: semigroups\n\ntest-suite parsec-issue127\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: issue127.hs\n hs-source-dirs: test\n build-depends: base, parsec\n\ntest-suite parsec-issue171\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: issue171.hs\n hs-source-dirs: test\n build-depends: base, tasty, tasty-hunit, deepseq, parsec\n\ntest-suite parsec-issue175\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: issue175.hs\n hs-source-dirs: test\n build-depends: base, tasty, tasty-hunit, parsec\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/primitive.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/primitive.nix new file mode 100644 index 0000000000..b5683f2c83 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/primitive.nix @@ -0,0 +1,73 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "2.0"; + identifier = { name = "primitive"; version = "0.9.0.0"; }; + license = "BSD-3-Clause"; + copyright = "(c) Roman Leshchinskiy 2009-2012"; + maintainer = "libraries@haskell.org"; + author = "Roman Leshchinskiy "; + homepage = "https://github.com/haskell/primitive"; + url = ""; + synopsis = "Primitive memory-related operations"; + description = "This package provides various primitive memory-related operations."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + buildable = true; + }; + tests = { + "test-qc" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."quickcheck-classes-base" or (errorHandler.buildDepError "quickcheck-classes-base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; + sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; + }); + }) // { + package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/process.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/process.nix new file mode 100644 index 0000000000..0c615b19be --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/process.nix @@ -0,0 +1,61 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "process"; version = "1.6.18.0"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "libraries@haskell.org"; + author = ""; + homepage = ""; + url = ""; + synopsis = "Process libraries"; + description = "This package contains libraries for dealing with system processes.\n\nThe typed-process package is a more recent take on a process API,\nwhich uses this package internally. It features better binary\nsupport, easier concurrency, and a more composable API. You can\nread more about it at\n."; + buildType = "Configure"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ] ++ (if system.isWindows + then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] + else pkgs.lib.optional (!system.isJavaScript) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))); + libs = pkgs.lib.optionals (system.isWindows) [ + (pkgs."kernel32" or (errorHandler.sysDepError "kernel32")) + (pkgs."ole32" or (errorHandler.sysDepError "ole32")) + (pkgs."rpcrt4" or (errorHandler.sysDepError "rpcrt4")) + ]; + buildable = true; + }; + tests = { + "test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/process-1.6.18.0.tar.gz"; + sha256 = "aa5f4c4fe4974f89f5ab998c7509daa4bda3926cfb06daacd5eba892aad8a37e"; + }); + }) // { + package-description-override = "name: process\nversion: 1.6.18.0\n-- NOTE: Don't forget to update ./changelog.md\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: libraries@haskell.org\nbug-reports: https://github.com/haskell/process/issues\nsynopsis: Process libraries\ncategory: System\nbuild-type: Configure\ncabal-version: >=1.10\ndescription:\n This package contains libraries for dealing with system processes.\n .\n The typed-process package is a more recent take on a process API,\n which uses this package internally. It features better binary\n support, easier concurrency, and a more composable API. You can\n read more about it at\n .\n\nextra-source-files:\n aclocal.m4\n changelog.md\n configure\n configure.ac\n include/HsProcessConfig.h.in\n process.buildinfo\n exes/echo.bat\n exes/subdir/echo.bat\n cbits/posix/common.h\n\nextra-tmp-files:\n autom4te.cache\n config.log\n config.status\n include/HsProcessConfig.h\n\nsource-repository head\n type: git\n location: https://github.com/haskell/process.git\n\nlibrary\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n InterruptibleFFI\n RecordWildCards\n Trustworthy\n Safe\n\n exposed-modules:\n System.Cmd\n System.Process\n System.Process.Internals\n other-modules: System.Process.Common\n if os(windows)\n c-sources:\n cbits/win32/runProcess.c\n other-modules: System.Process.Windows\n build-depends: Win32 >=2.4 && < 2.14\n -- ole32 and rpcrt4 are needed to create GUIDs for unique named pipes\n -- for process.\n extra-libraries: kernel32, ole32, rpcrt4\n cpp-options: -DWINDOWS\n else\n if arch(javascript)\n js-sources:\n jsbits/process.js\n other-modules: System.Process.JavaScript\n else\n c-sources:\n cbits/posix/runProcess.c\n cbits/posix/fork_exec.c\n cbits/posix/posix_spawn.c\n cbits/posix/find_executable.c\n other-modules: System.Process.Posix\n build-depends: unix >= 2.5 && < 2.9\n\n include-dirs: include\n includes:\n runProcess.h\n install-includes:\n runProcess.h\n processFlags.h\n\n ghc-options: -Wall\n\n build-depends: base >= 4.10 && < 4.20,\n directory >= 1.1 && < 1.4,\n filepath >= 1.2 && < 1.5,\n deepseq >= 1.1 && < 1.6\n\ntest-suite test\n default-language: Haskell2010\n hs-source-dirs: test\n main-is: main.hs\n type: exitcode-stdio-1.0\n -- Add otherwise redundant bounds on base since GHC's build system runs\n -- `cabal check`, which mandates bounds on base.\n build-depends: base >= 4 && < 5\n , bytestring\n , directory\n , process\n ghc-options: -threaded\n -with-rtsopts \"-N\"\n if os(windows)\n cpp-options: -DWINDOWS\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/random.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/random.nix new file mode 100644 index 0000000000..0dbaf8b099 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/random.nix @@ -0,0 +1,113 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "random"; version = "1.2.1.1"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "core-libraries-committee@haskell.org"; + author = ""; + homepage = ""; + url = ""; + synopsis = "Pseudo-random number generation"; + description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + buildable = true; + }; + tests = { + "legacy-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]; + buildable = true; + }; + "doctests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) + ] ++ pkgs.lib.optionals (compiler.isGhc && compiler.version.ge "8.2" && (compiler.isGhc && compiler.version.lt "8.10")) [ + (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "spec" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."smallcheck" or (errorHandler.buildDepError "smallcheck")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + "spec-inspection" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + buildable = true; + }; + }; + benchmarks = { + "legacy-bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) + (hsPkgs."split" or (errorHandler.buildDepError "split")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ]; + buildable = true; + }; + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; + sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/shake.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/shake.nix new file mode 100644 index 0000000000..d40c2a8bbc --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/shake.nix @@ -0,0 +1,132 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { portable = false; cloud = false; embed-files = false; }; + package = { + specVersion = "1.18"; + identifier = { name = "shake"; version = "0.19.7"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2011-2022"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://shakebuild.com"; + url = ""; + synopsis = "Build system library, like Make, but more accurate dependencies."; + description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ pkgs.lib.optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]; + buildable = true; + }; + exes = { + "shake" = { + depends = (((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ pkgs.lib.optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + }; + tests = { + "shake-test" = { + depends = (((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ pkgs.lib.optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; + sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/splitmix.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/splitmix.nix new file mode 100644 index 0000000000..aa0dd88d31 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/splitmix.nix @@ -0,0 +1,139 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { optimised-mixer = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "splitmix"; version = "0.1.0.5"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = ""; + homepage = ""; + url = ""; + synopsis = "Fast Splittable PRNG"; + description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ] ++ pkgs.lib.optionals (!(compiler.isGhcjs && true)) (pkgs.lib.optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + buildable = true; + }; + tests = { + "examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat" or (errorHandler.buildDepError "base-compat")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."math-functions" or (errorHandler.buildDepError "math-functions")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + ]; + buildable = true; + }; + "montecarlo-pi" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "montecarlo-pi-32" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-dieharder" = { + depends = [ + (hsPkgs."async" or (errorHandler.buildDepError "async")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "splitmix-testu01" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; + buildable = if !system.isLinux then false else true; + }; + "initialization" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + }; + benchmarks = { + "comparison" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + ]; + buildable = true; + }; + "simple-sum" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "range" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ pkgs.lib.optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; + sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/transformers.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/transformers.nix new file mode 100644 index 0000000000..288d680c82 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/transformers.nix @@ -0,0 +1,40 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.6"; + identifier = { name = "transformers"; version = "0.5.6.2"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Ross Paterson "; + author = "Andy Gill, Ross Paterson"; + homepage = ""; + url = ""; + synopsis = "Concrete functor and monad transformers"; + description = "A portable library of functor and monad transformers, inspired by\nthe paper\n\n* \\\"Functional Programming with Overloading and Higher-Order\nPolymorphism\\\", by Mark P Jones,\nin /Advanced School of Functional Programming/, 1995\n().\n\nThis package contains:\n\n* the monad transformer class (in \"Control.Monad.Trans.Class\")\n\n* concrete functor and monad transformers, each with associated\noperations and functions to lift operations associated with other\ntransformers.\n\nThe package can be used on its own in portable Haskell code, in\nwhich case operations need to be manually lifted through transformer\nstacks (see \"Control.Monad.Trans.Class\" for some examples).\nAlternatively, it can be used with the non-portable monad classes in\nthe @mtl@ or @monads-tf@ packages, which automatically lift operations\nintroduced by monad transformers through other transformers."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + ] ++ pkgs.lib.optional (compiler.isGhc && (compiler.version.ge "7.2" && compiler.version.lt "7.5")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = true; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/transformers-0.5.6.2.tar.gz"; + sha256 = "b668795d600297e4c8a7fd55a107b9827b2c52c0bc14c5ea0d65e20e6691c66c"; + }); + }) // { + package-description-override = "name: transformers\nversion: 0.5.6.2\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Andy Gill, Ross Paterson\nmaintainer: Ross Paterson \nbug-reports: http://hub.darcs.net/ross/transformers/issues\ncategory: Control\nsynopsis: Concrete functor and monad transformers\ndescription:\n A portable library of functor and monad transformers, inspired by\n the paper\n .\n * \\\"Functional Programming with Overloading and Higher-Order\n Polymorphism\\\", by Mark P Jones,\n in /Advanced School of Functional Programming/, 1995\n ().\n .\n This package contains:\n .\n * the monad transformer class (in \"Control.Monad.Trans.Class\")\n .\n * concrete functor and monad transformers, each with associated\n operations and functions to lift operations associated with other\n transformers.\n .\n The package can be used on its own in portable Haskell code, in\n which case operations need to be manually lifted through transformer\n stacks (see \"Control.Monad.Trans.Class\" for some examples).\n Alternatively, it can be used with the non-portable monad classes in\n the @mtl@ or @monads-tf@ packages, which automatically lift operations\n introduced by monad transformers through other transformers.\nbuild-type: Simple\nextra-source-files:\n changelog\ncabal-version: >= 1.6\n\nsource-repository head\n type: darcs\n location: http://hub.darcs.net/ross/transformers\n\nlibrary\n build-depends: base >= 2 && < 6\n hs-source-dirs: .\n if !impl(ghc>=7.9)\n -- Data.Functor.Identity was moved into base-4.8.0.0 (GHC 7.10)\n -- see also https://ghc.haskell.org/trac/ghc/ticket/9664\n -- NB: using impl(ghc>=7.9) instead of fragile Cabal flags\n hs-source-dirs: legacy/pre709\n exposed-modules: Data.Functor.Identity\n if !impl(ghc>=7.11)\n -- modules moved into base-4.9.0 (GHC 8.0)\n -- see https://ghc.haskell.org/trac/ghc/ticket/10773\n -- see https://ghc.haskell.org/trac/ghc/ticket/11135\n hs-source-dirs: legacy/pre711\n exposed-modules:\n Control.Monad.IO.Class\n Data.Functor.Classes\n Data.Functor.Compose\n Data.Functor.Product\n Data.Functor.Sum\n if impl(ghc>=7.2 && <7.5)\n -- Prior to GHC 7.5, GHC.Generics lived in ghc-prim\n build-depends: ghc-prim\n exposed-modules:\n Control.Applicative.Backwards\n Control.Applicative.Lift\n Control.Monad.Signatures\n Control.Monad.Trans.Accum\n Control.Monad.Trans.Class\n Control.Monad.Trans.Cont\n Control.Monad.Trans.Except\n Control.Monad.Trans.Error\n Control.Monad.Trans.Identity\n Control.Monad.Trans.List\n Control.Monad.Trans.Maybe\n Control.Monad.Trans.Reader\n Control.Monad.Trans.RWS\n Control.Monad.Trans.RWS.CPS\n Control.Monad.Trans.RWS.Lazy\n Control.Monad.Trans.RWS.Strict\n Control.Monad.Trans.Select\n Control.Monad.Trans.State\n Control.Monad.Trans.State.Lazy\n Control.Monad.Trans.State.Strict\n Control.Monad.Trans.Writer\n Control.Monad.Trans.Writer.CPS\n Control.Monad.Trans.Writer.Lazy\n Control.Monad.Trans.Writer.Strict\n Data.Functor.Constant\n Data.Functor.Reverse\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/unix.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/unix.nix new file mode 100644 index 0000000000..33c865d08a --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/unix.nix @@ -0,0 +1,168 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.12"; + identifier = { name = "unix"; version = "2.8.3.0"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Julian Ospald , Viktor Dukhovni , Andrew Lelechenko "; + author = ""; + homepage = "https://github.com/haskell/unix"; + url = ""; + synopsis = "POSIX functionality"; + description = "This package gives you access to the set of operating system\nservices standardised by\n\n(or the IEEE Portable Operating System Interface for Computing\nEnvironments - IEEE Std. 1003.1).\n\nThe package is not supported under Windows."; + buildType = "Configure"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ] ++ pkgs.lib.optional (system.isWindows) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isWindows then false else true; + }; + tests = { + "unix-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ]; + buildable = true; + }; + "FdReadBuf001" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "ForkProcess01" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "Signals002" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "Signals004" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "Posix004" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "Posix009" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "Posix014" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "T8108" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "ResourceLimit" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "Terminal" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "PutEnv001" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "Semaphore001" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "Semaphore002" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "SemaphoreInterrupt" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "T13660" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/unix-2.8.3.0.tar.gz"; + sha256 = "a9dc7868d42ec10e38c4d785eaec7f98d401590d4ebfd8f17ef59da3f18a5dab"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: unix\nversion: 2.8.3.0\n-- NOTE: Don't forget to update ./changelog.md\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Julian Ospald , Viktor Dukhovni , Andrew Lelechenko \nhomepage: https://github.com/haskell/unix\nbug-reports: https://github.com/haskell/unix/issues\nsynopsis: POSIX functionality\ncategory: System\nbuild-type: Configure\ntested-with: GHC==9.6.2,\n GHC==9.4.7,\n GHC==9.2.8,\n GHC==9.0.2,\n GHC==8.10.7,\n GHC==8.8.4,\n GHC==8.6.5\ndescription:\n This package gives you access to the set of operating system\n services standardised by\n \n (or the IEEE Portable Operating System Interface for Computing\n Environments - IEEE Std. 1003.1).\n .\n The package is not supported under Windows.\n\nextra-source-files:\n changelog.md\n config.guess\n config.sub\n configure\n configure.ac\n include/HsUnix.h\n include/HsUnixConfig.h.in\n install-sh\n unix.buildinfo.in\n\nextra-tmp-files:\n autom4te.cache\n config.log\n config.status\n include/HsUnixConfig.h\n unix.buildinfo\n\nsource-repository head\n type: git\n location: https://github.com/haskell/unix.git\n\nlibrary\n default-language: Haskell2010\n other-extensions:\n CApiFFI\n CPP\n DeriveDataTypeable\n InterruptibleFFI\n NondecreasingIndentation\n RankNTypes\n RecordWildCards\n Safe\n Trustworthy\n\n if os(windows)\n -- This package currently supports neither Cygwin nor MinGW,\n -- therefore os(windows) is effectively not supported.\n build-depends: unbuildable<0\n buildable: False\n\n build-depends:\n base >= 4.12.0.0 && < 4.20,\n bytestring >= 0.9.2 && < 0.13,\n filepath >= 1.4.100.0 && < 1.5,\n time >= 1.9.1 && < 1.13\n\n exposed-modules:\n System.Posix\n System.Posix.ByteString\n System.Posix.PosixString\n\n System.Posix.Error\n System.Posix.Resource\n System.Posix.Time\n System.Posix.Unistd\n System.Posix.Signals\n System.Posix.Signals.Exts\n System.Posix.Semaphore\n System.Posix.SharedMem\n\n System.Posix.User\n System.Posix.User.ByteString\n\n System.Posix.ByteString.FilePath\n System.Posix.PosixPath.FilePath\n\n System.Posix.Directory\n System.Posix.Directory.Internals\n System.Posix.Directory.Fd\n System.Posix.Directory.ByteString\n System.Posix.Directory.PosixPath\n\n System.Posix.DynamicLinker.Module\n System.Posix.DynamicLinker.Module.ByteString\n System.Posix.DynamicLinker.Prim\n System.Posix.DynamicLinker.ByteString\n System.Posix.DynamicLinker\n\n System.Posix.Files\n System.Posix.Files.ByteString\n System.Posix.Files.PosixString\n\n System.Posix.IO\n System.Posix.IO.ByteString\n System.Posix.IO.PosixString\n\n System.Posix.Env\n System.Posix.Env.ByteString\n System.Posix.Env.PosixString\n\n System.Posix.Fcntl\n\n System.Posix.Process\n System.Posix.Process.Internals\n System.Posix.Process.ByteString\n System.Posix.Process.PosixString\n\n System.Posix.Temp\n System.Posix.Temp.ByteString\n System.Posix.Temp.PosixString\n\n System.Posix.Terminal\n System.Posix.Terminal.ByteString\n System.Posix.Terminal.PosixString\n\n other-modules:\n System.Posix.Directory.Common\n System.Posix.DynamicLinker.Common\n System.Posix.Files.Common\n System.Posix.IO.Common\n System.Posix.Process.Common\n System.Posix.Terminal.Common\n System.Posix.User.Common\n System.Posix.Env.Internal\n\n ghc-options: -Wall\n\n include-dirs: include\n includes:\n HsUnix.h\n execvpe.h\n install-includes:\n HsUnix.h\n execvpe.h\n\n if !arch(javascript)\n c-sources:\n cbits/HsUnix.c\n cbits/execvpe.c\n\n if arch(javascript)\n js-sources:\n jsbits/time.js\n\ntest-suite unix-tests\n hs-source-dirs: tests\n main-is: Test.hs\n other-modules:\n FileStatus\n FileExtendedStatus\n FileStatusByteString\n Signals001\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, bytestring, filepath, tasty, tasty-hunit, tasty-quickcheck, unix\n ghc-options: -Wall -with-rtsopts=-V0\n\ntest-suite FdReadBuf001\n -- JS: missing \"pipe\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: FdReadBuf001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n\ntest-suite ForkProcess01\n -- JS: missing \"forkProcess\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: ForkProcess01.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Signals002\n -- JS: missing \"raise\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Signals002.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Signals004\n -- JS: missing \"raise\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Signals004.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Posix004\n -- JS: missing \"forkProcess\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Posix004.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Posix009\n -- JS: missing \"rtsTimerSignal\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Posix009.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -with-rtsopts=-V0\n\ntest-suite Posix014\n -- JS: missing \"pipe\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Posix014.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite T8108\n -- JS: missing \"sysconf\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: T8108.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite ResourceLimit\n -- JS: missing \"setrlimit\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: ResourceLimit.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty-hunit\n ghc-options: -Wall\n\ntest-suite Terminal\n -- JS: missing \"openpty\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Terminal.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty-hunit\n ghc-options: -Wall\n\ntest-suite PutEnv001\n -- JS: missing \"performGC\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: PutEnv001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty, tasty-hunit\n ghc-options: -Wall -with-rtsopts=-V0 -O0\n\ntest-suite Semaphore001\n -- JS: missing \"sem_open\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Semaphore001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Semaphore002\n -- JS: missing \"sem_open\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Semaphore002.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n\ntest-suite SemaphoreInterrupt\n -- JS: missing \"sem_open\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: SemaphoreInterrupt.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n\ntest-suite T13660\n hs-source-dirs: tests\n main-is: T13660.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, filepath >= 1.4.100.0 && < 1.5, bytestring\n ghc-options: -Wall\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/unordered-containers.nix new file mode 100644 index 0000000000..0aeaccb277 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/unordered-containers.nix @@ -0,0 +1,78 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { debug = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "unordered-containers"; version = "0.2.19.1"; }; + license = "BSD-3-Clause"; + copyright = "2010-2014 Johan Tibell\n2010 Edward Z. Yang"; + maintainer = "simon.jakobi@gmail.com, David.Feuer@gmail.com"; + author = "Johan Tibell"; + homepage = "https://github.com/haskell-unordered-containers/unordered-containers"; + url = ""; + synopsis = "Efficient hashing-based container types"; + description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]; + buildable = true; + }; + tests = { + "unordered-containers-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ChasingBottoms" or (errorHandler.buildDepError "ChasingBottoms")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."hashmap" or (errorHandler.buildDepError "hashmap")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; + sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; + }); + }) // { + package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/utf8-string.nix b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/utf8-string.nix new file mode 100644 index 0000000000..a5ee5272da --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/cabal-files/utf8-string.nix @@ -0,0 +1,51 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "utf8-string"; version = "1.0.2"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "emertens@galois.com"; + author = "Eric Mertens"; + homepage = "https://github.com/glguy/utf8-string/"; + url = ""; + synopsis = "Support for reading and writing UTF8 Strings"; + description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ]; + buildable = true; + }; + tests = { + "unit-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; + sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; + }); + }) // { + package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc94/hadrian/default.nix b/materialized/ghc964/hadrian-ghc94/hadrian/default.nix new file mode 100644 index 0000000000..eeec4eca3e --- /dev/null +++ b/materialized/ghc964/hadrian-ghc94/hadrian/default.nix @@ -0,0 +1,142 @@ +{ + pkgs = hackage: + { + packages = { + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + clock.revision = import ./cabal-files/clock.nix; + clock.flags.llvm = false; + transformers.revision = import ./cabal-files/transformers.nix; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.2.0".revisions.default; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + unix.revision = import ./cabal-files/unix.nix; + filepattern.revision = import ./cabal-files/filepattern.nix; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.4".revisions.default; + mtl.revision = import ./cabal-files/mtl.nix; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; + heaps.revision = import ./cabal-files/heaps.nix; + Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; + process.revision = import ./cabal-files/process.nix; + primitive.revision = import ./cabal-files/primitive.nix; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + exceptions.revision = import ./cabal-files/exceptions.nix; + exceptions.flags.transformers-0-4 = true; + parsec.revision = import ./cabal-files/parsec.nix; + system-cxx-std-lib.revision = hackage.system-cxx-std-lib."1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + utf8-string.revision = import ./cabal-files/utf8-string.nix; + js-jquery.revision = import ./cabal-files/js-jquery.nix; + text.revision = hackage.text."2.0.2".revisions.default; + QuickCheck.revision = import ./cabal-files/QuickCheck.nix; + QuickCheck.flags.old-random = false; + QuickCheck.flags.templatehaskell = true; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.6.0".revisions.default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.cloud = false; + shake.flags.embed-files = false; + shake.flags.portable = false; + random.revision = import ./cabal-files/random.nix; + bytestring.revision = hackage.bytestring."0.11.5.3".revisions.default; + Cabal.revision = import ./cabal-files/Cabal.nix; + directory.revision = import ./cabal-files/directory.nix; + js-flot.revision = import ./cabal-files/js-flot.nix; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + binary.revision = hackage.binary."0.8.9.1".revisions.default; + filepath.revision = import ./cabal-files/filepath.nix; + filepath.flags.cpphs = false; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; + extra.revision = import ./cabal-files/extra.nix; + }; + compiler = { + version = "9.6.4"; + nix-name = "ghc964"; + packages = { + "bytestring" = "0.11.5.3"; + "containers" = "0.6.7"; + "ghc-prim" = "0.10.0"; + "ghc-boot-th" = "9.6.4"; + "base" = "4.18.2.0"; + "time" = "1.12.2"; + "stm" = "2.5.1.0"; + "ghc-bignum" = "1.3"; + "template-haskell" = "2.20.0.0"; + "binary" = "0.8.9.1"; + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "system-cxx-std-lib" = "1.0"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.6.0"; + }; + }; + }; + extras = hackage: + { packages = { hadrian = ./.plan.nix/hadrian.nix; }; }; + modules = [ + ({ lib, ... }: + { + packages = { + "hadrian" = { + flags = { + "threaded" = lib.mkOverride 900 true; + "selftest" = lib.mkOverride 900 true; + }; + }; + }; + }) + ({ lib, ... }: + { + packages = { + "directory".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; + "heaps".components.library.planned = lib.mkOverride 900 true; + "extra".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "system-cxx-std-lib".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "shake".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; + "utf8-string".components.library.planned = lib.mkOverride 900 true; + "Cabal".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; + "exceptions".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "filepattern".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + "unix".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix b/materialized/ghc964/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix index ade1f3d512..a3d788196f 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix @@ -29,7 +29,7 @@ extraSrcFiles = []; extraTmpFiles = []; extraDocFiles = [ "README.md" ]; - }; + }; components = { exes = { "hadrian" = { @@ -48,7 +48,7 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + ] ++ pkgs.lib.optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); buildable = true; modules = [ "Base" @@ -116,6 +116,7 @@ "Settings/Builders/Cc" "Settings/Builders/Configure" "Settings/Builders/DeriveConstants" + "Settings/Builders/GenApply" "Settings/Builders/GenPrimopCode" "Settings/Builders/Ghc" "Settings/Builders/GhcPkg" @@ -151,12 +152,12 @@ "Utilities" "Way" "Way/Type" - ] ++ (pkgs.lib).optional (flags.selftest) "Rules/Selftest"; + ] ++ pkgs.lib.optional (flags.selftest) "Rules/Selftest"; hsSourceDirs = [ "." "src" ]; mainPath = ([ "Main.hs" - ] ++ (pkgs.lib).optional (flags.threaded) "") ++ (pkgs.lib).optional (flags.selftest) ""; - }; + ] ++ pkgs.lib.optional (flags.threaded) "") ++ pkgs.lib.optional (flags.selftest) ""; }; }; - } // rec { src = (pkgs.lib).mkDefault ../.; } \ No newline at end of file + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix index 3993fc7083..dabbcbdee8 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix @@ -21,7 +21,7 @@ synopsis = "A library for working with .cabal files"; description = "This library provides tools for reading and manipulating the .cabal file\nformat."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -39,17 +39,17 @@ (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."time" or (errorHandler.buildDepError "time")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ] ++ (if system.isWindows + ] ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-syntax-3.8.1.0.tar.gz"; sha256 = "07e8ddb19fe01781485f1522b6afc22aba680b0ab28ebe6bbfb84a2dd698ce0f"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal-syntax\r\nversion: 3.8.1.0\r\nx-revision: 3\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A library for working with .cabal files\r\ndescription:\r\n This library provides tools for reading and manipulating the .cabal file\r\n format.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal-syntax\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.9 && < 5,\r\n binary >= 0.7 && < 0.9,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n mtl >= 2.1 && < 2.4,\r\n parsec >= 3.1.13.0 && < 3.2,\r\n pretty >= 1.1.1 && < 1.2,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n time >= 1.4.0.1 && < 1.13,\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7)\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc < 8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack\r\n Distribution.CabalSpecVersion\r\n Distribution.Compat.Binary\r\n Distribution.Compat.CharParsing\r\n Distribution.Compat.DList\r\n Distribution.Compat.Exception\r\n Distribution.Compat.Graph\r\n Distribution.Compat.Lens\r\n Distribution.Compat.MonadFail\r\n Distribution.Compat.Newtype\r\n Distribution.Compat.NonEmptySet\r\n Distribution.Compat.Parsing\r\n Distribution.Compat.Prelude\r\n Distribution.Compat.Semigroup\r\n Distribution.Compat.Typeable\r\n Distribution.Compiler\r\n Distribution.FieldGrammar\r\n Distribution.FieldGrammar.Class\r\n Distribution.FieldGrammar.FieldDescrs\r\n Distribution.FieldGrammar.Newtypes\r\n Distribution.FieldGrammar.Parsec\r\n Distribution.FieldGrammar.Pretty\r\n Distribution.Fields\r\n Distribution.Fields.ConfVar\r\n Distribution.Fields.Field\r\n Distribution.Fields.Lexer\r\n Distribution.Fields.LexerMonad\r\n Distribution.Fields.ParseResult\r\n Distribution.Fields.Parser\r\n Distribution.Fields.Pretty\r\n Distribution.InstalledPackageInfo\r\n Distribution.License\r\n Distribution.ModuleName\r\n Distribution.Package\r\n Distribution.PackageDescription\r\n Distribution.PackageDescription.Configuration\r\n Distribution.PackageDescription.FieldGrammar\r\n Distribution.PackageDescription.Parsec\r\n Distribution.PackageDescription.PrettyPrint\r\n Distribution.PackageDescription.Quirks\r\n Distribution.PackageDescription.Utils\r\n Distribution.Parsec\r\n Distribution.Parsec.Error\r\n Distribution.Parsec.FieldLineStream\r\n Distribution.Parsec.Position\r\n Distribution.Parsec.Warning\r\n Distribution.Pretty\r\n Distribution.SPDX\r\n Distribution.SPDX.License\r\n Distribution.SPDX.LicenseExceptionId\r\n Distribution.SPDX.LicenseExpression\r\n Distribution.SPDX.LicenseId\r\n Distribution.SPDX.LicenseListVersion\r\n Distribution.SPDX.LicenseReference\r\n Distribution.System\r\n Distribution.Text\r\n Distribution.Types.AbiDependency\r\n Distribution.Types.AbiHash\r\n Distribution.Types.Benchmark\r\n Distribution.Types.Benchmark.Lens\r\n Distribution.Types.BenchmarkInterface\r\n Distribution.Types.BenchmarkType\r\n Distribution.Types.BuildInfo\r\n Distribution.Types.BuildInfo.Lens\r\n Distribution.Types.BuildType\r\n Distribution.Types.Component\r\n Distribution.Types.ComponentId\r\n Distribution.Types.ComponentName\r\n Distribution.Types.ComponentRequestedSpec\r\n Distribution.Types.CondTree\r\n Distribution.Types.Condition\r\n Distribution.Types.ConfVar\r\n Distribution.Types.Dependency\r\n Distribution.Types.DependencyMap\r\n Distribution.Types.ExeDependency\r\n Distribution.Types.Executable\r\n Distribution.Types.Executable.Lens\r\n Distribution.Types.ExecutableScope\r\n Distribution.Types.ExposedModule\r\n Distribution.Types.Flag\r\n Distribution.Types.ForeignLib\r\n Distribution.Types.ForeignLib.Lens\r\n Distribution.Types.ForeignLibOption\r\n Distribution.Types.ForeignLibType\r\n Distribution.Types.GenericPackageDescription\r\n Distribution.Types.GenericPackageDescription.Lens\r\n Distribution.Types.HookedBuildInfo\r\n Distribution.Types.IncludeRenaming\r\n Distribution.Types.InstalledPackageInfo\r\n Distribution.Types.InstalledPackageInfo.Lens\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar\r\n Distribution.Types.LegacyExeDependency\r\n Distribution.Types.Lens\r\n Distribution.Types.Library\r\n Distribution.Types.Library.Lens\r\n Distribution.Types.LibraryName\r\n Distribution.Types.LibraryVisibility\r\n Distribution.Types.Mixin\r\n Distribution.Types.Module\r\n Distribution.Types.ModuleReexport\r\n Distribution.Types.ModuleRenaming\r\n Distribution.Types.MungedPackageId\r\n Distribution.Types.MungedPackageName\r\n Distribution.Types.PackageDescription\r\n Distribution.Types.PackageDescription.Lens\r\n Distribution.Types.PackageId\r\n Distribution.Types.PackageId.Lens\r\n Distribution.Types.PackageName\r\n Distribution.Types.PackageVersionConstraint\r\n Distribution.Types.PkgconfigDependency\r\n Distribution.Types.PkgconfigName\r\n Distribution.Types.PkgconfigVersion\r\n Distribution.Types.PkgconfigVersionRange\r\n Distribution.Types.SetupBuildInfo\r\n Distribution.Types.SetupBuildInfo.Lens\r\n Distribution.Types.SourceRepo\r\n Distribution.Types.SourceRepo.Lens\r\n Distribution.Types.TestSuite\r\n Distribution.Types.TestSuite.Lens\r\n Distribution.Types.TestSuiteInterface\r\n Distribution.Types.TestType\r\n Distribution.Types.UnitId\r\n Distribution.Types.UnqualComponentName\r\n Distribution.Types.Version\r\n Distribution.Types.VersionInterval\r\n Distribution.Types.VersionInterval.Legacy\r\n Distribution.Types.VersionRange\r\n Distribution.Types.VersionRange.Internal\r\n Distribution.Utils.Base62\r\n Distribution.Utils.Generic\r\n Distribution.Utils.MD5\r\n Distribution.Utils.Path\r\n Distribution.Utils.ShortText\r\n Distribution.Utils.String\r\n Distribution.Utils.Structured\r\n Distribution.Version\r\n Language.Haskell.Extension\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal.nix index 22899ece21..be0b5019d9 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/Cabal.nix @@ -21,7 +21,7 @@ synopsis = "A framework for packaging Haskell software"; description = "The Haskell Common Architecture for Building Applications and\nLibraries: a framework defining a common interface for authors to more\neasily build their Haskell applications in a portable way.\n\nThe Haskell Cabal is part of a larger infrastructure for distributing,\norganizing, and cataloging Haskell libraries and tools."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ([ @@ -40,17 +40,17 @@ (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-3.8.1.0.tar.gz"; sha256 = "7464cbe6c2f3d7e5d0232023a1a7330621f8b24853cb259fc89a2af85b736608"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal\r\nversion: 3.8.1.0\r\nx-revision: 2\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A framework for packaging Haskell software\r\ndescription:\r\n The Haskell Common Architecture for Building Applications and\r\n Libraries: a framework defining a common interface for authors to more\r\n easily build their Haskell applications in a portable way.\r\n .\r\n The Haskell Cabal is part of a larger infrastructure for distributing,\r\n organizing, and cataloging Haskell libraries and tools.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n-- If we use a new Cabal feature, this needs to be changed to Custom so\r\n-- we can bootstrap.\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n Cabal-syntax >= 3.8 && < 3.9,\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.6 && < 5,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n pretty >= 1.1.1 && < 1.2,\r\n process >= 1.2.1.0 && < 1.7,\r\n time >= 1.4.0.1 && < 1.13\r\n\r\n -- PR #8802: moved conditional process lower bound to cabal-install package\r\n if impl(ghc >=8.2)\r\n build-depends: process >= 1.2.1.0\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc <8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack.Configure\r\n Distribution.Backpack.ComponentsGraph\r\n Distribution.Backpack.ConfiguredComponent\r\n Distribution.Backpack.DescribeUnitId\r\n Distribution.Backpack.FullUnitId\r\n Distribution.Backpack.LinkedComponent\r\n Distribution.Backpack.ModSubst\r\n Distribution.Backpack.ModuleShape\r\n Distribution.Backpack.PreModuleShape\r\n Distribution.Utils.IOData\r\n Distribution.Utils.LogProgress\r\n Distribution.Utils.MapAccum\r\n Distribution.Compat.CreatePipe\r\n Distribution.Compat.Directory\r\n Distribution.Compat.Environment\r\n Distribution.Compat.FilePath\r\n Distribution.Compat.Internal.TempFile\r\n Distribution.Compat.ResponseFile\r\n Distribution.Compat.Prelude.Internal\r\n Distribution.Compat.Process\r\n Distribution.Compat.Stack\r\n Distribution.Compat.Time\r\n Distribution.Make\r\n Distribution.PackageDescription.Check\r\n Distribution.ReadE\r\n Distribution.Simple\r\n Distribution.Simple.Bench\r\n Distribution.Simple.Build\r\n Distribution.Simple.Build.Macros\r\n Distribution.Simple.Build.PathsModule\r\n Distribution.Simple.BuildPaths\r\n Distribution.Simple.BuildTarget\r\n Distribution.Simple.BuildToolDepends\r\n Distribution.Simple.CCompiler\r\n Distribution.Simple.Command\r\n Distribution.Simple.Compiler\r\n Distribution.Simple.Configure\r\n Distribution.Simple.Flag\r\n Distribution.Simple.GHC\r\n Distribution.Simple.GHCJS\r\n Distribution.Simple.Haddock\r\n Distribution.Simple.Glob\r\n Distribution.Simple.HaskellSuite\r\n Distribution.Simple.Hpc\r\n Distribution.Simple.Install\r\n Distribution.Simple.InstallDirs\r\n Distribution.Simple.InstallDirs.Internal\r\n Distribution.Simple.LocalBuildInfo\r\n Distribution.Simple.PackageDescription\r\n Distribution.Simple.PackageIndex\r\n Distribution.Simple.PreProcess\r\n Distribution.Simple.PreProcess.Unlit\r\n Distribution.Simple.Program\r\n Distribution.Simple.Program.Ar\r\n Distribution.Simple.Program.Builtin\r\n Distribution.Simple.Program.Db\r\n Distribution.Simple.Program.Find\r\n Distribution.Simple.Program.GHC\r\n Distribution.Simple.Program.HcPkg\r\n Distribution.Simple.Program.Hpc\r\n Distribution.Simple.Program.Internal\r\n Distribution.Simple.Program.Ld\r\n Distribution.Simple.Program.ResponseFile\r\n Distribution.Simple.Program.Run\r\n Distribution.Simple.Program.Script\r\n Distribution.Simple.Program.Strip\r\n Distribution.Simple.Program.Types\r\n Distribution.Simple.Register\r\n Distribution.Simple.Setup\r\n Distribution.Simple.ShowBuildInfo\r\n Distribution.Simple.SrcDist\r\n Distribution.Simple.Test\r\n Distribution.Simple.Test.ExeV10\r\n Distribution.Simple.Test.LibV09\r\n Distribution.Simple.Test.Log\r\n Distribution.Simple.UHC\r\n Distribution.Simple.UserHooks\r\n Distribution.Simple.Utils\r\n Distribution.TestSuite\r\n Distribution.Types.AnnotatedId\r\n Distribution.Types.ComponentInclude\r\n Distribution.Types.DumpBuildInfo\r\n Distribution.Types.PackageName.Magic\r\n Distribution.Types.ComponentLocalBuildInfo\r\n Distribution.Types.LocalBuildInfo\r\n Distribution.Types.TargetInfo\r\n Distribution.Types.GivenComponent\r\n Distribution.Utils.Json\r\n Distribution.Utils.NubList\r\n Distribution.Utils.Progress\r\n Distribution.Verbosity\r\n Distribution.Verbosity.Internal\r\n\r\n -- We reexport all of Cabal-syntax to aid in compatibility for downstream\r\n -- users. In the future we may opt to deprecate some or all of these exports.\r\n -- See haskell/Cabal#7974.\r\n reexported-modules:\r\n Distribution.Backpack,\r\n Distribution.CabalSpecVersion,\r\n Distribution.Compat.Binary,\r\n Distribution.Compat.CharParsing,\r\n Distribution.Compat.DList,\r\n Distribution.Compat.Exception,\r\n Distribution.Compat.Graph,\r\n Distribution.Compat.Lens,\r\n Distribution.Compat.MonadFail,\r\n Distribution.Compat.Newtype,\r\n Distribution.Compat.NonEmptySet,\r\n Distribution.Compat.Parsing,\r\n Distribution.Compat.Prelude,\r\n Distribution.Compat.Semigroup,\r\n Distribution.Compat.Typeable,\r\n Distribution.Compiler,\r\n Distribution.FieldGrammar,\r\n Distribution.FieldGrammar.Class,\r\n Distribution.FieldGrammar.FieldDescrs,\r\n Distribution.FieldGrammar.Newtypes,\r\n Distribution.FieldGrammar.Parsec,\r\n Distribution.FieldGrammar.Pretty,\r\n Distribution.Fields,\r\n Distribution.Fields.ConfVar,\r\n Distribution.Fields.Field,\r\n Distribution.Fields.Lexer,\r\n Distribution.Fields.LexerMonad,\r\n Distribution.Fields.ParseResult,\r\n Distribution.Fields.Parser,\r\n Distribution.Fields.Pretty,\r\n Distribution.InstalledPackageInfo,\r\n Distribution.License,\r\n Distribution.ModuleName,\r\n Distribution.Package,\r\n Distribution.PackageDescription,\r\n Distribution.PackageDescription.Configuration,\r\n Distribution.PackageDescription.FieldGrammar,\r\n Distribution.PackageDescription.Parsec,\r\n Distribution.PackageDescription.PrettyPrint,\r\n Distribution.PackageDescription.Quirks,\r\n Distribution.PackageDescription.Utils,\r\n Distribution.Parsec,\r\n Distribution.Parsec.Error,\r\n Distribution.Parsec.FieldLineStream,\r\n Distribution.Parsec.Position,\r\n Distribution.Parsec.Warning,\r\n Distribution.Pretty,\r\n Distribution.SPDX,\r\n Distribution.SPDX.License,\r\n Distribution.SPDX.LicenseExceptionId,\r\n Distribution.SPDX.LicenseExpression,\r\n Distribution.SPDX.LicenseId,\r\n Distribution.SPDX.LicenseListVersion,\r\n Distribution.SPDX.LicenseReference,\r\n Distribution.System,\r\n Distribution.Text,\r\n Distribution.Types.AbiDependency,\r\n Distribution.Types.AbiHash,\r\n Distribution.Types.Benchmark,\r\n Distribution.Types.Benchmark.Lens,\r\n Distribution.Types.BenchmarkInterface,\r\n Distribution.Types.BenchmarkType,\r\n Distribution.Types.BuildInfo,\r\n Distribution.Types.BuildInfo.Lens,\r\n Distribution.Types.BuildType,\r\n Distribution.Types.Component,\r\n Distribution.Types.ComponentId,\r\n Distribution.Types.ComponentName,\r\n Distribution.Types.ComponentRequestedSpec,\r\n Distribution.Types.CondTree,\r\n Distribution.Types.Condition,\r\n Distribution.Types.ConfVar,\r\n Distribution.Types.Dependency,\r\n Distribution.Types.DependencyMap,\r\n Distribution.Types.ExeDependency,\r\n Distribution.Types.Executable,\r\n Distribution.Types.Executable.Lens,\r\n Distribution.Types.ExecutableScope,\r\n Distribution.Types.ExposedModule,\r\n Distribution.Types.Flag,\r\n Distribution.Types.ForeignLib,\r\n Distribution.Types.ForeignLib.Lens,\r\n Distribution.Types.ForeignLibOption,\r\n Distribution.Types.ForeignLibType,\r\n Distribution.Types.GenericPackageDescription,\r\n Distribution.Types.GenericPackageDescription.Lens,\r\n Distribution.Types.HookedBuildInfo,\r\n Distribution.Types.IncludeRenaming,\r\n Distribution.Types.InstalledPackageInfo,\r\n Distribution.Types.InstalledPackageInfo.Lens,\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar,\r\n Distribution.Types.LegacyExeDependency,\r\n Distribution.Types.Lens,\r\n Distribution.Types.Library,\r\n Distribution.Types.Library.Lens,\r\n Distribution.Types.LibraryName,\r\n Distribution.Types.LibraryVisibility,\r\n Distribution.Types.Mixin,\r\n Distribution.Types.Module,\r\n Distribution.Types.ModuleReexport,\r\n Distribution.Types.ModuleRenaming,\r\n Distribution.Types.MungedPackageId,\r\n Distribution.Types.MungedPackageName,\r\n Distribution.Types.PackageDescription,\r\n Distribution.Types.PackageDescription.Lens,\r\n Distribution.Types.PackageId,\r\n Distribution.Types.PackageId.Lens,\r\n Distribution.Types.PackageName,\r\n Distribution.Types.PackageVersionConstraint,\r\n Distribution.Types.PkgconfigDependency,\r\n Distribution.Types.PkgconfigName,\r\n Distribution.Types.PkgconfigVersion,\r\n Distribution.Types.PkgconfigVersionRange,\r\n Distribution.Types.SetupBuildInfo,\r\n Distribution.Types.SetupBuildInfo.Lens,\r\n Distribution.Types.SourceRepo,\r\n Distribution.Types.SourceRepo.Lens,\r\n Distribution.Types.TestSuite,\r\n Distribution.Types.TestSuite.Lens,\r\n Distribution.Types.TestSuiteInterface,\r\n Distribution.Types.TestType,\r\n Distribution.Types.UnitId,\r\n Distribution.Types.UnqualComponentName,\r\n Distribution.Types.Version,\r\n Distribution.Types.VersionInterval,\r\n Distribution.Types.VersionInterval.Legacy,\r\n Distribution.Types.VersionRange,\r\n Distribution.Types.VersionRange.Internal,\r\n Distribution.Utils.Base62,\r\n Distribution.Utils.Generic,\r\n Distribution.Utils.MD5,\r\n Distribution.Utils.Path,\r\n Distribution.Utils.ShortText,\r\n Distribution.Utils.String,\r\n Distribution.Utils.Structured,\r\n Distribution.Version,\r\n Language.Haskell.Extension\r\n\r\n -- Parsec parser-related modules\r\n build-depends:\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7),\r\n mtl >= 2.1 && < 2.4,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n parsec >= 3.1.13.0 && < 3.2\r\n\r\n other-modules:\r\n Distribution.Backpack.PreExistingComponent\r\n Distribution.Backpack.ReadyComponent\r\n Distribution.Backpack.MixLink\r\n Distribution.Backpack.ModuleScope\r\n Distribution.Backpack.UnifyM\r\n Distribution.Backpack.Id\r\n Distribution.Utils.UnionFind\r\n Distribution.Compat.Async\r\n Distribution.Compat.CopyFile\r\n Distribution.Compat.GetShortPathName\r\n Distribution.Compat.SnocList\r\n Distribution.GetOpt\r\n Distribution.Lex\r\n Distribution.Simple.Build.Macros.Z\r\n Distribution.Simple.Build.PathsModule.Z\r\n Distribution.Simple.GHC.EnvironmentParser\r\n Distribution.Simple.GHC.Internal\r\n Distribution.Simple.GHC.ImplInfo\r\n Distribution.ZinzaPrelude\r\n Paths_Cabal\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n LambdaCase\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix index 31390ca93b..62e36aa8b6 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix @@ -21,99 +21,99 @@ synopsis = "Automatic testing of Haskell programs"; description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((((((([ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - ] ++ [ + ] ++ [ (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]) ++ (pkgs.lib).optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ (pkgs.lib).optionals (compiler.isGhc && true) [ + ]) ++ pkgs.lib.optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ pkgs.lib.optionals (compiler.isGhc && true) [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ (pkgs.lib).optionals (compiler.isUhc && true) [ + ]) ++ pkgs.lib.optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ pkgs.lib.optionals (compiler.isUhc && true) [ (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) - ]; + ]; buildable = true; - }; + }; tests = { "test-quickcheck" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gcoarbitrary" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-generators" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gshrink" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-terminal" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-monadfix" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-split" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "test-quickcheck-misc" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; - }); - }) // { + }); + }) // { package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/clock.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/clock.nix index 4831499489..1db6e2d90d 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/clock.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/clock.nix @@ -21,12 +21,12 @@ synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -34,26 +34,26 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/extra.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/extra.nix index 450be82c4b..41668cf6bc 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/extra.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/extra.nix @@ -21,7 +21,7 @@ synopsis = "Extra functions I use."; description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -31,9 +31,9 @@ (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; tests = { "extra-test" = { depends = [ @@ -43,16 +43,16 @@ (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/filepattern.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/filepattern.nix index 13bbd09e88..385c502003 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/filepattern.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/filepattern.nix @@ -21,7 +21,7 @@ synopsis = "File path glob-like matching"; description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - ]; + ]; buildable = true; - }; + }; tests = { "filepattern-test" = { depends = [ @@ -41,16 +41,16 @@ (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/hashable.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/hashable.nix index 09de9076b1..4b125fa0bc 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/hashable.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/hashable.nix @@ -21,7 +21,7 @@ synopsis = "A class for types that can be converted to a hash value"; description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; buildType = "Simple"; - }; + }; components = { "library" = { depends = (([ @@ -32,19 +32,19 @@ (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && (compiler.version).ge "9" + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && compiler.version.ge "9" then [ (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) else if flags.integer-gmp then [ (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) - ] + ] else [ (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) - ]); + ]); buildable = true; - }; + }; tests = { "hashable-tests" = { depends = [ @@ -59,24 +59,24 @@ (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; "hashable-examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/heaps.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/heaps.nix index dc77aed1f4..e759e305bf 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/heaps.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/heaps.nix @@ -21,18 +21,18 @@ synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; - }); - }) // { + }); + }) // { package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix index 0237404c41..40ea1148c6 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified jquery.dgtable code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-dgtable-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-flot.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-flot.nix index ba292fc8b2..67980dd7ba 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-flot.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-flot.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified flot code"; description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-flot-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix index 9ecdc931ed..05e54a25ab 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix @@ -21,28 +21,28 @@ synopsis = "Obtain minified jQuery code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-jquery-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/primitive.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/primitive.nix index 1216d7e6c5..b5683f2c83 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/primitive.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/primitive.nix @@ -21,7 +21,7 @@ synopsis = "Primitive memory-related operations"; description = "This package provides various primitive memory-related operations."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); buildable = true; - }; + }; tests = { "test-qc" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -58,16 +58,16 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; - }); - }) // { + }); + }) // { package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/random.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/random.nix index fed649a35c..0dbaf8b099 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/random.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/random.nix @@ -21,7 +21,7 @@ synopsis = "Pseudo-random number generation"; description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -30,32 +30,32 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); buildable = true; - }; + }; tests = { "legacy-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]; + ]; buildable = true; - }; + }; "doctests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) - ] ++ (pkgs.lib).optionals (compiler.isGhc && (compiler.version).ge "8.2" && (compiler.isGhc && (compiler.version).lt "8.10")) [ + ] ++ pkgs.lib.optionals (compiler.isGhc && compiler.version.ge "8.2" && (compiler.isGhc && compiler.version.lt "8.10")) [ (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."stm" or (errorHandler.buildDepError "stm")) (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "spec" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -67,18 +67,18 @@ (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; + }; "spec-inspection" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); buildable = true; - }; }; + }; benchmarks = { "legacy-bench" = { depends = [ @@ -87,9 +87,9 @@ (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) (hsPkgs."split" or (errorHandler.buildDepError "split")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ]; + ]; buildable = true; - }; + }; "bench" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -98,16 +98,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/shake.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/shake.nix index e7eb5c6647..d40c2a8bbc 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/shake.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/shake.nix @@ -21,7 +21,7 @@ synopsis = "Build system library, like Make, but more accurate dependencies."; description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((([ @@ -45,15 +45,15 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]; + ]; buildable = true; - }; + }; exes = { "shake" = { depends = (((([ @@ -77,16 +77,16 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; + }; tests = { "shake-test" = { depends = (((([ @@ -111,22 +111,22 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/splitmix.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/splitmix.nix index 81fc69bf5c..aa0dd88d31 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/splitmix.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/splitmix.nix @@ -21,24 +21,24 @@ synopsis = "Fast Splittable PRNG"; description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ] ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) ((pkgs.lib).optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + ] ++ pkgs.lib.optionals (!(compiler.isGhcjs && true)) (pkgs.lib.optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); buildable = true; - }; + }; tests = { "examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -49,23 +49,23 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi-32" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-dieharder" = { depends = [ (hsPkgs."async" or (errorHandler.buildDepError "async")) @@ -78,27 +78,27 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "splitmix-testu01" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; buildable = if !system.isLinux then false else true; - }; + }; "initialization" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "comparison" = { depends = [ @@ -108,32 +108,32 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) - ]; + ]; buildable = true; - }; + }; "simple-sum" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "range" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ] ++ (pkgs.lib).optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); + ] ++ pkgs.lib.optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix index 43e48286c4..0aeaccb277 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix @@ -21,7 +21,7 @@ synopsis = "Efficient hashing-based container types"; description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]; + ]; buildable = true; - }; + }; tests = { "unordered-containers-tests" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ @@ -63,16 +63,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; - }); - }) // { + }); + }) // { package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix index ac9bde4057..a5ee5272da 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix @@ -21,31 +21,31 @@ synopsis = "Support for reading and writing UTF8 Strings"; description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "unit-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; - }); - }) // { + }); + }) // { package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc96/hadrian/default.nix b/materialized/ghc964/hadrian-ghc96/hadrian/default.nix index 8f84d14f0c..e20361dbf3 100644 --- a/materialized/ghc964/hadrian-ghc96/hadrian/default.nix +++ b/materialized/ghc964/hadrian-ghc96/hadrian/default.nix @@ -2,87 +2,87 @@ pkgs = hackage: { packages = { - Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; - bytestring.revision = (((hackage.bytestring)."0.11.5.3").revisions).default; - exceptions.revision = (((hackage.exceptions)."0.10.7").revisions).default; - directory.revision = (((hackage.directory)."1.3.8.1").revisions).default; - filepath.revision = (((hackage.filepath)."1.4.200.1").revisions).default; - mtl.revision = (((hackage.mtl)."2.3.1").revisions).default; - ghc-bignum.revision = (((hackage.ghc-bignum)."1.3").revisions).default; - ghc-prim.revision = (((hackage.ghc-prim)."0.10.0").revisions).default; - parsec.revision = (((hackage.parsec)."3.1.16.1").revisions).default; - js-flot.revision = import ./cabal-files/js-flot.nix; - utf8-string.revision = import ./cabal-files/utf8-string.nix; - Cabal.revision = import ./cabal-files/Cabal.nix; - splitmix.revision = import ./cabal-files/splitmix.nix; - splitmix.flags.optimised-mixer = false; - containers.revision = (((hackage.containers)."0.6.7").revisions).default; + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; clock.revision = import ./cabal-files/clock.nix; clock.flags.llvm = false; - stm.revision = (((hackage.stm)."2.5.1.0").revisions).default; + transformers.revision = hackage.transformers."0.6.1.0".revisions.default; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.2.0".revisions.default; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + unix.revision = hackage.unix."2.8.4.0".revisions.default; + filepattern.revision = import ./cabal-files/filepattern.nix; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.4".revisions.default; + mtl.revision = hackage.mtl."2.3.1".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; heaps.revision = import ./cabal-files/heaps.nix; - base.revision = (((hackage.base)."4.18.2.0").revisions).default; - time.revision = (((hackage.time)."1.12.2").revisions).default; - random.revision = import ./cabal-files/random.nix; + Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; + process.revision = hackage.process."1.6.17.0".revisions.default; primitive.revision = import ./cabal-files/primitive.nix; - deepseq.revision = (((hackage.deepseq)."1.4.8.1").revisions).default; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + exceptions.revision = hackage.exceptions."0.10.7".revisions.default; + parsec.revision = hackage.parsec."3.1.16.1".revisions.default; + system-cxx-std-lib.revision = hackage.system-cxx-std-lib."1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + utf8-string.revision = import ./cabal-files/utf8-string.nix; js-jquery.revision = import ./cabal-files/js-jquery.nix; - js-dgtable.revision = import ./cabal-files/js-dgtable.nix; - rts.revision = (((hackage.rts)."1.0.2").revisions).default; - template-haskell.revision = (((hackage.template-haskell)."2.20.0.0").revisions).default; - binary.revision = (((hackage.binary)."0.8.9.1").revisions).default; - shake.revision = import ./cabal-files/shake.nix; - shake.flags.portable = false; - shake.flags.cloud = false; - shake.flags.embed-files = false; - process.revision = (((hackage.process)."1.6.17.0").revisions).default; - unix.revision = (((hackage.unix)."2.8.4.0").revisions).default; - transformers.revision = (((hackage.transformers)."0.6.1.0").revisions).default; - unordered-containers.revision = import ./cabal-files/unordered-containers.nix; - unordered-containers.flags.debug = false; + text.revision = hackage.text."2.0.2".revisions.default; QuickCheck.revision = import ./cabal-files/QuickCheck.nix; QuickCheck.flags.old-random = false; QuickCheck.flags.templatehaskell = true; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.6.0".revisions.default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.cloud = false; + shake.flags.embed-files = false; + shake.flags.portable = false; + random.revision = import ./cabal-files/random.nix; + bytestring.revision = hackage.bytestring."0.11.5.3".revisions.default; + Cabal.revision = import ./cabal-files/Cabal.nix; + directory.revision = hackage.directory."1.3.8.1".revisions.default; + js-flot.revision = import ./cabal-files/js-flot.nix; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + binary.revision = hackage.binary."0.8.9.1".revisions.default; + filepath.revision = hackage.filepath."1.4.200.1".revisions.default; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; extra.revision = import ./cabal-files/extra.nix; - text.revision = (((hackage.text)."2.0.2").revisions).default; - array.revision = (((hackage.array)."0.5.6.0").revisions).default; - ghc-boot-th.revision = (((hackage.ghc-boot-th)."9.6.4").revisions).default; - filepattern.revision = import ./cabal-files/filepattern.nix; - pretty.revision = (((hackage.pretty)."1.1.3.6").revisions).default; - hashable.revision = import ./cabal-files/hashable.nix; - hashable.flags.random-initial-seed = false; - hashable.flags.integer-gmp = true; - }; + }; compiler = { version = "9.6.4"; nix-name = "ghc964"; packages = { - "pretty" = "1.1.3.6"; - "text" = "2.0.2"; - "array" = "0.5.6.0"; - "mtl" = "2.3.1"; + "unix" = "2.8.4.0"; + "filepath" = "1.4.200.1"; + "transformers" = "0.6.1.0"; "parsec" = "3.1.16.1"; "bytestring" = "0.11.5.3"; - "filepath" = "1.4.200.1"; - "stm" = "2.5.1.0"; + "containers" = "0.6.7"; "ghc-prim" = "0.10.0"; + "mtl" = "2.3.1"; "ghc-boot-th" = "9.6.4"; "base" = "4.18.2.0"; "time" = "1.12.2"; - "process" = "1.6.17.0"; + "stm" = "2.5.1.0"; "ghc-bignum" = "1.3"; "directory" = "1.3.8.1"; - "exceptions" = "0.10.7"; - "rts" = "1.0.2"; - "transformers" = "0.6.1.0"; "template-haskell" = "2.20.0.0"; - "deepseq" = "1.4.8.1"; - "unix" = "2.8.4.0"; + "process" = "1.6.17.0"; "binary" = "0.8.9.1"; - "containers" = "0.6.7"; - }; + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "system-cxx-std-lib" = "1.0"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.6.0"; + "exceptions" = "0.10.7"; }; }; + }; extras = hackage: { packages = { hadrian = ./.plan.nix/hadrian.nix; }; }; modules = [ @@ -93,56 +93,56 @@ flags = { "threaded" = lib.mkOverride 900 true; "selftest" = lib.mkOverride 900 true; - }; }; }; - }) + }; + }) ({ lib, ... }: { packages = { - "shake".components.library.planned = lib.mkOverride 900 true; - "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; "heaps".components.library.planned = lib.mkOverride 900 true; "extra".components.library.planned = lib.mkOverride 900 true; - "filepath".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "system-cxx-std-lib".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; "pretty".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "shake".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; "utf8-string".components.library.planned = lib.mkOverride 900 true; "Cabal".components.library.planned = lib.mkOverride 900 true; - "bytestring".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; "exceptions".components.library.planned = lib.mkOverride 900 true; - "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; "array".components.library.planned = lib.mkOverride 900 true; - "binary".components.library.planned = lib.mkOverride 900 true; "filepattern".components.library.planned = lib.mkOverride 900 true; "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; - "splitmix".components.library.planned = lib.mkOverride 900 true; - "rts".components.library.planned = lib.mkOverride 900 true; "unix".components.library.planned = lib.mkOverride 900 true; - "shake".components.exes."shake".planned = lib.mkOverride 900 true; - "directory".components.library.planned = lib.mkOverride 900 true; - "time".components.library.planned = lib.mkOverride 900 true; - "js-flot".components.library.planned = lib.mkOverride 900 true; - "ghc-bignum".components.library.planned = lib.mkOverride 900 true; - "process".components.library.planned = lib.mkOverride 900 true; - "clock".components.library.planned = lib.mkOverride 900 true; - "template-haskell".components.library.planned = lib.mkOverride 900 true; - "stm".components.library.planned = lib.mkOverride 900 true; - "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; - "QuickCheck".components.library.planned = lib.mkOverride 900 true; - "mtl".components.library.planned = lib.mkOverride 900 true; - "transformers".components.library.planned = lib.mkOverride 900 true; - "parsec".components.library.planned = lib.mkOverride 900 true; - "deepseq".components.library.planned = lib.mkOverride 900 true; - "primitive".components.library.planned = lib.mkOverride 900 true; - "js-jquery".components.library.planned = lib.mkOverride 900 true; - "text".components.library.planned = lib.mkOverride 900 true; - "unordered-containers".components.library.planned = lib.mkOverride 900 true; - "random".components.library.planned = lib.mkOverride 900 true; - "base".components.library.planned = lib.mkOverride 900 true; - "containers".components.library.planned = lib.mkOverride 900 true; - "js-dgtable".components.library.planned = lib.mkOverride 900 true; - "hashable".components.library.planned = lib.mkOverride 900 true; - }; - }) - ]; - } \ No newline at end of file + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix b/materialized/ghc964/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix index 9c366cea6d..45a80469a3 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix @@ -29,7 +29,7 @@ extraSrcFiles = []; extraTmpFiles = []; extraDocFiles = [ "README.md" ]; - }; + }; components = { exes = { "hadrian" = { @@ -50,7 +50,7 @@ (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) - ] ++ (pkgs.lib).optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + ] ++ pkgs.lib.optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); buildable = true; modules = [ "Base" @@ -119,6 +119,7 @@ "Settings/Builders/Cc" "Settings/Builders/Configure" "Settings/Builders/DeriveConstants" + "Settings/Builders/GenApply" "Settings/Builders/GenPrimopCode" "Settings/Builders/Ghc" "Settings/Builders/GhcPkg" @@ -154,12 +155,12 @@ "Utilities" "Way" "Way/Type" - ] ++ (pkgs.lib).optional (flags.selftest) "Rules/Selftest"; + ] ++ pkgs.lib.optional (flags.selftest) "Rules/Selftest"; hsSourceDirs = [ "." "src" ]; mainPath = ([ "Main.hs" - ] ++ (pkgs.lib).optional (flags.threaded) "") ++ (pkgs.lib).optional (flags.selftest) ""; - }; + ] ++ pkgs.lib.optional (flags.threaded) "") ++ pkgs.lib.optional (flags.selftest) ""; }; }; - } // rec { src = (pkgs.lib).mkDefault ../.; } \ No newline at end of file + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix index 3993fc7083..dabbcbdee8 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix @@ -21,7 +21,7 @@ synopsis = "A library for working with .cabal files"; description = "This library provides tools for reading and manipulating the .cabal file\nformat."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -39,17 +39,17 @@ (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."time" or (errorHandler.buildDepError "time")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ] ++ (if system.isWindows + ] ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-syntax-3.8.1.0.tar.gz"; sha256 = "07e8ddb19fe01781485f1522b6afc22aba680b0ab28ebe6bbfb84a2dd698ce0f"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal-syntax\r\nversion: 3.8.1.0\r\nx-revision: 3\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A library for working with .cabal files\r\ndescription:\r\n This library provides tools for reading and manipulating the .cabal file\r\n format.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal-syntax\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.9 && < 5,\r\n binary >= 0.7 && < 0.9,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n mtl >= 2.1 && < 2.4,\r\n parsec >= 3.1.13.0 && < 3.2,\r\n pretty >= 1.1.1 && < 1.2,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n time >= 1.4.0.1 && < 1.13,\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7)\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc < 8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack\r\n Distribution.CabalSpecVersion\r\n Distribution.Compat.Binary\r\n Distribution.Compat.CharParsing\r\n Distribution.Compat.DList\r\n Distribution.Compat.Exception\r\n Distribution.Compat.Graph\r\n Distribution.Compat.Lens\r\n Distribution.Compat.MonadFail\r\n Distribution.Compat.Newtype\r\n Distribution.Compat.NonEmptySet\r\n Distribution.Compat.Parsing\r\n Distribution.Compat.Prelude\r\n Distribution.Compat.Semigroup\r\n Distribution.Compat.Typeable\r\n Distribution.Compiler\r\n Distribution.FieldGrammar\r\n Distribution.FieldGrammar.Class\r\n Distribution.FieldGrammar.FieldDescrs\r\n Distribution.FieldGrammar.Newtypes\r\n Distribution.FieldGrammar.Parsec\r\n Distribution.FieldGrammar.Pretty\r\n Distribution.Fields\r\n Distribution.Fields.ConfVar\r\n Distribution.Fields.Field\r\n Distribution.Fields.Lexer\r\n Distribution.Fields.LexerMonad\r\n Distribution.Fields.ParseResult\r\n Distribution.Fields.Parser\r\n Distribution.Fields.Pretty\r\n Distribution.InstalledPackageInfo\r\n Distribution.License\r\n Distribution.ModuleName\r\n Distribution.Package\r\n Distribution.PackageDescription\r\n Distribution.PackageDescription.Configuration\r\n Distribution.PackageDescription.FieldGrammar\r\n Distribution.PackageDescription.Parsec\r\n Distribution.PackageDescription.PrettyPrint\r\n Distribution.PackageDescription.Quirks\r\n Distribution.PackageDescription.Utils\r\n Distribution.Parsec\r\n Distribution.Parsec.Error\r\n Distribution.Parsec.FieldLineStream\r\n Distribution.Parsec.Position\r\n Distribution.Parsec.Warning\r\n Distribution.Pretty\r\n Distribution.SPDX\r\n Distribution.SPDX.License\r\n Distribution.SPDX.LicenseExceptionId\r\n Distribution.SPDX.LicenseExpression\r\n Distribution.SPDX.LicenseId\r\n Distribution.SPDX.LicenseListVersion\r\n Distribution.SPDX.LicenseReference\r\n Distribution.System\r\n Distribution.Text\r\n Distribution.Types.AbiDependency\r\n Distribution.Types.AbiHash\r\n Distribution.Types.Benchmark\r\n Distribution.Types.Benchmark.Lens\r\n Distribution.Types.BenchmarkInterface\r\n Distribution.Types.BenchmarkType\r\n Distribution.Types.BuildInfo\r\n Distribution.Types.BuildInfo.Lens\r\n Distribution.Types.BuildType\r\n Distribution.Types.Component\r\n Distribution.Types.ComponentId\r\n Distribution.Types.ComponentName\r\n Distribution.Types.ComponentRequestedSpec\r\n Distribution.Types.CondTree\r\n Distribution.Types.Condition\r\n Distribution.Types.ConfVar\r\n Distribution.Types.Dependency\r\n Distribution.Types.DependencyMap\r\n Distribution.Types.ExeDependency\r\n Distribution.Types.Executable\r\n Distribution.Types.Executable.Lens\r\n Distribution.Types.ExecutableScope\r\n Distribution.Types.ExposedModule\r\n Distribution.Types.Flag\r\n Distribution.Types.ForeignLib\r\n Distribution.Types.ForeignLib.Lens\r\n Distribution.Types.ForeignLibOption\r\n Distribution.Types.ForeignLibType\r\n Distribution.Types.GenericPackageDescription\r\n Distribution.Types.GenericPackageDescription.Lens\r\n Distribution.Types.HookedBuildInfo\r\n Distribution.Types.IncludeRenaming\r\n Distribution.Types.InstalledPackageInfo\r\n Distribution.Types.InstalledPackageInfo.Lens\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar\r\n Distribution.Types.LegacyExeDependency\r\n Distribution.Types.Lens\r\n Distribution.Types.Library\r\n Distribution.Types.Library.Lens\r\n Distribution.Types.LibraryName\r\n Distribution.Types.LibraryVisibility\r\n Distribution.Types.Mixin\r\n Distribution.Types.Module\r\n Distribution.Types.ModuleReexport\r\n Distribution.Types.ModuleRenaming\r\n Distribution.Types.MungedPackageId\r\n Distribution.Types.MungedPackageName\r\n Distribution.Types.PackageDescription\r\n Distribution.Types.PackageDescription.Lens\r\n Distribution.Types.PackageId\r\n Distribution.Types.PackageId.Lens\r\n Distribution.Types.PackageName\r\n Distribution.Types.PackageVersionConstraint\r\n Distribution.Types.PkgconfigDependency\r\n Distribution.Types.PkgconfigName\r\n Distribution.Types.PkgconfigVersion\r\n Distribution.Types.PkgconfigVersionRange\r\n Distribution.Types.SetupBuildInfo\r\n Distribution.Types.SetupBuildInfo.Lens\r\n Distribution.Types.SourceRepo\r\n Distribution.Types.SourceRepo.Lens\r\n Distribution.Types.TestSuite\r\n Distribution.Types.TestSuite.Lens\r\n Distribution.Types.TestSuiteInterface\r\n Distribution.Types.TestType\r\n Distribution.Types.UnitId\r\n Distribution.Types.UnqualComponentName\r\n Distribution.Types.Version\r\n Distribution.Types.VersionInterval\r\n Distribution.Types.VersionInterval.Legacy\r\n Distribution.Types.VersionRange\r\n Distribution.Types.VersionRange.Internal\r\n Distribution.Utils.Base62\r\n Distribution.Utils.Generic\r\n Distribution.Utils.MD5\r\n Distribution.Utils.Path\r\n Distribution.Utils.ShortText\r\n Distribution.Utils.String\r\n Distribution.Utils.Structured\r\n Distribution.Version\r\n Language.Haskell.Extension\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal.nix index 22899ece21..be0b5019d9 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/Cabal.nix @@ -21,7 +21,7 @@ synopsis = "A framework for packaging Haskell software"; description = "The Haskell Common Architecture for Building Applications and\nLibraries: a framework defining a common interface for authors to more\neasily build their Haskell applications in a portable way.\n\nThe Haskell Cabal is part of a larger infrastructure for distributing,\norganizing, and cataloging Haskell libraries and tools."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ([ @@ -40,17 +40,17 @@ (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-3.8.1.0.tar.gz"; sha256 = "7464cbe6c2f3d7e5d0232023a1a7330621f8b24853cb259fc89a2af85b736608"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal\r\nversion: 3.8.1.0\r\nx-revision: 2\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A framework for packaging Haskell software\r\ndescription:\r\n The Haskell Common Architecture for Building Applications and\r\n Libraries: a framework defining a common interface for authors to more\r\n easily build their Haskell applications in a portable way.\r\n .\r\n The Haskell Cabal is part of a larger infrastructure for distributing,\r\n organizing, and cataloging Haskell libraries and tools.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n-- If we use a new Cabal feature, this needs to be changed to Custom so\r\n-- we can bootstrap.\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n Cabal-syntax >= 3.8 && < 3.9,\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.6 && < 5,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n pretty >= 1.1.1 && < 1.2,\r\n process >= 1.2.1.0 && < 1.7,\r\n time >= 1.4.0.1 && < 1.13\r\n\r\n -- PR #8802: moved conditional process lower bound to cabal-install package\r\n if impl(ghc >=8.2)\r\n build-depends: process >= 1.2.1.0\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc <8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack.Configure\r\n Distribution.Backpack.ComponentsGraph\r\n Distribution.Backpack.ConfiguredComponent\r\n Distribution.Backpack.DescribeUnitId\r\n Distribution.Backpack.FullUnitId\r\n Distribution.Backpack.LinkedComponent\r\n Distribution.Backpack.ModSubst\r\n Distribution.Backpack.ModuleShape\r\n Distribution.Backpack.PreModuleShape\r\n Distribution.Utils.IOData\r\n Distribution.Utils.LogProgress\r\n Distribution.Utils.MapAccum\r\n Distribution.Compat.CreatePipe\r\n Distribution.Compat.Directory\r\n Distribution.Compat.Environment\r\n Distribution.Compat.FilePath\r\n Distribution.Compat.Internal.TempFile\r\n Distribution.Compat.ResponseFile\r\n Distribution.Compat.Prelude.Internal\r\n Distribution.Compat.Process\r\n Distribution.Compat.Stack\r\n Distribution.Compat.Time\r\n Distribution.Make\r\n Distribution.PackageDescription.Check\r\n Distribution.ReadE\r\n Distribution.Simple\r\n Distribution.Simple.Bench\r\n Distribution.Simple.Build\r\n Distribution.Simple.Build.Macros\r\n Distribution.Simple.Build.PathsModule\r\n Distribution.Simple.BuildPaths\r\n Distribution.Simple.BuildTarget\r\n Distribution.Simple.BuildToolDepends\r\n Distribution.Simple.CCompiler\r\n Distribution.Simple.Command\r\n Distribution.Simple.Compiler\r\n Distribution.Simple.Configure\r\n Distribution.Simple.Flag\r\n Distribution.Simple.GHC\r\n Distribution.Simple.GHCJS\r\n Distribution.Simple.Haddock\r\n Distribution.Simple.Glob\r\n Distribution.Simple.HaskellSuite\r\n Distribution.Simple.Hpc\r\n Distribution.Simple.Install\r\n Distribution.Simple.InstallDirs\r\n Distribution.Simple.InstallDirs.Internal\r\n Distribution.Simple.LocalBuildInfo\r\n Distribution.Simple.PackageDescription\r\n Distribution.Simple.PackageIndex\r\n Distribution.Simple.PreProcess\r\n Distribution.Simple.PreProcess.Unlit\r\n Distribution.Simple.Program\r\n Distribution.Simple.Program.Ar\r\n Distribution.Simple.Program.Builtin\r\n Distribution.Simple.Program.Db\r\n Distribution.Simple.Program.Find\r\n Distribution.Simple.Program.GHC\r\n Distribution.Simple.Program.HcPkg\r\n Distribution.Simple.Program.Hpc\r\n Distribution.Simple.Program.Internal\r\n Distribution.Simple.Program.Ld\r\n Distribution.Simple.Program.ResponseFile\r\n Distribution.Simple.Program.Run\r\n Distribution.Simple.Program.Script\r\n Distribution.Simple.Program.Strip\r\n Distribution.Simple.Program.Types\r\n Distribution.Simple.Register\r\n Distribution.Simple.Setup\r\n Distribution.Simple.ShowBuildInfo\r\n Distribution.Simple.SrcDist\r\n Distribution.Simple.Test\r\n Distribution.Simple.Test.ExeV10\r\n Distribution.Simple.Test.LibV09\r\n Distribution.Simple.Test.Log\r\n Distribution.Simple.UHC\r\n Distribution.Simple.UserHooks\r\n Distribution.Simple.Utils\r\n Distribution.TestSuite\r\n Distribution.Types.AnnotatedId\r\n Distribution.Types.ComponentInclude\r\n Distribution.Types.DumpBuildInfo\r\n Distribution.Types.PackageName.Magic\r\n Distribution.Types.ComponentLocalBuildInfo\r\n Distribution.Types.LocalBuildInfo\r\n Distribution.Types.TargetInfo\r\n Distribution.Types.GivenComponent\r\n Distribution.Utils.Json\r\n Distribution.Utils.NubList\r\n Distribution.Utils.Progress\r\n Distribution.Verbosity\r\n Distribution.Verbosity.Internal\r\n\r\n -- We reexport all of Cabal-syntax to aid in compatibility for downstream\r\n -- users. In the future we may opt to deprecate some or all of these exports.\r\n -- See haskell/Cabal#7974.\r\n reexported-modules:\r\n Distribution.Backpack,\r\n Distribution.CabalSpecVersion,\r\n Distribution.Compat.Binary,\r\n Distribution.Compat.CharParsing,\r\n Distribution.Compat.DList,\r\n Distribution.Compat.Exception,\r\n Distribution.Compat.Graph,\r\n Distribution.Compat.Lens,\r\n Distribution.Compat.MonadFail,\r\n Distribution.Compat.Newtype,\r\n Distribution.Compat.NonEmptySet,\r\n Distribution.Compat.Parsing,\r\n Distribution.Compat.Prelude,\r\n Distribution.Compat.Semigroup,\r\n Distribution.Compat.Typeable,\r\n Distribution.Compiler,\r\n Distribution.FieldGrammar,\r\n Distribution.FieldGrammar.Class,\r\n Distribution.FieldGrammar.FieldDescrs,\r\n Distribution.FieldGrammar.Newtypes,\r\n Distribution.FieldGrammar.Parsec,\r\n Distribution.FieldGrammar.Pretty,\r\n Distribution.Fields,\r\n Distribution.Fields.ConfVar,\r\n Distribution.Fields.Field,\r\n Distribution.Fields.Lexer,\r\n Distribution.Fields.LexerMonad,\r\n Distribution.Fields.ParseResult,\r\n Distribution.Fields.Parser,\r\n Distribution.Fields.Pretty,\r\n Distribution.InstalledPackageInfo,\r\n Distribution.License,\r\n Distribution.ModuleName,\r\n Distribution.Package,\r\n Distribution.PackageDescription,\r\n Distribution.PackageDescription.Configuration,\r\n Distribution.PackageDescription.FieldGrammar,\r\n Distribution.PackageDescription.Parsec,\r\n Distribution.PackageDescription.PrettyPrint,\r\n Distribution.PackageDescription.Quirks,\r\n Distribution.PackageDescription.Utils,\r\n Distribution.Parsec,\r\n Distribution.Parsec.Error,\r\n Distribution.Parsec.FieldLineStream,\r\n Distribution.Parsec.Position,\r\n Distribution.Parsec.Warning,\r\n Distribution.Pretty,\r\n Distribution.SPDX,\r\n Distribution.SPDX.License,\r\n Distribution.SPDX.LicenseExceptionId,\r\n Distribution.SPDX.LicenseExpression,\r\n Distribution.SPDX.LicenseId,\r\n Distribution.SPDX.LicenseListVersion,\r\n Distribution.SPDX.LicenseReference,\r\n Distribution.System,\r\n Distribution.Text,\r\n Distribution.Types.AbiDependency,\r\n Distribution.Types.AbiHash,\r\n Distribution.Types.Benchmark,\r\n Distribution.Types.Benchmark.Lens,\r\n Distribution.Types.BenchmarkInterface,\r\n Distribution.Types.BenchmarkType,\r\n Distribution.Types.BuildInfo,\r\n Distribution.Types.BuildInfo.Lens,\r\n Distribution.Types.BuildType,\r\n Distribution.Types.Component,\r\n Distribution.Types.ComponentId,\r\n Distribution.Types.ComponentName,\r\n Distribution.Types.ComponentRequestedSpec,\r\n Distribution.Types.CondTree,\r\n Distribution.Types.Condition,\r\n Distribution.Types.ConfVar,\r\n Distribution.Types.Dependency,\r\n Distribution.Types.DependencyMap,\r\n Distribution.Types.ExeDependency,\r\n Distribution.Types.Executable,\r\n Distribution.Types.Executable.Lens,\r\n Distribution.Types.ExecutableScope,\r\n Distribution.Types.ExposedModule,\r\n Distribution.Types.Flag,\r\n Distribution.Types.ForeignLib,\r\n Distribution.Types.ForeignLib.Lens,\r\n Distribution.Types.ForeignLibOption,\r\n Distribution.Types.ForeignLibType,\r\n Distribution.Types.GenericPackageDescription,\r\n Distribution.Types.GenericPackageDescription.Lens,\r\n Distribution.Types.HookedBuildInfo,\r\n Distribution.Types.IncludeRenaming,\r\n Distribution.Types.InstalledPackageInfo,\r\n Distribution.Types.InstalledPackageInfo.Lens,\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar,\r\n Distribution.Types.LegacyExeDependency,\r\n Distribution.Types.Lens,\r\n Distribution.Types.Library,\r\n Distribution.Types.Library.Lens,\r\n Distribution.Types.LibraryName,\r\n Distribution.Types.LibraryVisibility,\r\n Distribution.Types.Mixin,\r\n Distribution.Types.Module,\r\n Distribution.Types.ModuleReexport,\r\n Distribution.Types.ModuleRenaming,\r\n Distribution.Types.MungedPackageId,\r\n Distribution.Types.MungedPackageName,\r\n Distribution.Types.PackageDescription,\r\n Distribution.Types.PackageDescription.Lens,\r\n Distribution.Types.PackageId,\r\n Distribution.Types.PackageId.Lens,\r\n Distribution.Types.PackageName,\r\n Distribution.Types.PackageVersionConstraint,\r\n Distribution.Types.PkgconfigDependency,\r\n Distribution.Types.PkgconfigName,\r\n Distribution.Types.PkgconfigVersion,\r\n Distribution.Types.PkgconfigVersionRange,\r\n Distribution.Types.SetupBuildInfo,\r\n Distribution.Types.SetupBuildInfo.Lens,\r\n Distribution.Types.SourceRepo,\r\n Distribution.Types.SourceRepo.Lens,\r\n Distribution.Types.TestSuite,\r\n Distribution.Types.TestSuite.Lens,\r\n Distribution.Types.TestSuiteInterface,\r\n Distribution.Types.TestType,\r\n Distribution.Types.UnitId,\r\n Distribution.Types.UnqualComponentName,\r\n Distribution.Types.Version,\r\n Distribution.Types.VersionInterval,\r\n Distribution.Types.VersionInterval.Legacy,\r\n Distribution.Types.VersionRange,\r\n Distribution.Types.VersionRange.Internal,\r\n Distribution.Utils.Base62,\r\n Distribution.Utils.Generic,\r\n Distribution.Utils.MD5,\r\n Distribution.Utils.Path,\r\n Distribution.Utils.ShortText,\r\n Distribution.Utils.String,\r\n Distribution.Utils.Structured,\r\n Distribution.Version,\r\n Language.Haskell.Extension\r\n\r\n -- Parsec parser-related modules\r\n build-depends:\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7),\r\n mtl >= 2.1 && < 2.4,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n parsec >= 3.1.13.0 && < 3.2\r\n\r\n other-modules:\r\n Distribution.Backpack.PreExistingComponent\r\n Distribution.Backpack.ReadyComponent\r\n Distribution.Backpack.MixLink\r\n Distribution.Backpack.ModuleScope\r\n Distribution.Backpack.UnifyM\r\n Distribution.Backpack.Id\r\n Distribution.Utils.UnionFind\r\n Distribution.Compat.Async\r\n Distribution.Compat.CopyFile\r\n Distribution.Compat.GetShortPathName\r\n Distribution.Compat.SnocList\r\n Distribution.GetOpt\r\n Distribution.Lex\r\n Distribution.Simple.Build.Macros.Z\r\n Distribution.Simple.Build.PathsModule.Z\r\n Distribution.Simple.GHC.EnvironmentParser\r\n Distribution.Simple.GHC.Internal\r\n Distribution.Simple.GHC.ImplInfo\r\n Distribution.ZinzaPrelude\r\n Paths_Cabal\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n LambdaCase\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix index 31390ca93b..62e36aa8b6 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix @@ -21,99 +21,99 @@ synopsis = "Automatic testing of Haskell programs"; description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((((((([ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - ] ++ [ + ] ++ [ (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]) ++ (pkgs.lib).optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ (pkgs.lib).optionals (compiler.isGhc && true) [ + ]) ++ pkgs.lib.optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ pkgs.lib.optionals (compiler.isGhc && true) [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ (pkgs.lib).optionals (compiler.isUhc && true) [ + ]) ++ pkgs.lib.optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ pkgs.lib.optionals (compiler.isUhc && true) [ (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) - ]; + ]; buildable = true; - }; + }; tests = { "test-quickcheck" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gcoarbitrary" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-generators" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gshrink" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-terminal" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-monadfix" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-split" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "test-quickcheck-misc" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; - }); - }) // { + }); + }) // { package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix index 32303af324..c3d272500b 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix @@ -21,15 +21,15 @@ synopsis = "RFC 4648-compliant Base16 encodings for ByteStrings"; description = "This package provides support for encoding and decoding binary data according\nto @base16@ (see also ) for\nstrict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n\nSee the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\nprovides an uniform API providing conversion paths between more binary and textual types."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -41,10 +41,10 @@ (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -53,16 +53,16 @@ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/base16-bytestring-1.0.2.0.tar.gz"; sha256 = "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.12\nname: base16-bytestring\nversion: 1.0.2.0\nx-revision: 1\nsynopsis: RFC 4648-compliant Base16 encodings for ByteStrings\ndescription:\n This package provides support for encoding and decoding binary data according\n to @base16@ (see also ) for\n strict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n .\n See the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\n provides an uniform API providing conversion paths between more binary and textual types.\n\nhomepage: http://github.com/haskell/base16-bytestring\nbug-reports: http://github.com/haskell/base16-bytestring/issues\nlicense: BSD3\nlicense-file: LICENSE\ncopyright:\n Copyright 2011 MailRank, Inc.;\n Copyright 2010-2020 Bryan O'Sullivan et al.\n\nauthor: Bryan O'Sullivan \nmaintainer:\n Herbert Valerio Riedel ,\n Mikhail Glushenkov ,\n Emily Pillmore \n\ncategory: Data\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.3\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n\nsource-repository head\n type: git\n location: http://github.com/haskell/base16-bytestring\n\nlibrary\n other-modules: Data.ByteString.Base16.Internal\n exposed-modules:\n Data.ByteString.Base16\n Data.ByteString.Base16.Lazy\n\n build-depends:\n base >=4.9 && <5\n , bytestring >=0.9 && <0.13\n\n ghc-options: -Wall -funbox-strict-fields\n default-language: Haskell2010\n\ntest-suite test\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends:\n base\n , base16-bytestring\n , bytestring\n , HUnit\n , QuickCheck\n , test-framework\n , test-framework-hunit\n , test-framework-quickcheck2\n\n default-language: Haskell2010\n\nbenchmark bench\n type: exitcode-stdio-1.0\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n build-depends:\n base >=4 && <5\n , base16-bytestring\n , bytestring\n , criterion\n , deepseq\n\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/clock.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/clock.nix index 4831499489..1db6e2d90d 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/clock.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/clock.nix @@ -21,12 +21,12 @@ synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -34,26 +34,26 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix index e764a8cdfa..7fe8a112a9 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix @@ -21,31 +21,31 @@ synopsis = "Fast, pure and practical SHA-256 implementation"; description = "A practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n\n\nAdditionally, this package provides support for\n\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n\n=== Relationship to the @cryptohash@ package and its API\n\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) - ] ++ (if flags.use-cbits + ] ++ (if flags.use-cbits then [ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ] + ] else [ (hsPkgs."cryptohash-sha256-pure" or (errorHandler.buildDepError "cryptohash-sha256-pure")) - ]); + ]); buildable = true; - }; + }; exes = { "sha256sum" = { - depends = (pkgs.lib).optionals (flags.exe) [ + depends = pkgs.lib.optionals (flags.exe) [ (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) - ]; + ]; buildable = if flags.exe then true else false; - }; }; + }; tests = { "test-sha256" = { depends = [ @@ -57,10 +57,10 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench-sha256" = { depends = [ @@ -69,16 +69,16 @@ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/cryptohash-sha256-0.11.102.1.tar.gz"; sha256 = "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 2.0\nname: cryptohash-sha256\nversion: 0.11.102.1\nx-revision: 3\n\nsynopsis: Fast, pure and practical SHA-256 implementation\ndescription: {\n\nA practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n.\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n.\n\n.\nAdditionally, this package provides support for\n.\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n.\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n.\n=== Relationship to the @cryptohash@ package and its API\n.\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n.\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).\n\n}\n\nlicense: BSD3\nlicense-file: LICENSE\ncopyright: Vincent Hanquez, Herbert Valerio Riedel\nmaintainer: Herbert Valerio Riedel \nhomepage: https://github.com/hvr/cryptohash-sha256\nbug-reports: https://github.com/hvr/cryptohash-sha256/issues\ncategory: Data, Cryptography\nbuild-type: Simple\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.2\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n\nextra-source-files: cbits/hs_sha256.h\n changelog.md\n\nsource-repository head\n type: git\n location: https://github.com/hvr/cryptohash-sha256.git\n\nflag exe\n description: Enable building @sha256sum@ executable\n manual: True\n default: False\n\nflag use-cbits\n description: Use fast optimized C routines via FFI; if flag is disabled falls back to non-FFI Haskell optimized implementation.\n manual: True\n default: True\n\nlibrary\n default-language: Haskell2010\n\n ghc-options: -Wall\n\n build-depends: base >= 4.5 && < 4.20\n\n exposed-modules: Crypto.Hash.SHA256\n\n if flag(use-cbits)\n build-depends: bytestring ^>= 0.9.2.0 || ^>= 0.10.0.0 || ^>= 0.11.0.0 || ^>= 0.12.0.2\n\n other-extensions: BangPatterns\n CApiFFI\n CPP\n Trustworthy\n Unsafe\n\n hs-source-dirs: src\n other-modules: Crypto.Hash.SHA256.FFI\n Compat\n include-dirs: cbits\n else\n hs-source-dirs: src-pure\n build-depends: cryptohash-sha256-pure ^>= 0.1.0\n\nexecutable sha256sum\n default-language: Haskell2010\n hs-source-dirs: src-exe\n main-is: sha256sum.hs\n ghc-options: -Wall -threaded\n if flag(exe)\n other-extensions: RecordWildCards\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n else\n buildable: False\n\ntest-suite test-sha256\n default-language: Haskell2010\n other-extensions: OverloadedStrings\n type: exitcode-stdio-1.0\n hs-source-dirs: src-tests\n main-is: test-sha256.hs\n ghc-options: -Wall -threaded\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n , SHA ^>= 1.6.4\n , tasty ^>= 1.4 || ^>= 1.5\n , tasty-quickcheck ^>= 0.10\n , tasty-hunit ^>= 0.10\n\nbenchmark bench-sha256\n default-language: Haskell2010\n other-extensions: BangPatterns\n type: exitcode-stdio-1.0\n main-is: bench-sha256.hs\n hs-source-dirs: src-bench\n build-depends: cryptohash-sha256\n , SHA ^>= 1.6.4\n , base\n , bytestring\n , criterion ^>= 1.5 || ^>=1.6\n\n -- not yet public\n -- build-depends: cryptohash-sha256-pure ^>= 0.1.0\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/extra.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/extra.nix index 450be82c4b..41668cf6bc 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/extra.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/extra.nix @@ -21,7 +21,7 @@ synopsis = "Extra functions I use."; description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -31,9 +31,9 @@ (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; tests = { "extra-test" = { depends = [ @@ -43,16 +43,16 @@ (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/filepattern.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/filepattern.nix index 13bbd09e88..385c502003 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/filepattern.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/filepattern.nix @@ -21,7 +21,7 @@ synopsis = "File path glob-like matching"; description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - ]; + ]; buildable = true; - }; + }; tests = { "filepattern-test" = { depends = [ @@ -41,16 +41,16 @@ (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/hashable.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/hashable.nix index 09de9076b1..4b125fa0bc 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/hashable.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/hashable.nix @@ -21,7 +21,7 @@ synopsis = "A class for types that can be converted to a hash value"; description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; buildType = "Simple"; - }; + }; components = { "library" = { depends = (([ @@ -32,19 +32,19 @@ (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && (compiler.version).ge "9" + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && compiler.version.ge "9" then [ (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) else if flags.integer-gmp then [ (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) - ] + ] else [ (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) - ]); + ]); buildable = true; - }; + }; tests = { "hashable-tests" = { depends = [ @@ -59,24 +59,24 @@ (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; "hashable-examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/heaps.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/heaps.nix index dc77aed1f4..e759e305bf 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/heaps.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/heaps.nix @@ -21,18 +21,18 @@ synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; - }); - }) // { + }); + }) // { package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix index 0237404c41..40ea1148c6 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified jquery.dgtable code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-dgtable-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-flot.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-flot.nix index ba292fc8b2..67980dd7ba 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-flot.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-flot.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified flot code"; description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-flot-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix index 9ecdc931ed..05e54a25ab 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix @@ -21,28 +21,28 @@ synopsis = "Obtain minified jQuery code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-jquery-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/primitive.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/primitive.nix index 1216d7e6c5..b5683f2c83 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/primitive.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/primitive.nix @@ -21,7 +21,7 @@ synopsis = "Primitive memory-related operations"; description = "This package provides various primitive memory-related operations."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); buildable = true; - }; + }; tests = { "test-qc" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -58,16 +58,16 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; - }); - }) // { + }); + }) // { package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/random.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/random.nix index fed649a35c..0dbaf8b099 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/random.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/random.nix @@ -21,7 +21,7 @@ synopsis = "Pseudo-random number generation"; description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -30,32 +30,32 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); buildable = true; - }; + }; tests = { "legacy-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]; + ]; buildable = true; - }; + }; "doctests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) - ] ++ (pkgs.lib).optionals (compiler.isGhc && (compiler.version).ge "8.2" && (compiler.isGhc && (compiler.version).lt "8.10")) [ + ] ++ pkgs.lib.optionals (compiler.isGhc && compiler.version.ge "8.2" && (compiler.isGhc && compiler.version.lt "8.10")) [ (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."stm" or (errorHandler.buildDepError "stm")) (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "spec" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -67,18 +67,18 @@ (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; + }; "spec-inspection" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); buildable = true; - }; }; + }; benchmarks = { "legacy-bench" = { depends = [ @@ -87,9 +87,9 @@ (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) (hsPkgs."split" or (errorHandler.buildDepError "split")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ]; + ]; buildable = true; - }; + }; "bench" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -98,16 +98,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/shake.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/shake.nix index e7eb5c6647..d40c2a8bbc 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/shake.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/shake.nix @@ -21,7 +21,7 @@ synopsis = "Build system library, like Make, but more accurate dependencies."; description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((([ @@ -45,15 +45,15 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]; + ]; buildable = true; - }; + }; exes = { "shake" = { depends = (((([ @@ -77,16 +77,16 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; + }; tests = { "shake-test" = { depends = (((([ @@ -111,22 +111,22 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/splitmix.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/splitmix.nix index 81fc69bf5c..aa0dd88d31 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/splitmix.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/splitmix.nix @@ -21,24 +21,24 @@ synopsis = "Fast Splittable PRNG"; description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ] ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) ((pkgs.lib).optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + ] ++ pkgs.lib.optionals (!(compiler.isGhcjs && true)) (pkgs.lib.optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); buildable = true; - }; + }; tests = { "examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -49,23 +49,23 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi-32" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-dieharder" = { depends = [ (hsPkgs."async" or (errorHandler.buildDepError "async")) @@ -78,27 +78,27 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "splitmix-testu01" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; buildable = if !system.isLinux then false else true; - }; + }; "initialization" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "comparison" = { depends = [ @@ -108,32 +108,32 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) - ]; + ]; buildable = true; - }; + }; "simple-sum" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "range" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ] ++ (pkgs.lib).optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); + ] ++ pkgs.lib.optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix index 43e48286c4..0aeaccb277 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix @@ -21,7 +21,7 @@ synopsis = "Efficient hashing-based container types"; description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]; + ]; buildable = true; - }; + }; tests = { "unordered-containers-tests" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ @@ -63,16 +63,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; - }); - }) // { + }); + }) // { package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix index ac9bde4057..a5ee5272da 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix @@ -21,31 +21,31 @@ synopsis = "Support for reading and writing UTF8 Strings"; description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "unit-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; - }); - }) // { + }); + }) // { package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc98/hadrian/default.nix b/materialized/ghc964/hadrian-ghc98/hadrian/default.nix index 1eab6d9b04..c679a4c074 100644 --- a/materialized/ghc964/hadrian-ghc98/hadrian/default.nix +++ b/materialized/ghc964/hadrian-ghc98/hadrian/default.nix @@ -2,91 +2,91 @@ pkgs = hackage: { packages = { - Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; - bytestring.revision = (((hackage.bytestring)."0.11.5.3").revisions).default; - exceptions.revision = (((hackage.exceptions)."0.10.7").revisions).default; - directory.revision = (((hackage.directory)."1.3.8.1").revisions).default; - filepath.revision = (((hackage.filepath)."1.4.200.1").revisions).default; - mtl.revision = (((hackage.mtl)."2.3.1").revisions).default; - ghc-bignum.revision = (((hackage.ghc-bignum)."1.3").revisions).default; - ghc-prim.revision = (((hackage.ghc-prim)."0.10.0").revisions).default; - base16-bytestring.revision = import ./cabal-files/base16-bytestring.nix; - parsec.revision = (((hackage.parsec)."3.1.16.1").revisions).default; - js-flot.revision = import ./cabal-files/js-flot.nix; - utf8-string.revision = import ./cabal-files/utf8-string.nix; - Cabal.revision = import ./cabal-files/Cabal.nix; - splitmix.revision = import ./cabal-files/splitmix.nix; - splitmix.flags.optimised-mixer = false; - containers.revision = (((hackage.containers)."0.6.7").revisions).default; + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; clock.revision = import ./cabal-files/clock.nix; clock.flags.llvm = false; - stm.revision = (((hackage.stm)."2.5.1.0").revisions).default; + transformers.revision = hackage.transformers."0.6.1.0".revisions.default; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.2.0".revisions.default; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + unix.revision = hackage.unix."2.8.4.0".revisions.default; + filepattern.revision = import ./cabal-files/filepattern.nix; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.4".revisions.default; + mtl.revision = hackage.mtl."2.3.1".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; heaps.revision = import ./cabal-files/heaps.nix; - base.revision = (((hackage.base)."4.18.2.0").revisions).default; - time.revision = (((hackage.time)."1.12.2").revisions).default; - random.revision = import ./cabal-files/random.nix; + Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; + process.revision = hackage.process."1.6.17.0".revisions.default; primitive.revision = import ./cabal-files/primitive.nix; - deepseq.revision = (((hackage.deepseq)."1.4.8.1").revisions).default; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + exceptions.revision = hackage.exceptions."0.10.7".revisions.default; + base16-bytestring.revision = import ./cabal-files/base16-bytestring.nix; + parsec.revision = hackage.parsec."3.1.16.1".revisions.default; + system-cxx-std-lib.revision = hackage.system-cxx-std-lib."1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + utf8-string.revision = import ./cabal-files/utf8-string.nix; js-jquery.revision = import ./cabal-files/js-jquery.nix; - js-dgtable.revision = import ./cabal-files/js-dgtable.nix; - rts.revision = (((hackage.rts)."1.0.2").revisions).default; - template-haskell.revision = (((hackage.template-haskell)."2.20.0.0").revisions).default; - binary.revision = (((hackage.binary)."0.8.9.1").revisions).default; - shake.revision = import ./cabal-files/shake.nix; - shake.flags.portable = false; - shake.flags.cloud = false; - shake.flags.embed-files = false; - process.revision = (((hackage.process)."1.6.17.0").revisions).default; - unix.revision = (((hackage.unix)."2.8.4.0").revisions).default; - transformers.revision = (((hackage.transformers)."0.6.1.0").revisions).default; - unordered-containers.revision = import ./cabal-files/unordered-containers.nix; - unordered-containers.flags.debug = false; + text.revision = hackage.text."2.0.2".revisions.default; QuickCheck.revision = import ./cabal-files/QuickCheck.nix; QuickCheck.flags.old-random = false; QuickCheck.flags.templatehaskell = true; - extra.revision = import ./cabal-files/extra.nix; - text.revision = (((hackage.text)."2.0.2").revisions).default; - array.revision = (((hackage.array)."0.5.6.0").revisions).default; - ghc-boot-th.revision = (((hackage.ghc-boot-th)."9.6.4").revisions).default; - filepattern.revision = import ./cabal-files/filepattern.nix; - pretty.revision = (((hackage.pretty)."1.1.3.6").revisions).default; - hashable.revision = import ./cabal-files/hashable.nix; - hashable.flags.random-initial-seed = false; - hashable.flags.integer-gmp = true; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.6.0".revisions.default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.cloud = false; + shake.flags.embed-files = false; + shake.flags.portable = false; + random.revision = import ./cabal-files/random.nix; + bytestring.revision = hackage.bytestring."0.11.5.3".revisions.default; + Cabal.revision = import ./cabal-files/Cabal.nix; + directory.revision = hackage.directory."1.3.8.1".revisions.default; + js-flot.revision = import ./cabal-files/js-flot.nix; cryptohash-sha256.revision = import ./cabal-files/cryptohash-sha256.nix; cryptohash-sha256.flags.exe = false; cryptohash-sha256.flags.use-cbits = true; - }; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + binary.revision = hackage.binary."0.8.9.1".revisions.default; + filepath.revision = hackage.filepath."1.4.200.1".revisions.default; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; + extra.revision = import ./cabal-files/extra.nix; + }; compiler = { version = "9.6.4"; nix-name = "ghc964"; packages = { - "pretty" = "1.1.3.6"; - "text" = "2.0.2"; - "array" = "0.5.6.0"; - "mtl" = "2.3.1"; + "unix" = "2.8.4.0"; + "filepath" = "1.4.200.1"; + "transformers" = "0.6.1.0"; "parsec" = "3.1.16.1"; "bytestring" = "0.11.5.3"; - "filepath" = "1.4.200.1"; - "stm" = "2.5.1.0"; + "containers" = "0.6.7"; "ghc-prim" = "0.10.0"; + "mtl" = "2.3.1"; "ghc-boot-th" = "9.6.4"; "base" = "4.18.2.0"; "time" = "1.12.2"; - "process" = "1.6.17.0"; + "stm" = "2.5.1.0"; "ghc-bignum" = "1.3"; "directory" = "1.3.8.1"; - "exceptions" = "0.10.7"; - "rts" = "1.0.2"; - "transformers" = "0.6.1.0"; "template-haskell" = "2.20.0.0"; - "deepseq" = "1.4.8.1"; - "unix" = "2.8.4.0"; + "process" = "1.6.17.0"; "binary" = "0.8.9.1"; - "containers" = "0.6.7"; - }; + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "system-cxx-std-lib" = "1.0"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.6.0"; + "exceptions" = "0.10.7"; }; }; + }; extras = hackage: { packages = { hadrian = ./.plan.nix/hadrian.nix; }; }; modules = [ @@ -97,58 +97,58 @@ flags = { "threaded" = lib.mkOverride 900 true; "selftest" = lib.mkOverride 900 true; - }; }; }; - }) + }; + }) ({ lib, ... }: { packages = { - "shake".components.library.planned = lib.mkOverride 900 true; - "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; "base16-bytestring".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; "heaps".components.library.planned = lib.mkOverride 900 true; "extra".components.library.planned = lib.mkOverride 900 true; - "filepath".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "system-cxx-std-lib".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; "pretty".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "shake".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; "utf8-string".components.library.planned = lib.mkOverride 900 true; "Cabal".components.library.planned = lib.mkOverride 900 true; - "bytestring".components.library.planned = lib.mkOverride 900 true; - "cryptohash-sha256".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; "exceptions".components.library.planned = lib.mkOverride 900 true; - "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; "array".components.library.planned = lib.mkOverride 900 true; - "binary".components.library.planned = lib.mkOverride 900 true; "filepattern".components.library.planned = lib.mkOverride 900 true; "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; - "splitmix".components.library.planned = lib.mkOverride 900 true; - "rts".components.library.planned = lib.mkOverride 900 true; + "cryptohash-sha256".components.library.planned = lib.mkOverride 900 true; "unix".components.library.planned = lib.mkOverride 900 true; - "shake".components.exes."shake".planned = lib.mkOverride 900 true; - "directory".components.library.planned = lib.mkOverride 900 true; - "time".components.library.planned = lib.mkOverride 900 true; - "js-flot".components.library.planned = lib.mkOverride 900 true; - "ghc-bignum".components.library.planned = lib.mkOverride 900 true; - "process".components.library.planned = lib.mkOverride 900 true; - "clock".components.library.planned = lib.mkOverride 900 true; - "template-haskell".components.library.planned = lib.mkOverride 900 true; - "stm".components.library.planned = lib.mkOverride 900 true; - "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; - "QuickCheck".components.library.planned = lib.mkOverride 900 true; - "mtl".components.library.planned = lib.mkOverride 900 true; - "transformers".components.library.planned = lib.mkOverride 900 true; - "parsec".components.library.planned = lib.mkOverride 900 true; - "deepseq".components.library.planned = lib.mkOverride 900 true; - "primitive".components.library.planned = lib.mkOverride 900 true; - "js-jquery".components.library.planned = lib.mkOverride 900 true; - "text".components.library.planned = lib.mkOverride 900 true; - "unordered-containers".components.library.planned = lib.mkOverride 900 true; - "random".components.library.planned = lib.mkOverride 900 true; - "base".components.library.planned = lib.mkOverride 900 true; - "containers".components.library.planned = lib.mkOverride 900 true; - "js-dgtable".components.library.planned = lib.mkOverride 900 true; - "hashable".components.library.planned = lib.mkOverride 900 true; - }; - }) - ]; - } \ No newline at end of file + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix b/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix new file mode 100644 index 0000000000..1e74a19dde --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix @@ -0,0 +1,41 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + { + flags = {}; + package = { + specVersion = "3.0"; + identifier = { name = "ghc-platform"; version = "0.1.0.0"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "ghc-devs@haskell.org"; + author = "Rodrigo Mesquita"; + homepage = ""; + url = ""; + synopsis = "Platform information used by GHC and friends"; + description = ""; + buildType = "Simple"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = [ "LICENSE" ]; + dataDir = "."; + dataFiles = []; + extraSrcFiles = []; + extraTmpFiles = []; + extraDocFiles = [ "CHANGELOG.md" ]; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + modules = [ "GHC/Platform/ArchOS" ]; + hsSourceDirs = [ "src" ]; + }; + }; + } // rec { src = pkgs.lib.mkDefault ../../libraries/ghc-platform; } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix b/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix new file mode 100644 index 0000000000..bcae793058 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix @@ -0,0 +1,70 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + { + flags = {}; + package = { + specVersion = "2.4"; + identifier = { name = "ghc-toolchain"; version = "0.1.0.0"; }; + license = "NONE"; + copyright = "(c) The GHC Developers"; + maintainer = "ben@well-typed.com"; + author = "Ben Gamari"; + homepage = ""; + url = ""; + synopsis = "Utility for managing GHC target toolchains"; + description = ""; + buildType = "Simple"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = []; + dataDir = "."; + dataFiles = []; + extraSrcFiles = []; + extraTmpFiles = []; + extraDocFiles = []; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."ghc-platform" or (errorHandler.buildDepError "ghc-platform")) + ]; + buildable = true; + modules = [ + "GHC/Toolchain" + "GHC/Toolchain/Lens" + "GHC/Toolchain/Monad" + "GHC/Toolchain/PlatformDetails" + "GHC/Toolchain/Prelude" + "GHC/Toolchain/Program" + "GHC/Toolchain/ParseTriple" + "GHC/Toolchain/NormaliseTriple" + "GHC/Toolchain/CheckArm" + "GHC/Toolchain/Target" + "GHC/Toolchain/Tools/Ar" + "GHC/Toolchain/Tools/Cc" + "GHC/Toolchain/Tools/Cxx" + "GHC/Toolchain/Tools/Cpp" + "GHC/Toolchain/Tools/Link" + "GHC/Toolchain/Tools/Nm" + "GHC/Toolchain/Tools/Ranlib" + "GHC/Toolchain/Tools/Readelf" + "GHC/Toolchain/Tools/MergeObjs" + "GHC/Toolchain/Utils" + ]; + hsSourceDirs = [ "src" ]; + }; + }; + } // rec { src = pkgs.lib.mkDefault ../../utils/ghc-toolchain; } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix b/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix new file mode 100644 index 0000000000..1ae09779ab --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix @@ -0,0 +1,169 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + { + flags = { threaded = true; selftest = true; }; + package = { + specVersion = "1.18"; + identifier = { name = "hadrian"; version = "0.1.0.0"; }; + license = "BSD-3-Clause"; + copyright = "Andrey Mokhov 2014-2017"; + maintainer = "Andrey Mokhov , github: @snowleopard"; + author = "Andrey Mokhov , github: @snowleopard"; + homepage = ""; + url = ""; + synopsis = "GHC build system"; + description = ""; + buildType = "Simple"; + isLocal = true; + detailLevel = "FullDetails"; + licenseFiles = [ "LICENSE" ]; + dataDir = "."; + dataFiles = []; + extraSrcFiles = []; + extraTmpFiles = []; + extraDocFiles = [ "README.md" ]; + }; + components = { + exes = { + "hadrian" = { + depends = [ + (hsPkgs."Cabal" or (errorHandler.buildDepError "Cabal")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + (hsPkgs."shake" or (errorHandler.buildDepError "shake")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + (hsPkgs."ghc-platform" or (errorHandler.buildDepError "ghc-platform")) + (hsPkgs."ghc-toolchain" or (errorHandler.buildDepError "ghc-toolchain")) + ] ++ pkgs.lib.optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + buildable = true; + 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" + "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" + ] ++ pkgs.lib.optional (flags.selftest) "Rules/Selftest"; + hsSourceDirs = [ "." "src" ]; + mainPath = ([ + "Main.hs" + ] ++ pkgs.lib.optional (flags.threaded) "") ++ pkgs.lib.optional (flags.selftest) ""; + }; + }; + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix new file mode 100644 index 0000000000..62e36aa8b6 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix @@ -0,0 +1,119 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { templatehaskell = true; old-random = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "QuickCheck"; version = "2.14.3"; }; + license = "BSD-3-Clause"; + copyright = "2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone"; + maintainer = "Nick Smallbone "; + author = "Koen Claessen "; + homepage = "https://github.com/nick8325/quickcheck"; + url = ""; + synopsis = "Automatic testing of Haskell programs"; + description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ((((((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + ] ++ [ + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]) ++ pkgs.lib.optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ pkgs.lib.optionals (compiler.isGhc && true) [ + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ]) ++ pkgs.lib.optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ pkgs.lib.optionals (compiler.isUhc && true) [ + (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) + (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) + ]; + buildable = true; + }; + tests = { + "test-quickcheck" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell then false else true; + }; + "test-quickcheck-gcoarbitrary" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") + then false + else true; + }; + "test-quickcheck-generators" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell then false else true; + }; + "test-quickcheck-gshrink" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") + then false + else true; + }; + "test-quickcheck-terminal" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") + then false + else true; + }; + "test-quickcheck-monadfix" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") + then false + else true; + }; + "test-quickcheck-split" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + "test-quickcheck-misc" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") + then false + else true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; + sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; + }); + }) // { + package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix new file mode 100644 index 0000000000..c3d272500b --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix @@ -0,0 +1,68 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.12"; + identifier = { name = "base16-bytestring"; version = "1.0.2.0"; }; + license = "BSD-3-Clause"; + copyright = "Copyright 2011 MailRank, Inc.;\nCopyright 2010-2020 Bryan O'Sullivan et al."; + maintainer = "Herbert Valerio Riedel ,\nMikhail Glushenkov ,\nEmily Pillmore "; + author = "Bryan O'Sullivan "; + homepage = "http://github.com/haskell/base16-bytestring"; + url = ""; + synopsis = "RFC 4648-compliant Base16 encodings for ByteStrings"; + description = "This package provides support for encoding and decoding binary data according\nto @base16@ (see also ) for\nstrict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n\nSee the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\nprovides an uniform API providing conversion paths between more binary and textual types."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ]; + buildable = true; + }; + tests = { + "test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/base16-bytestring-1.0.2.0.tar.gz"; + sha256 = "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: base16-bytestring\nversion: 1.0.2.0\nx-revision: 1\nsynopsis: RFC 4648-compliant Base16 encodings for ByteStrings\ndescription:\n This package provides support for encoding and decoding binary data according\n to @base16@ (see also ) for\n strict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n .\n See the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\n provides an uniform API providing conversion paths between more binary and textual types.\n\nhomepage: http://github.com/haskell/base16-bytestring\nbug-reports: http://github.com/haskell/base16-bytestring/issues\nlicense: BSD3\nlicense-file: LICENSE\ncopyright:\n Copyright 2011 MailRank, Inc.;\n Copyright 2010-2020 Bryan O'Sullivan et al.\n\nauthor: Bryan O'Sullivan \nmaintainer:\n Herbert Valerio Riedel ,\n Mikhail Glushenkov ,\n Emily Pillmore \n\ncategory: Data\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.3\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n\nsource-repository head\n type: git\n location: http://github.com/haskell/base16-bytestring\n\nlibrary\n other-modules: Data.ByteString.Base16.Internal\n exposed-modules:\n Data.ByteString.Base16\n Data.ByteString.Base16.Lazy\n\n build-depends:\n base >=4.9 && <5\n , bytestring >=0.9 && <0.13\n\n ghc-options: -Wall -funbox-strict-fields\n default-language: Haskell2010\n\ntest-suite test\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends:\n base\n , base16-bytestring\n , bytestring\n , HUnit\n , QuickCheck\n , test-framework\n , test-framework-hunit\n , test-framework-quickcheck2\n\n default-language: Haskell2010\n\nbenchmark bench\n type: exitcode-stdio-1.0\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n build-depends:\n base >=4 && <5\n , base16-bytestring\n , bytestring\n , criterion\n , deepseq\n\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/clock.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/clock.nix new file mode 100644 index 0000000000..1db6e2d90d --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/clock.nix @@ -0,0 +1,59 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { llvm = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "clock"; version = "0.8.4"; }; + license = "BSD-3-Clause"; + copyright = "Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; + maintainer = "Cetin Sert , Elefunc, Inc."; + author = "Cetin Sert , Elefunc, Inc."; + homepage = "https://github.com/corsis/clock"; + url = ""; + synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; + description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + ]; + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; + sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix new file mode 100644 index 0000000000..7fe8a112a9 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix @@ -0,0 +1,84 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { exe = false; use-cbits = true; }; + package = { + specVersion = "2.0"; + identifier = { name = "cryptohash-sha256"; version = "0.11.102.1"; }; + license = "BSD-3-Clause"; + copyright = "Vincent Hanquez, Herbert Valerio Riedel"; + maintainer = "Herbert Valerio Riedel "; + author = ""; + homepage = "https://github.com/hvr/cryptohash-sha256"; + url = ""; + synopsis = "Fast, pure and practical SHA-256 implementation"; + description = "A practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n\n\nAdditionally, this package provides support for\n\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n\n=== Relationship to the @cryptohash@ package and its API\n\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + ] ++ (if flags.use-cbits + then [ + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ] + else [ + (hsPkgs."cryptohash-sha256-pure" or (errorHandler.buildDepError "cryptohash-sha256-pure")) + ]); + buildable = true; + }; + exes = { + "sha256sum" = { + depends = pkgs.lib.optionals (flags.exe) [ + (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + ]; + buildable = if flags.exe then true else false; + }; + }; + tests = { + "test-sha256" = { + depends = [ + (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) + (hsPkgs."SHA" or (errorHandler.buildDepError "SHA")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench-sha256" = { + depends = [ + (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) + (hsPkgs."SHA" or (errorHandler.buildDepError "SHA")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/cryptohash-sha256-0.11.102.1.tar.gz"; + sha256 = "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6"; + }); + }) // { + package-description-override = "cabal-version: 2.0\nname: cryptohash-sha256\nversion: 0.11.102.1\nx-revision: 3\n\nsynopsis: Fast, pure and practical SHA-256 implementation\ndescription: {\n\nA practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n.\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n.\n\n.\nAdditionally, this package provides support for\n.\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n.\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n.\n=== Relationship to the @cryptohash@ package and its API\n.\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n.\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).\n\n}\n\nlicense: BSD3\nlicense-file: LICENSE\ncopyright: Vincent Hanquez, Herbert Valerio Riedel\nmaintainer: Herbert Valerio Riedel \nhomepage: https://github.com/hvr/cryptohash-sha256\nbug-reports: https://github.com/hvr/cryptohash-sha256/issues\ncategory: Data, Cryptography\nbuild-type: Simple\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.2\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n\nextra-source-files: cbits/hs_sha256.h\n changelog.md\n\nsource-repository head\n type: git\n location: https://github.com/hvr/cryptohash-sha256.git\n\nflag exe\n description: Enable building @sha256sum@ executable\n manual: True\n default: False\n\nflag use-cbits\n description: Use fast optimized C routines via FFI; if flag is disabled falls back to non-FFI Haskell optimized implementation.\n manual: True\n default: True\n\nlibrary\n default-language: Haskell2010\n\n ghc-options: -Wall\n\n build-depends: base >= 4.5 && < 4.20\n\n exposed-modules: Crypto.Hash.SHA256\n\n if flag(use-cbits)\n build-depends: bytestring ^>= 0.9.2.0 || ^>= 0.10.0.0 || ^>= 0.11.0.0 || ^>= 0.12.0.2\n\n other-extensions: BangPatterns\n CApiFFI\n CPP\n Trustworthy\n Unsafe\n\n hs-source-dirs: src\n other-modules: Crypto.Hash.SHA256.FFI\n Compat\n include-dirs: cbits\n else\n hs-source-dirs: src-pure\n build-depends: cryptohash-sha256-pure ^>= 0.1.0\n\nexecutable sha256sum\n default-language: Haskell2010\n hs-source-dirs: src-exe\n main-is: sha256sum.hs\n ghc-options: -Wall -threaded\n if flag(exe)\n other-extensions: RecordWildCards\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n else\n buildable: False\n\ntest-suite test-sha256\n default-language: Haskell2010\n other-extensions: OverloadedStrings\n type: exitcode-stdio-1.0\n hs-source-dirs: src-tests\n main-is: test-sha256.hs\n ghc-options: -Wall -threaded\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n , SHA ^>= 1.6.4\n , tasty ^>= 1.4 || ^>= 1.5\n , tasty-quickcheck ^>= 0.10\n , tasty-hunit ^>= 0.10\n\nbenchmark bench-sha256\n default-language: Haskell2010\n other-extensions: BangPatterns\n type: exitcode-stdio-1.0\n main-is: bench-sha256.hs\n hs-source-dirs: src-bench\n build-depends: cryptohash-sha256\n , SHA ^>= 1.6.4\n , base\n , bytestring\n , criterion ^>= 1.5 || ^>=1.6\n\n -- not yet public\n -- build-depends: cryptohash-sha256-pure ^>= 0.1.0\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/extra.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/extra.nix new file mode 100644 index 0000000000..41668cf6bc --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/extra.nix @@ -0,0 +1,58 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "extra"; version = "1.7.14"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2014-2023"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/extra#readme"; + url = ""; + synopsis = "Extra functions I use."; + description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."clock" or (errorHandler.buildDepError "clock")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + tests = { + "extra-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; + sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/filepattern.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/filepattern.nix new file mode 100644 index 0000000000..385c502003 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/filepattern.nix @@ -0,0 +1,56 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "filepattern"; version = "0.1.3"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2011-2022"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell , Evan Rutledge Borden "; + homepage = "https://github.com/ndmitchell/filepattern#readme"; + url = ""; + synopsis = "File path glob-like matching"; + description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + ]; + buildable = true; + }; + tests = { + "filepattern-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; + sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/hashable.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/hashable.nix new file mode 100644 index 0000000000..4b125fa0bc --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/hashable.nix @@ -0,0 +1,82 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { integer-gmp = true; random-initial-seed = false; }; + package = { + specVersion = "1.12"; + identifier = { name = "hashable"; version = "1.4.3.0"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = "Milan Straka \nJohan Tibell "; + homepage = "http://github.com/haskell-unordered-containers/hashable"; + url = ""; + synopsis = "A class for types that can be converted to a hash value"; + description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = (([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && compiler.version.ge "9" + then [ + (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + else if flags.integer-gmp + then [ + (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) + ] + else [ + (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) + ]); + buildable = true; + }; + tests = { + "hashable-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + "hashable-examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; + sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/heaps.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/heaps.nix new file mode 100644 index 0000000000..e759e305bf --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/heaps.nix @@ -0,0 +1,38 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "heaps"; version = "0.4"; }; + license = "BSD-3-Clause"; + copyright = "(c) 2010-2015 Edward A. Kmett"; + maintainer = "Edward A. Kmett "; + author = "Edward A. Kmett"; + homepage = "http://github.com/ekmett/heaps/"; + url = ""; + synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; + description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; + sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; + }); + }) // { + package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix new file mode 100644 index 0000000000..40ea1148c6 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix @@ -0,0 +1,47 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "js-dgtable"; version = "0.5.2"; }; + license = "MIT"; + copyright = "Neil Mitchell 2019"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-dgtable#readme"; + url = ""; + synopsis = "Obtain minified jquery.dgtable code"; + description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-dgtable-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; + sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; + }); + }) // { + package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-flot.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-flot.nix new file mode 100644 index 0000000000..67980dd7ba --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-flot.nix @@ -0,0 +1,47 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "js-flot"; version = "0.8.3"; }; + license = "MIT"; + copyright = "Neil Mitchell 2014"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-flot#readme"; + url = ""; + synopsis = "Obtain minified flot code"; + description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-flot-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; + sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix new file mode 100644 index 0000000000..05e54a25ab --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix @@ -0,0 +1,48 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.18"; + identifier = { name = "js-jquery"; version = "3.3.1"; }; + license = "MIT"; + copyright = "Neil Mitchell 2014-2018"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://github.com/ndmitchell/js-jquery#readme"; + url = ""; + synopsis = "Obtain minified jQuery code"; + description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; + buildable = true; + }; + tests = { + "js-jquery-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; + sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; + }); + }) // { + package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/primitive.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/primitive.nix new file mode 100644 index 0000000000..b5683f2c83 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/primitive.nix @@ -0,0 +1,73 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "2.0"; + identifier = { name = "primitive"; version = "0.9.0.0"; }; + license = "BSD-3-Clause"; + copyright = "(c) Roman Leshchinskiy 2009-2012"; + maintainer = "libraries@haskell.org"; + author = "Roman Leshchinskiy "; + homepage = "https://github.com/haskell/primitive"; + url = ""; + synopsis = "Primitive memory-related operations"; + description = "This package provides various primitive memory-related operations."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + buildable = true; + }; + tests = { + "test-qc" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."quickcheck-classes-base" or (errorHandler.buildDepError "quickcheck-classes-base")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) + ]; + buildable = true; + }; + }; + benchmarks = { + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; + sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; + }); + }) // { + package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/random.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/random.nix new file mode 100644 index 0000000000..0dbaf8b099 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/random.nix @@ -0,0 +1,113 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "random"; version = "1.2.1.1"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "core-libraries-committee@haskell.org"; + author = ""; + homepage = ""; + url = ""; + synopsis = "Pseudo-random number generation"; + description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + buildable = true; + }; + tests = { + "legacy-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]; + buildable = true; + }; + "doctests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) + ] ++ pkgs.lib.optionals (compiler.isGhc && compiler.version.ge "8.2" && (compiler.isGhc && compiler.version.lt "8.10")) [ + (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "spec" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."smallcheck" or (errorHandler.buildDepError "smallcheck")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + "spec-inspection" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + buildable = true; + }; + }; + benchmarks = { + "legacy-bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) + (hsPkgs."split" or (errorHandler.buildDepError "split")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ]; + buildable = true; + }; + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; + sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/shake.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/shake.nix new file mode 100644 index 0000000000..d40c2a8bbc --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/shake.nix @@ -0,0 +1,132 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { portable = false; cloud = false; embed-files = false; }; + package = { + specVersion = "1.18"; + identifier = { name = "shake"; version = "0.19.7"; }; + license = "BSD-3-Clause"; + copyright = "Neil Mitchell 2011-2022"; + maintainer = "Neil Mitchell "; + author = "Neil Mitchell "; + homepage = "https://shakebuild.com"; + url = ""; + synopsis = "Build system library, like Make, but more accurate dependencies."; + description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = ((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ pkgs.lib.optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]; + buildable = true; + }; + exes = { + "shake" = { + depends = (((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ pkgs.lib.optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + }; + tests = { + "shake-test" = { + depends = (((([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."binary" or (errorHandler.buildDepError "binary")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."heaps" or (errorHandler.buildDepError "heaps")) + (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) + (hsPkgs."js-flot" or (errorHandler.buildDepError "js-flot")) + (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ] ++ pkgs.lib.optionals (flags.embed-files) [ + (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; + sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; + }); + }) // { + package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/splitmix.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/splitmix.nix new file mode 100644 index 0000000000..aa0dd88d31 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/splitmix.nix @@ -0,0 +1,139 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { optimised-mixer = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "splitmix"; version = "0.1.0.5"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = ""; + homepage = ""; + url = ""; + synopsis = "Fast Splittable PRNG"; + description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ] ++ pkgs.lib.optionals (!(compiler.isGhcjs && true)) (pkgs.lib.optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + buildable = true; + }; + tests = { + "examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat" or (errorHandler.buildDepError "base-compat")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."math-functions" or (errorHandler.buildDepError "math-functions")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + ]; + buildable = true; + }; + "montecarlo-pi" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "montecarlo-pi-32" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-dieharder" = { + depends = [ + (hsPkgs."async" or (errorHandler.buildDepError "async")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "splitmix-testu01" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; + buildable = if !system.isLinux then false else true; + }; + "initialization" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + }; + benchmarks = { + "comparison" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + ]; + buildable = true; + }; + "simple-sum" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "range" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ pkgs.lib.optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; + sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix new file mode 100644 index 0000000000..0aeaccb277 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix @@ -0,0 +1,78 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { debug = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "unordered-containers"; version = "0.2.19.1"; }; + license = "BSD-3-Clause"; + copyright = "2010-2014 Johan Tibell\n2010 Edward Z. Yang"; + maintainer = "simon.jakobi@gmail.com, David.Feuer@gmail.com"; + author = "Johan Tibell"; + homepage = "https://github.com/haskell-unordered-containers/unordered-containers"; + url = ""; + synopsis = "Efficient hashing-based container types"; + description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]; + buildable = true; + }; + tests = { + "unordered-containers-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ChasingBottoms" or (errorHandler.buildDepError "ChasingBottoms")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."hashmap" or (errorHandler.buildDepError "hashmap")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; + sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; + }); + }) // { + package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix new file mode 100644 index 0000000000..a5ee5272da --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix @@ -0,0 +1,51 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "utf8-string"; version = "1.0.2"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "emertens@galois.com"; + author = "Eric Mertens"; + homepage = "https://github.com/glguy/utf8-string/"; + url = ""; + synopsis = "Support for reading and writing UTF8 Strings"; + description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ]; + buildable = true; + }; + tests = { + "unit-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; + sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; + }); + }) // { + package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/default.nix b/materialized/ghc964/hadrian-ghc99/hadrian/default.nix new file mode 100644 index 0000000000..c251f95e09 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc99/hadrian/default.nix @@ -0,0 +1,166 @@ +{ + pkgs = hackage: + { + packages = { + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + clock.revision = import ./cabal-files/clock.nix; + clock.flags.llvm = false; + transformers.revision = hackage.transformers."0.6.1.0".revisions.default; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.2.0".revisions.default; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + unix.revision = hackage.unix."2.8.4.0".revisions.default; + filepattern.revision = import ./cabal-files/filepattern.nix; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.4".revisions.default; + mtl.revision = hackage.mtl."2.3.1".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; + heaps.revision = import ./cabal-files/heaps.nix; + Cabal-syntax.revision = hackage.Cabal-syntax."3.10.1.0".revisions.default; + process.revision = hackage.process."1.6.17.0".revisions.default; + primitive.revision = import ./cabal-files/primitive.nix; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + exceptions.revision = hackage.exceptions."0.10.7".revisions.default; + base16-bytestring.revision = import ./cabal-files/base16-bytestring.nix; + parsec.revision = hackage.parsec."3.1.16.1".revisions.default; + system-cxx-std-lib.revision = hackage.system-cxx-std-lib."1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + utf8-string.revision = import ./cabal-files/utf8-string.nix; + js-jquery.revision = import ./cabal-files/js-jquery.nix; + text.revision = hackage.text."2.0.2".revisions.default; + QuickCheck.revision = import ./cabal-files/QuickCheck.nix; + QuickCheck.flags.old-random = false; + QuickCheck.flags.templatehaskell = true; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.6.0".revisions.default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.cloud = false; + shake.flags.embed-files = false; + shake.flags.portable = false; + random.revision = import ./cabal-files/random.nix; + bytestring.revision = hackage.bytestring."0.11.5.3".revisions.default; + Cabal.revision = hackage.Cabal."3.10.1.0".revisions.default; + directory.revision = hackage.directory."1.3.8.1".revisions.default; + js-flot.revision = import ./cabal-files/js-flot.nix; + cryptohash-sha256.revision = import ./cabal-files/cryptohash-sha256.nix; + cryptohash-sha256.flags.exe = false; + cryptohash-sha256.flags.use-cbits = true; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + binary.revision = hackage.binary."0.8.9.1".revisions.default; + filepath.revision = hackage.filepath."1.4.200.1".revisions.default; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; + extra.revision = import ./cabal-files/extra.nix; + }; + compiler = { + version = "9.6.4"; + nix-name = "ghc964"; + packages = { + "unix" = "2.8.4.0"; + "filepath" = "1.4.200.1"; + "transformers" = "0.6.1.0"; + "parsec" = "3.1.16.1"; + "bytestring" = "0.11.5.3"; + "containers" = "0.6.7"; + "ghc-prim" = "0.10.0"; + "mtl" = "2.3.1"; + "Cabal" = "3.10.1.0"; + "ghc-boot-th" = "9.6.4"; + "base" = "4.18.2.0"; + "time" = "1.12.2"; + "stm" = "2.5.1.0"; + "Cabal-syntax" = "3.10.1.0"; + "ghc-bignum" = "1.3"; + "directory" = "1.3.8.1"; + "template-haskell" = "2.20.0.0"; + "process" = "1.6.17.0"; + "binary" = "0.8.9.1"; + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "system-cxx-std-lib" = "1.0"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.6.0"; + "exceptions" = "0.10.7"; + }; + }; + }; + extras = hackage: + { + packages = { + ghc-toolchain = ./.plan.nix/ghc-toolchain.nix; + ghc-platform = ./.plan.nix/ghc-platform.nix; + hadrian = ./.plan.nix/hadrian.nix; + }; + }; + modules = [ + ({ lib, ... }: + { + packages = { + "ghc-toolchain" = { flags = {}; }; + "ghc-platform" = { flags = {}; }; + "hadrian" = { + flags = { + "threaded" = lib.mkOverride 900 true; + "selftest" = lib.mkOverride 900 true; + }; + }; + }; + }) + ({ lib, ... }: + { + packages = { + "directory".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "base16-bytestring".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; + "heaps".components.library.planned = lib.mkOverride 900 true; + "extra".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "ghc-toolchain".components.library.planned = lib.mkOverride 900 true; + "system-cxx-std-lib".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "ghc-platform".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "pretty".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "shake".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; + "utf8-string".components.library.planned = lib.mkOverride 900 true; + "Cabal".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; + "exceptions".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; + "array".components.library.planned = lib.mkOverride 900 true; + "filepattern".components.library.planned = lib.mkOverride 900 true; + "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; + "cryptohash-sha256".components.library.planned = lib.mkOverride 900 true; + "unix".components.library.planned = lib.mkOverride 900 true; + }; + }) + ]; +} \ No newline at end of file From 738b031d13300d1a7a06ee537ae2f8799afd2993 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 May 2024 14:06:48 +1200 Subject: [PATCH 108/170] Update hadrian materialization --- compiler/ghc/default.nix | 7 +- .../hadrian/.plan.nix/ghc-platform.nix | 0 .../hadrian/.plan.nix/ghc-toolchain.nix | 0 .../hadrian/.plan.nix/hadrian.nix | 0 .../hadrian/cabal-files/QuickCheck.nix | 0 .../hadrian/cabal-files/base16-bytestring.nix | 0 .../hadrian/cabal-files/clock.nix | 0 .../hadrian/cabal-files/cryptohash-sha256.nix | 0 .../hadrian/cabal-files/extra.nix | 0 .../hadrian/cabal-files/filepattern.nix | 0 .../hadrian/cabal-files/hashable.nix | 0 .../hadrian/cabal-files/heaps.nix | 0 .../hadrian/cabal-files/js-dgtable.nix | 0 .../hadrian/cabal-files/js-flot.nix | 0 .../hadrian/cabal-files/js-jquery.nix | 0 .../hadrian/cabal-files/primitive.nix | 0 .../hadrian/cabal-files/random.nix | 0 .../hadrian/cabal-files/shake.nix | 0 .../hadrian/cabal-files/splitmix.nix | 0 .../cabal-files/unordered-containers.nix | 0 .../hadrian/cabal-files/utf8-string.nix | 0 .../hadrian/default.nix | 212 +++++++++--------- .../hadrian/.plan.nix/hadrian.nix | 13 +- .../hadrian/cabal-files/Cabal-syntax.nix | 16 +- .../hadrian/cabal-files/Cabal.nix | 16 +- .../hadrian/cabal-files/QuickCheck.nix | 64 +++--- .../hadrian/cabal-files/clock.nix | 36 +-- .../hadrian/cabal-files/directory.nix | 22 +- .../hadrian/cabal-files/exceptions.nix | 28 +-- .../hadrian/cabal-files/extra.nix | 20 +- .../hadrian/cabal-files/filepath.nix | 49 ++-- .../hadrian/cabal-files/filepattern.nix | 20 +- .../hadrian/cabal-files/hashable.nix | 40 ++-- .../hadrian/cabal-files/heaps.nix | 14 +- .../hadrian/cabal-files/js-dgtable.nix | 18 +- .../hadrian/cabal-files/js-flot.nix | 18 +- .../hadrian/cabal-files/js-jquery.nix | 18 +- .../hadrian-ghc94/hadrian/cabal-files/mtl.nix | 16 +- .../hadrian/cabal-files/parsec.nix | 53 +++-- .../hadrian/cabal-files/primitive.nix | 32 +-- .../hadrian/cabal-files/process.nix | 34 +-- .../hadrian/cabal-files/random.nix | 44 ++-- .../hadrian/cabal-files/shake.nix | 36 +-- .../hadrian/cabal-files/splitmix.nix | 65 +++--- .../hadrian/cabal-files/transformers.nix | 16 +- .../hadrian/cabal-files/unix.nix | 122 +++++----- .../cabal-files/unordered-containers.nix | 26 +-- .../hadrian/cabal-files/utf8-string.nix | 20 +- .../ghc962/hadrian-ghc94/hadrian/default.nix | 178 +++++++-------- .../hadrian/.plan.nix/hadrian.nix | 13 +- .../hadrian/cabal-files/Cabal-syntax.nix | 16 +- .../hadrian/cabal-files/Cabal.nix | 16 +- .../hadrian/cabal-files/QuickCheck.nix | 64 +++--- .../hadrian/cabal-files/clock.nix | 36 +-- .../hadrian/cabal-files/extra.nix | 20 +- .../hadrian/cabal-files/filepattern.nix | 20 +- .../hadrian/cabal-files/hashable.nix | 40 ++-- .../hadrian/cabal-files/heaps.nix | 14 +- .../hadrian/cabal-files/js-dgtable.nix | 18 +- .../hadrian/cabal-files/js-flot.nix | 18 +- .../hadrian/cabal-files/js-jquery.nix | 18 +- .../hadrian/cabal-files/primitive.nix | 32 +-- .../hadrian/cabal-files/random.nix | 44 ++-- .../hadrian/cabal-files/shake.nix | 36 +-- .../hadrian/cabal-files/splitmix.nix | 65 +++--- .../cabal-files/unordered-containers.nix | 26 +-- .../hadrian/cabal-files/utf8-string.nix | 20 +- .../ghc962/hadrian-ghc96/hadrian/default.nix | 188 ++++++++-------- .../hadrian/.plan.nix/hadrian.nix | 13 +- .../hadrian/cabal-files/Cabal-syntax.nix | 16 +- .../hadrian/cabal-files/Cabal.nix | 16 +- .../hadrian/cabal-files/QuickCheck.nix | 64 +++--- .../hadrian/cabal-files/base16-bytestring.nix | 26 +-- .../hadrian/cabal-files/clock.nix | 36 +-- .../hadrian/cabal-files/cryptohash-sha256.nix | 36 +-- .../hadrian/cabal-files/extra.nix | 20 +- .../hadrian/cabal-files/filepattern.nix | 20 +- .../hadrian/cabal-files/hashable.nix | 40 ++-- .../hadrian/cabal-files/heaps.nix | 14 +- .../hadrian/cabal-files/js-dgtable.nix | 18 +- .../hadrian/cabal-files/js-flot.nix | 18 +- .../hadrian/cabal-files/js-jquery.nix | 18 +- .../hadrian/cabal-files/primitive.nix | 32 +-- .../hadrian/cabal-files/random.nix | 44 ++-- .../hadrian/cabal-files/shake.nix | 36 +-- .../hadrian/cabal-files/splitmix.nix | 65 +++--- .../cabal-files/unordered-containers.nix | 26 +-- .../hadrian/cabal-files/utf8-string.nix | 20 +- .../ghc962/hadrian-ghc98/hadrian/default.nix | 194 ++++++++-------- .../hadrian/cabal-files/hashable.nix | 82 ------- .../hadrian/cabal-files/random.nix | 113 ---------- .../hadrian/cabal-files/splitmix.nix | 140 ------------ .../cabal-files/unordered-containers.nix | 78 ------- .../hadrian/.plan.nix/ghc-platform.nix | 6 +- .../hadrian/.plan.nix/ghc-toolchain.nix | 10 +- .../hadrian/.plan.nix/hadrian.nix | 13 +- .../hadrian/cabal-files/QuickCheck.nix | 64 +++--- .../hadrian/cabal-files/base16-bytestring.nix | 26 +-- .../hadrian/cabal-files/clock.nix | 36 +-- .../hadrian/cabal-files/cryptohash-sha256.nix | 36 +-- .../hadrian/cabal-files/extra.nix | 20 +- .../hadrian/cabal-files/filepattern.nix | 20 +- .../hadrian/cabal-files/hashable.nix | 82 +++++++ .../hadrian/cabal-files/heaps.nix | 14 +- .../hadrian/cabal-files/js-dgtable.nix | 18 +- .../hadrian/cabal-files/js-flot.nix | 18 +- .../hadrian/cabal-files/js-jquery.nix | 18 +- .../hadrian/cabal-files/primitive.nix | 32 +-- .../hadrian/cabal-files/random.nix | 113 ++++++++++ .../hadrian/cabal-files/shake.nix | 36 +-- .../hadrian/cabal-files/splitmix.nix | 139 ++++++++++++ .../cabal-files/unordered-containers.nix | 78 +++++++ .../hadrian/cabal-files/utf8-string.nix | 20 +- .../hadrian/default.nix | 0 114 files changed, 1987 insertions(+), 1954 deletions(-) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/.plan.nix/ghc-platform.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/.plan.nix/ghc-toolchain.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/.plan.nix/hadrian.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/QuickCheck.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/base16-bytestring.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/clock.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/cryptohash-sha256.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/extra.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/filepattern.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/hashable.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/heaps.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/js-dgtable.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/js-flot.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/js-jquery.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/primitive.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/random.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/shake.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/splitmix.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/unordered-containers.nix (100%) rename materialized/{ghc964/hadrian-ghc99 => ghc962/hadrian-ghc910}/hadrian/cabal-files/utf8-string.nix (100%) rename materialized/ghc962/{hadrian-ghc99 => hadrian-ghc910}/hadrian/default.nix (76%) delete mode 100644 materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/hashable.nix delete mode 100644 materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/random.nix delete mode 100644 materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/splitmix.nix delete mode 100644 materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/.plan.nix/ghc-platform.nix (91%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/.plan.nix/ghc-toolchain.nix (94%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/.plan.nix/hadrian.nix (93%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/QuickCheck.nix (88%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/base16-bytestring.nix (54%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/clock.nix (68%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/cryptohash-sha256.nix (70%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/extra.nix (94%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/filepattern.nix (97%) create mode 100644 materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/hashable.nix rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/heaps.nix (96%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/js-dgtable.nix (96%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/js-flot.nix (96%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/js-jquery.nix (96%) rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/primitive.nix (63%) create mode 100644 materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/random.nix rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/shake.nix (94%) create mode 100644 materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/splitmix.nix create mode 100644 materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/unordered-containers.nix rename materialized/{ghc962/hadrian-ghc99 => ghc964/hadrian-ghc910}/hadrian/cabal-files/utf8-string.nix (96%) rename materialized/ghc964/{hadrian-ghc99 => hadrian-ghc910}/hadrian/default.nix (100%) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 68f7bb9c6c..10f1886d6e 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -264,12 +264,13 @@ let then ../../materialized/${compiler-nix-name}/hadrian-ghc92 else if builtins.compareVersions ghc-version "9.6" < 0 then ../../materialized/${compiler-nix-name}/hadrian-ghc94 - else if builtins.compareVersions ghc-version "9.8" < 0 + else if builtins.compareVersions ghc-version "9.7" < 0 then ../../materialized/${compiler-nix-name}/hadrian-ghc96 else if builtins.compareVersions ghc-version "9.9" < 0 then ../../materialized/${compiler-nix-name}/hadrian-ghc98 - else ../../materialized/${compiler-nix-name}/hadrian-ghc99; - checkMaterialization = true; + else if builtins.compareVersions ghc-version "9.11" < 0 + then ../../materialized/${compiler-nix-name}/hadrian-ghc910 + else null; modules = [{ reinstallableLibGhc = false; # Apply the patches in a way that does not require using something diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix b/materialized/ghc962/hadrian-ghc910/hadrian/.plan.nix/ghc-platform.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/.plan.nix/ghc-platform.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix b/materialized/ghc962/hadrian-ghc910/hadrian/.plan.nix/ghc-toolchain.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/.plan.nix/ghc-toolchain.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix b/materialized/ghc962/hadrian-ghc910/hadrian/.plan.nix/hadrian.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/.plan.nix/hadrian.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/QuickCheck.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/QuickCheck.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/base16-bytestring.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/base16-bytestring.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/clock.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/clock.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/clock.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/clock.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/cryptohash-sha256.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/cryptohash-sha256.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/extra.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/extra.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/extra.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/extra.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/filepattern.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/filepattern.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/filepattern.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/filepattern.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/hashable.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/hashable.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/hashable.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/hashable.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/heaps.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/heaps.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/heaps.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/heaps.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/js-dgtable.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/js-dgtable.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-flot.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/js-flot.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-flot.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/js-flot.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/js-jquery.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/js-jquery.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/primitive.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/primitive.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/primitive.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/primitive.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/random.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/random.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/random.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/random.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/shake.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/shake.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/shake.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/shake.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/splitmix.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/splitmix.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/splitmix.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/splitmix.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/unordered-containers.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/unordered-containers.nix diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix b/materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/utf8-string.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/cabal-files/utf8-string.nix diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/default.nix b/materialized/ghc962/hadrian-ghc910/hadrian/default.nix similarity index 76% rename from materialized/ghc962/hadrian-ghc99/hadrian/default.nix rename to materialized/ghc962/hadrian-ghc910/hadrian/default.nix index ebd7cdaea2..fec40fe314 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/default.nix +++ b/materialized/ghc962/hadrian-ghc910/hadrian/default.nix @@ -2,165 +2,165 @@ pkgs = hackage: { packages = { - Cabal-syntax.revision = (((hackage.Cabal-syntax)."3.10.1.0").revisions).default; - bytestring.revision = (((hackage.bytestring)."0.11.4.0").revisions).default; - exceptions.revision = (((hackage.exceptions)."0.10.7").revisions).default; - directory.revision = (((hackage.directory)."1.3.8.1").revisions).default; - filepath.revision = (((hackage.filepath)."1.4.100.1").revisions).default; - mtl.revision = (((hackage.mtl)."2.3.1").revisions).default; - ghc-bignum.revision = (((hackage.ghc-bignum)."1.3").revisions).default; - ghc-prim.revision = (((hackage.ghc-prim)."0.10.0").revisions).default; - base16-bytestring.revision = import ./cabal-files/base16-bytestring.nix; - parsec.revision = (((hackage.parsec)."3.1.16.1").revisions).default; - js-flot.revision = import ./cabal-files/js-flot.nix; - utf8-string.revision = import ./cabal-files/utf8-string.nix; - Cabal.revision = (((hackage.Cabal)."3.10.1.0").revisions).default; - splitmix.revision = import ./cabal-files/splitmix.nix; - splitmix.flags.optimised-mixer = false; - containers.revision = (((hackage.containers)."0.6.7").revisions).default; + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; clock.revision = import ./cabal-files/clock.nix; clock.flags.llvm = false; - stm.revision = (((hackage.stm)."2.5.1.0").revisions).default; + transformers.revision = hackage.transformers."0.6.1.0".revisions.default; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.0.0".revisions.default; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + unix.revision = hackage.unix."2.8.1.0".revisions.default; + filepattern.revision = import ./cabal-files/filepattern.nix; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.2".revisions.default; + mtl.revision = hackage.mtl."2.3.1".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; heaps.revision = import ./cabal-files/heaps.nix; - base.revision = (((hackage.base)."4.18.0.0").revisions).default; - time.revision = (((hackage.time)."1.12.2").revisions).default; - random.revision = import ./cabal-files/random.nix; + Cabal-syntax.revision = hackage.Cabal-syntax."3.10.1.0".revisions.default; + process.revision = hackage.process."1.6.17.0".revisions.default; primitive.revision = import ./cabal-files/primitive.nix; - deepseq.revision = (((hackage.deepseq)."1.4.8.1").revisions).default; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + exceptions.revision = hackage.exceptions."0.10.7".revisions.default; + base16-bytestring.revision = import ./cabal-files/base16-bytestring.nix; + parsec.revision = hackage.parsec."3.1.16.1".revisions.default; + system-cxx-std-lib.revision = hackage.system-cxx-std-lib."1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + utf8-string.revision = import ./cabal-files/utf8-string.nix; js-jquery.revision = import ./cabal-files/js-jquery.nix; - js-dgtable.revision = import ./cabal-files/js-dgtable.nix; - rts.revision = (((hackage.rts)."1.0.2").revisions).default; - template-haskell.revision = (((hackage.template-haskell)."2.20.0.0").revisions).default; - binary.revision = (((hackage.binary)."0.8.9.1").revisions).default; - shake.revision = import ./cabal-files/shake.nix; - shake.flags.portable = false; - shake.flags.cloud = false; - shake.flags.embed-files = false; - process.revision = (((hackage.process)."1.6.17.0").revisions).default; - unix.revision = (((hackage.unix)."2.8.1.0").revisions).default; - transformers.revision = (((hackage.transformers)."0.6.1.0").revisions).default; - unordered-containers.revision = import ./cabal-files/unordered-containers.nix; - unordered-containers.flags.debug = false; + text.revision = hackage.text."2.0.2".revisions.default; QuickCheck.revision = import ./cabal-files/QuickCheck.nix; QuickCheck.flags.old-random = false; QuickCheck.flags.templatehaskell = true; - extra.revision = import ./cabal-files/extra.nix; - text.revision = (((hackage.text)."2.0.2").revisions).default; - array.revision = (((hackage.array)."0.5.5.0").revisions).default; - ghc-boot-th.revision = (((hackage.ghc-boot-th)."9.6.2").revisions).default; - filepattern.revision = import ./cabal-files/filepattern.nix; - pretty.revision = (((hackage.pretty)."1.1.3.6").revisions).default; - hashable.revision = import ./cabal-files/hashable.nix; - hashable.flags.random-initial-seed = false; - hashable.flags.integer-gmp = true; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.5.0".revisions.default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.cloud = false; + shake.flags.embed-files = false; + shake.flags.portable = false; + random.revision = import ./cabal-files/random.nix; + bytestring.revision = hackage.bytestring."0.11.4.0".revisions.default; + Cabal.revision = hackage.Cabal."3.10.1.0".revisions.default; + directory.revision = hackage.directory."1.3.8.1".revisions.default; + js-flot.revision = import ./cabal-files/js-flot.nix; cryptohash-sha256.revision = import ./cabal-files/cryptohash-sha256.nix; cryptohash-sha256.flags.exe = false; cryptohash-sha256.flags.use-cbits = true; - }; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + binary.revision = hackage.binary."0.8.9.1".revisions.default; + filepath.revision = hackage.filepath."1.4.100.1".revisions.default; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; + extra.revision = import ./cabal-files/extra.nix; + }; compiler = { version = "9.6.2"; nix-name = "ghc962"; packages = { - "pretty" = "1.1.3.6"; - "text" = "2.0.2"; - "array" = "0.5.5.0"; - "Cabal-syntax" = "3.10.1.0"; - "Cabal" = "3.10.1.0"; - "mtl" = "2.3.1"; + "unix" = "2.8.1.0"; + "filepath" = "1.4.100.1"; + "transformers" = "0.6.1.0"; "parsec" = "3.1.16.1"; "bytestring" = "0.11.4.0"; - "filepath" = "1.4.100.1"; - "stm" = "2.5.1.0"; + "containers" = "0.6.7"; "ghc-prim" = "0.10.0"; + "mtl" = "2.3.1"; + "Cabal" = "3.10.1.0"; "ghc-boot-th" = "9.6.2"; "base" = "4.18.0.0"; "time" = "1.12.2"; - "process" = "1.6.17.0"; + "stm" = "2.5.1.0"; + "Cabal-syntax" = "3.10.1.0"; "ghc-bignum" = "1.3"; "directory" = "1.3.8.1"; - "exceptions" = "0.10.7"; - "rts" = "1.0.2"; - "transformers" = "0.6.1.0"; "template-haskell" = "2.20.0.0"; - "deepseq" = "1.4.8.1"; - "unix" = "2.8.1.0"; + "process" = "1.6.17.0"; "binary" = "0.8.9.1"; - "containers" = "0.6.7"; - }; + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "system-cxx-std-lib" = "1.0"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.5.0"; + "exceptions" = "0.10.7"; }; }; + }; extras = hackage: { packages = { - hadrian = ./.plan.nix/hadrian.nix; - ghc-platform = ./.plan.nix/ghc-platform.nix; ghc-toolchain = ./.plan.nix/ghc-toolchain.nix; - }; + ghc-platform = ./.plan.nix/ghc-platform.nix; + hadrian = ./.plan.nix/hadrian.nix; }; + }; modules = [ ({ lib, ... }: { packages = { + "ghc-toolchain" = { flags = {}; }; + "ghc-platform" = { flags = {}; }; "hadrian" = { flags = { "threaded" = lib.mkOverride 900 true; "selftest" = lib.mkOverride 900 true; - }; }; - "ghc-platform" = { flags = {}; }; - "ghc-toolchain" = { flags = {}; }; }; - }) + }; + }) ({ lib, ... }: { packages = { - "shake".components.library.planned = lib.mkOverride 900 true; - "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; "base16-bytestring".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; "heaps".components.library.planned = lib.mkOverride 900 true; "extra".components.library.planned = lib.mkOverride 900 true; - "filepath".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "ghc-toolchain".components.library.planned = lib.mkOverride 900 true; + "system-cxx-std-lib".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "ghc-platform".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; "pretty".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "shake".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; "utf8-string".components.library.planned = lib.mkOverride 900 true; "Cabal".components.library.planned = lib.mkOverride 900 true; - "bytestring".components.library.planned = lib.mkOverride 900 true; - "cryptohash-sha256".components.library.planned = lib.mkOverride 900 true; - "ghc-platform".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; "exceptions".components.library.planned = lib.mkOverride 900 true; - "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; "array".components.library.planned = lib.mkOverride 900 true; - "binary".components.library.planned = lib.mkOverride 900 true; "filepattern".components.library.planned = lib.mkOverride 900 true; "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; - "ghc-toolchain".components.library.planned = lib.mkOverride 900 true; - "splitmix".components.library.planned = lib.mkOverride 900 true; - "rts".components.library.planned = lib.mkOverride 900 true; + "cryptohash-sha256".components.library.planned = lib.mkOverride 900 true; "unix".components.library.planned = lib.mkOverride 900 true; - "shake".components.exes."shake".planned = lib.mkOverride 900 true; - "directory".components.library.planned = lib.mkOverride 900 true; - "time".components.library.planned = lib.mkOverride 900 true; - "js-flot".components.library.planned = lib.mkOverride 900 true; - "ghc-bignum".components.library.planned = lib.mkOverride 900 true; - "process".components.library.planned = lib.mkOverride 900 true; - "clock".components.library.planned = lib.mkOverride 900 true; - "template-haskell".components.library.planned = lib.mkOverride 900 true; - "stm".components.library.planned = lib.mkOverride 900 true; - "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; - "QuickCheck".components.library.planned = lib.mkOverride 900 true; - "mtl".components.library.planned = lib.mkOverride 900 true; - "transformers".components.library.planned = lib.mkOverride 900 true; - "parsec".components.library.planned = lib.mkOverride 900 true; - "deepseq".components.library.planned = lib.mkOverride 900 true; - "primitive".components.library.planned = lib.mkOverride 900 true; - "js-jquery".components.library.planned = lib.mkOverride 900 true; - "text".components.library.planned = lib.mkOverride 900 true; - "unordered-containers".components.library.planned = lib.mkOverride 900 true; - "random".components.library.planned = lib.mkOverride 900 true; - "base".components.library.planned = lib.mkOverride 900 true; - "containers".components.library.planned = lib.mkOverride 900 true; - "js-dgtable".components.library.planned = lib.mkOverride 900 true; - "hashable".components.library.planned = lib.mkOverride 900 true; - }; - }) - ]; - } \ No newline at end of file + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/.plan.nix/hadrian.nix b/materialized/ghc962/hadrian-ghc94/hadrian/.plan.nix/hadrian.nix index 7c047cd1d6..6a031230a6 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/.plan.nix/hadrian.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/.plan.nix/hadrian.nix @@ -29,7 +29,7 @@ extraSrcFiles = []; extraTmpFiles = []; extraDocFiles = [ "README.md" ]; - }; + }; components = { exes = { "hadrian" = { @@ -47,7 +47,7 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + ] ++ pkgs.lib.optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); buildable = true; modules = [ "Base" @@ -126,6 +126,7 @@ "Settings/Builders/Ld" "Settings/Builders/Make" "Settings/Builders/MergeObjects" + "Settings/Builders/SplitSections" "Settings/Builders/RunTest" "Settings/Builders/Win32Tarballs" "Settings/Builders/Xelatex" @@ -149,12 +150,12 @@ "Utilities" "Way" "Way/Type" - ] ++ (pkgs.lib).optional (flags.selftest) "Rules/Selftest"; + ] ++ pkgs.lib.optional (flags.selftest) "Rules/Selftest"; hsSourceDirs = [ "." "src" ]; mainPath = ([ "Main.hs" - ] ++ (pkgs.lib).optional (flags.threaded) "") ++ (pkgs.lib).optional (flags.selftest) ""; - }; + ] ++ pkgs.lib.optional (flags.threaded) "") ++ pkgs.lib.optional (flags.selftest) ""; }; }; - } // rec { src = (pkgs.lib).mkDefault ../.; } \ No newline at end of file + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/Cabal-syntax.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/Cabal-syntax.nix index 3993fc7083..dabbcbdee8 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/Cabal-syntax.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/Cabal-syntax.nix @@ -21,7 +21,7 @@ synopsis = "A library for working with .cabal files"; description = "This library provides tools for reading and manipulating the .cabal file\nformat."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -39,17 +39,17 @@ (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."time" or (errorHandler.buildDepError "time")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ] ++ (if system.isWindows + ] ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-syntax-3.8.1.0.tar.gz"; sha256 = "07e8ddb19fe01781485f1522b6afc22aba680b0ab28ebe6bbfb84a2dd698ce0f"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal-syntax\r\nversion: 3.8.1.0\r\nx-revision: 3\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A library for working with .cabal files\r\ndescription:\r\n This library provides tools for reading and manipulating the .cabal file\r\n format.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal-syntax\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.9 && < 5,\r\n binary >= 0.7 && < 0.9,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n mtl >= 2.1 && < 2.4,\r\n parsec >= 3.1.13.0 && < 3.2,\r\n pretty >= 1.1.1 && < 1.2,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n time >= 1.4.0.1 && < 1.13,\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7)\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc < 8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack\r\n Distribution.CabalSpecVersion\r\n Distribution.Compat.Binary\r\n Distribution.Compat.CharParsing\r\n Distribution.Compat.DList\r\n Distribution.Compat.Exception\r\n Distribution.Compat.Graph\r\n Distribution.Compat.Lens\r\n Distribution.Compat.MonadFail\r\n Distribution.Compat.Newtype\r\n Distribution.Compat.NonEmptySet\r\n Distribution.Compat.Parsing\r\n Distribution.Compat.Prelude\r\n Distribution.Compat.Semigroup\r\n Distribution.Compat.Typeable\r\n Distribution.Compiler\r\n Distribution.FieldGrammar\r\n Distribution.FieldGrammar.Class\r\n Distribution.FieldGrammar.FieldDescrs\r\n Distribution.FieldGrammar.Newtypes\r\n Distribution.FieldGrammar.Parsec\r\n Distribution.FieldGrammar.Pretty\r\n Distribution.Fields\r\n Distribution.Fields.ConfVar\r\n Distribution.Fields.Field\r\n Distribution.Fields.Lexer\r\n Distribution.Fields.LexerMonad\r\n Distribution.Fields.ParseResult\r\n Distribution.Fields.Parser\r\n Distribution.Fields.Pretty\r\n Distribution.InstalledPackageInfo\r\n Distribution.License\r\n Distribution.ModuleName\r\n Distribution.Package\r\n Distribution.PackageDescription\r\n Distribution.PackageDescription.Configuration\r\n Distribution.PackageDescription.FieldGrammar\r\n Distribution.PackageDescription.Parsec\r\n Distribution.PackageDescription.PrettyPrint\r\n Distribution.PackageDescription.Quirks\r\n Distribution.PackageDescription.Utils\r\n Distribution.Parsec\r\n Distribution.Parsec.Error\r\n Distribution.Parsec.FieldLineStream\r\n Distribution.Parsec.Position\r\n Distribution.Parsec.Warning\r\n Distribution.Pretty\r\n Distribution.SPDX\r\n Distribution.SPDX.License\r\n Distribution.SPDX.LicenseExceptionId\r\n Distribution.SPDX.LicenseExpression\r\n Distribution.SPDX.LicenseId\r\n Distribution.SPDX.LicenseListVersion\r\n Distribution.SPDX.LicenseReference\r\n Distribution.System\r\n Distribution.Text\r\n Distribution.Types.AbiDependency\r\n Distribution.Types.AbiHash\r\n Distribution.Types.Benchmark\r\n Distribution.Types.Benchmark.Lens\r\n Distribution.Types.BenchmarkInterface\r\n Distribution.Types.BenchmarkType\r\n Distribution.Types.BuildInfo\r\n Distribution.Types.BuildInfo.Lens\r\n Distribution.Types.BuildType\r\n Distribution.Types.Component\r\n Distribution.Types.ComponentId\r\n Distribution.Types.ComponentName\r\n Distribution.Types.ComponentRequestedSpec\r\n Distribution.Types.CondTree\r\n Distribution.Types.Condition\r\n Distribution.Types.ConfVar\r\n Distribution.Types.Dependency\r\n Distribution.Types.DependencyMap\r\n Distribution.Types.ExeDependency\r\n Distribution.Types.Executable\r\n Distribution.Types.Executable.Lens\r\n Distribution.Types.ExecutableScope\r\n Distribution.Types.ExposedModule\r\n Distribution.Types.Flag\r\n Distribution.Types.ForeignLib\r\n Distribution.Types.ForeignLib.Lens\r\n Distribution.Types.ForeignLibOption\r\n Distribution.Types.ForeignLibType\r\n Distribution.Types.GenericPackageDescription\r\n Distribution.Types.GenericPackageDescription.Lens\r\n Distribution.Types.HookedBuildInfo\r\n Distribution.Types.IncludeRenaming\r\n Distribution.Types.InstalledPackageInfo\r\n Distribution.Types.InstalledPackageInfo.Lens\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar\r\n Distribution.Types.LegacyExeDependency\r\n Distribution.Types.Lens\r\n Distribution.Types.Library\r\n Distribution.Types.Library.Lens\r\n Distribution.Types.LibraryName\r\n Distribution.Types.LibraryVisibility\r\n Distribution.Types.Mixin\r\n Distribution.Types.Module\r\n Distribution.Types.ModuleReexport\r\n Distribution.Types.ModuleRenaming\r\n Distribution.Types.MungedPackageId\r\n Distribution.Types.MungedPackageName\r\n Distribution.Types.PackageDescription\r\n Distribution.Types.PackageDescription.Lens\r\n Distribution.Types.PackageId\r\n Distribution.Types.PackageId.Lens\r\n Distribution.Types.PackageName\r\n Distribution.Types.PackageVersionConstraint\r\n Distribution.Types.PkgconfigDependency\r\n Distribution.Types.PkgconfigName\r\n Distribution.Types.PkgconfigVersion\r\n Distribution.Types.PkgconfigVersionRange\r\n Distribution.Types.SetupBuildInfo\r\n Distribution.Types.SetupBuildInfo.Lens\r\n Distribution.Types.SourceRepo\r\n Distribution.Types.SourceRepo.Lens\r\n Distribution.Types.TestSuite\r\n Distribution.Types.TestSuite.Lens\r\n Distribution.Types.TestSuiteInterface\r\n Distribution.Types.TestType\r\n Distribution.Types.UnitId\r\n Distribution.Types.UnqualComponentName\r\n Distribution.Types.Version\r\n Distribution.Types.VersionInterval\r\n Distribution.Types.VersionInterval.Legacy\r\n Distribution.Types.VersionRange\r\n Distribution.Types.VersionRange.Internal\r\n Distribution.Utils.Base62\r\n Distribution.Utils.Generic\r\n Distribution.Utils.MD5\r\n Distribution.Utils.Path\r\n Distribution.Utils.ShortText\r\n Distribution.Utils.String\r\n Distribution.Utils.Structured\r\n Distribution.Version\r\n Language.Haskell.Extension\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/Cabal.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/Cabal.nix index 22899ece21..be0b5019d9 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/Cabal.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/Cabal.nix @@ -21,7 +21,7 @@ synopsis = "A framework for packaging Haskell software"; description = "The Haskell Common Architecture for Building Applications and\nLibraries: a framework defining a common interface for authors to more\neasily build their Haskell applications in a portable way.\n\nThe Haskell Cabal is part of a larger infrastructure for distributing,\norganizing, and cataloging Haskell libraries and tools."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ([ @@ -40,17 +40,17 @@ (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-3.8.1.0.tar.gz"; sha256 = "7464cbe6c2f3d7e5d0232023a1a7330621f8b24853cb259fc89a2af85b736608"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal\r\nversion: 3.8.1.0\r\nx-revision: 2\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A framework for packaging Haskell software\r\ndescription:\r\n The Haskell Common Architecture for Building Applications and\r\n Libraries: a framework defining a common interface for authors to more\r\n easily build their Haskell applications in a portable way.\r\n .\r\n The Haskell Cabal is part of a larger infrastructure for distributing,\r\n organizing, and cataloging Haskell libraries and tools.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n-- If we use a new Cabal feature, this needs to be changed to Custom so\r\n-- we can bootstrap.\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n Cabal-syntax >= 3.8 && < 3.9,\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.6 && < 5,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n pretty >= 1.1.1 && < 1.2,\r\n process >= 1.2.1.0 && < 1.7,\r\n time >= 1.4.0.1 && < 1.13\r\n\r\n -- PR #8802: moved conditional process lower bound to cabal-install package\r\n if impl(ghc >=8.2)\r\n build-depends: process >= 1.2.1.0\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc <8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack.Configure\r\n Distribution.Backpack.ComponentsGraph\r\n Distribution.Backpack.ConfiguredComponent\r\n Distribution.Backpack.DescribeUnitId\r\n Distribution.Backpack.FullUnitId\r\n Distribution.Backpack.LinkedComponent\r\n Distribution.Backpack.ModSubst\r\n Distribution.Backpack.ModuleShape\r\n Distribution.Backpack.PreModuleShape\r\n Distribution.Utils.IOData\r\n Distribution.Utils.LogProgress\r\n Distribution.Utils.MapAccum\r\n Distribution.Compat.CreatePipe\r\n Distribution.Compat.Directory\r\n Distribution.Compat.Environment\r\n Distribution.Compat.FilePath\r\n Distribution.Compat.Internal.TempFile\r\n Distribution.Compat.ResponseFile\r\n Distribution.Compat.Prelude.Internal\r\n Distribution.Compat.Process\r\n Distribution.Compat.Stack\r\n Distribution.Compat.Time\r\n Distribution.Make\r\n Distribution.PackageDescription.Check\r\n Distribution.ReadE\r\n Distribution.Simple\r\n Distribution.Simple.Bench\r\n Distribution.Simple.Build\r\n Distribution.Simple.Build.Macros\r\n Distribution.Simple.Build.PathsModule\r\n Distribution.Simple.BuildPaths\r\n Distribution.Simple.BuildTarget\r\n Distribution.Simple.BuildToolDepends\r\n Distribution.Simple.CCompiler\r\n Distribution.Simple.Command\r\n Distribution.Simple.Compiler\r\n Distribution.Simple.Configure\r\n Distribution.Simple.Flag\r\n Distribution.Simple.GHC\r\n Distribution.Simple.GHCJS\r\n Distribution.Simple.Haddock\r\n Distribution.Simple.Glob\r\n Distribution.Simple.HaskellSuite\r\n Distribution.Simple.Hpc\r\n Distribution.Simple.Install\r\n Distribution.Simple.InstallDirs\r\n Distribution.Simple.InstallDirs.Internal\r\n Distribution.Simple.LocalBuildInfo\r\n Distribution.Simple.PackageDescription\r\n Distribution.Simple.PackageIndex\r\n Distribution.Simple.PreProcess\r\n Distribution.Simple.PreProcess.Unlit\r\n Distribution.Simple.Program\r\n Distribution.Simple.Program.Ar\r\n Distribution.Simple.Program.Builtin\r\n Distribution.Simple.Program.Db\r\n Distribution.Simple.Program.Find\r\n Distribution.Simple.Program.GHC\r\n Distribution.Simple.Program.HcPkg\r\n Distribution.Simple.Program.Hpc\r\n Distribution.Simple.Program.Internal\r\n Distribution.Simple.Program.Ld\r\n Distribution.Simple.Program.ResponseFile\r\n Distribution.Simple.Program.Run\r\n Distribution.Simple.Program.Script\r\n Distribution.Simple.Program.Strip\r\n Distribution.Simple.Program.Types\r\n Distribution.Simple.Register\r\n Distribution.Simple.Setup\r\n Distribution.Simple.ShowBuildInfo\r\n Distribution.Simple.SrcDist\r\n Distribution.Simple.Test\r\n Distribution.Simple.Test.ExeV10\r\n Distribution.Simple.Test.LibV09\r\n Distribution.Simple.Test.Log\r\n Distribution.Simple.UHC\r\n Distribution.Simple.UserHooks\r\n Distribution.Simple.Utils\r\n Distribution.TestSuite\r\n Distribution.Types.AnnotatedId\r\n Distribution.Types.ComponentInclude\r\n Distribution.Types.DumpBuildInfo\r\n Distribution.Types.PackageName.Magic\r\n Distribution.Types.ComponentLocalBuildInfo\r\n Distribution.Types.LocalBuildInfo\r\n Distribution.Types.TargetInfo\r\n Distribution.Types.GivenComponent\r\n Distribution.Utils.Json\r\n Distribution.Utils.NubList\r\n Distribution.Utils.Progress\r\n Distribution.Verbosity\r\n Distribution.Verbosity.Internal\r\n\r\n -- We reexport all of Cabal-syntax to aid in compatibility for downstream\r\n -- users. In the future we may opt to deprecate some or all of these exports.\r\n -- See haskell/Cabal#7974.\r\n reexported-modules:\r\n Distribution.Backpack,\r\n Distribution.CabalSpecVersion,\r\n Distribution.Compat.Binary,\r\n Distribution.Compat.CharParsing,\r\n Distribution.Compat.DList,\r\n Distribution.Compat.Exception,\r\n Distribution.Compat.Graph,\r\n Distribution.Compat.Lens,\r\n Distribution.Compat.MonadFail,\r\n Distribution.Compat.Newtype,\r\n Distribution.Compat.NonEmptySet,\r\n Distribution.Compat.Parsing,\r\n Distribution.Compat.Prelude,\r\n Distribution.Compat.Semigroup,\r\n Distribution.Compat.Typeable,\r\n Distribution.Compiler,\r\n Distribution.FieldGrammar,\r\n Distribution.FieldGrammar.Class,\r\n Distribution.FieldGrammar.FieldDescrs,\r\n Distribution.FieldGrammar.Newtypes,\r\n Distribution.FieldGrammar.Parsec,\r\n Distribution.FieldGrammar.Pretty,\r\n Distribution.Fields,\r\n Distribution.Fields.ConfVar,\r\n Distribution.Fields.Field,\r\n Distribution.Fields.Lexer,\r\n Distribution.Fields.LexerMonad,\r\n Distribution.Fields.ParseResult,\r\n Distribution.Fields.Parser,\r\n Distribution.Fields.Pretty,\r\n Distribution.InstalledPackageInfo,\r\n Distribution.License,\r\n Distribution.ModuleName,\r\n Distribution.Package,\r\n Distribution.PackageDescription,\r\n Distribution.PackageDescription.Configuration,\r\n Distribution.PackageDescription.FieldGrammar,\r\n Distribution.PackageDescription.Parsec,\r\n Distribution.PackageDescription.PrettyPrint,\r\n Distribution.PackageDescription.Quirks,\r\n Distribution.PackageDescription.Utils,\r\n Distribution.Parsec,\r\n Distribution.Parsec.Error,\r\n Distribution.Parsec.FieldLineStream,\r\n Distribution.Parsec.Position,\r\n Distribution.Parsec.Warning,\r\n Distribution.Pretty,\r\n Distribution.SPDX,\r\n Distribution.SPDX.License,\r\n Distribution.SPDX.LicenseExceptionId,\r\n Distribution.SPDX.LicenseExpression,\r\n Distribution.SPDX.LicenseId,\r\n Distribution.SPDX.LicenseListVersion,\r\n Distribution.SPDX.LicenseReference,\r\n Distribution.System,\r\n Distribution.Text,\r\n Distribution.Types.AbiDependency,\r\n Distribution.Types.AbiHash,\r\n Distribution.Types.Benchmark,\r\n Distribution.Types.Benchmark.Lens,\r\n Distribution.Types.BenchmarkInterface,\r\n Distribution.Types.BenchmarkType,\r\n Distribution.Types.BuildInfo,\r\n Distribution.Types.BuildInfo.Lens,\r\n Distribution.Types.BuildType,\r\n Distribution.Types.Component,\r\n Distribution.Types.ComponentId,\r\n Distribution.Types.ComponentName,\r\n Distribution.Types.ComponentRequestedSpec,\r\n Distribution.Types.CondTree,\r\n Distribution.Types.Condition,\r\n Distribution.Types.ConfVar,\r\n Distribution.Types.Dependency,\r\n Distribution.Types.DependencyMap,\r\n Distribution.Types.ExeDependency,\r\n Distribution.Types.Executable,\r\n Distribution.Types.Executable.Lens,\r\n Distribution.Types.ExecutableScope,\r\n Distribution.Types.ExposedModule,\r\n Distribution.Types.Flag,\r\n Distribution.Types.ForeignLib,\r\n Distribution.Types.ForeignLib.Lens,\r\n Distribution.Types.ForeignLibOption,\r\n Distribution.Types.ForeignLibType,\r\n Distribution.Types.GenericPackageDescription,\r\n Distribution.Types.GenericPackageDescription.Lens,\r\n Distribution.Types.HookedBuildInfo,\r\n Distribution.Types.IncludeRenaming,\r\n Distribution.Types.InstalledPackageInfo,\r\n Distribution.Types.InstalledPackageInfo.Lens,\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar,\r\n Distribution.Types.LegacyExeDependency,\r\n Distribution.Types.Lens,\r\n Distribution.Types.Library,\r\n Distribution.Types.Library.Lens,\r\n Distribution.Types.LibraryName,\r\n Distribution.Types.LibraryVisibility,\r\n Distribution.Types.Mixin,\r\n Distribution.Types.Module,\r\n Distribution.Types.ModuleReexport,\r\n Distribution.Types.ModuleRenaming,\r\n Distribution.Types.MungedPackageId,\r\n Distribution.Types.MungedPackageName,\r\n Distribution.Types.PackageDescription,\r\n Distribution.Types.PackageDescription.Lens,\r\n Distribution.Types.PackageId,\r\n Distribution.Types.PackageId.Lens,\r\n Distribution.Types.PackageName,\r\n Distribution.Types.PackageVersionConstraint,\r\n Distribution.Types.PkgconfigDependency,\r\n Distribution.Types.PkgconfigName,\r\n Distribution.Types.PkgconfigVersion,\r\n Distribution.Types.PkgconfigVersionRange,\r\n Distribution.Types.SetupBuildInfo,\r\n Distribution.Types.SetupBuildInfo.Lens,\r\n Distribution.Types.SourceRepo,\r\n Distribution.Types.SourceRepo.Lens,\r\n Distribution.Types.TestSuite,\r\n Distribution.Types.TestSuite.Lens,\r\n Distribution.Types.TestSuiteInterface,\r\n Distribution.Types.TestType,\r\n Distribution.Types.UnitId,\r\n Distribution.Types.UnqualComponentName,\r\n Distribution.Types.Version,\r\n Distribution.Types.VersionInterval,\r\n Distribution.Types.VersionInterval.Legacy,\r\n Distribution.Types.VersionRange,\r\n Distribution.Types.VersionRange.Internal,\r\n Distribution.Utils.Base62,\r\n Distribution.Utils.Generic,\r\n Distribution.Utils.MD5,\r\n Distribution.Utils.Path,\r\n Distribution.Utils.ShortText,\r\n Distribution.Utils.String,\r\n Distribution.Utils.Structured,\r\n Distribution.Version,\r\n Language.Haskell.Extension\r\n\r\n -- Parsec parser-related modules\r\n build-depends:\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7),\r\n mtl >= 2.1 && < 2.4,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n parsec >= 3.1.13.0 && < 3.2\r\n\r\n other-modules:\r\n Distribution.Backpack.PreExistingComponent\r\n Distribution.Backpack.ReadyComponent\r\n Distribution.Backpack.MixLink\r\n Distribution.Backpack.ModuleScope\r\n Distribution.Backpack.UnifyM\r\n Distribution.Backpack.Id\r\n Distribution.Utils.UnionFind\r\n Distribution.Compat.Async\r\n Distribution.Compat.CopyFile\r\n Distribution.Compat.GetShortPathName\r\n Distribution.Compat.SnocList\r\n Distribution.GetOpt\r\n Distribution.Lex\r\n Distribution.Simple.Build.Macros.Z\r\n Distribution.Simple.Build.PathsModule.Z\r\n Distribution.Simple.GHC.EnvironmentParser\r\n Distribution.Simple.GHC.Internal\r\n Distribution.Simple.GHC.ImplInfo\r\n Distribution.ZinzaPrelude\r\n Paths_Cabal\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n LambdaCase\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/QuickCheck.nix index 31390ca93b..62e36aa8b6 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/QuickCheck.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/QuickCheck.nix @@ -21,99 +21,99 @@ synopsis = "Automatic testing of Haskell programs"; description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((((((([ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - ] ++ [ + ] ++ [ (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]) ++ (pkgs.lib).optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ (pkgs.lib).optionals (compiler.isGhc && true) [ + ]) ++ pkgs.lib.optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ pkgs.lib.optionals (compiler.isGhc && true) [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ (pkgs.lib).optionals (compiler.isUhc && true) [ + ]) ++ pkgs.lib.optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ pkgs.lib.optionals (compiler.isUhc && true) [ (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) - ]; + ]; buildable = true; - }; + }; tests = { "test-quickcheck" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gcoarbitrary" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-generators" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gshrink" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-terminal" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-monadfix" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-split" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "test-quickcheck-misc" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; - }); - }) // { + }); + }) // { package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/clock.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/clock.nix index de66c1339a..1db6e2d90d 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/clock.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/clock.nix @@ -11,22 +11,22 @@ flags = { llvm = false; }; package = { specVersion = "1.10"; - identifier = { name = "clock"; version = "0.8.3"; }; + identifier = { name = "clock"; version = "0.8.4"; }; license = "BSD-3-Clause"; - copyright = "Copyright © Cetin Sert 2009-2016, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; - maintainer = "Cetin Sert , Corsis Research"; - author = "Cetin Sert , Corsis Research"; + copyright = "Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; + maintainer = "Cetin Sert , Elefunc, Inc."; + author = "Cetin Sert , Elefunc, Inc."; homepage = "https://github.com/corsis/clock"; url = ""; synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -34,26 +34,26 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/clock-0.8.3.tar.gz"; - sha256 = "845ce5db4c98cefd517323e005f87effceff886987305e421c4ef616dc0505d1"; - }); - }) // { - package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.3\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2016, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Corsis Research\nmaintainer: Cetin Sert , Corsis Research\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.2.1\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: git://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; + sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/directory.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/directory.nix index b39c9662f1..a93c7eb928 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/directory.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/directory.nix @@ -21,18 +21,18 @@ synopsis = "Platform-agnostic library for filesystem operations"; description = "This library provides a basic set of operations for manipulating files and\ndirectories in a portable way."; buildType = "Configure"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."time" or (errorHandler.buildDepError "time")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - ] ++ (if system.isWindows + ] ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -40,18 +40,18 @@ (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ] ++ (if system.isWindows + ] ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/directory-1.3.8.1.tar.gz"; sha256 = "bd8253197587d32d4553070d2de89d3817176860932b0e9ab7bb7ba3759d8e9c"; - }); - }) // { - package-description-override = "cabal-version: 2.2\nname: directory\nversion: 1.3.8.1\nlicense: BSD-3-Clause\nlicense-file: LICENSE\nmaintainer: libraries@haskell.org\nbug-reports: https://github.com/haskell/directory/issues\nsynopsis: Platform-agnostic library for filesystem operations\ndescription:\n This library provides a basic set of operations for manipulating files and\n directories in a portable way.\ncategory: System\nbuild-type: Configure\ntested-with: GHC == 8.6.5 || == 8.10.7 || == 9.0.2 || == 9.2.4 || == 9.4.3\n\nextra-tmp-files:\n autom4te.cache\n config.log\n config.status\n HsDirectoryConfig.h\n\nextra-source-files:\n HsDirectoryConfig.h.in\n README.md\n System/Directory/Internal/*.h\n changelog.md\n configure\n configure.ac\n directory.buildinfo\n tests/*.hs\n tests/util.inl\n\nsource-repository head\n type: git\n location: https://github.com/haskell/directory\n\nLibrary\n default-language: Haskell2010\n other-extensions: CApiFFI, CPP\n\n exposed-modules:\n System.Directory\n System.Directory.OsPath\n System.Directory.Internal\n System.Directory.Internal.Prelude\n other-modules:\n System.Directory.Internal.C_utimensat\n System.Directory.Internal.Common\n System.Directory.Internal.Config\n System.Directory.Internal.Posix\n System.Directory.Internal.Windows\n\n include-dirs: .\n\n build-depends:\n base >= 4.11.0 && < 4.19,\n time >= 1.8.0 && < 1.13,\n filepath >= 1.4.100 && < 1.5\n if os(windows)\n build-depends: Win32 >= 2.13.3 && < 2.14\n else\n build-depends: unix >= 2.8.0 && < 2.9\n\n ghc-options: -Wall\n\ntest-suite test\n default-language: Haskell2010\n other-extensions: BangPatterns, CPP\n default-extensions: OverloadedStrings\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n build-depends: base, directory, filepath, time\n if os(windows)\n build-depends: Win32\n else\n build-depends: unix\n other-modules:\n TestUtils\n Util\n -- test-modules-begin\n CanonicalizePath\n CopyFile001\n CopyFile002\n CopyFileWithMetadata\n CreateDirectory001\n CreateDirectoryIfMissing001\n CurrentDirectory001\n Directory001\n DoesDirectoryExist001\n DoesPathExist\n FileTime\n FindFile001\n GetDirContents001\n GetDirContents002\n GetFileSize\n GetHomeDirectory001\n GetHomeDirectory002\n GetPermissions001\n LongPaths\n MakeAbsolute\n MinimizeNameConflicts\n PathIsSymbolicLink\n RemoveDirectoryRecursive001\n RemovePathForcibly\n RenameDirectory\n RenameFile001\n RenamePath\n Simplify\n T8482\n WithCurrentDirectory\n Xdg\n -- test-modules-end\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "cabal-version: 2.2\r\nname: directory\r\nversion: 1.3.8.1\r\nx-revision: 1\r\nlicense: BSD-3-Clause\r\nlicense-file: LICENSE\r\nmaintainer: libraries@haskell.org\r\nbug-reports: https://github.com/haskell/directory/issues\r\nsynopsis: Platform-agnostic library for filesystem operations\r\ndescription:\r\n This library provides a basic set of operations for manipulating files and\r\n directories in a portable way.\r\ncategory: System\r\nbuild-type: Configure\r\ntested-with: GHC == 8.6.5 || == 8.10.7 || == 9.0.2 || == 9.2.4 || == 9.4.3\r\n\r\nextra-tmp-files:\r\n autom4te.cache\r\n config.log\r\n config.status\r\n HsDirectoryConfig.h\r\n\r\nextra-source-files:\r\n HsDirectoryConfig.h.in\r\n README.md\r\n System/Directory/Internal/*.h\r\n changelog.md\r\n configure\r\n configure.ac\r\n directory.buildinfo\r\n tests/*.hs\r\n tests/util.inl\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/directory\r\n\r\nLibrary\r\n default-language: Haskell2010\r\n other-extensions: CApiFFI, CPP\r\n\r\n exposed-modules:\r\n System.Directory\r\n System.Directory.OsPath\r\n System.Directory.Internal\r\n System.Directory.Internal.Prelude\r\n other-modules:\r\n System.Directory.Internal.C_utimensat\r\n System.Directory.Internal.Common\r\n System.Directory.Internal.Config\r\n System.Directory.Internal.Posix\r\n System.Directory.Internal.Windows\r\n\r\n include-dirs: .\r\n\r\n build-depends:\r\n base >= 4.11.0 && < 4.20,\r\n time >= 1.8.0 && < 1.13,\r\n filepath >= 1.4.100 && < 1.5\r\n if os(windows)\r\n build-depends: Win32 >= 2.13.3 && < 2.14\r\n else\r\n build-depends: unix >= 2.8.0 && < 2.9\r\n\r\n ghc-options: -Wall\r\n\r\ntest-suite test\r\n default-language: Haskell2010\r\n other-extensions: BangPatterns, CPP\r\n default-extensions: OverloadedStrings\r\n ghc-options: -Wall\r\n hs-source-dirs: tests\r\n main-is: Main.hs\r\n type: exitcode-stdio-1.0\r\n build-depends: base, directory, filepath, time\r\n if os(windows)\r\n build-depends: Win32\r\n else\r\n build-depends: unix\r\n other-modules:\r\n TestUtils\r\n Util\r\n -- test-modules-begin\r\n CanonicalizePath\r\n CopyFile001\r\n CopyFile002\r\n CopyFileWithMetadata\r\n CreateDirectory001\r\n CreateDirectoryIfMissing001\r\n CurrentDirectory001\r\n Directory001\r\n DoesDirectoryExist001\r\n DoesPathExist\r\n FileTime\r\n FindFile001\r\n GetDirContents001\r\n GetDirContents002\r\n GetFileSize\r\n GetHomeDirectory001\r\n GetHomeDirectory002\r\n GetPermissions001\r\n LongPaths\r\n MakeAbsolute\r\n MinimizeNameConflicts\r\n PathIsSymbolicLink\r\n RemoveDirectoryRecursive001\r\n RemovePathForcibly\r\n RenameDirectory\r\n RenameFile001\r\n RenamePath\r\n Simplify\r\n T8482\r\n WithCurrentDirectory\r\n Xdg\r\n -- test-modules-end\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/exceptions.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/exceptions.nix index 6fafed81fe..6c5da3df95 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/exceptions.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/exceptions.nix @@ -21,7 +21,7 @@ synopsis = "Extensible optionally-pure exceptions"; description = "Extensible optionally-pure exceptions."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ([ @@ -29,16 +29,16 @@ (hsPkgs."stm" or (errorHandler.buildDepError "stm")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "8.0")) (hsPkgs."fail" or (errorHandler.buildDepError "fail"))) ++ (if flags.transformers-0-4 + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "8.0")) (hsPkgs."fail" or (errorHandler.buildDepError "fail"))) ++ (if flags.transformers-0-4 then [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ] + ] else [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) - ]); + ]); buildable = true; - }; + }; tests = { "exceptions-tests" = { depends = [ @@ -51,23 +51,23 @@ (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (if flags.transformers-0-4 + ] ++ (if flags.transformers-0-4 then [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ] + ] else [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) - ]); + ]); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/exceptions-0.10.7.tar.gz"; sha256 = "9a42ade4c8b53d8da5350e8e0e2929f4ef128c4b8591b120656455310b546049"; - }); - }) // { + }); + }) // { package-description-override = "name: exceptions\r\ncategory: Control, Exceptions, Monad\r\nversion: 0.10.7\r\nx-revision: 1\r\ncabal-version: >= 1.10\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Edward A. Kmett\r\nmaintainer: Edward A. Kmett \r\nstability: provisional\r\nhomepage: http://github.com/ekmett/exceptions/\r\nbug-reports: http://github.com/ekmett/exceptions/issues\r\ncopyright: Copyright (C) 2013-2015 Edward A. Kmett\r\n Copyright (C) 2012 Google Inc.\r\nbuild-type: Simple\r\ntested-with: GHC == 7.4.2\r\n , GHC == 7.6.3\r\n , GHC == 7.8.4\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.4\r\n , GHC == 8.10.7\r\n , GHC == 9.0.2\r\n , GHC == 9.2.2\r\nsynopsis: Extensible optionally-pure exceptions\r\ndescription: Extensible optionally-pure exceptions.\r\n\r\nextra-source-files:\r\n .ghci\r\n .gitignore\r\n .vim.custom\r\n AUTHORS.markdown\r\n README.markdown\r\n CHANGELOG.markdown\r\n\r\nsource-repository head\r\n type: git\r\n location: git://github.com/ekmett/exceptions.git\r\n\r\nflag transformers-0-4\r\n description: Use @transformers-0.4@ or later.\r\n default: True\r\n\r\nlibrary\r\n build-depends:\r\n base >= 4.5 && < 5,\r\n stm >= 2.2 && < 3,\r\n template-haskell >= 2.7 && < 2.21,\r\n mtl >= 2.0 && < 2.4\r\n\r\n if !impl(ghc >= 8.0)\r\n build-depends: fail == 4.9.*\r\n\r\n if flag(transformers-0-4)\r\n build-depends:\r\n transformers >= 0.4 && < 0.7\r\n else\r\n build-depends:\r\n transformers >= 0.2 && < 0.4,\r\n transformers-compat >= 0.3 && < 0.8\r\n\r\n exposed-modules:\r\n Control.Monad.Catch\r\n Control.Monad.Catch.Pure\r\n\r\n ghc-options: -Wall -fwarn-tabs -O2\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n\r\ntest-suite exceptions-tests\r\n main-is: Tests.hs\r\n other-modules: Control.Monad.Catch.Tests\r\n hs-source-dirs: tests\r\n ghc-options: -Wall -fwarn-tabs\r\n default-language: Haskell2010\r\n type: exitcode-stdio-1.0\r\n build-depends:\r\n base,\r\n exceptions,\r\n stm,\r\n template-haskell,\r\n mtl >= 2.0,\r\n test-framework >= 0.8 && < 0.9,\r\n test-framework-hunit >= 0.3 && < 0.4,\r\n test-framework-quickcheck2 >= 0.3 && < 0.4,\r\n QuickCheck >= 2.5 && < 2.15\r\n\r\n if flag(transformers-0-4)\r\n build-depends:\r\n transformers >= 0.4 && < 0.7\r\n else\r\n build-depends:\r\n transformers >= 0.2 && < 0.4,\r\n transformers-compat >= 0.3 && < 0.8\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/extra.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/extra.nix index 450be82c4b..41668cf6bc 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/extra.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/extra.nix @@ -21,7 +21,7 @@ synopsis = "Extra functions I use."; description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -31,9 +31,9 @@ (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; tests = { "extra-test" = { depends = [ @@ -43,16 +43,16 @@ (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/filepath.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/filepath.nix index 3aebe84b7f..c8384c1597 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/filepath.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/filepath.nix @@ -11,7 +11,7 @@ flags = { cpphs = false; }; package = { specVersion = "2.2"; - identifier = { name = "filepath"; version = "1.4.100.3"; }; + identifier = { name = "filepath"; version = "1.4.100.4"; }; license = "BSD-3-Clause"; copyright = "Neil Mitchell 2005-2020, Julain Ospald 2021-2022"; maintainer = "Julian Ospald "; @@ -21,7 +21,7 @@ synopsis = "Library for manipulating FilePaths in a cross platform way."; description = "This package provides functionality for manipulating @FilePath@ values, and is shipped with . It provides two variants for filepaths:\n\n1. legacy filepaths: @type FilePath = String@\n\n2. operating system abstracted filepaths (@OsPath@): internally unpinned @ShortByteString@ (platform-dependent encoding)\n\nIt is recommended to use @OsPath@ when possible, because it is more correct.\n\nFor each variant there are three main modules:\n\n* \"System.FilePath.Posix\" / \"System.OsPath.Posix\" manipulates POSIX\\/Linux style @FilePath@ values (with @\\/@ as the path separator).\n\n* \"System.FilePath.Windows\" / \"System.OsPath.Windows\" manipulates Windows style @FilePath@ values (with either @\\\\@ or @\\/@ as the path separator, and deals with drives).\n\n* \"System.FilePath\" / \"System.OsPath\" for dealing with current platform-specific filepaths\n\n\"System.OsString\" is like \"System.OsPath\", but more general purpose. Refer to the documentation of\nthose modules for more information.\n\nAn introduction into the new API can be found in this\n.\nCode examples for the new API can be found ."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -30,10 +30,10 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]; - build-tools = (pkgs.lib).optional (flags.cpphs) (hsPkgs.buildPackages.cpphs.components.exes.cpphs or (pkgs.buildPackages.cpphs or (errorHandler.buildToolDepError "cpphs:cpphs"))); + ]; + build-tools = pkgs.lib.optional (flags.cpphs) (hsPkgs.buildPackages.cpphs.components.exes.cpphs or (pkgs.buildPackages.cpphs or (errorHandler.buildToolDepError "cpphs:cpphs"))); buildable = true; - }; + }; tests = { "filepath-tests" = { depends = [ @@ -41,39 +41,39 @@ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "filepath-equivalent-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "bytestring-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "abstract-filepath" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - (hsPkgs."checkers" or (errorHandler.buildDepError "checkers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + (hsPkgs."quickcheck-classes-base" or (errorHandler.buildDepError "quickcheck-classes-base")) + ]; buildable = true; - }; }; + }; benchmarks = { "bench-filepath" = { depends = [ @@ -81,16 +81,17 @@ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - ]; + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/filepath-1.4.100.3.tar.gz"; - sha256 = "ed1d11173f5052461cd1df58b5ef4abbfa1803ad2b237da7ddb7c7d64e017de2"; - }); - }) // { - package-description-override = "cabal-version: 2.2\r\nname: filepath\r\nversion: 1.4.100.3\r\nx-revision: 1\r\n\r\n-- NOTE: Don't forget to update ./changelog.md\r\nlicense: BSD-3-Clause\r\nlicense-file: LICENSE\r\nauthor: Neil Mitchell \r\nmaintainer: Julian Ospald \r\ncopyright: Neil Mitchell 2005-2020, Julain Ospald 2021-2022\r\nbug-reports: https://github.com/haskell/filepath/issues\r\nhomepage:\r\n https://github.com/haskell/filepath/blob/master/README.md\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nsynopsis: Library for manipulating FilePaths in a cross platform way.\r\ntested-with:\r\n GHC ==8.0.2\r\n || ==8.2.2\r\n || ==8.4.4\r\n || ==8.6.5\r\n || ==8.8.4\r\n || ==8.10.7\r\n || ==9.0.2\r\n || ==9.2.3\r\n\r\ndescription:\r\n This package provides functionality for manipulating @FilePath@ values, and is shipped with . It provides two variants for filepaths:\r\n .\r\n 1. legacy filepaths: @type FilePath = String@\r\n .\r\n 2. operating system abstracted filepaths (@OsPath@): internally unpinned @ShortByteString@ (platform-dependent encoding)\r\n .\r\n It is recommended to use @OsPath@ when possible, because it is more correct.\r\n .\r\n For each variant there are three main modules:\r\n .\r\n * \"System.FilePath.Posix\" / \"System.OsPath.Posix\" manipulates POSIX\\/Linux style @FilePath@ values (with @\\/@ as the path separator).\r\n .\r\n * \"System.FilePath.Windows\" / \"System.OsPath.Windows\" manipulates Windows style @FilePath@ values (with either @\\\\@ or @\\/@ as the path separator, and deals with drives).\r\n .\r\n * \"System.FilePath\" / \"System.OsPath\" for dealing with current platform-specific filepaths\r\n .\r\n \"System.OsString\" is like \"System.OsPath\", but more general purpose. Refer to the documentation of\r\n those modules for more information.\r\n .\r\n An introduction into the new API can be found in this\r\n .\r\n Code examples for the new API can be found .\r\n\r\nextra-source-files:\r\n Generate.hs\r\n Makefile\r\n System/FilePath/Internal.hs\r\n System/OsPath/Common.hs\r\n System/OsString/Common.hs\r\n tests/bytestring-tests/Properties/Common.hs\r\n\r\nextra-doc-files:\r\n changelog.md\r\n HACKING.md\r\n README.md\r\n\r\nflag cpphs\r\n description: Use cpphs (fixes haddock source links)\r\n default: False\r\n manual: True\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/filepath\r\n\r\nlibrary\r\n exposed-modules:\r\n System.FilePath\r\n System.FilePath.Posix\r\n System.FilePath.Windows\r\n System.OsPath\r\n System.OsPath.Data.ByteString.Short\r\n System.OsPath.Data.ByteString.Short.Internal\r\n System.OsPath.Data.ByteString.Short.Word16\r\n System.OsPath.Encoding\r\n System.OsPath.Encoding.Internal\r\n System.OsPath.Internal\r\n System.OsPath.Posix\r\n System.OsPath.Posix.Internal\r\n System.OsPath.Types\r\n System.OsPath.Windows\r\n System.OsPath.Windows.Internal\r\n System.OsString\r\n System.OsString.Internal\r\n System.OsString.Internal.Types\r\n System.OsString.Posix\r\n System.OsString.Windows\r\n\r\n other-extensions:\r\n CPP\r\n PatternGuards\r\n\r\n if impl(ghc >=7.2)\r\n other-extensions: Safe\r\n\r\n default-language: Haskell2010\r\n build-depends:\r\n , base >=4.9 && <4.20\r\n , bytestring >=0.11.3.0\r\n , deepseq\r\n , exceptions\r\n , template-haskell\r\n\r\n ghc-options: -Wall\r\n\r\n if flag(cpphs)\r\n ghc-options: -pgmPcpphs -optP--cpp\r\n build-tool-depends: cpphs:cpphs -any\r\n\r\ntest-suite filepath-tests\r\n type: exitcode-stdio-1.0\r\n main-is: Test.hs\r\n hs-source-dirs: tests tests/filepath-tests\r\n other-modules:\r\n TestGen\r\n TestUtil\r\n\r\n build-depends:\r\n , base\r\n , bytestring >=0.11.3.0\r\n , filepath\r\n , QuickCheck >=2.7 && <2.15\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n\r\ntest-suite filepath-equivalent-tests\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n type: exitcode-stdio-1.0\r\n main-is: TestEquiv.hs\r\n hs-source-dirs: tests tests/filepath-equivalent-tests\r\n other-modules:\r\n Legacy.System.FilePath\r\n Legacy.System.FilePath.Posix\r\n Legacy.System.FilePath.Windows\r\n TestUtil\r\n\r\n build-depends:\r\n , base\r\n , bytestring >=0.11.3.0\r\n , filepath\r\n , QuickCheck >=2.7 && <2.15\r\n\r\ntest-suite bytestring-tests\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: tests tests/bytestring-tests\r\n other-modules:\r\n Properties.ShortByteString\r\n Properties.ShortByteString.Word16\r\n TestUtil\r\n\r\n build-depends:\r\n , base\r\n , bytestring >=0.11.3.0\r\n , filepath\r\n , QuickCheck >=2.7 && <2.15\r\n\r\ntest-suite abstract-filepath\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n type: exitcode-stdio-1.0\r\n main-is: Test.hs\r\n hs-source-dirs: tests tests/abstract-filepath\r\n other-modules:\r\n Arbitrary\r\n EncodingSpec\r\n OsPathSpec\r\n TestUtil\r\n\r\n build-depends:\r\n , base\r\n , bytestring >=0.11.3.0\r\n , checkers ^>=0.5.6\r\n , deepseq\r\n , filepath\r\n , QuickCheck >=2.7 && <2.15\r\n\r\nbenchmark bench-filepath\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n type: exitcode-stdio-1.0\r\n main-is: BenchFilePath.hs\r\n hs-source-dirs: bench\r\n other-modules: TastyBench\r\n build-depends:\r\n , base\r\n , bytestring >=0.11.3.0\r\n , deepseq\r\n , filepath\r\n\r\n if impl(ghc >=8.10)\r\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\r\n\r\n else\r\n ghc-options: -with-rtsopts=-A32m\r\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/filepath-1.4.100.4.tar.gz"; + sha256 = "82876250347c2fdf0f9de5448ce44f02539f37951b671d9a30719a6c4f96e9ad"; + }); + }) // { + package-description-override = "cabal-version: 2.2\nname: filepath\nversion: 1.4.100.4\n\n-- NOTE: Don't forget to update ./changelog.md\nlicense: BSD-3-Clause\nlicense-file: LICENSE\nauthor: Neil Mitchell \nmaintainer: Julian Ospald \ncopyright: Neil Mitchell 2005-2020, Julain Ospald 2021-2022\nbug-reports: https://github.com/haskell/filepath/issues\nhomepage:\n https://github.com/haskell/filepath/blob/master/README.md\n\ncategory: System\nbuild-type: Simple\nsynopsis: Library for manipulating FilePaths in a cross platform way.\ntested-with:\n GHC ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.7\n || ==9.0.2\n || ==9.2.3\n\ndescription:\n This package provides functionality for manipulating @FilePath@ values, and is shipped with . It provides two variants for filepaths:\n .\n 1. legacy filepaths: @type FilePath = String@\n .\n 2. operating system abstracted filepaths (@OsPath@): internally unpinned @ShortByteString@ (platform-dependent encoding)\n .\n It is recommended to use @OsPath@ when possible, because it is more correct.\n .\n For each variant there are three main modules:\n .\n * \"System.FilePath.Posix\" / \"System.OsPath.Posix\" manipulates POSIX\\/Linux style @FilePath@ values (with @\\/@ as the path separator).\n .\n * \"System.FilePath.Windows\" / \"System.OsPath.Windows\" manipulates Windows style @FilePath@ values (with either @\\\\@ or @\\/@ as the path separator, and deals with drives).\n .\n * \"System.FilePath\" / \"System.OsPath\" for dealing with current platform-specific filepaths\n .\n \"System.OsString\" is like \"System.OsPath\", but more general purpose. Refer to the documentation of\n those modules for more information.\n .\n An introduction into the new API can be found in this\n .\n Code examples for the new API can be found .\n\nextra-source-files:\n Generate.hs\n Makefile\n System/FilePath/Internal.hs\n System/OsPath/Common.hs\n System/OsString/Common.hs\n tests/bytestring-tests/Properties/Common.hs\n\nextra-doc-files:\n changelog.md\n HACKING.md\n README.md\n\nflag cpphs\n description: Use cpphs (fixes haddock source links)\n default: False\n manual: True\n\nsource-repository head\n type: git\n location: https://github.com/haskell/filepath\n\nlibrary\n exposed-modules:\n System.FilePath\n System.FilePath.Posix\n System.FilePath.Windows\n System.OsPath\n System.OsPath.Data.ByteString.Short\n System.OsPath.Data.ByteString.Short.Internal\n System.OsPath.Data.ByteString.Short.Word16\n System.OsPath.Encoding\n System.OsPath.Encoding.Internal\n System.OsPath.Internal\n System.OsPath.Posix\n System.OsPath.Posix.Internal\n System.OsPath.Types\n System.OsPath.Windows\n System.OsPath.Windows.Internal\n System.OsString\n System.OsString.Internal\n System.OsString.Internal.Types\n System.OsString.Posix\n System.OsString.Windows\n\n other-extensions:\n CPP\n PatternGuards\n\n if impl(ghc >=7.2)\n other-extensions: Safe\n\n default-language: Haskell2010\n build-depends:\n , base >=4.9 && <4.20\n , bytestring >=0.11.3.0\n , deepseq\n , exceptions\n , template-haskell\n\n ghc-options: -Wall\n\n if flag(cpphs)\n ghc-options: -pgmPcpphs -optP--cpp\n build-tool-depends: cpphs:cpphs -any\n\ntest-suite filepath-tests\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: tests tests/filepath-tests\n other-modules:\n TestGen\n TestUtil\n\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , filepath\n , QuickCheck >=2.7 && <2.15\n\n default-language: Haskell2010\n ghc-options: -Wall\n\ntest-suite filepath-equivalent-tests\n default-language: Haskell2010\n ghc-options: -Wall\n type: exitcode-stdio-1.0\n main-is: TestEquiv.hs\n hs-source-dirs: tests tests/filepath-equivalent-tests\n other-modules:\n Legacy.System.FilePath\n Legacy.System.FilePath.Posix\n Legacy.System.FilePath.Windows\n TestUtil\n\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , filepath\n , QuickCheck >=2.7 && <2.15\n\ntest-suite bytestring-tests\n default-language: Haskell2010\n ghc-options: -Wall\n type: exitcode-stdio-1.0\n main-is: Main.hs\n hs-source-dirs: tests tests/bytestring-tests\n other-modules:\n Properties.ShortByteString\n Properties.ShortByteString.Word16\n TestUtil\n\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , filepath\n , QuickCheck >=2.7 && <2.15\n\ntest-suite abstract-filepath\n default-language: Haskell2010\n ghc-options: -Wall\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: tests tests/abstract-filepath\n other-modules:\n Arbitrary\n EncodingSpec\n OsPathSpec\n TestUtil\n\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , deepseq\n , filepath\n , QuickCheck >=2.7 && <2.15\n , quickcheck-classes-base ^>=0.6.2\n\nbenchmark bench-filepath\n default-language: Haskell2010\n ghc-options: -Wall\n type: exitcode-stdio-1.0\n main-is: BenchFilePath.hs\n hs-source-dirs: bench\n build-depends:\n , base\n , bytestring >=0.11.3.0\n , deepseq\n , filepath\n , tasty-bench\n\n ghc-options: -with-rtsopts=-A32m\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/filepattern.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/filepattern.nix index 13bbd09e88..385c502003 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/filepattern.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/filepattern.nix @@ -21,7 +21,7 @@ synopsis = "File path glob-like matching"; description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - ]; + ]; buildable = true; - }; + }; tests = { "filepattern-test" = { depends = [ @@ -41,16 +41,16 @@ (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/hashable.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/hashable.nix index 288fdf7407..4b125fa0bc 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/hashable.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/hashable.nix @@ -11,7 +11,7 @@ flags = { integer-gmp = true; random-initial-seed = false; }; package = { specVersion = "1.12"; - identifier = { name = "hashable"; version = "1.4.2.0"; }; + identifier = { name = "hashable"; version = "1.4.3.0"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "Oleg Grenrus "; @@ -19,9 +19,9 @@ homepage = "http://github.com/haskell-unordered-containers/hashable"; url = ""; synopsis = "A class for types that can be converted to a hash value"; - description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values."; + description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; buildType = "Simple"; - }; + }; components = { "library" = { depends = (([ @@ -32,19 +32,19 @@ (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && (compiler.version).ge "9" + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && compiler.version.ge "9" then [ (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) else if flags.integer-gmp then [ (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) - ] + ] else [ (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) - ]); + ]); buildable = true; - }; + }; tests = { "hashable-tests" = { depends = [ @@ -59,24 +59,24 @@ (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; "hashable-examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/hashable-1.4.2.0.tar.gz"; - sha256 = "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8"; - }); - }) // { - package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.2.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.5\n || ==9.4.4\n || ==9.6.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.19\n , bytestring >=0.10.8.2 && <0.12\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.5\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.1\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; + sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/heaps.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/heaps.nix index dc77aed1f4..e759e305bf 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/heaps.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/heaps.nix @@ -21,18 +21,18 @@ synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; - }); - }) // { + }); + }) // { package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-dgtable.nix index 0237404c41..40ea1148c6 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-dgtable.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-dgtable.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified jquery.dgtable code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-dgtable-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-flot.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-flot.nix index ba292fc8b2..67980dd7ba 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-flot.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-flot.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified flot code"; description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-flot-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-jquery.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-jquery.nix index 9ecdc931ed..05e54a25ab 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-jquery.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/js-jquery.nix @@ -21,28 +21,28 @@ synopsis = "Obtain minified jQuery code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-jquery-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/mtl.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/mtl.nix index 4a03c79736..36fa049c2d 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/mtl.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/mtl.nix @@ -21,21 +21,21 @@ synopsis = "Monad classes, using functional dependencies"; description = "Monad classes using functional dependencies, with instances\nfor various monad transformers, inspired by the paper\n/Functional Programming with Overloading and Higher-Order Polymorphism/,\nby Mark P Jones, in /Advanced School of Functional Programming/, 1995\n()."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/mtl-2.2.2.tar.gz"; sha256 = "8803f48a8ed33296c3a3272f448198737a287ec31baa901af09e2118c829bef6"; - }); - }) // { + }); + }) // { package-description-override = "name: mtl\nversion: 2.2.2\ncabal-version: >= 1.10\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Andy Gill\nmaintainer: Edward Kmett \ncategory: Control\nsynopsis: Monad classes, using functional dependencies\nhomepage: http://github.com/haskell/mtl\nbug-reports: http://github.com/haskell/mtl/issues\ndescription:\n Monad classes using functional dependencies, with instances\n for various monad transformers, inspired by the paper\n /Functional Programming with Overloading and Higher-Order Polymorphism/,\n by Mark P Jones, in /Advanced School of Functional Programming/, 1995\n ().\nbuild-type: Simple\nextra-source-files: CHANGELOG.markdown, README.markdown\ntested-with:\n GHC==7.0.4,\n GHC==7.2.2,\n GHC==7.4.2,\n GHC==7.6.3,\n GHC==7.8.4,\n GHC==7.10.3,\n GHC==8.0.2,\n GHC==8.2.2,\n GHC==8.4.1\n\nsource-repository head\n type: git\n location: https://github.com/haskell/mtl.git\n\nLibrary\n exposed-modules:\n Control.Monad.Cont\n Control.Monad.Cont.Class\n Control.Monad.Error\n Control.Monad.Error.Class\n Control.Monad.Except\n Control.Monad.Identity\n Control.Monad.List\n Control.Monad.RWS\n Control.Monad.RWS.Class\n Control.Monad.RWS.Lazy\n Control.Monad.RWS.Strict\n Control.Monad.Reader\n Control.Monad.Reader.Class\n Control.Monad.State\n Control.Monad.State.Class\n Control.Monad.State.Lazy\n Control.Monad.State.Strict\n Control.Monad.Trans\n Control.Monad.Writer\n Control.Monad.Writer.Class\n Control.Monad.Writer.Lazy\n Control.Monad.Writer.Strict\n build-depends: base < 5, transformers >= 0.4 && <0.6\n\n default-language: Haskell2010\n other-extensions:\n CPP\n MultiParamTypeClasses\n FunctionalDependencies\n FlexibleInstances\n UndecidableInstances\n\n -- This is a SafeHaskell safeguard (pun intended) to explicitly declare the API contract of `mtl`\n -- GHC versions before 7.4 were hopelessly broken or incapable of SafeHaskell\n if impl(ghc >= 7.4)\n default-extensions: Safe\n\n ghc-options: -Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations\n\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/parsec.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/parsec.nix index c37a105f09..d3ce074a87 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/parsec.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/parsec.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "1.12"; - identifier = { name = "parsec"; version = "3.1.16.1"; }; + identifier = { name = "parsec"; version = "3.1.17.0"; }; license = "BSD-2-Clause"; copyright = ""; maintainer = "Oleg Grenrus , Herbert Valerio Riedel "; @@ -21,7 +21,7 @@ synopsis = "Monadic parser combinators"; description = "Parsec is designed from scratch as an industrial-strength parser\nlibrary. It is simple, safe, well documented (on the package\nhomepage), has extensive libraries, good error messages,\nand is fast. It is defined as a monad transformer that can be\nstacked on arbitrary monads, and it is also parametric in the\ninput stream type.\n\nThe main entry point is the \"Text.Parsec\" module which provides\ndefaults for parsing 'Char'acter data.\n\nThe \"Text.ParserCombinators.Parsec\" module hierarchy contains\nthe legacy @parsec-2@ API and may be removed at some point in\nthe future."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,12 +29,12 @@ (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optionals (!(compiler.isGhc && (compiler.version).ge "8.0")) [ + ] ++ pkgs.lib.optionals (!(compiler.isGhc && compiler.version.ge "8.0")) [ (hsPkgs."fail" or (errorHandler.buildDepError "fail")) (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")) - ]; + ]; buildable = true; - }; + }; tests = { "parsec-tests" = { depends = [ @@ -43,23 +43,42 @@ (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "8.0")) (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "8.0")) (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; + }; "parsec-issue127" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) - ]; + ]; + buildable = true; + }; + "parsec-issue171" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + ]; + buildable = true; + }; + "parsec-issue175" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/parsec-3.1.16.1.tar.gz"; - sha256 = "a41962e5d76ea68658876735b8d5b755e0eff336b079d0a2f439c364755d1246"; - }); - }) // { - package-description-override = "cabal-version: 1.12\nname: parsec\nversion: 3.1.16.1\n\nsynopsis: Monadic parser combinators\ndescription: Parsec is designed from scratch as an industrial-strength parser\n library. It is simple, safe, well documented (on the package\n homepage), has extensive libraries, good error messages,\n and is fast. It is defined as a monad transformer that can be\n stacked on arbitrary monads, and it is also parametric in the\n input stream type.\n .\n The main entry point is the \"Text.Parsec\" module which provides\n defaults for parsing 'Char'acter data.\n .\n The \"Text.ParserCombinators.Parsec\" module hierarchy contains\n the legacy @parsec-2@ API and may be removed at some point in\n the future.\n\nlicense: BSD2\nlicense-file: LICENSE\nauthor: Daan Leijen , Paolo Martini , Antoine Latter \nmaintainer: Oleg Grenrus , Herbert Valerio Riedel \nhomepage: https://github.com/haskell/parsec\nbug-reports: https://github.com/haskell/parsec/issues\ncategory: Parsing\n\nbuild-type: Simple\ntested-with: GHC ==9.2.2 || ==9.0.2 || ==8.10.7 || ==8.8.4 || ==8.6.5 || ==8.4.4 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2\n\nextra-source-files: ChangeLog.md, README.md\n\nsource-repository head\n type: git\n location: https://github.com/haskell/parsec\n\nlibrary\n hs-source-dirs: src\n exposed-modules:\n Text.Parsec\n Text.Parsec.String\n Text.Parsec.ByteString\n Text.Parsec.ByteString.Lazy\n Text.Parsec.Text\n Text.Parsec.Text.Lazy\n Text.Parsec.Pos\n Text.Parsec.Error\n Text.Parsec.Prim\n Text.Parsec.Char\n Text.Parsec.Combinator\n Text.Parsec.Token\n Text.Parsec.Expr\n Text.Parsec.Language\n Text.Parsec.Perm\n Text.ParserCombinators.Parsec\n Text.ParserCombinators.Parsec.Char\n Text.ParserCombinators.Parsec.Combinator\n Text.ParserCombinators.Parsec.Error\n Text.ParserCombinators.Parsec.Expr\n Text.ParserCombinators.Parsec.Language\n Text.ParserCombinators.Parsec.Perm\n Text.ParserCombinators.Parsec.Pos\n Text.ParserCombinators.Parsec.Prim\n Text.ParserCombinators.Parsec.Token\n\n build-depends:\n base >= 4.5.1.0 && < 4.19,\n mtl >= 2.1.3.1 && < 2.4,\n bytestring >= 0.9.2.1 && < 0.12,\n text (>= 1.2.3.0 && < 1.3)\n || (>= 2.0 && < 2.1)\n\n default-language: Haskell2010\n other-extensions:\n CPP\n DeriveDataTypeable\n ExistentialQuantification\n FlexibleContexts\n FlexibleInstances\n FunctionalDependencies\n MultiParamTypeClasses\n PolymorphicComponents\n StandaloneDeriving\n Safe\n Trustworthy\n UndecidableInstances\n\n ghc-options: -Wall\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wno-trustworthy-safe\n if impl(ghc < 8.8)\n ghc-options: -Wnoncanonical-monadfail-instances\n else\n -- provide/emulate `Control.Monad.Fail` and `Semigroup` API for pre-GHC8\n build-depends: fail == 4.9.*, semigroups >= 0.18 && < 0.21\n\n if impl(ghc >= 7.10)\n ghc-options: -fno-warn-trustworthy-safe\n\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n -- https://gitlab.haskell.org/ghc/ghc/-/issues/22728\n -- if impl(ghc >= 9.0)\n -- -- ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite parsec-tests\n type: exitcode-stdio-1.0\n\n hs-source-dirs: test\n main-is: Main.hs\n other-modules:\n Bugs\n Bugs.Bug2\n Bugs.Bug6\n Bugs.Bug9\n Bugs.Bug35\n Features\n Features.Feature80\n Features.Feature150\n Util\n\n build-depends:\n base,\n mtl,\n parsec,\n -- dependencies whose version bounds are not inherited via lib:parsec\n tasty >= 1.4 && < 1.5,\n tasty-hunit >= 0.10 && < 0.11\n\n default-language: Haskell2010\n\n ghc-options: -Wall\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances\n else\n build-depends: semigroups\n\ntest-suite parsec-issue127\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: issue127.hs\n hs-source-dirs: test\n build-depends: base, parsec\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/parsec-3.1.17.0.tar.gz"; + sha256 = "58c500bec1ec3c849c8243ddfd675a5983b17a8e5da55acea6adade5ae179d36"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: parsec\nversion: 3.1.17.0\n\nsynopsis: Monadic parser combinators\ndescription: Parsec is designed from scratch as an industrial-strength parser\n library. It is simple, safe, well documented (on the package\n homepage), has extensive libraries, good error messages,\n and is fast. It is defined as a monad transformer that can be\n stacked on arbitrary monads, and it is also parametric in the\n input stream type.\n .\n The main entry point is the \"Text.Parsec\" module which provides\n defaults for parsing 'Char'acter data.\n .\n The \"Text.ParserCombinators.Parsec\" module hierarchy contains\n the legacy @parsec-2@ API and may be removed at some point in\n the future.\n\nlicense: BSD2\nlicense-file: LICENSE\nauthor: Daan Leijen , Paolo Martini , Antoine Latter \nmaintainer: Oleg Grenrus , Herbert Valerio Riedel \nhomepage: https://github.com/haskell/parsec\nbug-reports: https://github.com/haskell/parsec/issues\ncategory: Parsing\n\nbuild-type: Simple\ntested-with: GHC ==9.8.1 || ==9.6.2 || ==9.4.7 || ==9.2.8 || ==9.0.2 || ==8.10.7 || ==8.8.4 || ==8.6.5 || ==8.4.4 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2\n\nextra-source-files: ChangeLog.md, README.md\n\nsource-repository head\n type: git\n location: https://github.com/haskell/parsec\n\nlibrary\n hs-source-dirs: src\n exposed-modules:\n Text.Parsec\n Text.Parsec.String\n Text.Parsec.ByteString\n Text.Parsec.ByteString.Lazy\n Text.Parsec.Text\n Text.Parsec.Text.Lazy\n Text.Parsec.Pos\n Text.Parsec.Error\n Text.Parsec.Prim\n Text.Parsec.Char\n Text.Parsec.Combinator\n Text.Parsec.Token\n Text.Parsec.Expr\n Text.Parsec.Language\n Text.Parsec.Perm\n Text.ParserCombinators.Parsec\n Text.ParserCombinators.Parsec.Char\n Text.ParserCombinators.Parsec.Combinator\n Text.ParserCombinators.Parsec.Error\n Text.ParserCombinators.Parsec.Expr\n Text.ParserCombinators.Parsec.Language\n Text.ParserCombinators.Parsec.Perm\n Text.ParserCombinators.Parsec.Pos\n Text.ParserCombinators.Parsec.Prim\n Text.ParserCombinators.Parsec.Token\n\n build-depends:\n base >= 4.5.1.0 && < 4.20,\n mtl >= 2.1.3.1 && < 2.4,\n bytestring >= 0.9.2.1 && < 0.13,\n text (>= 1.2.3.0 && < 1.3)\n || (>= 2.0 && < 2.2)\n\n default-language: Haskell2010\n other-extensions:\n CPP\n DeriveDataTypeable\n ExistentialQuantification\n FlexibleContexts\n FlexibleInstances\n FunctionalDependencies\n MultiParamTypeClasses\n PolymorphicComponents\n StandaloneDeriving\n Safe\n Trustworthy\n UndecidableInstances\n\n ghc-options: -Wall\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wno-trustworthy-safe\n if impl(ghc < 8.8)\n ghc-options: -Wnoncanonical-monadfail-instances\n else\n -- provide/emulate `Control.Monad.Fail` and `Semigroup` API for pre-GHC8\n build-depends: fail == 4.9.*, semigroups >= 0.18 && < 0.21\n\n if impl(ghc >= 7.10)\n ghc-options: -fno-warn-trustworthy-safe\n\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n -- https://gitlab.haskell.org/ghc/ghc/-/issues/22728\n -- if impl(ghc >= 9.0)\n -- -- ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite parsec-tests\n type: exitcode-stdio-1.0\n\n hs-source-dirs: test\n main-is: Main.hs\n other-modules:\n Bugs\n Bugs.Bug2\n Bugs.Bug6\n Bugs.Bug9\n Bugs.Bug35\n Features\n Features.Feature80\n Features.Feature150\n Util\n\n build-depends:\n base,\n mtl,\n parsec,\n -- dependencies whose version bounds are not inherited via lib:parsec\n tasty >= 1.4 && < 1.6,\n tasty-hunit >= 0.10 && < 0.11\n\n default-language: Haskell2010\n\n ghc-options: -Wall\n if impl(ghc >= 8.0)\n ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances\n else\n build-depends: semigroups\n\ntest-suite parsec-issue127\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: issue127.hs\n hs-source-dirs: test\n build-depends: base, parsec\n\ntest-suite parsec-issue171\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: issue171.hs\n hs-source-dirs: test\n build-depends: base, tasty, tasty-hunit, deepseq, parsec\n\ntest-suite parsec-issue175\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: issue175.hs\n hs-source-dirs: test\n build-depends: base, tasty, tasty-hunit, parsec\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/primitive.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/primitive.nix index bbc2dd58da..b5683f2c83 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/primitive.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/primitive.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "2.0"; - identifier = { name = "primitive"; version = "0.8.0.0"; }; + identifier = { name = "primitive"; version = "0.9.0.0"; }; license = "BSD-3-Clause"; copyright = "(c) Roman Leshchinskiy 2009-2012"; maintainer = "libraries@haskell.org"; @@ -21,7 +21,7 @@ synopsis = "Primitive memory-related operations"; description = "This package provides various primitive memory-related operations."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); buildable = true; - }; + }; tests = { "test-qc" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -58,16 +58,16 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/primitive-0.8.0.0.tar.gz"; - sha256 = "5553c21b4a789f9b591eed69e598cc58484c274af29250e517b5a8bcc62b995f"; - }); - }) // { - package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.8.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n\n Build-Depends: base >= 4.9 && < 4.19\n , deepseq >= 1.1 && < 1.5\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; + sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; + }); + }) // { + package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/process.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/process.nix index b201a24356..0c615b19be 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/process.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/process.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "1.10"; - identifier = { name = "process"; version = "1.6.17.0"; }; + identifier = { name = "process"; version = "1.6.18.0"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "libraries@haskell.org"; @@ -21,7 +21,7 @@ synopsis = "Process libraries"; description = "This package contains libraries for dealing with system processes.\n\nThe typed-process package is a more recent take on a process API,\nwhich uses this package internally. It features better binary\nsupport, easier concurrency, and a more composable API. You can\nread more about it at\n."; buildType = "Configure"; - }; + }; components = { "library" = { depends = [ @@ -29,16 +29,16 @@ (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ] ++ (if system.isWindows + ] ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] - else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); - libs = (pkgs.lib).optionals (system.isWindows) [ + else pkgs.lib.optional (!system.isJavaScript) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))); + libs = pkgs.lib.optionals (system.isWindows) [ (pkgs."kernel32" or (errorHandler.sysDepError "kernel32")) (pkgs."ole32" or (errorHandler.sysDepError "ole32")) (pkgs."rpcrt4" or (errorHandler.sysDepError "rpcrt4")) - ]; + ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -46,16 +46,16 @@ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."process" or (errorHandler.buildDepError "process")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/process-1.6.17.0.tar.gz"; - sha256 = "4c5c454e0f5c864c79b9fabd850307b26d8ac4037e45a6a39ab87e20b583bf06"; - }); - }) // { - package-description-override = "name: process\nversion: 1.6.17.0\n-- NOTE: Don't forget to update ./changelog.md\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: libraries@haskell.org\nbug-reports: https://github.com/haskell/process/issues\nsynopsis: Process libraries\ncategory: System\nbuild-type: Configure\ncabal-version: >=1.10\ndescription:\n This package contains libraries for dealing with system processes.\n .\n The typed-process package is a more recent take on a process API,\n which uses this package internally. It features better binary\n support, easier concurrency, and a more composable API. You can\n read more about it at\n .\n\nextra-source-files:\n aclocal.m4\n changelog.md\n configure\n configure.ac\n include/HsProcessConfig.h.in\n process.buildinfo\n exes/echo.bat\n exes/subdir/echo.bat\n cbits/posix/common.h\n\nextra-tmp-files:\n autom4te.cache\n config.log\n config.status\n include/HsProcessConfig.h\n\nsource-repository head\n type: git\n location: https://github.com/haskell/process.git\n\nlibrary\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n InterruptibleFFI\n RecordWildCards\n Trustworthy\n Safe\n\n exposed-modules:\n System.Cmd\n System.Process\n System.Process.Internals\n other-modules: System.Process.Common\n if os(windows)\n c-sources:\n cbits/win32/runProcess.c\n other-modules: System.Process.Windows\n build-depends: Win32 >=2.4 && < 2.14\n -- ole32 and rpcrt4 are needed to create GUIDs for unique named pipes\n -- for process.\n extra-libraries: kernel32, ole32, rpcrt4\n cpp-options: -DWINDOWS\n else\n c-sources:\n cbits/posix/runProcess.c\n cbits/posix/fork_exec.c\n cbits/posix/posix_spawn.c\n cbits/posix/find_executable.c\n other-modules: System.Process.Posix\n build-depends: unix >= 2.5 && < 2.9\n\n include-dirs: include\n includes:\n runProcess.h\n install-includes:\n runProcess.h\n processFlags.h\n\n ghc-options: -Wall\n\n build-depends: base >= 4.10 && < 4.19,\n directory >= 1.1 && < 1.4,\n filepath >= 1.2 && < 1.5,\n deepseq >= 1.1 && < 1.5\n\ntest-suite test\n default-language: Haskell2010\n hs-source-dirs: test\n main-is: main.hs\n type: exitcode-stdio-1.0\n -- Add otherwise redundant bounds on base since GHC's build system runs\n -- `cabal check`, which mandates bounds on base.\n build-depends: base >= 4 && < 5\n , bytestring\n , directory\n , process\n ghc-options: -threaded\n -with-rtsopts \"-N\"\n if os(windows)\n cpp-options: -DWINDOWS\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/process-1.6.18.0.tar.gz"; + sha256 = "aa5f4c4fe4974f89f5ab998c7509daa4bda3926cfb06daacd5eba892aad8a37e"; + }); + }) // { + package-description-override = "name: process\nversion: 1.6.18.0\n-- NOTE: Don't forget to update ./changelog.md\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: libraries@haskell.org\nbug-reports: https://github.com/haskell/process/issues\nsynopsis: Process libraries\ncategory: System\nbuild-type: Configure\ncabal-version: >=1.10\ndescription:\n This package contains libraries for dealing with system processes.\n .\n The typed-process package is a more recent take on a process API,\n which uses this package internally. It features better binary\n support, easier concurrency, and a more composable API. You can\n read more about it at\n .\n\nextra-source-files:\n aclocal.m4\n changelog.md\n configure\n configure.ac\n include/HsProcessConfig.h.in\n process.buildinfo\n exes/echo.bat\n exes/subdir/echo.bat\n cbits/posix/common.h\n\nextra-tmp-files:\n autom4te.cache\n config.log\n config.status\n include/HsProcessConfig.h\n\nsource-repository head\n type: git\n location: https://github.com/haskell/process.git\n\nlibrary\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n InterruptibleFFI\n RecordWildCards\n Trustworthy\n Safe\n\n exposed-modules:\n System.Cmd\n System.Process\n System.Process.Internals\n other-modules: System.Process.Common\n if os(windows)\n c-sources:\n cbits/win32/runProcess.c\n other-modules: System.Process.Windows\n build-depends: Win32 >=2.4 && < 2.14\n -- ole32 and rpcrt4 are needed to create GUIDs for unique named pipes\n -- for process.\n extra-libraries: kernel32, ole32, rpcrt4\n cpp-options: -DWINDOWS\n else\n if arch(javascript)\n js-sources:\n jsbits/process.js\n other-modules: System.Process.JavaScript\n else\n c-sources:\n cbits/posix/runProcess.c\n cbits/posix/fork_exec.c\n cbits/posix/posix_spawn.c\n cbits/posix/find_executable.c\n other-modules: System.Process.Posix\n build-depends: unix >= 2.5 && < 2.9\n\n include-dirs: include\n includes:\n runProcess.h\n install-includes:\n runProcess.h\n processFlags.h\n\n ghc-options: -Wall\n\n build-depends: base >= 4.10 && < 4.20,\n directory >= 1.1 && < 1.4,\n filepath >= 1.2 && < 1.5,\n deepseq >= 1.1 && < 1.6\n\ntest-suite test\n default-language: Haskell2010\n hs-source-dirs: test\n main-is: main.hs\n type: exitcode-stdio-1.0\n -- Add otherwise redundant bounds on base since GHC's build system runs\n -- `cabal check`, which mandates bounds on base.\n build-depends: base >= 4 && < 5\n , bytestring\n , directory\n , process\n ghc-options: -threaded\n -with-rtsopts \"-N\"\n if os(windows)\n cpp-options: -DWINDOWS\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/random.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/random.nix index c2f8f753b4..0dbaf8b099 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/random.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/random.nix @@ -21,7 +21,7 @@ synopsis = "Pseudo-random number generation"; description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -30,32 +30,32 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); buildable = true; - }; + }; tests = { "legacy-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]; + ]; buildable = true; - }; + }; "doctests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) - ] ++ (pkgs.lib).optionals (compiler.isGhc && (compiler.version).ge "8.2" && (compiler.isGhc && (compiler.version).lt "8.10")) [ + ] ++ pkgs.lib.optionals (compiler.isGhc && compiler.version.ge "8.2" && (compiler.isGhc && compiler.version.lt "8.10")) [ (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."stm" or (errorHandler.buildDepError "stm")) (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "spec" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -67,18 +67,18 @@ (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; + }; "spec-inspection" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); buildable = true; - }; }; + }; benchmarks = { "legacy-bench" = { depends = [ @@ -87,9 +87,9 @@ (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) (hsPkgs."split" or (errorHandler.buildDepError "split")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ]; + ]; buildable = true; - }; + }; "bench" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -98,16 +98,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; - }); - }) // { - package-description-override = "cabal-version: >=1.10\nname: random\nversion: 1.2.1.1\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: core-libraries-committee@haskell.org\nbug-reports: https://github.com/haskell/random/issues\nsynopsis: Pseudo-random number generation\ndescription:\n This package provides basic pseudo-random number generation, including the\n ability to split random number generators.\n .\n == \"System.Random\": pure pseudo-random number interface\n .\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\n number generator like 'System.Random.StdGen'.\n .\n As an example, here is how you can simulate rolls of a six-sided die using\n 'System.Random.uniformR':\n .\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n >>> let pureGen = mkStdGen 42\n >>> take 10 (rolls pureGen) :: [Word]\n [1,1,3,2,4,5,3,4,6,2]\n .\n See \"System.Random\" for more details.\n .\n == \"System.Random.Stateful\": monadic pseudo-random number interface\n .\n In monadic code, use 'System.Random.Stateful.uniformM' and\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\n pseudo-random numbers with a monadic pseudo-random number generator, or\n using a monadic adapter.\n .\n As an example, here is how you can simulate rolls of a six-sided die using\n 'System.Random.Stateful.uniformRM':\n .\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n >>> let pureGen = mkStdGen 42\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n [1,1,3,2,4,5,3,4,6,2]\n .\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\n the pure pseudo-random number generator @pureGen@ into the\n 'System.Random.Stateful.StatefulGen' context.\n .\n The monadic interface can also be used with existing monadic pseudo-random\n number generators. In this example, we use the one provided in the\n package:\n .\n >>> import System.Random.MWC as MWC\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n >>> monadicGen <- MWC.create\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\n [2,3,6,6,4,4,3,1,5,4]\n .\n See \"System.Random.Stateful\" for more details.\n\ncategory: System\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\ntested-with: GHC == 7.10.2\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.3\n , GHC == 8.4.4\n , GHC == 8.6.3\n , GHC == 8.6.4\n , GHC == 8.6.5\n , GHC == 8.8.1\n , GHC == 8.8.2\n , GHC == 8.10.1\n\nsource-repository head\n type: git\n location: https://github.com/haskell/random.git\n\n\nlibrary\n exposed-modules:\n System.Random\n System.Random.Internal\n System.Random.Stateful\n other-modules:\n System.Random.GFinite\n\n hs-source-dirs: src\n default-language: Haskell2010\n ghc-options:\n -Wall\n if impl(ghc >= 8.0)\n ghc-options:\n -Wincomplete-record-updates -Wincomplete-uni-patterns\n\n build-depends:\n base >=4.8 && <5,\n bytestring >=0.10.4 && <0.12,\n deepseq >=1.1 && <2,\n mtl >=2.2 && <2.4,\n splitmix >=0.1 && <0.2\n if impl(ghc < 8.0)\n build-depends:\n transformers\n\ntest-suite legacy-test\n type: exitcode-stdio-1.0\n main-is: Legacy.hs\n hs-source-dirs: test-legacy\n other-modules:\n T7936\n TestRandomIOs\n TestRandomRs\n Random1283\n RangeTest\n\n default-language: Haskell2010\n ghc-options: -with-rtsopts=-M8M\n if impl(ghc >= 8.0)\n ghc-options:\n -Wno-deprecations\n build-depends:\n base,\n containers >=0.5 && <0.7,\n random\n\ntest-suite doctests\n type: exitcode-stdio-1.0\n main-is: doctests.hs\n hs-source-dirs: test\n default-language: Haskell2010\n build-depends:\n base,\n doctest >=0.15 && <0.21\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\n build-depends:\n mwc-random >=0.13 && <0.16,\n primitive >=0.6 && <0.8,\n random,\n stm,\n unliftio >=0.2 && <0.3,\n vector >= 0.10 && <0.14\n\ntest-suite spec\n type: exitcode-stdio-1.0\n main-is: Spec.hs\n hs-source-dirs: test\n other-modules:\n Spec.Range\n Spec.Run\n Spec.Stateful\n\n default-language: Haskell2010\n ghc-options: -Wall\n build-depends:\n base,\n bytestring,\n random,\n smallcheck >=1.2 && <1.3,\n stm,\n tasty >=1.0 && <1.5,\n tasty-smallcheck >=0.8 && <0.9,\n tasty-hunit >=0.10 && <0.11,\n transformers\n\n-- Note. Fails when compiled with coverage:\n-- https://github.com/haskell/random/issues/107\ntest-suite spec-inspection\n type: exitcode-stdio-1.0\n main-is: Spec.hs\n hs-source-dirs: test-inspection\n build-depends:\n\n default-language: Haskell2010\n ghc-options: -Wall\n build-depends:\n base,\n random,\n tasty >=1.0 && <1.5\n if impl(ghc >= 8.0)\n build-depends:\n tasty-inspection-testing\n other-modules:\n Spec.Inspection\n\nbenchmark legacy-bench\n type: exitcode-stdio-1.0\n main-is: SimpleRNGBench.hs\n hs-source-dirs: bench-legacy\n other-modules: BinSearch\n default-language: Haskell2010\n ghc-options:\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\n if impl(ghc >= 8.0)\n ghc-options:\n -Wno-deprecations\n\n build-depends:\n base,\n random,\n rdtsc,\n split >=0.2 && <0.3,\n time >=1.4 && <1.13\n\nbenchmark bench\n type: exitcode-stdio-1.0\n main-is: Main.hs\n hs-source-dirs: bench\n default-language: Haskell2010\n ghc-options: -Wall -O2\n build-depends:\n base,\n mtl,\n primitive >= 0.7.1,\n random,\n splitmix >=0.1 && <0.2,\n tasty-bench\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/shake.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/shake.nix index e7eb5c6647..d40c2a8bbc 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/shake.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/shake.nix @@ -21,7 +21,7 @@ synopsis = "Build system library, like Make, but more accurate dependencies."; description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((([ @@ -45,15 +45,15 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]; + ]; buildable = true; - }; + }; exes = { "shake" = { depends = (((([ @@ -77,16 +77,16 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; + }; tests = { "shake-test" = { depends = (((([ @@ -111,22 +111,22 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/splitmix.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/splitmix.nix index 7918d356b1..aa0dd88d31 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/splitmix.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/splitmix.nix @@ -11,7 +11,7 @@ flags = { optimised-mixer = false; }; package = { specVersion = "1.10"; - identifier = { name = "splitmix"; version = "0.1.0.4"; }; + identifier = { name = "splitmix"; version = "0.1.0.5"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "Oleg Grenrus "; @@ -21,24 +21,24 @@ synopsis = "Fast Splittable PRNG"; description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ] ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) ((pkgs.lib).optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + ] ++ pkgs.lib.optionals (!(compiler.isGhcjs && true)) (pkgs.lib.optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); buildable = true; - }; + }; tests = { "examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -49,23 +49,23 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi-32" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-dieharder" = { depends = [ (hsPkgs."async" or (errorHandler.buildDepError "async")) @@ -78,27 +78,27 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "splitmix-testu01" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; buildable = if !system.isLinux then false else true; - }; + }; "initialization" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "comparison" = { depends = [ @@ -108,33 +108,32 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) - ]; + ]; buildable = true; - }; + }; "simple-sum" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "range" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ] ++ pkgs.lib.optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/splitmix-0.1.0.4.tar.gz"; - sha256 = "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa"; - }); - }) // { - package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.4\nx-revision: 2\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.5\n || ==9.4.4\n || ==9.6.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.19\n , deepseq >=1.3.0.0 && <1.5\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.6\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , clock >=0.8 && <0.9\n , random\n , splitmix\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.13\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.13\n , bytestring >=0.9.1.8 && <0.12\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.13\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.13\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; + sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/transformers.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/transformers.nix index 7260a74f14..288d680c82 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/transformers.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/transformers.nix @@ -21,20 +21,20 @@ synopsis = "Concrete functor and monad transformers"; description = "A portable library of functor and monad transformers, inspired by\nthe paper\n\n* \\\"Functional Programming with Overloading and Higher-Order\nPolymorphism\\\", by Mark P Jones,\nin /Advanced School of Functional Programming/, 1995\n().\n\nThis package contains:\n\n* the monad transformer class (in \"Control.Monad.Trans.Class\")\n\n* concrete functor and monad transformers, each with associated\noperations and functions to lift operations associated with other\ntransformers.\n\nThe package can be used on its own in portable Haskell code, in\nwhich case operations need to be manually lifted through transformer\nstacks (see \"Control.Monad.Trans.Class\" for some examples).\nAlternatively, it can be used with the non-portable monad classes in\nthe @mtl@ or @monads-tf@ packages, which automatically lift operations\nintroduced by monad transformers through other transformers."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) - ] ++ (pkgs.lib).optional (compiler.isGhc && ((compiler.version).ge "7.2" && (compiler.version).lt "7.5")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + ] ++ pkgs.lib.optional (compiler.isGhc && (compiler.version.ge "7.2" && compiler.version.lt "7.5")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/transformers-0.5.6.2.tar.gz"; sha256 = "b668795d600297e4c8a7fd55a107b9827b2c52c0bc14c5ea0d65e20e6691c66c"; - }); - }) // { + }); + }) // { package-description-override = "name: transformers\nversion: 0.5.6.2\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Andy Gill, Ross Paterson\nmaintainer: Ross Paterson \nbug-reports: http://hub.darcs.net/ross/transformers/issues\ncategory: Control\nsynopsis: Concrete functor and monad transformers\ndescription:\n A portable library of functor and monad transformers, inspired by\n the paper\n .\n * \\\"Functional Programming with Overloading and Higher-Order\n Polymorphism\\\", by Mark P Jones,\n in /Advanced School of Functional Programming/, 1995\n ().\n .\n This package contains:\n .\n * the monad transformer class (in \"Control.Monad.Trans.Class\")\n .\n * concrete functor and monad transformers, each with associated\n operations and functions to lift operations associated with other\n transformers.\n .\n The package can be used on its own in portable Haskell code, in\n which case operations need to be manually lifted through transformer\n stacks (see \"Control.Monad.Trans.Class\" for some examples).\n Alternatively, it can be used with the non-portable monad classes in\n the @mtl@ or @monads-tf@ packages, which automatically lift operations\n introduced by monad transformers through other transformers.\nbuild-type: Simple\nextra-source-files:\n changelog\ncabal-version: >= 1.6\n\nsource-repository head\n type: darcs\n location: http://hub.darcs.net/ross/transformers\n\nlibrary\n build-depends: base >= 2 && < 6\n hs-source-dirs: .\n if !impl(ghc>=7.9)\n -- Data.Functor.Identity was moved into base-4.8.0.0 (GHC 7.10)\n -- see also https://ghc.haskell.org/trac/ghc/ticket/9664\n -- NB: using impl(ghc>=7.9) instead of fragile Cabal flags\n hs-source-dirs: legacy/pre709\n exposed-modules: Data.Functor.Identity\n if !impl(ghc>=7.11)\n -- modules moved into base-4.9.0 (GHC 8.0)\n -- see https://ghc.haskell.org/trac/ghc/ticket/10773\n -- see https://ghc.haskell.org/trac/ghc/ticket/11135\n hs-source-dirs: legacy/pre711\n exposed-modules:\n Control.Monad.IO.Class\n Data.Functor.Classes\n Data.Functor.Compose\n Data.Functor.Product\n Data.Functor.Sum\n if impl(ghc>=7.2 && <7.5)\n -- Prior to GHC 7.5, GHC.Generics lived in ghc-prim\n build-depends: ghc-prim\n exposed-modules:\n Control.Applicative.Backwards\n Control.Applicative.Lift\n Control.Monad.Signatures\n Control.Monad.Trans.Accum\n Control.Monad.Trans.Class\n Control.Monad.Trans.Cont\n Control.Monad.Trans.Except\n Control.Monad.Trans.Error\n Control.Monad.Trans.Identity\n Control.Monad.Trans.List\n Control.Monad.Trans.Maybe\n Control.Monad.Trans.Reader\n Control.Monad.Trans.RWS\n Control.Monad.Trans.RWS.CPS\n Control.Monad.Trans.RWS.Lazy\n Control.Monad.Trans.RWS.Strict\n Control.Monad.Trans.Select\n Control.Monad.Trans.State\n Control.Monad.Trans.State.Lazy\n Control.Monad.Trans.State.Strict\n Control.Monad.Trans.Writer\n Control.Monad.Trans.Writer.CPS\n Control.Monad.Trans.Writer.Lazy\n Control.Monad.Trans.Writer.Strict\n Data.Functor.Constant\n Data.Functor.Reverse\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/unix.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/unix.nix index 791c5fff68..33c865d08a 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/unix.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/unix.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "1.12"; - identifier = { name = "unix"; version = "2.8.1.1"; }; + identifier = { name = "unix"; version = "2.8.3.0"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "Julian Ospald , Viktor Dukhovni , Andrew Lelechenko "; @@ -21,7 +21,7 @@ synopsis = "POSIX functionality"; description = "This package gives you access to the set of operating system\nservices standardised by\n\n(or the IEEE Portable Operating System Interface for Computing\nEnvironments - IEEE Std. 1003.1).\n\nThe package is not supported under Windows."; buildType = "Configure"; - }; + }; components = { "library" = { depends = [ @@ -29,128 +29,140 @@ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ] ++ (pkgs.lib).optional (system.isWindows) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + ] ++ pkgs.lib.optional (system.isWindows) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); buildable = if system.isWindows then false else true; - }; + }; tests = { "unix-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; + ]; buildable = true; - }; + }; "FdReadBuf001" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "ForkProcess01" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "Signals002" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "Signals004" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "Posix004" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "Posix009" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "Posix014" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "T8108" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "ResourceLimit" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "Terminal" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "PutEnv001" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "Semaphore001" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "Semaphore002" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; - buildable = true; - }; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; "SemaphoreInterrupt" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."unix" or (errorHandler.buildDepError "unix")) - ]; + ] ++ pkgs.lib.optional (system.isJavaScript) (hsPkgs."unbuildable" or (errorHandler.buildDepError "unbuildable")); + buildable = if system.isJavaScript then false else true; + }; + "T13660" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."unix" or (errorHandler.buildDepError "unix")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/unix-2.8.1.1.tar.gz"; - sha256 = "cc287659427c80f3598c199387ba7eb7d4cc3270cbb31f75e2f677e879f26384"; - }); - }) // { - package-description-override = "cabal-version: 1.12\nname: unix\nversion: 2.8.1.1\n-- NOTE: Don't forget to update ./changelog.md\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Julian Ospald , Viktor Dukhovni , Andrew Lelechenko \nhomepage: https://github.com/haskell/unix\nbug-reports: https://github.com/haskell/unix/issues\nsynopsis: POSIX functionality\ncategory: System\nbuild-type: Configure\ntested-with: GHC==9.2.4,\n GHC==9.0.2,\n GHC==8.10.7,\n GHC==8.8.4,\n GHC==8.6.5,\n GHC==8.4.4,\n GHC==8.2.2\ndescription:\n This package gives you access to the set of operating system\n services standardised by\n \n (or the IEEE Portable Operating System Interface for Computing\n Environments - IEEE Std. 1003.1).\n .\n The package is not supported under Windows.\n\nextra-source-files:\n changelog.md\n config.guess\n config.sub\n configure\n configure.ac\n include/HsUnix.h\n include/HsUnixConfig.h.in\n install-sh\n unix.buildinfo.in\n\nextra-tmp-files:\n autom4te.cache\n config.log\n config.status\n include/HsUnixConfig.h\n unix.buildinfo\n\nsource-repository head\n type: git\n location: https://github.com/haskell/unix.git\n\nlibrary\n default-language: Haskell2010\n other-extensions:\n CApiFFI\n CPP\n DeriveDataTypeable\n InterruptibleFFI\n NondecreasingIndentation\n RankNTypes\n RecordWildCards\n Safe\n Trustworthy\n\n if os(windows)\n -- This package currently supports neither Cygwin nor MinGW,\n -- therefore os(windows) is effectively not supported.\n build-depends: unbuildable<0\n buildable: False\n\n build-depends:\n base >= 4.10 && < 4.19,\n bytestring >= 0.9.2 && < 0.12,\n filepath >= 1.4.100.0 && < 1.5,\n time >= 1.2 && < 1.13\n\n exposed-modules:\n System.Posix\n System.Posix.ByteString\n System.Posix.PosixString\n\n System.Posix.Error\n System.Posix.Resource\n System.Posix.Time\n System.Posix.Unistd\n System.Posix.Signals\n System.Posix.Signals.Exts\n System.Posix.Semaphore\n System.Posix.SharedMem\n\n System.Posix.User\n System.Posix.User.ByteString\n\n System.Posix.ByteString.FilePath\n System.Posix.PosixPath.FilePath\n\n System.Posix.Directory\n System.Posix.Directory.Internals\n System.Posix.Directory.Fd\n System.Posix.Directory.ByteString\n System.Posix.Directory.PosixPath\n\n System.Posix.DynamicLinker.Module\n System.Posix.DynamicLinker.Module.ByteString\n System.Posix.DynamicLinker.Prim\n System.Posix.DynamicLinker.ByteString\n System.Posix.DynamicLinker\n\n System.Posix.Files\n System.Posix.Files.ByteString\n System.Posix.Files.PosixString\n\n System.Posix.IO\n System.Posix.IO.ByteString\n System.Posix.IO.PosixString\n\n System.Posix.Env\n System.Posix.Env.ByteString\n System.Posix.Env.PosixString\n\n System.Posix.Fcntl\n\n System.Posix.Process\n System.Posix.Process.Internals\n System.Posix.Process.ByteString\n System.Posix.Process.PosixString\n\n System.Posix.Temp\n System.Posix.Temp.ByteString\n System.Posix.Temp.PosixString\n\n System.Posix.Terminal\n System.Posix.Terminal.ByteString\n System.Posix.Terminal.PosixString\n\n other-modules:\n System.Posix.Directory.Common\n System.Posix.DynamicLinker.Common\n System.Posix.Files.Common\n System.Posix.IO.Common\n System.Posix.Process.Common\n System.Posix.Terminal.Common\n System.Posix.User.Common\n System.Posix.Env.Internal\n\n ghc-options: -Wall\n\n include-dirs: include\n includes:\n HsUnix.h\n execvpe.h\n install-includes:\n HsUnix.h\n execvpe.h\n c-sources:\n cbits/HsUnix.c\n cbits/execvpe.c\n\ntest-suite unix-tests\n hs-source-dirs: tests\n main-is: Test.hs\n other-modules:\n FileStatus\n FileStatusByteString\n Signals001\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, tasty, tasty-hunit, unix\n ghc-options: -Wall -with-rtsopts=-V0\n\ntest-suite FdReadBuf001\n hs-source-dirs: tests\n main-is: FdReadBuf001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n\ntest-suite ForkProcess01\n hs-source-dirs: tests\n main-is: ForkProcess01.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Signals002\n hs-source-dirs: tests\n main-is: Signals002.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Signals004\n hs-source-dirs: tests\n main-is: Signals004.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Posix004\n hs-source-dirs: tests\n main-is: Posix004.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Posix009\n hs-source-dirs: tests\n main-is: Posix009.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -with-rtsopts=-V0\n\ntest-suite Posix014\n hs-source-dirs: tests\n main-is: Posix014.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite T8108\n hs-source-dirs: tests\n main-is: T8108.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite ResourceLimit\n hs-source-dirs: tests\n main-is: ResourceLimit.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty-hunit\n ghc-options: -Wall\n\ntest-suite Terminal\n hs-source-dirs: tests\n main-is: Terminal.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty-hunit\n ghc-options: -Wall\n\ntest-suite PutEnv001\n hs-source-dirs: tests\n main-is: PutEnv001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty, tasty-hunit\n ghc-options: -Wall -with-rtsopts=-V0 -O0\n\ntest-suite Semaphore001\n hs-source-dirs: tests\n main-is: Semaphore001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Semaphore002\n hs-source-dirs: tests\n main-is: Semaphore002.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n\ntest-suite SemaphoreInterrupt\n hs-source-dirs: tests\n main-is: SemaphoreInterrupt.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/unix-2.8.3.0.tar.gz"; + sha256 = "a9dc7868d42ec10e38c4d785eaec7f98d401590d4ebfd8f17ef59da3f18a5dab"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: unix\nversion: 2.8.3.0\n-- NOTE: Don't forget to update ./changelog.md\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Julian Ospald , Viktor Dukhovni , Andrew Lelechenko \nhomepage: https://github.com/haskell/unix\nbug-reports: https://github.com/haskell/unix/issues\nsynopsis: POSIX functionality\ncategory: System\nbuild-type: Configure\ntested-with: GHC==9.6.2,\n GHC==9.4.7,\n GHC==9.2.8,\n GHC==9.0.2,\n GHC==8.10.7,\n GHC==8.8.4,\n GHC==8.6.5\ndescription:\n This package gives you access to the set of operating system\n services standardised by\n \n (or the IEEE Portable Operating System Interface for Computing\n Environments - IEEE Std. 1003.1).\n .\n The package is not supported under Windows.\n\nextra-source-files:\n changelog.md\n config.guess\n config.sub\n configure\n configure.ac\n include/HsUnix.h\n include/HsUnixConfig.h.in\n install-sh\n unix.buildinfo.in\n\nextra-tmp-files:\n autom4te.cache\n config.log\n config.status\n include/HsUnixConfig.h\n unix.buildinfo\n\nsource-repository head\n type: git\n location: https://github.com/haskell/unix.git\n\nlibrary\n default-language: Haskell2010\n other-extensions:\n CApiFFI\n CPP\n DeriveDataTypeable\n InterruptibleFFI\n NondecreasingIndentation\n RankNTypes\n RecordWildCards\n Safe\n Trustworthy\n\n if os(windows)\n -- This package currently supports neither Cygwin nor MinGW,\n -- therefore os(windows) is effectively not supported.\n build-depends: unbuildable<0\n buildable: False\n\n build-depends:\n base >= 4.12.0.0 && < 4.20,\n bytestring >= 0.9.2 && < 0.13,\n filepath >= 1.4.100.0 && < 1.5,\n time >= 1.9.1 && < 1.13\n\n exposed-modules:\n System.Posix\n System.Posix.ByteString\n System.Posix.PosixString\n\n System.Posix.Error\n System.Posix.Resource\n System.Posix.Time\n System.Posix.Unistd\n System.Posix.Signals\n System.Posix.Signals.Exts\n System.Posix.Semaphore\n System.Posix.SharedMem\n\n System.Posix.User\n System.Posix.User.ByteString\n\n System.Posix.ByteString.FilePath\n System.Posix.PosixPath.FilePath\n\n System.Posix.Directory\n System.Posix.Directory.Internals\n System.Posix.Directory.Fd\n System.Posix.Directory.ByteString\n System.Posix.Directory.PosixPath\n\n System.Posix.DynamicLinker.Module\n System.Posix.DynamicLinker.Module.ByteString\n System.Posix.DynamicLinker.Prim\n System.Posix.DynamicLinker.ByteString\n System.Posix.DynamicLinker\n\n System.Posix.Files\n System.Posix.Files.ByteString\n System.Posix.Files.PosixString\n\n System.Posix.IO\n System.Posix.IO.ByteString\n System.Posix.IO.PosixString\n\n System.Posix.Env\n System.Posix.Env.ByteString\n System.Posix.Env.PosixString\n\n System.Posix.Fcntl\n\n System.Posix.Process\n System.Posix.Process.Internals\n System.Posix.Process.ByteString\n System.Posix.Process.PosixString\n\n System.Posix.Temp\n System.Posix.Temp.ByteString\n System.Posix.Temp.PosixString\n\n System.Posix.Terminal\n System.Posix.Terminal.ByteString\n System.Posix.Terminal.PosixString\n\n other-modules:\n System.Posix.Directory.Common\n System.Posix.DynamicLinker.Common\n System.Posix.Files.Common\n System.Posix.IO.Common\n System.Posix.Process.Common\n System.Posix.Terminal.Common\n System.Posix.User.Common\n System.Posix.Env.Internal\n\n ghc-options: -Wall\n\n include-dirs: include\n includes:\n HsUnix.h\n execvpe.h\n install-includes:\n HsUnix.h\n execvpe.h\n\n if !arch(javascript)\n c-sources:\n cbits/HsUnix.c\n cbits/execvpe.c\n\n if arch(javascript)\n js-sources:\n jsbits/time.js\n\ntest-suite unix-tests\n hs-source-dirs: tests\n main-is: Test.hs\n other-modules:\n FileStatus\n FileExtendedStatus\n FileStatusByteString\n Signals001\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, bytestring, filepath, tasty, tasty-hunit, tasty-quickcheck, unix\n ghc-options: -Wall -with-rtsopts=-V0\n\ntest-suite FdReadBuf001\n -- JS: missing \"pipe\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: FdReadBuf001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n\ntest-suite ForkProcess01\n -- JS: missing \"forkProcess\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: ForkProcess01.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Signals002\n -- JS: missing \"raise\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Signals002.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Signals004\n -- JS: missing \"raise\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Signals004.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Posix004\n -- JS: missing \"forkProcess\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Posix004.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Posix009\n -- JS: missing \"rtsTimerSignal\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Posix009.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -with-rtsopts=-V0\n\ntest-suite Posix014\n -- JS: missing \"pipe\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Posix014.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite T8108\n -- JS: missing \"sysconf\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: T8108.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite ResourceLimit\n -- JS: missing \"setrlimit\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: ResourceLimit.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty-hunit\n ghc-options: -Wall\n\ntest-suite Terminal\n -- JS: missing \"openpty\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Terminal.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty-hunit\n ghc-options: -Wall\n\ntest-suite PutEnv001\n -- JS: missing \"performGC\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: PutEnv001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, tasty, tasty-hunit\n ghc-options: -Wall -with-rtsopts=-V0 -O0\n\ntest-suite Semaphore001\n -- JS: missing \"sem_open\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Semaphore001.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall\n\ntest-suite Semaphore002\n -- JS: missing \"sem_open\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: Semaphore002.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n\ntest-suite SemaphoreInterrupt\n -- JS: missing \"sem_open\"\n if arch(javascript)\n build-depends: unbuildable<0\n buildable: False\n\n hs-source-dirs: tests\n main-is: SemaphoreInterrupt.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix\n ghc-options: -Wall -threaded\n\ntest-suite T13660\n hs-source-dirs: tests\n main-is: T13660.hs\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends: base, unix, filepath >= 1.4.100.0 && < 1.5, bytestring\n ghc-options: -Wall\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/unordered-containers.nix index ab6a9d8c44..0aeaccb277 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/unordered-containers.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/unordered-containers.nix @@ -21,7 +21,7 @@ synopsis = "Efficient hashing-based container types"; description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]; + ]; buildable = true; - }; + }; tests = { "unordered-containers-tests" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ @@ -63,16 +63,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; - }); - }) // { - package-description-override = "name: unordered-containers\r\nversion: 0.2.19.1\r\nx-revision: 2\r\nsynopsis: Efficient hashing-based container types\r\ndescription:\r\n Efficient hashing-based container types. The containers have been\r\n optimized for performance critical use, both in terms of large data\r\n quantities and high speed.\r\n .\r\n The declared cost of each operation is either worst-case or\r\n amortized, but remains valid even if structures are shared.\r\n .\r\n /Security/\r\n .\r\n This package currently provides no defenses against hash collision attacks\r\n such as HashDoS.\r\n Users who need to store input from untrusted sources are advised to use\r\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Johan Tibell\r\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\r\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\r\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\r\ncopyright: 2010-2014 Johan Tibell\r\n 2010 Edward Z. Yang\r\ncategory: Data\r\nbuild-type: Simple\r\ncabal-version: >=1.10\r\nextra-source-files: CHANGES.md\r\n\r\ntested-with:\r\n GHC ==9.6.1\r\n || ==9.4.4\r\n || ==9.2.7\r\n || ==9.0.2\r\n || ==8.10.7\r\n || ==8.8.4\r\n || ==8.6.5\r\n || ==8.4.4\r\n || ==8.2.2\r\n\r\nflag debug\r\n description: Enable debug support\r\n default: False\r\n\r\nlibrary\r\n exposed-modules:\r\n Data.HashMap.Internal\r\n Data.HashMap.Internal.Array\r\n Data.HashMap.Internal.List\r\n Data.HashMap.Internal.Strict\r\n Data.HashMap.Lazy\r\n Data.HashMap.Strict\r\n Data.HashSet\r\n Data.HashSet.Internal\r\n\r\n build-depends:\r\n base >= 4.10 && < 5,\r\n deepseq >= 1.4.3,\r\n hashable >= 1.2.5 && < 1.5,\r\n template-haskell < 2.21\r\n\r\n default-language: Haskell2010\r\n\r\n other-extensions:\r\n RoleAnnotations,\r\n UnboxedTuples,\r\n ScopedTypeVariables,\r\n MagicHash,\r\n BangPatterns\r\n\r\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\r\n\r\n -- For dumping the generated code:\r\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\r\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\r\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\r\n\r\n if flag(debug)\r\n cpp-options: -DASSERTS\r\n\r\ntest-suite unordered-containers-tests\r\n hs-source-dirs: tests\r\n main-is: Main.hs\r\n type: exitcode-stdio-1.0\r\n other-modules:\r\n Regressions\r\n Properties\r\n Properties.HashMapLazy\r\n Properties.HashMapStrict\r\n Properties.HashSet\r\n Properties.List\r\n Strictness\r\n\r\n build-depends:\r\n base,\r\n ChasingBottoms,\r\n containers >= 0.5.8,\r\n hashable,\r\n HUnit,\r\n QuickCheck >= 2.4.0.1,\r\n random,\r\n tasty >= 1.4.0.3,\r\n tasty-hunit >= 0.10.0.3,\r\n tasty-quickcheck >= 0.10.1.2,\r\n unordered-containers\r\n\r\n if impl(ghc >= 8.6)\r\n build-depends:\r\n nothunks >= 0.1.3\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n cpp-options: -DASSERTS\r\n\r\nbenchmark benchmarks\r\n hs-source-dirs: benchmarks\r\n main-is: Benchmarks.hs\r\n type: exitcode-stdio-1.0\r\n\r\n other-modules:\r\n Util.ByteString\r\n Util.String\r\n Util.Int\r\n\r\n build-depends:\r\n base,\r\n bytestring >= 0.10.0.0,\r\n containers,\r\n deepseq,\r\n hashable,\r\n hashmap,\r\n mtl,\r\n random,\r\n tasty-bench >= 0.3.1,\r\n unordered-containers\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\r\n if impl(ghc >= 8.10)\r\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\r\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\r\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/utf8-string.nix b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/utf8-string.nix index ac9bde4057..a5ee5272da 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/utf8-string.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/cabal-files/utf8-string.nix @@ -21,31 +21,31 @@ synopsis = "Support for reading and writing UTF8 Strings"; description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "unit-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; - }); - }) // { + }); + }) // { package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc94/hadrian/default.nix b/materialized/ghc962/hadrian-ghc94/hadrian/default.nix index c1623558f7..5743e4c98e 100644 --- a/materialized/ghc962/hadrian-ghc94/hadrian/default.nix +++ b/materialized/ghc962/hadrian-ghc94/hadrian/default.nix @@ -2,81 +2,81 @@ pkgs = hackage: { packages = { + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; + clock.revision = import ./cabal-files/clock.nix; + clock.flags.llvm = false; + transformers.revision = import ./cabal-files/transformers.nix; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.0.0".revisions.default; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + unix.revision = import ./cabal-files/unix.nix; + filepattern.revision = import ./cabal-files/filepattern.nix; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.2".revisions.default; + mtl.revision = import ./cabal-files/mtl.nix; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; + heaps.revision = import ./cabal-files/heaps.nix; Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; - bytestring.revision = (((hackage.bytestring)."0.11.4.0").revisions).default; + process.revision = import ./cabal-files/process.nix; + primitive.revision = import ./cabal-files/primitive.nix; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; exceptions.revision = import ./cabal-files/exceptions.nix; exceptions.flags.transformers-0-4 = true; - directory.revision = import ./cabal-files/directory.nix; - filepath.revision = import ./cabal-files/filepath.nix; - filepath.flags.cpphs = false; - mtl.revision = import ./cabal-files/mtl.nix; - ghc-bignum.revision = (((hackage.ghc-bignum)."1.3").revisions).default; - ghc-prim.revision = (((hackage.ghc-prim)."0.10.0").revisions).default; parsec.revision = import ./cabal-files/parsec.nix; - js-flot.revision = import ./cabal-files/js-flot.nix; + system-cxx-std-lib.revision = hackage.system-cxx-std-lib."1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; utf8-string.revision = import ./cabal-files/utf8-string.nix; - Cabal.revision = import ./cabal-files/Cabal.nix; - splitmix.revision = import ./cabal-files/splitmix.nix; - splitmix.flags.optimised-mixer = false; - containers.revision = (((hackage.containers)."0.6.7").revisions).default; - clock.revision = import ./cabal-files/clock.nix; - clock.flags.llvm = false; - stm.revision = (((hackage.stm)."2.5.1.0").revisions).default; - heaps.revision = import ./cabal-files/heaps.nix; - base.revision = (((hackage.base)."4.18.0.0").revisions).default; - time.revision = (((hackage.time)."1.12.2").revisions).default; - random.revision = import ./cabal-files/random.nix; - primitive.revision = import ./cabal-files/primitive.nix; - deepseq.revision = (((hackage.deepseq)."1.4.8.1").revisions).default; js-jquery.revision = import ./cabal-files/js-jquery.nix; - js-dgtable.revision = import ./cabal-files/js-dgtable.nix; - rts.revision = (((hackage.rts)."1.0.2").revisions).default; - template-haskell.revision = (((hackage.template-haskell)."2.20.0.0").revisions).default; - binary.revision = (((hackage.binary)."0.8.9.1").revisions).default; - shake.revision = import ./cabal-files/shake.nix; - shake.flags.portable = false; - shake.flags.cloud = false; - shake.flags.embed-files = false; - process.revision = import ./cabal-files/process.nix; - unix.revision = import ./cabal-files/unix.nix; - transformers.revision = import ./cabal-files/transformers.nix; - unordered-containers.revision = import ./cabal-files/unordered-containers.nix; - unordered-containers.flags.debug = false; + text.revision = hackage.text."2.0.2".revisions.default; QuickCheck.revision = import ./cabal-files/QuickCheck.nix; QuickCheck.flags.old-random = false; QuickCheck.flags.templatehaskell = true; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.5.0".revisions.default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.cloud = false; + shake.flags.embed-files = false; + shake.flags.portable = false; + random.revision = import ./cabal-files/random.nix; + bytestring.revision = hackage.bytestring."0.11.4.0".revisions.default; + Cabal.revision = import ./cabal-files/Cabal.nix; + directory.revision = import ./cabal-files/directory.nix; + js-flot.revision = import ./cabal-files/js-flot.nix; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + binary.revision = hackage.binary."0.8.9.1".revisions.default; + filepath.revision = import ./cabal-files/filepath.nix; + filepath.flags.cpphs = false; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; extra.revision = import ./cabal-files/extra.nix; - text.revision = (((hackage.text)."2.0.2").revisions).default; - array.revision = (((hackage.array)."0.5.5.0").revisions).default; - ghc-boot-th.revision = (((hackage.ghc-boot-th)."9.6.2").revisions).default; - filepattern.revision = import ./cabal-files/filepattern.nix; - pretty.revision = (((hackage.pretty)."1.1.3.6").revisions).default; - hashable.revision = import ./cabal-files/hashable.nix; - hashable.flags.random-initial-seed = false; - hashable.flags.integer-gmp = true; - }; + }; compiler = { version = "9.6.2"; nix-name = "ghc962"; packages = { - "pretty" = "1.1.3.6"; - "text" = "2.0.2"; - "array" = "0.5.5.0"; "bytestring" = "0.11.4.0"; - "stm" = "2.5.1.0"; + "containers" = "0.6.7"; "ghc-prim" = "0.10.0"; "ghc-boot-th" = "9.6.2"; "base" = "4.18.0.0"; "time" = "1.12.2"; + "stm" = "2.5.1.0"; "ghc-bignum" = "1.3"; - "rts" = "1.0.2"; "template-haskell" = "2.20.0.0"; - "deepseq" = "1.4.8.1"; "binary" = "0.8.9.1"; - "containers" = "0.6.7"; - }; + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "system-cxx-std-lib" = "1.0"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.5.0"; }; }; + }; extras = hackage: { packages = { hadrian = ./.plan.nix/hadrian.nix; }; }; modules = [ @@ -87,56 +87,56 @@ flags = { "threaded" = lib.mkOverride 900 true; "selftest" = lib.mkOverride 900 true; - }; }; }; - }) + }; + }) ({ lib, ... }: { packages = { - "shake".components.library.planned = lib.mkOverride 900 true; - "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; "heaps".components.library.planned = lib.mkOverride 900 true; "extra".components.library.planned = lib.mkOverride 900 true; - "filepath".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "system-cxx-std-lib".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; "pretty".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "shake".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; "utf8-string".components.library.planned = lib.mkOverride 900 true; "Cabal".components.library.planned = lib.mkOverride 900 true; - "bytestring".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; "exceptions".components.library.planned = lib.mkOverride 900 true; - "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; "array".components.library.planned = lib.mkOverride 900 true; - "binary".components.library.planned = lib.mkOverride 900 true; "filepattern".components.library.planned = lib.mkOverride 900 true; "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; - "splitmix".components.library.planned = lib.mkOverride 900 true; - "rts".components.library.planned = lib.mkOverride 900 true; "unix".components.library.planned = lib.mkOverride 900 true; - "shake".components.exes."shake".planned = lib.mkOverride 900 true; - "directory".components.library.planned = lib.mkOverride 900 true; - "time".components.library.planned = lib.mkOverride 900 true; - "js-flot".components.library.planned = lib.mkOverride 900 true; - "ghc-bignum".components.library.planned = lib.mkOverride 900 true; - "process".components.library.planned = lib.mkOverride 900 true; - "clock".components.library.planned = lib.mkOverride 900 true; - "template-haskell".components.library.planned = lib.mkOverride 900 true; - "stm".components.library.planned = lib.mkOverride 900 true; - "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; - "QuickCheck".components.library.planned = lib.mkOverride 900 true; - "mtl".components.library.planned = lib.mkOverride 900 true; - "transformers".components.library.planned = lib.mkOverride 900 true; - "parsec".components.library.planned = lib.mkOverride 900 true; - "deepseq".components.library.planned = lib.mkOverride 900 true; - "primitive".components.library.planned = lib.mkOverride 900 true; - "js-jquery".components.library.planned = lib.mkOverride 900 true; - "text".components.library.planned = lib.mkOverride 900 true; - "unordered-containers".components.library.planned = lib.mkOverride 900 true; - "random".components.library.planned = lib.mkOverride 900 true; - "base".components.library.planned = lib.mkOverride 900 true; - "containers".components.library.planned = lib.mkOverride 900 true; - "js-dgtable".components.library.planned = lib.mkOverride 900 true; - "hashable".components.library.planned = lib.mkOverride 900 true; - }; - }) - ]; - } \ No newline at end of file + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix b/materialized/ghc962/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix index ade1f3d512..a3d788196f 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/.plan.nix/hadrian.nix @@ -29,7 +29,7 @@ extraSrcFiles = []; extraTmpFiles = []; extraDocFiles = [ "README.md" ]; - }; + }; components = { exes = { "hadrian" = { @@ -48,7 +48,7 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + ] ++ pkgs.lib.optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); buildable = true; modules = [ "Base" @@ -116,6 +116,7 @@ "Settings/Builders/Cc" "Settings/Builders/Configure" "Settings/Builders/DeriveConstants" + "Settings/Builders/GenApply" "Settings/Builders/GenPrimopCode" "Settings/Builders/Ghc" "Settings/Builders/GhcPkg" @@ -151,12 +152,12 @@ "Utilities" "Way" "Way/Type" - ] ++ (pkgs.lib).optional (flags.selftest) "Rules/Selftest"; + ] ++ pkgs.lib.optional (flags.selftest) "Rules/Selftest"; hsSourceDirs = [ "." "src" ]; mainPath = ([ "Main.hs" - ] ++ (pkgs.lib).optional (flags.threaded) "") ++ (pkgs.lib).optional (flags.selftest) ""; - }; + ] ++ pkgs.lib.optional (flags.threaded) "") ++ pkgs.lib.optional (flags.selftest) ""; }; }; - } // rec { src = (pkgs.lib).mkDefault ../.; } \ No newline at end of file + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix index 3993fc7083..dabbcbdee8 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/Cabal-syntax.nix @@ -21,7 +21,7 @@ synopsis = "A library for working with .cabal files"; description = "This library provides tools for reading and manipulating the .cabal file\nformat."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -39,17 +39,17 @@ (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."time" or (errorHandler.buildDepError "time")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ] ++ (if system.isWindows + ] ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-syntax-3.8.1.0.tar.gz"; sha256 = "07e8ddb19fe01781485f1522b6afc22aba680b0ab28ebe6bbfb84a2dd698ce0f"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal-syntax\r\nversion: 3.8.1.0\r\nx-revision: 3\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A library for working with .cabal files\r\ndescription:\r\n This library provides tools for reading and manipulating the .cabal file\r\n format.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal-syntax\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.9 && < 5,\r\n binary >= 0.7 && < 0.9,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n mtl >= 2.1 && < 2.4,\r\n parsec >= 3.1.13.0 && < 3.2,\r\n pretty >= 1.1.1 && < 1.2,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n time >= 1.4.0.1 && < 1.13,\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7)\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc < 8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack\r\n Distribution.CabalSpecVersion\r\n Distribution.Compat.Binary\r\n Distribution.Compat.CharParsing\r\n Distribution.Compat.DList\r\n Distribution.Compat.Exception\r\n Distribution.Compat.Graph\r\n Distribution.Compat.Lens\r\n Distribution.Compat.MonadFail\r\n Distribution.Compat.Newtype\r\n Distribution.Compat.NonEmptySet\r\n Distribution.Compat.Parsing\r\n Distribution.Compat.Prelude\r\n Distribution.Compat.Semigroup\r\n Distribution.Compat.Typeable\r\n Distribution.Compiler\r\n Distribution.FieldGrammar\r\n Distribution.FieldGrammar.Class\r\n Distribution.FieldGrammar.FieldDescrs\r\n Distribution.FieldGrammar.Newtypes\r\n Distribution.FieldGrammar.Parsec\r\n Distribution.FieldGrammar.Pretty\r\n Distribution.Fields\r\n Distribution.Fields.ConfVar\r\n Distribution.Fields.Field\r\n Distribution.Fields.Lexer\r\n Distribution.Fields.LexerMonad\r\n Distribution.Fields.ParseResult\r\n Distribution.Fields.Parser\r\n Distribution.Fields.Pretty\r\n Distribution.InstalledPackageInfo\r\n Distribution.License\r\n Distribution.ModuleName\r\n Distribution.Package\r\n Distribution.PackageDescription\r\n Distribution.PackageDescription.Configuration\r\n Distribution.PackageDescription.FieldGrammar\r\n Distribution.PackageDescription.Parsec\r\n Distribution.PackageDescription.PrettyPrint\r\n Distribution.PackageDescription.Quirks\r\n Distribution.PackageDescription.Utils\r\n Distribution.Parsec\r\n Distribution.Parsec.Error\r\n Distribution.Parsec.FieldLineStream\r\n Distribution.Parsec.Position\r\n Distribution.Parsec.Warning\r\n Distribution.Pretty\r\n Distribution.SPDX\r\n Distribution.SPDX.License\r\n Distribution.SPDX.LicenseExceptionId\r\n Distribution.SPDX.LicenseExpression\r\n Distribution.SPDX.LicenseId\r\n Distribution.SPDX.LicenseListVersion\r\n Distribution.SPDX.LicenseReference\r\n Distribution.System\r\n Distribution.Text\r\n Distribution.Types.AbiDependency\r\n Distribution.Types.AbiHash\r\n Distribution.Types.Benchmark\r\n Distribution.Types.Benchmark.Lens\r\n Distribution.Types.BenchmarkInterface\r\n Distribution.Types.BenchmarkType\r\n Distribution.Types.BuildInfo\r\n Distribution.Types.BuildInfo.Lens\r\n Distribution.Types.BuildType\r\n Distribution.Types.Component\r\n Distribution.Types.ComponentId\r\n Distribution.Types.ComponentName\r\n Distribution.Types.ComponentRequestedSpec\r\n Distribution.Types.CondTree\r\n Distribution.Types.Condition\r\n Distribution.Types.ConfVar\r\n Distribution.Types.Dependency\r\n Distribution.Types.DependencyMap\r\n Distribution.Types.ExeDependency\r\n Distribution.Types.Executable\r\n Distribution.Types.Executable.Lens\r\n Distribution.Types.ExecutableScope\r\n Distribution.Types.ExposedModule\r\n Distribution.Types.Flag\r\n Distribution.Types.ForeignLib\r\n Distribution.Types.ForeignLib.Lens\r\n Distribution.Types.ForeignLibOption\r\n Distribution.Types.ForeignLibType\r\n Distribution.Types.GenericPackageDescription\r\n Distribution.Types.GenericPackageDescription.Lens\r\n Distribution.Types.HookedBuildInfo\r\n Distribution.Types.IncludeRenaming\r\n Distribution.Types.InstalledPackageInfo\r\n Distribution.Types.InstalledPackageInfo.Lens\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar\r\n Distribution.Types.LegacyExeDependency\r\n Distribution.Types.Lens\r\n Distribution.Types.Library\r\n Distribution.Types.Library.Lens\r\n Distribution.Types.LibraryName\r\n Distribution.Types.LibraryVisibility\r\n Distribution.Types.Mixin\r\n Distribution.Types.Module\r\n Distribution.Types.ModuleReexport\r\n Distribution.Types.ModuleRenaming\r\n Distribution.Types.MungedPackageId\r\n Distribution.Types.MungedPackageName\r\n Distribution.Types.PackageDescription\r\n Distribution.Types.PackageDescription.Lens\r\n Distribution.Types.PackageId\r\n Distribution.Types.PackageId.Lens\r\n Distribution.Types.PackageName\r\n Distribution.Types.PackageVersionConstraint\r\n Distribution.Types.PkgconfigDependency\r\n Distribution.Types.PkgconfigName\r\n Distribution.Types.PkgconfigVersion\r\n Distribution.Types.PkgconfigVersionRange\r\n Distribution.Types.SetupBuildInfo\r\n Distribution.Types.SetupBuildInfo.Lens\r\n Distribution.Types.SourceRepo\r\n Distribution.Types.SourceRepo.Lens\r\n Distribution.Types.TestSuite\r\n Distribution.Types.TestSuite.Lens\r\n Distribution.Types.TestSuiteInterface\r\n Distribution.Types.TestType\r\n Distribution.Types.UnitId\r\n Distribution.Types.UnqualComponentName\r\n Distribution.Types.Version\r\n Distribution.Types.VersionInterval\r\n Distribution.Types.VersionInterval.Legacy\r\n Distribution.Types.VersionRange\r\n Distribution.Types.VersionRange.Internal\r\n Distribution.Utils.Base62\r\n Distribution.Utils.Generic\r\n Distribution.Utils.MD5\r\n Distribution.Utils.Path\r\n Distribution.Utils.ShortText\r\n Distribution.Utils.String\r\n Distribution.Utils.Structured\r\n Distribution.Version\r\n Language.Haskell.Extension\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/Cabal.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/Cabal.nix index 22899ece21..be0b5019d9 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/Cabal.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/Cabal.nix @@ -21,7 +21,7 @@ synopsis = "A framework for packaging Haskell software"; description = "The Haskell Common Architecture for Building Applications and\nLibraries: a framework defining a common interface for authors to more\neasily build their Haskell applications in a portable way.\n\nThe Haskell Cabal is part of a larger infrastructure for distributing,\norganizing, and cataloging Haskell libraries and tools."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ([ @@ -40,17 +40,17 @@ (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-3.8.1.0.tar.gz"; sha256 = "7464cbe6c2f3d7e5d0232023a1a7330621f8b24853cb259fc89a2af85b736608"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal\r\nversion: 3.8.1.0\r\nx-revision: 2\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A framework for packaging Haskell software\r\ndescription:\r\n The Haskell Common Architecture for Building Applications and\r\n Libraries: a framework defining a common interface for authors to more\r\n easily build their Haskell applications in a portable way.\r\n .\r\n The Haskell Cabal is part of a larger infrastructure for distributing,\r\n organizing, and cataloging Haskell libraries and tools.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n-- If we use a new Cabal feature, this needs to be changed to Custom so\r\n-- we can bootstrap.\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n Cabal-syntax >= 3.8 && < 3.9,\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.6 && < 5,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n pretty >= 1.1.1 && < 1.2,\r\n process >= 1.2.1.0 && < 1.7,\r\n time >= 1.4.0.1 && < 1.13\r\n\r\n -- PR #8802: moved conditional process lower bound to cabal-install package\r\n if impl(ghc >=8.2)\r\n build-depends: process >= 1.2.1.0\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc <8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack.Configure\r\n Distribution.Backpack.ComponentsGraph\r\n Distribution.Backpack.ConfiguredComponent\r\n Distribution.Backpack.DescribeUnitId\r\n Distribution.Backpack.FullUnitId\r\n Distribution.Backpack.LinkedComponent\r\n Distribution.Backpack.ModSubst\r\n Distribution.Backpack.ModuleShape\r\n Distribution.Backpack.PreModuleShape\r\n Distribution.Utils.IOData\r\n Distribution.Utils.LogProgress\r\n Distribution.Utils.MapAccum\r\n Distribution.Compat.CreatePipe\r\n Distribution.Compat.Directory\r\n Distribution.Compat.Environment\r\n Distribution.Compat.FilePath\r\n Distribution.Compat.Internal.TempFile\r\n Distribution.Compat.ResponseFile\r\n Distribution.Compat.Prelude.Internal\r\n Distribution.Compat.Process\r\n Distribution.Compat.Stack\r\n Distribution.Compat.Time\r\n Distribution.Make\r\n Distribution.PackageDescription.Check\r\n Distribution.ReadE\r\n Distribution.Simple\r\n Distribution.Simple.Bench\r\n Distribution.Simple.Build\r\n Distribution.Simple.Build.Macros\r\n Distribution.Simple.Build.PathsModule\r\n Distribution.Simple.BuildPaths\r\n Distribution.Simple.BuildTarget\r\n Distribution.Simple.BuildToolDepends\r\n Distribution.Simple.CCompiler\r\n Distribution.Simple.Command\r\n Distribution.Simple.Compiler\r\n Distribution.Simple.Configure\r\n Distribution.Simple.Flag\r\n Distribution.Simple.GHC\r\n Distribution.Simple.GHCJS\r\n Distribution.Simple.Haddock\r\n Distribution.Simple.Glob\r\n Distribution.Simple.HaskellSuite\r\n Distribution.Simple.Hpc\r\n Distribution.Simple.Install\r\n Distribution.Simple.InstallDirs\r\n Distribution.Simple.InstallDirs.Internal\r\n Distribution.Simple.LocalBuildInfo\r\n Distribution.Simple.PackageDescription\r\n Distribution.Simple.PackageIndex\r\n Distribution.Simple.PreProcess\r\n Distribution.Simple.PreProcess.Unlit\r\n Distribution.Simple.Program\r\n Distribution.Simple.Program.Ar\r\n Distribution.Simple.Program.Builtin\r\n Distribution.Simple.Program.Db\r\n Distribution.Simple.Program.Find\r\n Distribution.Simple.Program.GHC\r\n Distribution.Simple.Program.HcPkg\r\n Distribution.Simple.Program.Hpc\r\n Distribution.Simple.Program.Internal\r\n Distribution.Simple.Program.Ld\r\n Distribution.Simple.Program.ResponseFile\r\n Distribution.Simple.Program.Run\r\n Distribution.Simple.Program.Script\r\n Distribution.Simple.Program.Strip\r\n Distribution.Simple.Program.Types\r\n Distribution.Simple.Register\r\n Distribution.Simple.Setup\r\n Distribution.Simple.ShowBuildInfo\r\n Distribution.Simple.SrcDist\r\n Distribution.Simple.Test\r\n Distribution.Simple.Test.ExeV10\r\n Distribution.Simple.Test.LibV09\r\n Distribution.Simple.Test.Log\r\n Distribution.Simple.UHC\r\n Distribution.Simple.UserHooks\r\n Distribution.Simple.Utils\r\n Distribution.TestSuite\r\n Distribution.Types.AnnotatedId\r\n Distribution.Types.ComponentInclude\r\n Distribution.Types.DumpBuildInfo\r\n Distribution.Types.PackageName.Magic\r\n Distribution.Types.ComponentLocalBuildInfo\r\n Distribution.Types.LocalBuildInfo\r\n Distribution.Types.TargetInfo\r\n Distribution.Types.GivenComponent\r\n Distribution.Utils.Json\r\n Distribution.Utils.NubList\r\n Distribution.Utils.Progress\r\n Distribution.Verbosity\r\n Distribution.Verbosity.Internal\r\n\r\n -- We reexport all of Cabal-syntax to aid in compatibility for downstream\r\n -- users. In the future we may opt to deprecate some or all of these exports.\r\n -- See haskell/Cabal#7974.\r\n reexported-modules:\r\n Distribution.Backpack,\r\n Distribution.CabalSpecVersion,\r\n Distribution.Compat.Binary,\r\n Distribution.Compat.CharParsing,\r\n Distribution.Compat.DList,\r\n Distribution.Compat.Exception,\r\n Distribution.Compat.Graph,\r\n Distribution.Compat.Lens,\r\n Distribution.Compat.MonadFail,\r\n Distribution.Compat.Newtype,\r\n Distribution.Compat.NonEmptySet,\r\n Distribution.Compat.Parsing,\r\n Distribution.Compat.Prelude,\r\n Distribution.Compat.Semigroup,\r\n Distribution.Compat.Typeable,\r\n Distribution.Compiler,\r\n Distribution.FieldGrammar,\r\n Distribution.FieldGrammar.Class,\r\n Distribution.FieldGrammar.FieldDescrs,\r\n Distribution.FieldGrammar.Newtypes,\r\n Distribution.FieldGrammar.Parsec,\r\n Distribution.FieldGrammar.Pretty,\r\n Distribution.Fields,\r\n Distribution.Fields.ConfVar,\r\n Distribution.Fields.Field,\r\n Distribution.Fields.Lexer,\r\n Distribution.Fields.LexerMonad,\r\n Distribution.Fields.ParseResult,\r\n Distribution.Fields.Parser,\r\n Distribution.Fields.Pretty,\r\n Distribution.InstalledPackageInfo,\r\n Distribution.License,\r\n Distribution.ModuleName,\r\n Distribution.Package,\r\n Distribution.PackageDescription,\r\n Distribution.PackageDescription.Configuration,\r\n Distribution.PackageDescription.FieldGrammar,\r\n Distribution.PackageDescription.Parsec,\r\n Distribution.PackageDescription.PrettyPrint,\r\n Distribution.PackageDescription.Quirks,\r\n Distribution.PackageDescription.Utils,\r\n Distribution.Parsec,\r\n Distribution.Parsec.Error,\r\n Distribution.Parsec.FieldLineStream,\r\n Distribution.Parsec.Position,\r\n Distribution.Parsec.Warning,\r\n Distribution.Pretty,\r\n Distribution.SPDX,\r\n Distribution.SPDX.License,\r\n Distribution.SPDX.LicenseExceptionId,\r\n Distribution.SPDX.LicenseExpression,\r\n Distribution.SPDX.LicenseId,\r\n Distribution.SPDX.LicenseListVersion,\r\n Distribution.SPDX.LicenseReference,\r\n Distribution.System,\r\n Distribution.Text,\r\n Distribution.Types.AbiDependency,\r\n Distribution.Types.AbiHash,\r\n Distribution.Types.Benchmark,\r\n Distribution.Types.Benchmark.Lens,\r\n Distribution.Types.BenchmarkInterface,\r\n Distribution.Types.BenchmarkType,\r\n Distribution.Types.BuildInfo,\r\n Distribution.Types.BuildInfo.Lens,\r\n Distribution.Types.BuildType,\r\n Distribution.Types.Component,\r\n Distribution.Types.ComponentId,\r\n Distribution.Types.ComponentName,\r\n Distribution.Types.ComponentRequestedSpec,\r\n Distribution.Types.CondTree,\r\n Distribution.Types.Condition,\r\n Distribution.Types.ConfVar,\r\n Distribution.Types.Dependency,\r\n Distribution.Types.DependencyMap,\r\n Distribution.Types.ExeDependency,\r\n Distribution.Types.Executable,\r\n Distribution.Types.Executable.Lens,\r\n Distribution.Types.ExecutableScope,\r\n Distribution.Types.ExposedModule,\r\n Distribution.Types.Flag,\r\n Distribution.Types.ForeignLib,\r\n Distribution.Types.ForeignLib.Lens,\r\n Distribution.Types.ForeignLibOption,\r\n Distribution.Types.ForeignLibType,\r\n Distribution.Types.GenericPackageDescription,\r\n Distribution.Types.GenericPackageDescription.Lens,\r\n Distribution.Types.HookedBuildInfo,\r\n Distribution.Types.IncludeRenaming,\r\n Distribution.Types.InstalledPackageInfo,\r\n Distribution.Types.InstalledPackageInfo.Lens,\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar,\r\n Distribution.Types.LegacyExeDependency,\r\n Distribution.Types.Lens,\r\n Distribution.Types.Library,\r\n Distribution.Types.Library.Lens,\r\n Distribution.Types.LibraryName,\r\n Distribution.Types.LibraryVisibility,\r\n Distribution.Types.Mixin,\r\n Distribution.Types.Module,\r\n Distribution.Types.ModuleReexport,\r\n Distribution.Types.ModuleRenaming,\r\n Distribution.Types.MungedPackageId,\r\n Distribution.Types.MungedPackageName,\r\n Distribution.Types.PackageDescription,\r\n Distribution.Types.PackageDescription.Lens,\r\n Distribution.Types.PackageId,\r\n Distribution.Types.PackageId.Lens,\r\n Distribution.Types.PackageName,\r\n Distribution.Types.PackageVersionConstraint,\r\n Distribution.Types.PkgconfigDependency,\r\n Distribution.Types.PkgconfigName,\r\n Distribution.Types.PkgconfigVersion,\r\n Distribution.Types.PkgconfigVersionRange,\r\n Distribution.Types.SetupBuildInfo,\r\n Distribution.Types.SetupBuildInfo.Lens,\r\n Distribution.Types.SourceRepo,\r\n Distribution.Types.SourceRepo.Lens,\r\n Distribution.Types.TestSuite,\r\n Distribution.Types.TestSuite.Lens,\r\n Distribution.Types.TestSuiteInterface,\r\n Distribution.Types.TestType,\r\n Distribution.Types.UnitId,\r\n Distribution.Types.UnqualComponentName,\r\n Distribution.Types.Version,\r\n Distribution.Types.VersionInterval,\r\n Distribution.Types.VersionInterval.Legacy,\r\n Distribution.Types.VersionRange,\r\n Distribution.Types.VersionRange.Internal,\r\n Distribution.Utils.Base62,\r\n Distribution.Utils.Generic,\r\n Distribution.Utils.MD5,\r\n Distribution.Utils.Path,\r\n Distribution.Utils.ShortText,\r\n Distribution.Utils.String,\r\n Distribution.Utils.Structured,\r\n Distribution.Version,\r\n Language.Haskell.Extension\r\n\r\n -- Parsec parser-related modules\r\n build-depends:\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7),\r\n mtl >= 2.1 && < 2.4,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n parsec >= 3.1.13.0 && < 3.2\r\n\r\n other-modules:\r\n Distribution.Backpack.PreExistingComponent\r\n Distribution.Backpack.ReadyComponent\r\n Distribution.Backpack.MixLink\r\n Distribution.Backpack.ModuleScope\r\n Distribution.Backpack.UnifyM\r\n Distribution.Backpack.Id\r\n Distribution.Utils.UnionFind\r\n Distribution.Compat.Async\r\n Distribution.Compat.CopyFile\r\n Distribution.Compat.GetShortPathName\r\n Distribution.Compat.SnocList\r\n Distribution.GetOpt\r\n Distribution.Lex\r\n Distribution.Simple.Build.Macros.Z\r\n Distribution.Simple.Build.PathsModule.Z\r\n Distribution.Simple.GHC.EnvironmentParser\r\n Distribution.Simple.GHC.Internal\r\n Distribution.Simple.GHC.ImplInfo\r\n Distribution.ZinzaPrelude\r\n Paths_Cabal\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n LambdaCase\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix index 31390ca93b..62e36aa8b6 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/QuickCheck.nix @@ -21,99 +21,99 @@ synopsis = "Automatic testing of Haskell programs"; description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((((((([ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - ] ++ [ + ] ++ [ (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]) ++ (pkgs.lib).optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ (pkgs.lib).optionals (compiler.isGhc && true) [ + ]) ++ pkgs.lib.optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ pkgs.lib.optionals (compiler.isGhc && true) [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ (pkgs.lib).optionals (compiler.isUhc && true) [ + ]) ++ pkgs.lib.optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ pkgs.lib.optionals (compiler.isUhc && true) [ (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) - ]; + ]; buildable = true; - }; + }; tests = { "test-quickcheck" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gcoarbitrary" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-generators" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gshrink" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-terminal" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-monadfix" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-split" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "test-quickcheck-misc" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; - }); - }) // { + }); + }) // { package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/clock.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/clock.nix index de66c1339a..1db6e2d90d 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/clock.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/clock.nix @@ -11,22 +11,22 @@ flags = { llvm = false; }; package = { specVersion = "1.10"; - identifier = { name = "clock"; version = "0.8.3"; }; + identifier = { name = "clock"; version = "0.8.4"; }; license = "BSD-3-Clause"; - copyright = "Copyright © Cetin Sert 2009-2016, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; - maintainer = "Cetin Sert , Corsis Research"; - author = "Cetin Sert , Corsis Research"; + copyright = "Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; + maintainer = "Cetin Sert , Elefunc, Inc."; + author = "Cetin Sert , Elefunc, Inc."; homepage = "https://github.com/corsis/clock"; url = ""; synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -34,26 +34,26 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/clock-0.8.3.tar.gz"; - sha256 = "845ce5db4c98cefd517323e005f87effceff886987305e421c4ef616dc0505d1"; - }); - }) // { - package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.3\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2016, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Corsis Research\nmaintainer: Cetin Sert , Corsis Research\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.2.1\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: git://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; + sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/extra.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/extra.nix index 450be82c4b..41668cf6bc 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/extra.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/extra.nix @@ -21,7 +21,7 @@ synopsis = "Extra functions I use."; description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -31,9 +31,9 @@ (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; tests = { "extra-test" = { depends = [ @@ -43,16 +43,16 @@ (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/filepattern.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/filepattern.nix index 13bbd09e88..385c502003 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/filepattern.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/filepattern.nix @@ -21,7 +21,7 @@ synopsis = "File path glob-like matching"; description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - ]; + ]; buildable = true; - }; + }; tests = { "filepattern-test" = { depends = [ @@ -41,16 +41,16 @@ (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/hashable.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/hashable.nix index 288fdf7407..4b125fa0bc 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/hashable.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/hashable.nix @@ -11,7 +11,7 @@ flags = { integer-gmp = true; random-initial-seed = false; }; package = { specVersion = "1.12"; - identifier = { name = "hashable"; version = "1.4.2.0"; }; + identifier = { name = "hashable"; version = "1.4.3.0"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "Oleg Grenrus "; @@ -19,9 +19,9 @@ homepage = "http://github.com/haskell-unordered-containers/hashable"; url = ""; synopsis = "A class for types that can be converted to a hash value"; - description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values."; + description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; buildType = "Simple"; - }; + }; components = { "library" = { depends = (([ @@ -32,19 +32,19 @@ (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && (compiler.version).ge "9" + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && compiler.version.ge "9" then [ (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) else if flags.integer-gmp then [ (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) - ] + ] else [ (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) - ]); + ]); buildable = true; - }; + }; tests = { "hashable-tests" = { depends = [ @@ -59,24 +59,24 @@ (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; "hashable-examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/hashable-1.4.2.0.tar.gz"; - sha256 = "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8"; - }); - }) // { - package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.2.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.5\n || ==9.4.4\n || ==9.6.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.19\n , bytestring >=0.10.8.2 && <0.12\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.5\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.1\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; + sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/heaps.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/heaps.nix index dc77aed1f4..e759e305bf 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/heaps.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/heaps.nix @@ -21,18 +21,18 @@ synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; - }); - }) // { + }); + }) // { package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix index 0237404c41..40ea1148c6 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-dgtable.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified jquery.dgtable code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-dgtable-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-flot.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-flot.nix index ba292fc8b2..67980dd7ba 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-flot.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-flot.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified flot code"; description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-flot-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix index 9ecdc931ed..05e54a25ab 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/js-jquery.nix @@ -21,28 +21,28 @@ synopsis = "Obtain minified jQuery code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-jquery-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/primitive.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/primitive.nix index bbc2dd58da..b5683f2c83 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/primitive.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/primitive.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "2.0"; - identifier = { name = "primitive"; version = "0.8.0.0"; }; + identifier = { name = "primitive"; version = "0.9.0.0"; }; license = "BSD-3-Clause"; copyright = "(c) Roman Leshchinskiy 2009-2012"; maintainer = "libraries@haskell.org"; @@ -21,7 +21,7 @@ synopsis = "Primitive memory-related operations"; description = "This package provides various primitive memory-related operations."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); buildable = true; - }; + }; tests = { "test-qc" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -58,16 +58,16 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/primitive-0.8.0.0.tar.gz"; - sha256 = "5553c21b4a789f9b591eed69e598cc58484c274af29250e517b5a8bcc62b995f"; - }); - }) // { - package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.8.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n\n Build-Depends: base >= 4.9 && < 4.19\n , deepseq >= 1.1 && < 1.5\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; + sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; + }); + }) // { + package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/random.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/random.nix index c2f8f753b4..0dbaf8b099 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/random.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/random.nix @@ -21,7 +21,7 @@ synopsis = "Pseudo-random number generation"; description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -30,32 +30,32 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); buildable = true; - }; + }; tests = { "legacy-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]; + ]; buildable = true; - }; + }; "doctests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) - ] ++ (pkgs.lib).optionals (compiler.isGhc && (compiler.version).ge "8.2" && (compiler.isGhc && (compiler.version).lt "8.10")) [ + ] ++ pkgs.lib.optionals (compiler.isGhc && compiler.version.ge "8.2" && (compiler.isGhc && compiler.version.lt "8.10")) [ (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."stm" or (errorHandler.buildDepError "stm")) (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "spec" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -67,18 +67,18 @@ (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; + }; "spec-inspection" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); buildable = true; - }; }; + }; benchmarks = { "legacy-bench" = { depends = [ @@ -87,9 +87,9 @@ (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) (hsPkgs."split" or (errorHandler.buildDepError "split")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ]; + ]; buildable = true; - }; + }; "bench" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -98,16 +98,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; - }); - }) // { - package-description-override = "cabal-version: >=1.10\nname: random\nversion: 1.2.1.1\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: core-libraries-committee@haskell.org\nbug-reports: https://github.com/haskell/random/issues\nsynopsis: Pseudo-random number generation\ndescription:\n This package provides basic pseudo-random number generation, including the\n ability to split random number generators.\n .\n == \"System.Random\": pure pseudo-random number interface\n .\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\n number generator like 'System.Random.StdGen'.\n .\n As an example, here is how you can simulate rolls of a six-sided die using\n 'System.Random.uniformR':\n .\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n >>> let pureGen = mkStdGen 42\n >>> take 10 (rolls pureGen) :: [Word]\n [1,1,3,2,4,5,3,4,6,2]\n .\n See \"System.Random\" for more details.\n .\n == \"System.Random.Stateful\": monadic pseudo-random number interface\n .\n In monadic code, use 'System.Random.Stateful.uniformM' and\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\n pseudo-random numbers with a monadic pseudo-random number generator, or\n using a monadic adapter.\n .\n As an example, here is how you can simulate rolls of a six-sided die using\n 'System.Random.Stateful.uniformRM':\n .\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n >>> let pureGen = mkStdGen 42\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n [1,1,3,2,4,5,3,4,6,2]\n .\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\n the pure pseudo-random number generator @pureGen@ into the\n 'System.Random.Stateful.StatefulGen' context.\n .\n The monadic interface can also be used with existing monadic pseudo-random\n number generators. In this example, we use the one provided in the\n package:\n .\n >>> import System.Random.MWC as MWC\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n >>> monadicGen <- MWC.create\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\n [2,3,6,6,4,4,3,1,5,4]\n .\n See \"System.Random.Stateful\" for more details.\n\ncategory: System\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\ntested-with: GHC == 7.10.2\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.3\n , GHC == 8.4.4\n , GHC == 8.6.3\n , GHC == 8.6.4\n , GHC == 8.6.5\n , GHC == 8.8.1\n , GHC == 8.8.2\n , GHC == 8.10.1\n\nsource-repository head\n type: git\n location: https://github.com/haskell/random.git\n\n\nlibrary\n exposed-modules:\n System.Random\n System.Random.Internal\n System.Random.Stateful\n other-modules:\n System.Random.GFinite\n\n hs-source-dirs: src\n default-language: Haskell2010\n ghc-options:\n -Wall\n if impl(ghc >= 8.0)\n ghc-options:\n -Wincomplete-record-updates -Wincomplete-uni-patterns\n\n build-depends:\n base >=4.8 && <5,\n bytestring >=0.10.4 && <0.12,\n deepseq >=1.1 && <2,\n mtl >=2.2 && <2.4,\n splitmix >=0.1 && <0.2\n if impl(ghc < 8.0)\n build-depends:\n transformers\n\ntest-suite legacy-test\n type: exitcode-stdio-1.0\n main-is: Legacy.hs\n hs-source-dirs: test-legacy\n other-modules:\n T7936\n TestRandomIOs\n TestRandomRs\n Random1283\n RangeTest\n\n default-language: Haskell2010\n ghc-options: -with-rtsopts=-M8M\n if impl(ghc >= 8.0)\n ghc-options:\n -Wno-deprecations\n build-depends:\n base,\n containers >=0.5 && <0.7,\n random\n\ntest-suite doctests\n type: exitcode-stdio-1.0\n main-is: doctests.hs\n hs-source-dirs: test\n default-language: Haskell2010\n build-depends:\n base,\n doctest >=0.15 && <0.21\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\n build-depends:\n mwc-random >=0.13 && <0.16,\n primitive >=0.6 && <0.8,\n random,\n stm,\n unliftio >=0.2 && <0.3,\n vector >= 0.10 && <0.14\n\ntest-suite spec\n type: exitcode-stdio-1.0\n main-is: Spec.hs\n hs-source-dirs: test\n other-modules:\n Spec.Range\n Spec.Run\n Spec.Stateful\n\n default-language: Haskell2010\n ghc-options: -Wall\n build-depends:\n base,\n bytestring,\n random,\n smallcheck >=1.2 && <1.3,\n stm,\n tasty >=1.0 && <1.5,\n tasty-smallcheck >=0.8 && <0.9,\n tasty-hunit >=0.10 && <0.11,\n transformers\n\n-- Note. Fails when compiled with coverage:\n-- https://github.com/haskell/random/issues/107\ntest-suite spec-inspection\n type: exitcode-stdio-1.0\n main-is: Spec.hs\n hs-source-dirs: test-inspection\n build-depends:\n\n default-language: Haskell2010\n ghc-options: -Wall\n build-depends:\n base,\n random,\n tasty >=1.0 && <1.5\n if impl(ghc >= 8.0)\n build-depends:\n tasty-inspection-testing\n other-modules:\n Spec.Inspection\n\nbenchmark legacy-bench\n type: exitcode-stdio-1.0\n main-is: SimpleRNGBench.hs\n hs-source-dirs: bench-legacy\n other-modules: BinSearch\n default-language: Haskell2010\n ghc-options:\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\n if impl(ghc >= 8.0)\n ghc-options:\n -Wno-deprecations\n\n build-depends:\n base,\n random,\n rdtsc,\n split >=0.2 && <0.3,\n time >=1.4 && <1.13\n\nbenchmark bench\n type: exitcode-stdio-1.0\n main-is: Main.hs\n hs-source-dirs: bench\n default-language: Haskell2010\n ghc-options: -Wall -O2\n build-depends:\n base,\n mtl,\n primitive >= 0.7.1,\n random,\n splitmix >=0.1 && <0.2,\n tasty-bench\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/shake.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/shake.nix index e7eb5c6647..d40c2a8bbc 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/shake.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/shake.nix @@ -21,7 +21,7 @@ synopsis = "Build system library, like Make, but more accurate dependencies."; description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((([ @@ -45,15 +45,15 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]; + ]; buildable = true; - }; + }; exes = { "shake" = { depends = (((([ @@ -77,16 +77,16 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; + }; tests = { "shake-test" = { depends = (((([ @@ -111,22 +111,22 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/splitmix.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/splitmix.nix index 7918d356b1..aa0dd88d31 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/splitmix.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/splitmix.nix @@ -11,7 +11,7 @@ flags = { optimised-mixer = false; }; package = { specVersion = "1.10"; - identifier = { name = "splitmix"; version = "0.1.0.4"; }; + identifier = { name = "splitmix"; version = "0.1.0.5"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "Oleg Grenrus "; @@ -21,24 +21,24 @@ synopsis = "Fast Splittable PRNG"; description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ] ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) ((pkgs.lib).optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + ] ++ pkgs.lib.optionals (!(compiler.isGhcjs && true)) (pkgs.lib.optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); buildable = true; - }; + }; tests = { "examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -49,23 +49,23 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi-32" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-dieharder" = { depends = [ (hsPkgs."async" or (errorHandler.buildDepError "async")) @@ -78,27 +78,27 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "splitmix-testu01" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; buildable = if !system.isLinux then false else true; - }; + }; "initialization" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "comparison" = { depends = [ @@ -108,33 +108,32 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) - ]; + ]; buildable = true; - }; + }; "simple-sum" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "range" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ] ++ pkgs.lib.optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/splitmix-0.1.0.4.tar.gz"; - sha256 = "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa"; - }); - }) // { - package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.4\nx-revision: 2\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.5\n || ==9.4.4\n || ==9.6.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.19\n , deepseq >=1.3.0.0 && <1.5\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.6\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , clock >=0.8 && <0.9\n , random\n , splitmix\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.13\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.13\n , bytestring >=0.9.1.8 && <0.12\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.13\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.13\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; + sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix index ab6a9d8c44..0aeaccb277 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/unordered-containers.nix @@ -21,7 +21,7 @@ synopsis = "Efficient hashing-based container types"; description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]; + ]; buildable = true; - }; + }; tests = { "unordered-containers-tests" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ @@ -63,16 +63,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; - }); - }) // { - package-description-override = "name: unordered-containers\r\nversion: 0.2.19.1\r\nx-revision: 2\r\nsynopsis: Efficient hashing-based container types\r\ndescription:\r\n Efficient hashing-based container types. The containers have been\r\n optimized for performance critical use, both in terms of large data\r\n quantities and high speed.\r\n .\r\n The declared cost of each operation is either worst-case or\r\n amortized, but remains valid even if structures are shared.\r\n .\r\n /Security/\r\n .\r\n This package currently provides no defenses against hash collision attacks\r\n such as HashDoS.\r\n Users who need to store input from untrusted sources are advised to use\r\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Johan Tibell\r\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\r\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\r\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\r\ncopyright: 2010-2014 Johan Tibell\r\n 2010 Edward Z. Yang\r\ncategory: Data\r\nbuild-type: Simple\r\ncabal-version: >=1.10\r\nextra-source-files: CHANGES.md\r\n\r\ntested-with:\r\n GHC ==9.6.1\r\n || ==9.4.4\r\n || ==9.2.7\r\n || ==9.0.2\r\n || ==8.10.7\r\n || ==8.8.4\r\n || ==8.6.5\r\n || ==8.4.4\r\n || ==8.2.2\r\n\r\nflag debug\r\n description: Enable debug support\r\n default: False\r\n\r\nlibrary\r\n exposed-modules:\r\n Data.HashMap.Internal\r\n Data.HashMap.Internal.Array\r\n Data.HashMap.Internal.List\r\n Data.HashMap.Internal.Strict\r\n Data.HashMap.Lazy\r\n Data.HashMap.Strict\r\n Data.HashSet\r\n Data.HashSet.Internal\r\n\r\n build-depends:\r\n base >= 4.10 && < 5,\r\n deepseq >= 1.4.3,\r\n hashable >= 1.2.5 && < 1.5,\r\n template-haskell < 2.21\r\n\r\n default-language: Haskell2010\r\n\r\n other-extensions:\r\n RoleAnnotations,\r\n UnboxedTuples,\r\n ScopedTypeVariables,\r\n MagicHash,\r\n BangPatterns\r\n\r\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\r\n\r\n -- For dumping the generated code:\r\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\r\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\r\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\r\n\r\n if flag(debug)\r\n cpp-options: -DASSERTS\r\n\r\ntest-suite unordered-containers-tests\r\n hs-source-dirs: tests\r\n main-is: Main.hs\r\n type: exitcode-stdio-1.0\r\n other-modules:\r\n Regressions\r\n Properties\r\n Properties.HashMapLazy\r\n Properties.HashMapStrict\r\n Properties.HashSet\r\n Properties.List\r\n Strictness\r\n\r\n build-depends:\r\n base,\r\n ChasingBottoms,\r\n containers >= 0.5.8,\r\n hashable,\r\n HUnit,\r\n QuickCheck >= 2.4.0.1,\r\n random,\r\n tasty >= 1.4.0.3,\r\n tasty-hunit >= 0.10.0.3,\r\n tasty-quickcheck >= 0.10.1.2,\r\n unordered-containers\r\n\r\n if impl(ghc >= 8.6)\r\n build-depends:\r\n nothunks >= 0.1.3\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n cpp-options: -DASSERTS\r\n\r\nbenchmark benchmarks\r\n hs-source-dirs: benchmarks\r\n main-is: Benchmarks.hs\r\n type: exitcode-stdio-1.0\r\n\r\n other-modules:\r\n Util.ByteString\r\n Util.String\r\n Util.Int\r\n\r\n build-depends:\r\n base,\r\n bytestring >= 0.10.0.0,\r\n containers,\r\n deepseq,\r\n hashable,\r\n hashmap,\r\n mtl,\r\n random,\r\n tasty-bench >= 0.3.1,\r\n unordered-containers\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\r\n if impl(ghc >= 8.10)\r\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\r\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\r\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix index ac9bde4057..a5ee5272da 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/cabal-files/utf8-string.nix @@ -21,31 +21,31 @@ synopsis = "Support for reading and writing UTF8 Strings"; description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "unit-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; - }); - }) // { + }); + }) // { package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc96/hadrian/default.nix b/materialized/ghc962/hadrian-ghc96/hadrian/default.nix index 271117f86e..cba307240d 100644 --- a/materialized/ghc962/hadrian-ghc96/hadrian/default.nix +++ b/materialized/ghc962/hadrian-ghc96/hadrian/default.nix @@ -2,87 +2,87 @@ pkgs = hackage: { packages = { - Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; - bytestring.revision = (((hackage.bytestring)."0.11.4.0").revisions).default; - exceptions.revision = (((hackage.exceptions)."0.10.7").revisions).default; - directory.revision = (((hackage.directory)."1.3.8.1").revisions).default; - filepath.revision = (((hackage.filepath)."1.4.100.1").revisions).default; - mtl.revision = (((hackage.mtl)."2.3.1").revisions).default; - ghc-bignum.revision = (((hackage.ghc-bignum)."1.3").revisions).default; - ghc-prim.revision = (((hackage.ghc-prim)."0.10.0").revisions).default; - parsec.revision = (((hackage.parsec)."3.1.16.1").revisions).default; - js-flot.revision = import ./cabal-files/js-flot.nix; - utf8-string.revision = import ./cabal-files/utf8-string.nix; - Cabal.revision = import ./cabal-files/Cabal.nix; - splitmix.revision = import ./cabal-files/splitmix.nix; - splitmix.flags.optimised-mixer = false; - containers.revision = (((hackage.containers)."0.6.7").revisions).default; + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; clock.revision = import ./cabal-files/clock.nix; clock.flags.llvm = false; - stm.revision = (((hackage.stm)."2.5.1.0").revisions).default; + transformers.revision = hackage.transformers."0.6.1.0".revisions.default; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.0.0".revisions.default; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + unix.revision = hackage.unix."2.8.1.0".revisions.default; + filepattern.revision = import ./cabal-files/filepattern.nix; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.2".revisions.default; + mtl.revision = hackage.mtl."2.3.1".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; heaps.revision = import ./cabal-files/heaps.nix; - base.revision = (((hackage.base)."4.18.0.0").revisions).default; - time.revision = (((hackage.time)."1.12.2").revisions).default; - random.revision = import ./cabal-files/random.nix; + Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; + process.revision = hackage.process."1.6.17.0".revisions.default; primitive.revision = import ./cabal-files/primitive.nix; - deepseq.revision = (((hackage.deepseq)."1.4.8.1").revisions).default; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + exceptions.revision = hackage.exceptions."0.10.7".revisions.default; + parsec.revision = hackage.parsec."3.1.16.1".revisions.default; + system-cxx-std-lib.revision = hackage.system-cxx-std-lib."1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + utf8-string.revision = import ./cabal-files/utf8-string.nix; js-jquery.revision = import ./cabal-files/js-jquery.nix; - js-dgtable.revision = import ./cabal-files/js-dgtable.nix; - rts.revision = (((hackage.rts)."1.0.2").revisions).default; - template-haskell.revision = (((hackage.template-haskell)."2.20.0.0").revisions).default; - binary.revision = (((hackage.binary)."0.8.9.1").revisions).default; - shake.revision = import ./cabal-files/shake.nix; - shake.flags.portable = false; - shake.flags.cloud = false; - shake.flags.embed-files = false; - process.revision = (((hackage.process)."1.6.17.0").revisions).default; - unix.revision = (((hackage.unix)."2.8.1.0").revisions).default; - transformers.revision = (((hackage.transformers)."0.6.1.0").revisions).default; - unordered-containers.revision = import ./cabal-files/unordered-containers.nix; - unordered-containers.flags.debug = false; + text.revision = hackage.text."2.0.2".revisions.default; QuickCheck.revision = import ./cabal-files/QuickCheck.nix; QuickCheck.flags.old-random = false; QuickCheck.flags.templatehaskell = true; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.5.0".revisions.default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.cloud = false; + shake.flags.embed-files = false; + shake.flags.portable = false; + random.revision = import ./cabal-files/random.nix; + bytestring.revision = hackage.bytestring."0.11.4.0".revisions.default; + Cabal.revision = import ./cabal-files/Cabal.nix; + directory.revision = hackage.directory."1.3.8.1".revisions.default; + js-flot.revision = import ./cabal-files/js-flot.nix; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + binary.revision = hackage.binary."0.8.9.1".revisions.default; + filepath.revision = hackage.filepath."1.4.100.1".revisions.default; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; extra.revision = import ./cabal-files/extra.nix; - text.revision = (((hackage.text)."2.0.2").revisions).default; - array.revision = (((hackage.array)."0.5.5.0").revisions).default; - ghc-boot-th.revision = (((hackage.ghc-boot-th)."9.6.2").revisions).default; - filepattern.revision = import ./cabal-files/filepattern.nix; - pretty.revision = (((hackage.pretty)."1.1.3.6").revisions).default; - hashable.revision = import ./cabal-files/hashable.nix; - hashable.flags.random-initial-seed = false; - hashable.flags.integer-gmp = true; - }; + }; compiler = { version = "9.6.2"; nix-name = "ghc962"; packages = { - "pretty" = "1.1.3.6"; - "text" = "2.0.2"; - "array" = "0.5.5.0"; - "mtl" = "2.3.1"; + "unix" = "2.8.1.0"; + "filepath" = "1.4.100.1"; + "transformers" = "0.6.1.0"; "parsec" = "3.1.16.1"; "bytestring" = "0.11.4.0"; - "filepath" = "1.4.100.1"; - "stm" = "2.5.1.0"; + "containers" = "0.6.7"; "ghc-prim" = "0.10.0"; + "mtl" = "2.3.1"; "ghc-boot-th" = "9.6.2"; "base" = "4.18.0.0"; "time" = "1.12.2"; - "process" = "1.6.17.0"; + "stm" = "2.5.1.0"; "ghc-bignum" = "1.3"; "directory" = "1.3.8.1"; - "exceptions" = "0.10.7"; - "rts" = "1.0.2"; - "transformers" = "0.6.1.0"; "template-haskell" = "2.20.0.0"; - "deepseq" = "1.4.8.1"; - "unix" = "2.8.1.0"; + "process" = "1.6.17.0"; "binary" = "0.8.9.1"; - "containers" = "0.6.7"; - }; + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "system-cxx-std-lib" = "1.0"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.5.0"; + "exceptions" = "0.10.7"; }; }; + }; extras = hackage: { packages = { hadrian = ./.plan.nix/hadrian.nix; }; }; modules = [ @@ -93,56 +93,56 @@ flags = { "threaded" = lib.mkOverride 900 true; "selftest" = lib.mkOverride 900 true; - }; }; }; - }) + }; + }) ({ lib, ... }: { packages = { - "shake".components.library.planned = lib.mkOverride 900 true; - "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; "heaps".components.library.planned = lib.mkOverride 900 true; "extra".components.library.planned = lib.mkOverride 900 true; - "filepath".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "system-cxx-std-lib".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; "pretty".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "shake".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; "utf8-string".components.library.planned = lib.mkOverride 900 true; "Cabal".components.library.planned = lib.mkOverride 900 true; - "bytestring".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; "exceptions".components.library.planned = lib.mkOverride 900 true; - "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; "array".components.library.planned = lib.mkOverride 900 true; - "binary".components.library.planned = lib.mkOverride 900 true; "filepattern".components.library.planned = lib.mkOverride 900 true; "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; - "splitmix".components.library.planned = lib.mkOverride 900 true; - "rts".components.library.planned = lib.mkOverride 900 true; "unix".components.library.planned = lib.mkOverride 900 true; - "shake".components.exes."shake".planned = lib.mkOverride 900 true; - "directory".components.library.planned = lib.mkOverride 900 true; - "time".components.library.planned = lib.mkOverride 900 true; - "js-flot".components.library.planned = lib.mkOverride 900 true; - "ghc-bignum".components.library.planned = lib.mkOverride 900 true; - "process".components.library.planned = lib.mkOverride 900 true; - "clock".components.library.planned = lib.mkOverride 900 true; - "template-haskell".components.library.planned = lib.mkOverride 900 true; - "stm".components.library.planned = lib.mkOverride 900 true; - "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; - "QuickCheck".components.library.planned = lib.mkOverride 900 true; - "mtl".components.library.planned = lib.mkOverride 900 true; - "transformers".components.library.planned = lib.mkOverride 900 true; - "parsec".components.library.planned = lib.mkOverride 900 true; - "deepseq".components.library.planned = lib.mkOverride 900 true; - "primitive".components.library.planned = lib.mkOverride 900 true; - "js-jquery".components.library.planned = lib.mkOverride 900 true; - "text".components.library.planned = lib.mkOverride 900 true; - "unordered-containers".components.library.planned = lib.mkOverride 900 true; - "random".components.library.planned = lib.mkOverride 900 true; - "base".components.library.planned = lib.mkOverride 900 true; - "containers".components.library.planned = lib.mkOverride 900 true; - "js-dgtable".components.library.planned = lib.mkOverride 900 true; - "hashable".components.library.planned = lib.mkOverride 900 true; - }; - }) - ]; - } \ No newline at end of file + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix b/materialized/ghc962/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix index 9c366cea6d..45a80469a3 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/.plan.nix/hadrian.nix @@ -29,7 +29,7 @@ extraSrcFiles = []; extraTmpFiles = []; extraDocFiles = [ "README.md" ]; - }; + }; components = { exes = { "hadrian" = { @@ -50,7 +50,7 @@ (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) - ] ++ (pkgs.lib).optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + ] ++ pkgs.lib.optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); buildable = true; modules = [ "Base" @@ -119,6 +119,7 @@ "Settings/Builders/Cc" "Settings/Builders/Configure" "Settings/Builders/DeriveConstants" + "Settings/Builders/GenApply" "Settings/Builders/GenPrimopCode" "Settings/Builders/Ghc" "Settings/Builders/GhcPkg" @@ -154,12 +155,12 @@ "Utilities" "Way" "Way/Type" - ] ++ (pkgs.lib).optional (flags.selftest) "Rules/Selftest"; + ] ++ pkgs.lib.optional (flags.selftest) "Rules/Selftest"; hsSourceDirs = [ "." "src" ]; mainPath = ([ "Main.hs" - ] ++ (pkgs.lib).optional (flags.threaded) "") ++ (pkgs.lib).optional (flags.selftest) ""; - }; + ] ++ pkgs.lib.optional (flags.threaded) "") ++ pkgs.lib.optional (flags.selftest) ""; }; }; - } // rec { src = (pkgs.lib).mkDefault ../.; } \ No newline at end of file + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix index 3993fc7083..dabbcbdee8 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/Cabal-syntax.nix @@ -21,7 +21,7 @@ synopsis = "A library for working with .cabal files"; description = "This library provides tools for reading and manipulating the .cabal file\nformat."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -39,17 +39,17 @@ (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."time" or (errorHandler.buildDepError "time")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ] ++ (if system.isWindows + ] ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-syntax-3.8.1.0.tar.gz"; sha256 = "07e8ddb19fe01781485f1522b6afc22aba680b0ab28ebe6bbfb84a2dd698ce0f"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal-syntax\r\nversion: 3.8.1.0\r\nx-revision: 3\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A library for working with .cabal files\r\ndescription:\r\n This library provides tools for reading and manipulating the .cabal file\r\n format.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal-syntax\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.9 && < 5,\r\n binary >= 0.7 && < 0.9,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n mtl >= 2.1 && < 2.4,\r\n parsec >= 3.1.13.0 && < 3.2,\r\n pretty >= 1.1.1 && < 1.2,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n time >= 1.4.0.1 && < 1.13,\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7)\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc < 8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack\r\n Distribution.CabalSpecVersion\r\n Distribution.Compat.Binary\r\n Distribution.Compat.CharParsing\r\n Distribution.Compat.DList\r\n Distribution.Compat.Exception\r\n Distribution.Compat.Graph\r\n Distribution.Compat.Lens\r\n Distribution.Compat.MonadFail\r\n Distribution.Compat.Newtype\r\n Distribution.Compat.NonEmptySet\r\n Distribution.Compat.Parsing\r\n Distribution.Compat.Prelude\r\n Distribution.Compat.Semigroup\r\n Distribution.Compat.Typeable\r\n Distribution.Compiler\r\n Distribution.FieldGrammar\r\n Distribution.FieldGrammar.Class\r\n Distribution.FieldGrammar.FieldDescrs\r\n Distribution.FieldGrammar.Newtypes\r\n Distribution.FieldGrammar.Parsec\r\n Distribution.FieldGrammar.Pretty\r\n Distribution.Fields\r\n Distribution.Fields.ConfVar\r\n Distribution.Fields.Field\r\n Distribution.Fields.Lexer\r\n Distribution.Fields.LexerMonad\r\n Distribution.Fields.ParseResult\r\n Distribution.Fields.Parser\r\n Distribution.Fields.Pretty\r\n Distribution.InstalledPackageInfo\r\n Distribution.License\r\n Distribution.ModuleName\r\n Distribution.Package\r\n Distribution.PackageDescription\r\n Distribution.PackageDescription.Configuration\r\n Distribution.PackageDescription.FieldGrammar\r\n Distribution.PackageDescription.Parsec\r\n Distribution.PackageDescription.PrettyPrint\r\n Distribution.PackageDescription.Quirks\r\n Distribution.PackageDescription.Utils\r\n Distribution.Parsec\r\n Distribution.Parsec.Error\r\n Distribution.Parsec.FieldLineStream\r\n Distribution.Parsec.Position\r\n Distribution.Parsec.Warning\r\n Distribution.Pretty\r\n Distribution.SPDX\r\n Distribution.SPDX.License\r\n Distribution.SPDX.LicenseExceptionId\r\n Distribution.SPDX.LicenseExpression\r\n Distribution.SPDX.LicenseId\r\n Distribution.SPDX.LicenseListVersion\r\n Distribution.SPDX.LicenseReference\r\n Distribution.System\r\n Distribution.Text\r\n Distribution.Types.AbiDependency\r\n Distribution.Types.AbiHash\r\n Distribution.Types.Benchmark\r\n Distribution.Types.Benchmark.Lens\r\n Distribution.Types.BenchmarkInterface\r\n Distribution.Types.BenchmarkType\r\n Distribution.Types.BuildInfo\r\n Distribution.Types.BuildInfo.Lens\r\n Distribution.Types.BuildType\r\n Distribution.Types.Component\r\n Distribution.Types.ComponentId\r\n Distribution.Types.ComponentName\r\n Distribution.Types.ComponentRequestedSpec\r\n Distribution.Types.CondTree\r\n Distribution.Types.Condition\r\n Distribution.Types.ConfVar\r\n Distribution.Types.Dependency\r\n Distribution.Types.DependencyMap\r\n Distribution.Types.ExeDependency\r\n Distribution.Types.Executable\r\n Distribution.Types.Executable.Lens\r\n Distribution.Types.ExecutableScope\r\n Distribution.Types.ExposedModule\r\n Distribution.Types.Flag\r\n Distribution.Types.ForeignLib\r\n Distribution.Types.ForeignLib.Lens\r\n Distribution.Types.ForeignLibOption\r\n Distribution.Types.ForeignLibType\r\n Distribution.Types.GenericPackageDescription\r\n Distribution.Types.GenericPackageDescription.Lens\r\n Distribution.Types.HookedBuildInfo\r\n Distribution.Types.IncludeRenaming\r\n Distribution.Types.InstalledPackageInfo\r\n Distribution.Types.InstalledPackageInfo.Lens\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar\r\n Distribution.Types.LegacyExeDependency\r\n Distribution.Types.Lens\r\n Distribution.Types.Library\r\n Distribution.Types.Library.Lens\r\n Distribution.Types.LibraryName\r\n Distribution.Types.LibraryVisibility\r\n Distribution.Types.Mixin\r\n Distribution.Types.Module\r\n Distribution.Types.ModuleReexport\r\n Distribution.Types.ModuleRenaming\r\n Distribution.Types.MungedPackageId\r\n Distribution.Types.MungedPackageName\r\n Distribution.Types.PackageDescription\r\n Distribution.Types.PackageDescription.Lens\r\n Distribution.Types.PackageId\r\n Distribution.Types.PackageId.Lens\r\n Distribution.Types.PackageName\r\n Distribution.Types.PackageVersionConstraint\r\n Distribution.Types.PkgconfigDependency\r\n Distribution.Types.PkgconfigName\r\n Distribution.Types.PkgconfigVersion\r\n Distribution.Types.PkgconfigVersionRange\r\n Distribution.Types.SetupBuildInfo\r\n Distribution.Types.SetupBuildInfo.Lens\r\n Distribution.Types.SourceRepo\r\n Distribution.Types.SourceRepo.Lens\r\n Distribution.Types.TestSuite\r\n Distribution.Types.TestSuite.Lens\r\n Distribution.Types.TestSuiteInterface\r\n Distribution.Types.TestType\r\n Distribution.Types.UnitId\r\n Distribution.Types.UnqualComponentName\r\n Distribution.Types.Version\r\n Distribution.Types.VersionInterval\r\n Distribution.Types.VersionInterval.Legacy\r\n Distribution.Types.VersionRange\r\n Distribution.Types.VersionRange.Internal\r\n Distribution.Utils.Base62\r\n Distribution.Utils.Generic\r\n Distribution.Utils.MD5\r\n Distribution.Utils.Path\r\n Distribution.Utils.ShortText\r\n Distribution.Utils.String\r\n Distribution.Utils.Structured\r\n Distribution.Version\r\n Language.Haskell.Extension\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/Cabal.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/Cabal.nix index 22899ece21..be0b5019d9 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/Cabal.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/Cabal.nix @@ -21,7 +21,7 @@ synopsis = "A framework for packaging Haskell software"; description = "The Haskell Common Architecture for Building Applications and\nLibraries: a framework defining a common interface for authors to more\neasily build their Haskell applications in a portable way.\n\nThe Haskell Cabal is part of a larger infrastructure for distributing,\norganizing, and cataloging Haskell libraries and tools."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ([ @@ -40,17 +40,17 @@ (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."parsec" or (errorHandler.buildDepError "parsec")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.2") (hsPkgs."process" or (errorHandler.buildDepError "process"))) ++ (if system.isWindows then [ (hsPkgs."Win32" or (errorHandler.buildDepError "Win32")) ] else [ (hsPkgs."unix" or (errorHandler.buildDepError "unix")) ]); buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/Cabal-3.8.1.0.tar.gz"; sha256 = "7464cbe6c2f3d7e5d0232023a1a7330621f8b24853cb259fc89a2af85b736608"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.22\r\nname: Cabal\r\nversion: 3.8.1.0\r\nx-revision: 2\r\ncopyright: 2003-2022, Cabal Development Team (see AUTHORS file)\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Cabal Development Team \r\nmaintainer: cabal-devel@haskell.org\r\nhomepage: http://www.haskell.org/cabal/\r\nbug-reports: https://github.com/haskell/cabal/issues\r\nsynopsis: A framework for packaging Haskell software\r\ndescription:\r\n The Haskell Common Architecture for Building Applications and\r\n Libraries: a framework defining a common interface for authors to more\r\n easily build their Haskell applications in a portable way.\r\n .\r\n The Haskell Cabal is part of a larger infrastructure for distributing,\r\n organizing, and cataloging Haskell libraries and tools.\r\ncategory: Distribution\r\nbuild-type: Simple\r\n-- If we use a new Cabal feature, this needs to be changed to Custom so\r\n-- we can bootstrap.\r\n\r\nextra-source-files:\r\n README.md ChangeLog.md\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/cabal/\r\n subdir: Cabal\r\n\r\nlibrary\r\n default-language: Haskell2010\r\n hs-source-dirs: src\r\n\r\n build-depends:\r\n Cabal-syntax >= 3.8 && < 3.9,\r\n array >= 0.4.0.1 && < 0.6,\r\n base >= 4.6 && < 5,\r\n bytestring >= 0.10.0.0 && < 0.12,\r\n containers >= 0.5.0.0 && < 0.7,\r\n deepseq >= 1.3.0.1 && < 1.5,\r\n directory >= 1.2 && < 1.4,\r\n filepath >= 1.3.0.1 && < 1.5,\r\n pretty >= 1.1.1 && < 1.2,\r\n process >= 1.2.1.0 && < 1.7,\r\n time >= 1.4.0.1 && < 1.13\r\n\r\n -- PR #8802: moved conditional process lower bound to cabal-install package\r\n if impl(ghc >=8.2)\r\n build-depends: process >= 1.2.1.0\r\n\r\n if os(windows)\r\n build-depends: Win32 >= 2.3.0.0 && < 2.14\r\n else\r\n build-depends: unix >= 2.6.0.0 && < 2.9\r\n\r\n ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates\r\n ghc-options: -Wcompat -Wnoncanonical-monad-instances\r\n\r\n if impl(ghc <8.8)\r\n ghc-options: -Wnoncanonical-monadfail-instances\r\n\r\n exposed-modules:\r\n Distribution.Backpack.Configure\r\n Distribution.Backpack.ComponentsGraph\r\n Distribution.Backpack.ConfiguredComponent\r\n Distribution.Backpack.DescribeUnitId\r\n Distribution.Backpack.FullUnitId\r\n Distribution.Backpack.LinkedComponent\r\n Distribution.Backpack.ModSubst\r\n Distribution.Backpack.ModuleShape\r\n Distribution.Backpack.PreModuleShape\r\n Distribution.Utils.IOData\r\n Distribution.Utils.LogProgress\r\n Distribution.Utils.MapAccum\r\n Distribution.Compat.CreatePipe\r\n Distribution.Compat.Directory\r\n Distribution.Compat.Environment\r\n Distribution.Compat.FilePath\r\n Distribution.Compat.Internal.TempFile\r\n Distribution.Compat.ResponseFile\r\n Distribution.Compat.Prelude.Internal\r\n Distribution.Compat.Process\r\n Distribution.Compat.Stack\r\n Distribution.Compat.Time\r\n Distribution.Make\r\n Distribution.PackageDescription.Check\r\n Distribution.ReadE\r\n Distribution.Simple\r\n Distribution.Simple.Bench\r\n Distribution.Simple.Build\r\n Distribution.Simple.Build.Macros\r\n Distribution.Simple.Build.PathsModule\r\n Distribution.Simple.BuildPaths\r\n Distribution.Simple.BuildTarget\r\n Distribution.Simple.BuildToolDepends\r\n Distribution.Simple.CCompiler\r\n Distribution.Simple.Command\r\n Distribution.Simple.Compiler\r\n Distribution.Simple.Configure\r\n Distribution.Simple.Flag\r\n Distribution.Simple.GHC\r\n Distribution.Simple.GHCJS\r\n Distribution.Simple.Haddock\r\n Distribution.Simple.Glob\r\n Distribution.Simple.HaskellSuite\r\n Distribution.Simple.Hpc\r\n Distribution.Simple.Install\r\n Distribution.Simple.InstallDirs\r\n Distribution.Simple.InstallDirs.Internal\r\n Distribution.Simple.LocalBuildInfo\r\n Distribution.Simple.PackageDescription\r\n Distribution.Simple.PackageIndex\r\n Distribution.Simple.PreProcess\r\n Distribution.Simple.PreProcess.Unlit\r\n Distribution.Simple.Program\r\n Distribution.Simple.Program.Ar\r\n Distribution.Simple.Program.Builtin\r\n Distribution.Simple.Program.Db\r\n Distribution.Simple.Program.Find\r\n Distribution.Simple.Program.GHC\r\n Distribution.Simple.Program.HcPkg\r\n Distribution.Simple.Program.Hpc\r\n Distribution.Simple.Program.Internal\r\n Distribution.Simple.Program.Ld\r\n Distribution.Simple.Program.ResponseFile\r\n Distribution.Simple.Program.Run\r\n Distribution.Simple.Program.Script\r\n Distribution.Simple.Program.Strip\r\n Distribution.Simple.Program.Types\r\n Distribution.Simple.Register\r\n Distribution.Simple.Setup\r\n Distribution.Simple.ShowBuildInfo\r\n Distribution.Simple.SrcDist\r\n Distribution.Simple.Test\r\n Distribution.Simple.Test.ExeV10\r\n Distribution.Simple.Test.LibV09\r\n Distribution.Simple.Test.Log\r\n Distribution.Simple.UHC\r\n Distribution.Simple.UserHooks\r\n Distribution.Simple.Utils\r\n Distribution.TestSuite\r\n Distribution.Types.AnnotatedId\r\n Distribution.Types.ComponentInclude\r\n Distribution.Types.DumpBuildInfo\r\n Distribution.Types.PackageName.Magic\r\n Distribution.Types.ComponentLocalBuildInfo\r\n Distribution.Types.LocalBuildInfo\r\n Distribution.Types.TargetInfo\r\n Distribution.Types.GivenComponent\r\n Distribution.Utils.Json\r\n Distribution.Utils.NubList\r\n Distribution.Utils.Progress\r\n Distribution.Verbosity\r\n Distribution.Verbosity.Internal\r\n\r\n -- We reexport all of Cabal-syntax to aid in compatibility for downstream\r\n -- users. In the future we may opt to deprecate some or all of these exports.\r\n -- See haskell/Cabal#7974.\r\n reexported-modules:\r\n Distribution.Backpack,\r\n Distribution.CabalSpecVersion,\r\n Distribution.Compat.Binary,\r\n Distribution.Compat.CharParsing,\r\n Distribution.Compat.DList,\r\n Distribution.Compat.Exception,\r\n Distribution.Compat.Graph,\r\n Distribution.Compat.Lens,\r\n Distribution.Compat.MonadFail,\r\n Distribution.Compat.Newtype,\r\n Distribution.Compat.NonEmptySet,\r\n Distribution.Compat.Parsing,\r\n Distribution.Compat.Prelude,\r\n Distribution.Compat.Semigroup,\r\n Distribution.Compat.Typeable,\r\n Distribution.Compiler,\r\n Distribution.FieldGrammar,\r\n Distribution.FieldGrammar.Class,\r\n Distribution.FieldGrammar.FieldDescrs,\r\n Distribution.FieldGrammar.Newtypes,\r\n Distribution.FieldGrammar.Parsec,\r\n Distribution.FieldGrammar.Pretty,\r\n Distribution.Fields,\r\n Distribution.Fields.ConfVar,\r\n Distribution.Fields.Field,\r\n Distribution.Fields.Lexer,\r\n Distribution.Fields.LexerMonad,\r\n Distribution.Fields.ParseResult,\r\n Distribution.Fields.Parser,\r\n Distribution.Fields.Pretty,\r\n Distribution.InstalledPackageInfo,\r\n Distribution.License,\r\n Distribution.ModuleName,\r\n Distribution.Package,\r\n Distribution.PackageDescription,\r\n Distribution.PackageDescription.Configuration,\r\n Distribution.PackageDescription.FieldGrammar,\r\n Distribution.PackageDescription.Parsec,\r\n Distribution.PackageDescription.PrettyPrint,\r\n Distribution.PackageDescription.Quirks,\r\n Distribution.PackageDescription.Utils,\r\n Distribution.Parsec,\r\n Distribution.Parsec.Error,\r\n Distribution.Parsec.FieldLineStream,\r\n Distribution.Parsec.Position,\r\n Distribution.Parsec.Warning,\r\n Distribution.Pretty,\r\n Distribution.SPDX,\r\n Distribution.SPDX.License,\r\n Distribution.SPDX.LicenseExceptionId,\r\n Distribution.SPDX.LicenseExpression,\r\n Distribution.SPDX.LicenseId,\r\n Distribution.SPDX.LicenseListVersion,\r\n Distribution.SPDX.LicenseReference,\r\n Distribution.System,\r\n Distribution.Text,\r\n Distribution.Types.AbiDependency,\r\n Distribution.Types.AbiHash,\r\n Distribution.Types.Benchmark,\r\n Distribution.Types.Benchmark.Lens,\r\n Distribution.Types.BenchmarkInterface,\r\n Distribution.Types.BenchmarkType,\r\n Distribution.Types.BuildInfo,\r\n Distribution.Types.BuildInfo.Lens,\r\n Distribution.Types.BuildType,\r\n Distribution.Types.Component,\r\n Distribution.Types.ComponentId,\r\n Distribution.Types.ComponentName,\r\n Distribution.Types.ComponentRequestedSpec,\r\n Distribution.Types.CondTree,\r\n Distribution.Types.Condition,\r\n Distribution.Types.ConfVar,\r\n Distribution.Types.Dependency,\r\n Distribution.Types.DependencyMap,\r\n Distribution.Types.ExeDependency,\r\n Distribution.Types.Executable,\r\n Distribution.Types.Executable.Lens,\r\n Distribution.Types.ExecutableScope,\r\n Distribution.Types.ExposedModule,\r\n Distribution.Types.Flag,\r\n Distribution.Types.ForeignLib,\r\n Distribution.Types.ForeignLib.Lens,\r\n Distribution.Types.ForeignLibOption,\r\n Distribution.Types.ForeignLibType,\r\n Distribution.Types.GenericPackageDescription,\r\n Distribution.Types.GenericPackageDescription.Lens,\r\n Distribution.Types.HookedBuildInfo,\r\n Distribution.Types.IncludeRenaming,\r\n Distribution.Types.InstalledPackageInfo,\r\n Distribution.Types.InstalledPackageInfo.Lens,\r\n Distribution.Types.InstalledPackageInfo.FieldGrammar,\r\n Distribution.Types.LegacyExeDependency,\r\n Distribution.Types.Lens,\r\n Distribution.Types.Library,\r\n Distribution.Types.Library.Lens,\r\n Distribution.Types.LibraryName,\r\n Distribution.Types.LibraryVisibility,\r\n Distribution.Types.Mixin,\r\n Distribution.Types.Module,\r\n Distribution.Types.ModuleReexport,\r\n Distribution.Types.ModuleRenaming,\r\n Distribution.Types.MungedPackageId,\r\n Distribution.Types.MungedPackageName,\r\n Distribution.Types.PackageDescription,\r\n Distribution.Types.PackageDescription.Lens,\r\n Distribution.Types.PackageId,\r\n Distribution.Types.PackageId.Lens,\r\n Distribution.Types.PackageName,\r\n Distribution.Types.PackageVersionConstraint,\r\n Distribution.Types.PkgconfigDependency,\r\n Distribution.Types.PkgconfigName,\r\n Distribution.Types.PkgconfigVersion,\r\n Distribution.Types.PkgconfigVersionRange,\r\n Distribution.Types.SetupBuildInfo,\r\n Distribution.Types.SetupBuildInfo.Lens,\r\n Distribution.Types.SourceRepo,\r\n Distribution.Types.SourceRepo.Lens,\r\n Distribution.Types.TestSuite,\r\n Distribution.Types.TestSuite.Lens,\r\n Distribution.Types.TestSuiteInterface,\r\n Distribution.Types.TestType,\r\n Distribution.Types.UnitId,\r\n Distribution.Types.UnqualComponentName,\r\n Distribution.Types.Version,\r\n Distribution.Types.VersionInterval,\r\n Distribution.Types.VersionInterval.Legacy,\r\n Distribution.Types.VersionRange,\r\n Distribution.Types.VersionRange.Internal,\r\n Distribution.Utils.Base62,\r\n Distribution.Utils.Generic,\r\n Distribution.Utils.MD5,\r\n Distribution.Utils.Path,\r\n Distribution.Utils.ShortText,\r\n Distribution.Utils.String,\r\n Distribution.Utils.Structured,\r\n Distribution.Version,\r\n Language.Haskell.Extension\r\n\r\n -- Parsec parser-related modules\r\n build-depends:\r\n -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity\r\n -- See also https://github.com/ekmett/transformers-compat/issues/35\r\n transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7),\r\n mtl >= 2.1 && < 2.4,\r\n text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),\r\n parsec >= 3.1.13.0 && < 3.2\r\n\r\n other-modules:\r\n Distribution.Backpack.PreExistingComponent\r\n Distribution.Backpack.ReadyComponent\r\n Distribution.Backpack.MixLink\r\n Distribution.Backpack.ModuleScope\r\n Distribution.Backpack.UnifyM\r\n Distribution.Backpack.Id\r\n Distribution.Utils.UnionFind\r\n Distribution.Compat.Async\r\n Distribution.Compat.CopyFile\r\n Distribution.Compat.GetShortPathName\r\n Distribution.Compat.SnocList\r\n Distribution.GetOpt\r\n Distribution.Lex\r\n Distribution.Simple.Build.Macros.Z\r\n Distribution.Simple.Build.PathsModule.Z\r\n Distribution.Simple.GHC.EnvironmentParser\r\n Distribution.Simple.GHC.Internal\r\n Distribution.Simple.GHC.ImplInfo\r\n Distribution.ZinzaPrelude\r\n Paths_Cabal\r\n\r\n other-extensions:\r\n BangPatterns\r\n CPP\r\n DefaultSignatures\r\n DeriveDataTypeable\r\n DeriveFoldable\r\n DeriveFunctor\r\n DeriveGeneric\r\n DeriveTraversable\r\n ExistentialQuantification\r\n FlexibleContexts\r\n FlexibleInstances\r\n GeneralizedNewtypeDeriving\r\n ImplicitParams\r\n KindSignatures\r\n LambdaCase\r\n NondecreasingIndentation\r\n OverloadedStrings\r\n PatternSynonyms\r\n RankNTypes\r\n RecordWildCards\r\n ScopedTypeVariables\r\n StandaloneDeriving\r\n Trustworthy\r\n TypeFamilies\r\n TypeOperators\r\n TypeSynonymInstances\r\n UndecidableInstances\r\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix index 31390ca93b..62e36aa8b6 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/QuickCheck.nix @@ -21,99 +21,99 @@ synopsis = "Automatic testing of Haskell programs"; description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((((((([ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - ] ++ [ + ] ++ [ (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]) ++ (pkgs.lib).optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ (pkgs.lib).optionals (compiler.isGhc && true) [ + ]) ++ pkgs.lib.optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ pkgs.lib.optionals (compiler.isGhc && true) [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ (pkgs.lib).optionals (compiler.isUhc && true) [ + ]) ++ pkgs.lib.optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ pkgs.lib.optionals (compiler.isUhc && true) [ (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) - ]; + ]; buildable = true; - }; + }; tests = { "test-quickcheck" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gcoarbitrary" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-generators" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gshrink" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-terminal" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-monadfix" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-split" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "test-quickcheck-misc" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; - }); - }) // { + }); + }) // { package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix index 31d3b31c55..c3d272500b 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/base16-bytestring.nix @@ -21,15 +21,15 @@ synopsis = "RFC 4648-compliant Base16 encodings for ByteStrings"; description = "This package provides support for encoding and decoding binary data according\nto @base16@ (see also ) for\nstrict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n\nSee the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\nprovides an uniform API providing conversion paths between more binary and textual types."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -41,10 +41,10 @@ (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -53,16 +53,16 @@ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/base16-bytestring-1.0.2.0.tar.gz"; sha256 = "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784"; - }); - }) // { - package-description-override = "cabal-version: 1.12\nname: base16-bytestring\nversion: 1.0.2.0\nsynopsis: RFC 4648-compliant Base16 encodings for ByteStrings\ndescription:\n This package provides support for encoding and decoding binary data according\n to @base16@ (see also ) for\n strict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n .\n See the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\n provides an uniform API providing conversion paths between more binary and textual types.\n\nhomepage: http://github.com/haskell/base16-bytestring\nbug-reports: http://github.com/haskell/base16-bytestring/issues\nlicense: BSD3\nlicense-file: LICENSE\ncopyright:\n Copyright 2011 MailRank, Inc.;\n Copyright 2010-2020 Bryan O'Sullivan et al.\n\nauthor: Bryan O'Sullivan \nmaintainer:\n Herbert Valerio Riedel ,\n Mikhail Glushenkov ,\n Emily Pillmore \n\ncategory: Data\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\n\ntested-with:\n GHC ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.1\n\nsource-repository head\n type: git\n location: http://github.com/haskell/base16-bytestring\n\nlibrary\n other-modules: Data.ByteString.Base16.Internal\n exposed-modules:\n Data.ByteString.Base16\n Data.ByteString.Base16.Lazy\n\n build-depends:\n base >=4.9 && <5\n , bytestring >=0.9 && <0.12\n\n ghc-options: -Wall -funbox-strict-fields\n default-language: Haskell2010\n\ntest-suite test\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends:\n base\n , base16-bytestring\n , bytestring\n , HUnit\n , QuickCheck\n , test-framework\n , test-framework-hunit\n , test-framework-quickcheck2\n\n default-language: Haskell2010\n\nbenchmark bench\n type: exitcode-stdio-1.0\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n build-depends:\n base >=4 && <5\n , base16-bytestring\n , bytestring\n , criterion\n , deepseq\n\n default-language: Haskell2010\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: base16-bytestring\nversion: 1.0.2.0\nx-revision: 1\nsynopsis: RFC 4648-compliant Base16 encodings for ByteStrings\ndescription:\n This package provides support for encoding and decoding binary data according\n to @base16@ (see also ) for\n strict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n .\n See the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\n provides an uniform API providing conversion paths between more binary and textual types.\n\nhomepage: http://github.com/haskell/base16-bytestring\nbug-reports: http://github.com/haskell/base16-bytestring/issues\nlicense: BSD3\nlicense-file: LICENSE\ncopyright:\n Copyright 2011 MailRank, Inc.;\n Copyright 2010-2020 Bryan O'Sullivan et al.\n\nauthor: Bryan O'Sullivan \nmaintainer:\n Herbert Valerio Riedel ,\n Mikhail Glushenkov ,\n Emily Pillmore \n\ncategory: Data\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.3\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n\nsource-repository head\n type: git\n location: http://github.com/haskell/base16-bytestring\n\nlibrary\n other-modules: Data.ByteString.Base16.Internal\n exposed-modules:\n Data.ByteString.Base16\n Data.ByteString.Base16.Lazy\n\n build-depends:\n base >=4.9 && <5\n , bytestring >=0.9 && <0.13\n\n ghc-options: -Wall -funbox-strict-fields\n default-language: Haskell2010\n\ntest-suite test\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends:\n base\n , base16-bytestring\n , bytestring\n , HUnit\n , QuickCheck\n , test-framework\n , test-framework-hunit\n , test-framework-quickcheck2\n\n default-language: Haskell2010\n\nbenchmark bench\n type: exitcode-stdio-1.0\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n build-depends:\n base >=4 && <5\n , base16-bytestring\n , bytestring\n , criterion\n , deepseq\n\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/clock.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/clock.nix index de66c1339a..1db6e2d90d 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/clock.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/clock.nix @@ -11,22 +11,22 @@ flags = { llvm = false; }; package = { specVersion = "1.10"; - identifier = { name = "clock"; version = "0.8.3"; }; + identifier = { name = "clock"; version = "0.8.4"; }; license = "BSD-3-Clause"; - copyright = "Copyright © Cetin Sert 2009-2016, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; - maintainer = "Cetin Sert , Corsis Research"; - author = "Cetin Sert , Corsis Research"; + copyright = "Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; + maintainer = "Cetin Sert , Elefunc, Inc."; + author = "Cetin Sert , Elefunc, Inc."; homepage = "https://github.com/corsis/clock"; url = ""; synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -34,26 +34,26 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/clock-0.8.3.tar.gz"; - sha256 = "845ce5db4c98cefd517323e005f87effceff886987305e421c4ef616dc0505d1"; - }); - }) // { - package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.3\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2016, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Corsis Research\nmaintainer: Cetin Sert , Corsis Research\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.2.1\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: git://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; + sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix index 5d4a3157f0..7fe8a112a9 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/cryptohash-sha256.nix @@ -21,31 +21,31 @@ synopsis = "Fast, pure and practical SHA-256 implementation"; description = "A practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n\n\nAdditionally, this package provides support for\n\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n\n=== Relationship to the @cryptohash@ package and its API\n\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) - ] ++ (if flags.use-cbits + ] ++ (if flags.use-cbits then [ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ] + ] else [ (hsPkgs."cryptohash-sha256-pure" or (errorHandler.buildDepError "cryptohash-sha256-pure")) - ]); + ]); buildable = true; - }; + }; exes = { "sha256sum" = { - depends = (pkgs.lib).optionals (flags.exe) [ + depends = pkgs.lib.optionals (flags.exe) [ (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) - ]; + ]; buildable = if flags.exe then true else false; - }; }; + }; tests = { "test-sha256" = { depends = [ @@ -57,10 +57,10 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench-sha256" = { depends = [ @@ -69,16 +69,16 @@ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/cryptohash-sha256-0.11.102.1.tar.gz"; sha256 = "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6"; - }); - }) // { - package-description-override = "cabal-version: 2.0\nname: cryptohash-sha256\nversion: 0.11.102.1\nx-revision: 2\n\nsynopsis: Fast, pure and practical SHA-256 implementation\ndescription: {\n\nA practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n.\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n.\n\n.\nAdditionally, this package provides support for\n.\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n.\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n.\n=== Relationship to the @cryptohash@ package and its API\n.\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n.\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).\n\n}\n\nlicense: BSD3\nlicense-file: LICENSE\ncopyright: Vincent Hanquez, Herbert Valerio Riedel\nmaintainer: Herbert Valerio Riedel \nhomepage: https://github.com/hvr/cryptohash-sha256\nbug-reports: https://github.com/hvr/cryptohash-sha256/issues\ncategory: Data, Cryptography\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n GHC == 7.6.3\n GHC == 7.4.2\n\nextra-source-files: cbits/hs_sha256.h\n changelog.md\n\nsource-repository head\n type: git\n location: https://github.com/hvr/cryptohash-sha256.git\n\nflag exe\n description: Enable building @sha256sum@ executable\n manual: True\n default: False\n\nflag use-cbits\n description: Use fast optimized C routines via FFI; if flag is disabled falls back to non-FFI Haskell optimized implementation.\n manual: True\n default: True\n\nlibrary\n default-language: Haskell2010\n\n ghc-options: -Wall\n\n build-depends: base >= 4.5 && < 4.19\n\n exposed-modules: Crypto.Hash.SHA256\n\n if flag(use-cbits)\n build-depends: bytestring ^>= 0.9.2 || ^>= 0.10.0 || ^>= 0.11.0\n\n other-extensions: BangPatterns\n CApiFFI\n CPP\n Trustworthy\n Unsafe\n\n hs-source-dirs: src\n other-modules: Crypto.Hash.SHA256.FFI\n Compat\n include-dirs: cbits\n else\n hs-source-dirs: src-pure\n build-depends: cryptohash-sha256-pure ^>= 0.1.0\n\nexecutable sha256sum\n default-language: Haskell2010\n hs-source-dirs: src-exe\n main-is: sha256sum.hs\n ghc-options: -Wall -threaded\n if flag(exe)\n other-extensions: RecordWildCards\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n else\n buildable: False\n\ntest-suite test-sha256\n default-language: Haskell2010\n other-extensions: OverloadedStrings\n type: exitcode-stdio-1.0\n hs-source-dirs: src-tests\n main-is: test-sha256.hs\n ghc-options: -Wall -threaded\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n , SHA ^>= 1.6.4\n , tasty ^>= 1.4\n , tasty-quickcheck ^>= 0.10\n , tasty-hunit ^>= 0.10\n\nbenchmark bench-sha256\n default-language: Haskell2010\n other-extensions: BangPatterns\n type: exitcode-stdio-1.0\n main-is: bench-sha256.hs\n hs-source-dirs: src-bench\n build-depends: cryptohash-sha256\n , SHA ^>= 1.6.4\n , base\n , bytestring\n , criterion ^>= 1.5 || ^>=1.6\n\n -- not yet public\n -- build-depends: cryptohash-sha256-pure ^>= 0.1.0\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "cabal-version: 2.0\nname: cryptohash-sha256\nversion: 0.11.102.1\nx-revision: 3\n\nsynopsis: Fast, pure and practical SHA-256 implementation\ndescription: {\n\nA practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n.\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n.\n\n.\nAdditionally, this package provides support for\n.\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n.\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n.\n=== Relationship to the @cryptohash@ package and its API\n.\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n.\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).\n\n}\n\nlicense: BSD3\nlicense-file: LICENSE\ncopyright: Vincent Hanquez, Herbert Valerio Riedel\nmaintainer: Herbert Valerio Riedel \nhomepage: https://github.com/hvr/cryptohash-sha256\nbug-reports: https://github.com/hvr/cryptohash-sha256/issues\ncategory: Data, Cryptography\nbuild-type: Simple\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.2\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n\nextra-source-files: cbits/hs_sha256.h\n changelog.md\n\nsource-repository head\n type: git\n location: https://github.com/hvr/cryptohash-sha256.git\n\nflag exe\n description: Enable building @sha256sum@ executable\n manual: True\n default: False\n\nflag use-cbits\n description: Use fast optimized C routines via FFI; if flag is disabled falls back to non-FFI Haskell optimized implementation.\n manual: True\n default: True\n\nlibrary\n default-language: Haskell2010\n\n ghc-options: -Wall\n\n build-depends: base >= 4.5 && < 4.20\n\n exposed-modules: Crypto.Hash.SHA256\n\n if flag(use-cbits)\n build-depends: bytestring ^>= 0.9.2.0 || ^>= 0.10.0.0 || ^>= 0.11.0.0 || ^>= 0.12.0.2\n\n other-extensions: BangPatterns\n CApiFFI\n CPP\n Trustworthy\n Unsafe\n\n hs-source-dirs: src\n other-modules: Crypto.Hash.SHA256.FFI\n Compat\n include-dirs: cbits\n else\n hs-source-dirs: src-pure\n build-depends: cryptohash-sha256-pure ^>= 0.1.0\n\nexecutable sha256sum\n default-language: Haskell2010\n hs-source-dirs: src-exe\n main-is: sha256sum.hs\n ghc-options: -Wall -threaded\n if flag(exe)\n other-extensions: RecordWildCards\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n else\n buildable: False\n\ntest-suite test-sha256\n default-language: Haskell2010\n other-extensions: OverloadedStrings\n type: exitcode-stdio-1.0\n hs-source-dirs: src-tests\n main-is: test-sha256.hs\n ghc-options: -Wall -threaded\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n , SHA ^>= 1.6.4\n , tasty ^>= 1.4 || ^>= 1.5\n , tasty-quickcheck ^>= 0.10\n , tasty-hunit ^>= 0.10\n\nbenchmark bench-sha256\n default-language: Haskell2010\n other-extensions: BangPatterns\n type: exitcode-stdio-1.0\n main-is: bench-sha256.hs\n hs-source-dirs: src-bench\n build-depends: cryptohash-sha256\n , SHA ^>= 1.6.4\n , base\n , bytestring\n , criterion ^>= 1.5 || ^>=1.6\n\n -- not yet public\n -- build-depends: cryptohash-sha256-pure ^>= 0.1.0\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/extra.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/extra.nix index 450be82c4b..41668cf6bc 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/extra.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/extra.nix @@ -21,7 +21,7 @@ synopsis = "Extra functions I use."; description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -31,9 +31,9 @@ (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; tests = { "extra-test" = { depends = [ @@ -43,16 +43,16 @@ (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/filepattern.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/filepattern.nix index 13bbd09e88..385c502003 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/filepattern.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/filepattern.nix @@ -21,7 +21,7 @@ synopsis = "File path glob-like matching"; description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - ]; + ]; buildable = true; - }; + }; tests = { "filepattern-test" = { depends = [ @@ -41,16 +41,16 @@ (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/hashable.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/hashable.nix index 288fdf7407..4b125fa0bc 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/hashable.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/hashable.nix @@ -11,7 +11,7 @@ flags = { integer-gmp = true; random-initial-seed = false; }; package = { specVersion = "1.12"; - identifier = { name = "hashable"; version = "1.4.2.0"; }; + identifier = { name = "hashable"; version = "1.4.3.0"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "Oleg Grenrus "; @@ -19,9 +19,9 @@ homepage = "http://github.com/haskell-unordered-containers/hashable"; url = ""; synopsis = "A class for types that can be converted to a hash value"; - description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values."; + description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; buildType = "Simple"; - }; + }; components = { "library" = { depends = (([ @@ -32,19 +32,19 @@ (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && (compiler.version).ge "9" + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && compiler.version.ge "9" then [ (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) else if flags.integer-gmp then [ (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) - ] + ] else [ (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) - ]); + ]); buildable = true; - }; + }; tests = { "hashable-tests" = { depends = [ @@ -59,24 +59,24 @@ (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; "hashable-examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/hashable-1.4.2.0.tar.gz"; - sha256 = "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8"; - }); - }) // { - package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.2.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.5\n || ==9.4.4\n || ==9.6.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.19\n , bytestring >=0.10.8.2 && <0.12\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.5\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.1\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; + sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/heaps.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/heaps.nix index dc77aed1f4..e759e305bf 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/heaps.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/heaps.nix @@ -21,18 +21,18 @@ synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; - }); - }) // { + }); + }) // { package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix index 0237404c41..40ea1148c6 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-dgtable.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified jquery.dgtable code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-dgtable-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-flot.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-flot.nix index ba292fc8b2..67980dd7ba 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-flot.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-flot.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified flot code"; description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-flot-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix index 9ecdc931ed..05e54a25ab 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/js-jquery.nix @@ -21,28 +21,28 @@ synopsis = "Obtain minified jQuery code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-jquery-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/primitive.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/primitive.nix index bbc2dd58da..b5683f2c83 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/primitive.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/primitive.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "2.0"; - identifier = { name = "primitive"; version = "0.8.0.0"; }; + identifier = { name = "primitive"; version = "0.9.0.0"; }; license = "BSD-3-Clause"; copyright = "(c) Roman Leshchinskiy 2009-2012"; maintainer = "libraries@haskell.org"; @@ -21,7 +21,7 @@ synopsis = "Primitive memory-related operations"; description = "This package provides various primitive memory-related operations."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); buildable = true; - }; + }; tests = { "test-qc" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -58,16 +58,16 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/primitive-0.8.0.0.tar.gz"; - sha256 = "5553c21b4a789f9b591eed69e598cc58484c274af29250e517b5a8bcc62b995f"; - }); - }) // { - package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.8.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n\n Build-Depends: base >= 4.9 && < 4.19\n , deepseq >= 1.1 && < 1.5\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; + sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; + }); + }) // { + package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/random.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/random.nix index c2f8f753b4..0dbaf8b099 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/random.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/random.nix @@ -21,7 +21,7 @@ synopsis = "Pseudo-random number generation"; description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -30,32 +30,32 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); buildable = true; - }; + }; tests = { "legacy-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]; + ]; buildable = true; - }; + }; "doctests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) - ] ++ (pkgs.lib).optionals (compiler.isGhc && (compiler.version).ge "8.2" && (compiler.isGhc && (compiler.version).lt "8.10")) [ + ] ++ pkgs.lib.optionals (compiler.isGhc && compiler.version.ge "8.2" && (compiler.isGhc && compiler.version.lt "8.10")) [ (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."stm" or (errorHandler.buildDepError "stm")) (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "spec" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -67,18 +67,18 @@ (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; + }; "spec-inspection" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); buildable = true; - }; }; + }; benchmarks = { "legacy-bench" = { depends = [ @@ -87,9 +87,9 @@ (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) (hsPkgs."split" or (errorHandler.buildDepError "split")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ]; + ]; buildable = true; - }; + }; "bench" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -98,16 +98,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; - }); - }) // { - package-description-override = "cabal-version: >=1.10\nname: random\nversion: 1.2.1.1\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: core-libraries-committee@haskell.org\nbug-reports: https://github.com/haskell/random/issues\nsynopsis: Pseudo-random number generation\ndescription:\n This package provides basic pseudo-random number generation, including the\n ability to split random number generators.\n .\n == \"System.Random\": pure pseudo-random number interface\n .\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\n number generator like 'System.Random.StdGen'.\n .\n As an example, here is how you can simulate rolls of a six-sided die using\n 'System.Random.uniformR':\n .\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n >>> let pureGen = mkStdGen 42\n >>> take 10 (rolls pureGen) :: [Word]\n [1,1,3,2,4,5,3,4,6,2]\n .\n See \"System.Random\" for more details.\n .\n == \"System.Random.Stateful\": monadic pseudo-random number interface\n .\n In monadic code, use 'System.Random.Stateful.uniformM' and\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\n pseudo-random numbers with a monadic pseudo-random number generator, or\n using a monadic adapter.\n .\n As an example, here is how you can simulate rolls of a six-sided die using\n 'System.Random.Stateful.uniformRM':\n .\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n >>> let pureGen = mkStdGen 42\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n [1,1,3,2,4,5,3,4,6,2]\n .\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\n the pure pseudo-random number generator @pureGen@ into the\n 'System.Random.Stateful.StatefulGen' context.\n .\n The monadic interface can also be used with existing monadic pseudo-random\n number generators. In this example, we use the one provided in the\n package:\n .\n >>> import System.Random.MWC as MWC\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n >>> monadicGen <- MWC.create\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\n [2,3,6,6,4,4,3,1,5,4]\n .\n See \"System.Random.Stateful\" for more details.\n\ncategory: System\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\ntested-with: GHC == 7.10.2\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.3\n , GHC == 8.4.4\n , GHC == 8.6.3\n , GHC == 8.6.4\n , GHC == 8.6.5\n , GHC == 8.8.1\n , GHC == 8.8.2\n , GHC == 8.10.1\n\nsource-repository head\n type: git\n location: https://github.com/haskell/random.git\n\n\nlibrary\n exposed-modules:\n System.Random\n System.Random.Internal\n System.Random.Stateful\n other-modules:\n System.Random.GFinite\n\n hs-source-dirs: src\n default-language: Haskell2010\n ghc-options:\n -Wall\n if impl(ghc >= 8.0)\n ghc-options:\n -Wincomplete-record-updates -Wincomplete-uni-patterns\n\n build-depends:\n base >=4.8 && <5,\n bytestring >=0.10.4 && <0.12,\n deepseq >=1.1 && <2,\n mtl >=2.2 && <2.4,\n splitmix >=0.1 && <0.2\n if impl(ghc < 8.0)\n build-depends:\n transformers\n\ntest-suite legacy-test\n type: exitcode-stdio-1.0\n main-is: Legacy.hs\n hs-source-dirs: test-legacy\n other-modules:\n T7936\n TestRandomIOs\n TestRandomRs\n Random1283\n RangeTest\n\n default-language: Haskell2010\n ghc-options: -with-rtsopts=-M8M\n if impl(ghc >= 8.0)\n ghc-options:\n -Wno-deprecations\n build-depends:\n base,\n containers >=0.5 && <0.7,\n random\n\ntest-suite doctests\n type: exitcode-stdio-1.0\n main-is: doctests.hs\n hs-source-dirs: test\n default-language: Haskell2010\n build-depends:\n base,\n doctest >=0.15 && <0.21\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\n build-depends:\n mwc-random >=0.13 && <0.16,\n primitive >=0.6 && <0.8,\n random,\n stm,\n unliftio >=0.2 && <0.3,\n vector >= 0.10 && <0.14\n\ntest-suite spec\n type: exitcode-stdio-1.0\n main-is: Spec.hs\n hs-source-dirs: test\n other-modules:\n Spec.Range\n Spec.Run\n Spec.Stateful\n\n default-language: Haskell2010\n ghc-options: -Wall\n build-depends:\n base,\n bytestring,\n random,\n smallcheck >=1.2 && <1.3,\n stm,\n tasty >=1.0 && <1.5,\n tasty-smallcheck >=0.8 && <0.9,\n tasty-hunit >=0.10 && <0.11,\n transformers\n\n-- Note. Fails when compiled with coverage:\n-- https://github.com/haskell/random/issues/107\ntest-suite spec-inspection\n type: exitcode-stdio-1.0\n main-is: Spec.hs\n hs-source-dirs: test-inspection\n build-depends:\n\n default-language: Haskell2010\n ghc-options: -Wall\n build-depends:\n base,\n random,\n tasty >=1.0 && <1.5\n if impl(ghc >= 8.0)\n build-depends:\n tasty-inspection-testing\n other-modules:\n Spec.Inspection\n\nbenchmark legacy-bench\n type: exitcode-stdio-1.0\n main-is: SimpleRNGBench.hs\n hs-source-dirs: bench-legacy\n other-modules: BinSearch\n default-language: Haskell2010\n ghc-options:\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\n if impl(ghc >= 8.0)\n ghc-options:\n -Wno-deprecations\n\n build-depends:\n base,\n random,\n rdtsc,\n split >=0.2 && <0.3,\n time >=1.4 && <1.13\n\nbenchmark bench\n type: exitcode-stdio-1.0\n main-is: Main.hs\n hs-source-dirs: bench\n default-language: Haskell2010\n ghc-options: -Wall -O2\n build-depends:\n base,\n mtl,\n primitive >= 0.7.1,\n random,\n splitmix >=0.1 && <0.2,\n tasty-bench\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/shake.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/shake.nix index e7eb5c6647..d40c2a8bbc 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/shake.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/shake.nix @@ -21,7 +21,7 @@ synopsis = "Build system library, like Make, but more accurate dependencies."; description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((([ @@ -45,15 +45,15 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]; + ]; buildable = true; - }; + }; exes = { "shake" = { depends = (((([ @@ -77,16 +77,16 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; + }; tests = { "shake-test" = { depends = (((([ @@ -111,22 +111,22 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/splitmix.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/splitmix.nix index 7918d356b1..aa0dd88d31 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/splitmix.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/splitmix.nix @@ -11,7 +11,7 @@ flags = { optimised-mixer = false; }; package = { specVersion = "1.10"; - identifier = { name = "splitmix"; version = "0.1.0.4"; }; + identifier = { name = "splitmix"; version = "0.1.0.5"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "Oleg Grenrus "; @@ -21,24 +21,24 @@ synopsis = "Fast Splittable PRNG"; description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ] ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) ((pkgs.lib).optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + ] ++ pkgs.lib.optionals (!(compiler.isGhcjs && true)) (pkgs.lib.optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); buildable = true; - }; + }; tests = { "examples" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) @@ -49,23 +49,23 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "montecarlo-pi-32" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "splitmix-dieharder" = { depends = [ (hsPkgs."async" or (errorHandler.buildDepError "async")) @@ -78,27 +78,27 @@ (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; + ]; buildable = true; - }; + }; "splitmix-testu01" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; buildable = if !system.isLinux then false else true; - }; + }; "initialization" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "comparison" = { depends = [ @@ -108,33 +108,32 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) - ]; + ]; buildable = true; - }; + }; "simple-sum" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ]; buildable = true; - }; + }; "range" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; + ] ++ pkgs.lib.optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/splitmix-0.1.0.4.tar.gz"; - sha256 = "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa"; - }); - }) // { - package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.4\nx-revision: 2\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.5\n || ==9.4.4\n || ==9.6.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.19\n , deepseq >=1.3.0.0 && <1.5\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.6\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , clock >=0.8 && <0.9\n , random\n , splitmix\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.13\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.13\n , bytestring >=0.9.1.8 && <0.12\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.13\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.13\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; + sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix index ab6a9d8c44..0aeaccb277 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/unordered-containers.nix @@ -21,7 +21,7 @@ synopsis = "Efficient hashing-based container types"; description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]; + ]; buildable = true; - }; + }; tests = { "unordered-containers-tests" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ @@ -63,16 +63,16 @@ (hsPkgs."random" or (errorHandler.buildDepError "random")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; - }); - }) // { - package-description-override = "name: unordered-containers\r\nversion: 0.2.19.1\r\nx-revision: 2\r\nsynopsis: Efficient hashing-based container types\r\ndescription:\r\n Efficient hashing-based container types. The containers have been\r\n optimized for performance critical use, both in terms of large data\r\n quantities and high speed.\r\n .\r\n The declared cost of each operation is either worst-case or\r\n amortized, but remains valid even if structures are shared.\r\n .\r\n /Security/\r\n .\r\n This package currently provides no defenses against hash collision attacks\r\n such as HashDoS.\r\n Users who need to store input from untrusted sources are advised to use\r\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Johan Tibell\r\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\r\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\r\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\r\ncopyright: 2010-2014 Johan Tibell\r\n 2010 Edward Z. Yang\r\ncategory: Data\r\nbuild-type: Simple\r\ncabal-version: >=1.10\r\nextra-source-files: CHANGES.md\r\n\r\ntested-with:\r\n GHC ==9.6.1\r\n || ==9.4.4\r\n || ==9.2.7\r\n || ==9.0.2\r\n || ==8.10.7\r\n || ==8.8.4\r\n || ==8.6.5\r\n || ==8.4.4\r\n || ==8.2.2\r\n\r\nflag debug\r\n description: Enable debug support\r\n default: False\r\n\r\nlibrary\r\n exposed-modules:\r\n Data.HashMap.Internal\r\n Data.HashMap.Internal.Array\r\n Data.HashMap.Internal.List\r\n Data.HashMap.Internal.Strict\r\n Data.HashMap.Lazy\r\n Data.HashMap.Strict\r\n Data.HashSet\r\n Data.HashSet.Internal\r\n\r\n build-depends:\r\n base >= 4.10 && < 5,\r\n deepseq >= 1.4.3,\r\n hashable >= 1.2.5 && < 1.5,\r\n template-haskell < 2.21\r\n\r\n default-language: Haskell2010\r\n\r\n other-extensions:\r\n RoleAnnotations,\r\n UnboxedTuples,\r\n ScopedTypeVariables,\r\n MagicHash,\r\n BangPatterns\r\n\r\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\r\n\r\n -- For dumping the generated code:\r\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\r\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\r\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\r\n\r\n if flag(debug)\r\n cpp-options: -DASSERTS\r\n\r\ntest-suite unordered-containers-tests\r\n hs-source-dirs: tests\r\n main-is: Main.hs\r\n type: exitcode-stdio-1.0\r\n other-modules:\r\n Regressions\r\n Properties\r\n Properties.HashMapLazy\r\n Properties.HashMapStrict\r\n Properties.HashSet\r\n Properties.List\r\n Strictness\r\n\r\n build-depends:\r\n base,\r\n ChasingBottoms,\r\n containers >= 0.5.8,\r\n hashable,\r\n HUnit,\r\n QuickCheck >= 2.4.0.1,\r\n random,\r\n tasty >= 1.4.0.3,\r\n tasty-hunit >= 0.10.0.3,\r\n tasty-quickcheck >= 0.10.1.2,\r\n unordered-containers\r\n\r\n if impl(ghc >= 8.6)\r\n build-depends:\r\n nothunks >= 0.1.3\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n cpp-options: -DASSERTS\r\n\r\nbenchmark benchmarks\r\n hs-source-dirs: benchmarks\r\n main-is: Benchmarks.hs\r\n type: exitcode-stdio-1.0\r\n\r\n other-modules:\r\n Util.ByteString\r\n Util.String\r\n Util.Int\r\n\r\n build-depends:\r\n base,\r\n bytestring >= 0.10.0.0,\r\n containers,\r\n deepseq,\r\n hashable,\r\n hashmap,\r\n mtl,\r\n random,\r\n tasty-bench >= 0.3.1,\r\n unordered-containers\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\r\n if impl(ghc >= 8.10)\r\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\r\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\r\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix index ac9bde4057..a5ee5272da 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/cabal-files/utf8-string.nix @@ -21,31 +21,31 @@ synopsis = "Support for reading and writing UTF8 Strings"; description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "unit-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; - }); - }) // { + }); + }) // { package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc98/hadrian/default.nix b/materialized/ghc962/hadrian-ghc98/hadrian/default.nix index 33c1b3b921..8191e2097d 100644 --- a/materialized/ghc962/hadrian-ghc98/hadrian/default.nix +++ b/materialized/ghc962/hadrian-ghc98/hadrian/default.nix @@ -2,91 +2,91 @@ pkgs = hackage: { packages = { - Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; - bytestring.revision = (((hackage.bytestring)."0.11.4.0").revisions).default; - exceptions.revision = (((hackage.exceptions)."0.10.7").revisions).default; - directory.revision = (((hackage.directory)."1.3.8.1").revisions).default; - filepath.revision = (((hackage.filepath)."1.4.100.1").revisions).default; - mtl.revision = (((hackage.mtl)."2.3.1").revisions).default; - ghc-bignum.revision = (((hackage.ghc-bignum)."1.3").revisions).default; - ghc-prim.revision = (((hackage.ghc-prim)."0.10.0").revisions).default; - base16-bytestring.revision = import ./cabal-files/base16-bytestring.nix; - parsec.revision = (((hackage.parsec)."3.1.16.1").revisions).default; - js-flot.revision = import ./cabal-files/js-flot.nix; - utf8-string.revision = import ./cabal-files/utf8-string.nix; - Cabal.revision = import ./cabal-files/Cabal.nix; - splitmix.revision = import ./cabal-files/splitmix.nix; - splitmix.flags.optimised-mixer = false; - containers.revision = (((hackage.containers)."0.6.7").revisions).default; + ghc-prim.revision = hackage.ghc-prim."0.10.0".revisions.default; clock.revision = import ./cabal-files/clock.nix; clock.flags.llvm = false; - stm.revision = (((hackage.stm)."2.5.1.0").revisions).default; + transformers.revision = hackage.transformers."0.6.1.0".revisions.default; + time.revision = hackage.time."1.12.2".revisions.default; + base.revision = hackage.base."4.18.0.0".revisions.default; + splitmix.revision = import ./cabal-files/splitmix.nix; + splitmix.flags.optimised-mixer = false; + unix.revision = hackage.unix."2.8.1.0".revisions.default; + filepattern.revision = import ./cabal-files/filepattern.nix; + ghc-boot-th.revision = hackage.ghc-boot-th."9.6.2".revisions.default; + mtl.revision = hackage.mtl."2.3.1".revisions.default; + pretty.revision = hackage.pretty."1.1.3.6".revisions.default; + hashable.revision = import ./cabal-files/hashable.nix; + hashable.flags.random-initial-seed = false; + hashable.flags.integer-gmp = true; heaps.revision = import ./cabal-files/heaps.nix; - base.revision = (((hackage.base)."4.18.0.0").revisions).default; - time.revision = (((hackage.time)."1.12.2").revisions).default; - random.revision = import ./cabal-files/random.nix; + Cabal-syntax.revision = import ./cabal-files/Cabal-syntax.nix; + process.revision = hackage.process."1.6.17.0".revisions.default; primitive.revision = import ./cabal-files/primitive.nix; - deepseq.revision = (((hackage.deepseq)."1.4.8.1").revisions).default; + stm.revision = hackage.stm."2.5.1.0".revisions.default; + template-haskell.revision = hackage.template-haskell."2.20.0.0".revisions.default; + exceptions.revision = hackage.exceptions."0.10.7".revisions.default; + base16-bytestring.revision = import ./cabal-files/base16-bytestring.nix; + parsec.revision = hackage.parsec."3.1.16.1".revisions.default; + system-cxx-std-lib.revision = hackage.system-cxx-std-lib."1.0".revisions.default; + deepseq.revision = hackage.deepseq."1.4.8.1".revisions.default; + utf8-string.revision = import ./cabal-files/utf8-string.nix; js-jquery.revision = import ./cabal-files/js-jquery.nix; - js-dgtable.revision = import ./cabal-files/js-dgtable.nix; - rts.revision = (((hackage.rts)."1.0.2").revisions).default; - template-haskell.revision = (((hackage.template-haskell)."2.20.0.0").revisions).default; - binary.revision = (((hackage.binary)."0.8.9.1").revisions).default; - shake.revision = import ./cabal-files/shake.nix; - shake.flags.portable = false; - shake.flags.cloud = false; - shake.flags.embed-files = false; - process.revision = (((hackage.process)."1.6.17.0").revisions).default; - unix.revision = (((hackage.unix)."2.8.1.0").revisions).default; - transformers.revision = (((hackage.transformers)."0.6.1.0").revisions).default; - unordered-containers.revision = import ./cabal-files/unordered-containers.nix; - unordered-containers.flags.debug = false; + text.revision = hackage.text."2.0.2".revisions.default; QuickCheck.revision = import ./cabal-files/QuickCheck.nix; QuickCheck.flags.old-random = false; QuickCheck.flags.templatehaskell = true; - extra.revision = import ./cabal-files/extra.nix; - text.revision = (((hackage.text)."2.0.2").revisions).default; - array.revision = (((hackage.array)."0.5.5.0").revisions).default; - ghc-boot-th.revision = (((hackage.ghc-boot-th)."9.6.2").revisions).default; - filepattern.revision = import ./cabal-files/filepattern.nix; - pretty.revision = (((hackage.pretty)."1.1.3.6").revisions).default; - hashable.revision = import ./cabal-files/hashable.nix; - hashable.flags.random-initial-seed = false; - hashable.flags.integer-gmp = true; + unordered-containers.revision = import ./cabal-files/unordered-containers.nix; + unordered-containers.flags.debug = false; + containers.revision = hackage.containers."0.6.7".revisions.default; + array.revision = hackage.array."0.5.5.0".revisions.default; + shake.revision = import ./cabal-files/shake.nix; + shake.flags.cloud = false; + shake.flags.embed-files = false; + shake.flags.portable = false; + random.revision = import ./cabal-files/random.nix; + bytestring.revision = hackage.bytestring."0.11.4.0".revisions.default; + Cabal.revision = import ./cabal-files/Cabal.nix; + directory.revision = hackage.directory."1.3.8.1".revisions.default; + js-flot.revision = import ./cabal-files/js-flot.nix; cryptohash-sha256.revision = import ./cabal-files/cryptohash-sha256.nix; cryptohash-sha256.flags.exe = false; cryptohash-sha256.flags.use-cbits = true; - }; + ghc-bignum.revision = hackage.ghc-bignum."1.3".revisions.default; + binary.revision = hackage.binary."0.8.9.1".revisions.default; + filepath.revision = hackage.filepath."1.4.100.1".revisions.default; + js-dgtable.revision = import ./cabal-files/js-dgtable.nix; + extra.revision = import ./cabal-files/extra.nix; + }; compiler = { version = "9.6.2"; nix-name = "ghc962"; packages = { - "pretty" = "1.1.3.6"; - "text" = "2.0.2"; - "array" = "0.5.5.0"; - "mtl" = "2.3.1"; + "unix" = "2.8.1.0"; + "filepath" = "1.4.100.1"; + "transformers" = "0.6.1.0"; "parsec" = "3.1.16.1"; "bytestring" = "0.11.4.0"; - "filepath" = "1.4.100.1"; - "stm" = "2.5.1.0"; + "containers" = "0.6.7"; "ghc-prim" = "0.10.0"; + "mtl" = "2.3.1"; "ghc-boot-th" = "9.6.2"; "base" = "4.18.0.0"; "time" = "1.12.2"; - "process" = "1.6.17.0"; + "stm" = "2.5.1.0"; "ghc-bignum" = "1.3"; "directory" = "1.3.8.1"; - "exceptions" = "0.10.7"; - "rts" = "1.0.2"; - "transformers" = "0.6.1.0"; "template-haskell" = "2.20.0.0"; - "deepseq" = "1.4.8.1"; - "unix" = "2.8.1.0"; + "process" = "1.6.17.0"; "binary" = "0.8.9.1"; - "containers" = "0.6.7"; - }; + "pretty" = "1.1.3.6"; + "text" = "2.0.2"; + "system-cxx-std-lib" = "1.0"; + "deepseq" = "1.4.8.1"; + "array" = "0.5.5.0"; + "exceptions" = "0.10.7"; }; }; + }; extras = hackage: { packages = { hadrian = ./.plan.nix/hadrian.nix; }; }; modules = [ @@ -97,58 +97,58 @@ flags = { "threaded" = lib.mkOverride 900 true; "selftest" = lib.mkOverride 900 true; - }; }; }; - }) + }; + }) ({ lib, ... }: { packages = { - "shake".components.library.planned = lib.mkOverride 900 true; - "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "directory".components.library.planned = lib.mkOverride 900 true; + "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; + "deepseq".components.library.planned = lib.mkOverride 900 true; "base16-bytestring".components.library.planned = lib.mkOverride 900 true; + "unordered-containers".components.library.planned = lib.mkOverride 900 true; + "text".components.library.planned = lib.mkOverride 900 true; + "base".components.library.planned = lib.mkOverride 900 true; + "js-flot".components.library.planned = lib.mkOverride 900 true; + "splitmix".components.library.planned = lib.mkOverride 900 true; + "filepath".components.library.planned = lib.mkOverride 900 true; + "clock".components.library.planned = lib.mkOverride 900 true; "heaps".components.library.planned = lib.mkOverride 900 true; "extra".components.library.planned = lib.mkOverride 900 true; - "filepath".components.library.planned = lib.mkOverride 900 true; + "transformers".components.library.planned = lib.mkOverride 900 true; + "parsec".components.library.planned = lib.mkOverride 900 true; + "system-cxx-std-lib".components.library.planned = lib.mkOverride 900 true; + "hashable".components.library.planned = lib.mkOverride 900 true; + "primitive".components.library.planned = lib.mkOverride 900 true; + "Cabal-syntax".components.library.planned = lib.mkOverride 900 true; + "QuickCheck".components.library.planned = lib.mkOverride 900 true; + "js-jquery".components.library.planned = lib.mkOverride 900 true; + "mtl".components.library.planned = lib.mkOverride 900 true; + "containers".components.library.planned = lib.mkOverride 900 true; + "ghc-prim".components.library.planned = lib.mkOverride 900 true; "pretty".components.library.planned = lib.mkOverride 900 true; + "shake".components.exes."shake".planned = lib.mkOverride 900 true; + "bytestring".components.library.planned = lib.mkOverride 900 true; + "time".components.library.planned = lib.mkOverride 900 true; + "shake".components.library.planned = lib.mkOverride 900 true; + "random".components.library.planned = lib.mkOverride 900 true; + "template-haskell".components.library.planned = lib.mkOverride 900 true; + "process".components.library.planned = lib.mkOverride 900 true; "utf8-string".components.library.planned = lib.mkOverride 900 true; "Cabal".components.library.planned = lib.mkOverride 900 true; - "bytestring".components.library.planned = lib.mkOverride 900 true; - "cryptohash-sha256".components.library.planned = lib.mkOverride 900 true; + "ghc-bignum".components.library.planned = lib.mkOverride 900 true; + "stm".components.library.planned = lib.mkOverride 900 true; + "binary".components.library.planned = lib.mkOverride 900 true; "exceptions".components.library.planned = lib.mkOverride 900 true; - "ghc-prim".components.library.planned = lib.mkOverride 900 true; + "js-dgtable".components.library.planned = lib.mkOverride 900 true; "array".components.library.planned = lib.mkOverride 900 true; - "binary".components.library.planned = lib.mkOverride 900 true; "filepattern".components.library.planned = lib.mkOverride 900 true; "ghc-boot-th".components.library.planned = lib.mkOverride 900 true; - "splitmix".components.library.planned = lib.mkOverride 900 true; - "rts".components.library.planned = lib.mkOverride 900 true; + "cryptohash-sha256".components.library.planned = lib.mkOverride 900 true; "unix".components.library.planned = lib.mkOverride 900 true; - "shake".components.exes."shake".planned = lib.mkOverride 900 true; - "directory".components.library.planned = lib.mkOverride 900 true; - "time".components.library.planned = lib.mkOverride 900 true; - "js-flot".components.library.planned = lib.mkOverride 900 true; - "ghc-bignum".components.library.planned = lib.mkOverride 900 true; - "process".components.library.planned = lib.mkOverride 900 true; - "clock".components.library.planned = lib.mkOverride 900 true; - "template-haskell".components.library.planned = lib.mkOverride 900 true; - "stm".components.library.planned = lib.mkOverride 900 true; - "hadrian".components.exes."hadrian".planned = lib.mkOverride 900 true; - "QuickCheck".components.library.planned = lib.mkOverride 900 true; - "mtl".components.library.planned = lib.mkOverride 900 true; - "transformers".components.library.planned = lib.mkOverride 900 true; - "parsec".components.library.planned = lib.mkOverride 900 true; - "deepseq".components.library.planned = lib.mkOverride 900 true; - "primitive".components.library.planned = lib.mkOverride 900 true; - "js-jquery".components.library.planned = lib.mkOverride 900 true; - "text".components.library.planned = lib.mkOverride 900 true; - "unordered-containers".components.library.planned = lib.mkOverride 900 true; - "random".components.library.planned = lib.mkOverride 900 true; - "base".components.library.planned = lib.mkOverride 900 true; - "containers".components.library.planned = lib.mkOverride 900 true; - "js-dgtable".components.library.planned = lib.mkOverride 900 true; - "hashable".components.library.planned = lib.mkOverride 900 true; - }; - }) - ]; - } \ No newline at end of file + }; + }) + ]; +} \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/hashable.nix b/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/hashable.nix deleted file mode 100644 index 288fdf7407..0000000000 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/hashable.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ system - , compiler - , flags - , pkgs - , hsPkgs - , pkgconfPkgs - , errorHandler - , config - , ... }: - ({ - flags = { integer-gmp = true; random-initial-seed = false; }; - package = { - specVersion = "1.12"; - identifier = { name = "hashable"; version = "1.4.2.0"; }; - license = "BSD-3-Clause"; - copyright = ""; - maintainer = "Oleg Grenrus "; - author = "Milan Straka \nJohan Tibell "; - homepage = "http://github.com/haskell-unordered-containers/hashable"; - url = ""; - synopsis = "A class for types that can be converted to a hash value"; - description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values."; - buildType = "Simple"; - }; - components = { - "library" = { - depends = (([ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) - (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && (compiler.version).ge "9" - then [ - (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) - ] ++ (pkgs.lib).optional (!(compiler.isGhc && (compiler.version).ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) - else if flags.integer-gmp - then [ - (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) - ] - else [ - (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) - ]); - buildable = true; - }; - tests = { - "hashable-tests" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) - (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) - (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) - (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) - (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) - (hsPkgs."text" or (errorHandler.buildDepError "text")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); - buildable = true; - }; - "hashable-examples" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) - (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - ]; - buildable = true; - }; - }; - }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/hashable-1.4.2.0.tar.gz"; - sha256 = "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8"; - }); - }) // { - package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.2.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.5\n || ==9.4.4\n || ==9.6.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.19\n , bytestring >=0.10.8.2 && <0.12\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.5\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.1\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; - } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/random.nix b/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/random.nix deleted file mode 100644 index c2f8f753b4..0000000000 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/random.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ system - , compiler - , flags - , pkgs - , hsPkgs - , pkgconfPkgs - , errorHandler - , config - , ... }: - ({ - flags = {}; - package = { - specVersion = "1.10"; - identifier = { name = "random"; version = "1.2.1.1"; }; - license = "BSD-3-Clause"; - copyright = ""; - maintainer = "core-libraries-committee@haskell.org"; - author = ""; - homepage = ""; - url = ""; - synopsis = "Pseudo-random number generation"; - description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; - buildType = "Simple"; - }; - components = { - "library" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); - buildable = true; - }; - tests = { - "legacy-test" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]; - buildable = true; - }; - "doctests" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) - ] ++ (pkgs.lib).optionals (compiler.isGhc && (compiler.version).ge "8.2" && (compiler.isGhc && (compiler.version).lt "8.10")) [ - (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) - (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."stm" or (errorHandler.buildDepError "stm")) - (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) - (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; - buildable = true; - }; - "spec" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."smallcheck" or (errorHandler.buildDepError "smallcheck")) - (hsPkgs."stm" or (errorHandler.buildDepError "stm")) - (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) - (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) - (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; - buildable = true; - }; - "spec-inspection" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); - buildable = true; - }; - }; - benchmarks = { - "legacy-bench" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) - (hsPkgs."split" or (errorHandler.buildDepError "split")) - (hsPkgs."time" or (errorHandler.buildDepError "time")) - ]; - buildable = true; - }; - "bench" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) - (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) - ]; - buildable = true; - }; - }; - }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; - sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; - }); - }) // { - package-description-override = "cabal-version: >=1.10\nname: random\nversion: 1.2.1.1\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: core-libraries-committee@haskell.org\nbug-reports: https://github.com/haskell/random/issues\nsynopsis: Pseudo-random number generation\ndescription:\n This package provides basic pseudo-random number generation, including the\n ability to split random number generators.\n .\n == \"System.Random\": pure pseudo-random number interface\n .\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\n number generator like 'System.Random.StdGen'.\n .\n As an example, here is how you can simulate rolls of a six-sided die using\n 'System.Random.uniformR':\n .\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n >>> let pureGen = mkStdGen 42\n >>> take 10 (rolls pureGen) :: [Word]\n [1,1,3,2,4,5,3,4,6,2]\n .\n See \"System.Random\" for more details.\n .\n == \"System.Random.Stateful\": monadic pseudo-random number interface\n .\n In monadic code, use 'System.Random.Stateful.uniformM' and\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\n pseudo-random numbers with a monadic pseudo-random number generator, or\n using a monadic adapter.\n .\n As an example, here is how you can simulate rolls of a six-sided die using\n 'System.Random.Stateful.uniformRM':\n .\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n >>> let pureGen = mkStdGen 42\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n [1,1,3,2,4,5,3,4,6,2]\n .\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\n the pure pseudo-random number generator @pureGen@ into the\n 'System.Random.Stateful.StatefulGen' context.\n .\n The monadic interface can also be used with existing monadic pseudo-random\n number generators. In this example, we use the one provided in the\n package:\n .\n >>> import System.Random.MWC as MWC\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n >>> monadicGen <- MWC.create\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\n [2,3,6,6,4,4,3,1,5,4]\n .\n See \"System.Random.Stateful\" for more details.\n\ncategory: System\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\ntested-with: GHC == 7.10.2\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.3\n , GHC == 8.4.4\n , GHC == 8.6.3\n , GHC == 8.6.4\n , GHC == 8.6.5\n , GHC == 8.8.1\n , GHC == 8.8.2\n , GHC == 8.10.1\n\nsource-repository head\n type: git\n location: https://github.com/haskell/random.git\n\n\nlibrary\n exposed-modules:\n System.Random\n System.Random.Internal\n System.Random.Stateful\n other-modules:\n System.Random.GFinite\n\n hs-source-dirs: src\n default-language: Haskell2010\n ghc-options:\n -Wall\n if impl(ghc >= 8.0)\n ghc-options:\n -Wincomplete-record-updates -Wincomplete-uni-patterns\n\n build-depends:\n base >=4.8 && <5,\n bytestring >=0.10.4 && <0.12,\n deepseq >=1.1 && <2,\n mtl >=2.2 && <2.4,\n splitmix >=0.1 && <0.2\n if impl(ghc < 8.0)\n build-depends:\n transformers\n\ntest-suite legacy-test\n type: exitcode-stdio-1.0\n main-is: Legacy.hs\n hs-source-dirs: test-legacy\n other-modules:\n T7936\n TestRandomIOs\n TestRandomRs\n Random1283\n RangeTest\n\n default-language: Haskell2010\n ghc-options: -with-rtsopts=-M8M\n if impl(ghc >= 8.0)\n ghc-options:\n -Wno-deprecations\n build-depends:\n base,\n containers >=0.5 && <0.7,\n random\n\ntest-suite doctests\n type: exitcode-stdio-1.0\n main-is: doctests.hs\n hs-source-dirs: test\n default-language: Haskell2010\n build-depends:\n base,\n doctest >=0.15 && <0.21\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\n build-depends:\n mwc-random >=0.13 && <0.16,\n primitive >=0.6 && <0.8,\n random,\n stm,\n unliftio >=0.2 && <0.3,\n vector >= 0.10 && <0.14\n\ntest-suite spec\n type: exitcode-stdio-1.0\n main-is: Spec.hs\n hs-source-dirs: test\n other-modules:\n Spec.Range\n Spec.Run\n Spec.Stateful\n\n default-language: Haskell2010\n ghc-options: -Wall\n build-depends:\n base,\n bytestring,\n random,\n smallcheck >=1.2 && <1.3,\n stm,\n tasty >=1.0 && <1.5,\n tasty-smallcheck >=0.8 && <0.9,\n tasty-hunit >=0.10 && <0.11,\n transformers\n\n-- Note. Fails when compiled with coverage:\n-- https://github.com/haskell/random/issues/107\ntest-suite spec-inspection\n type: exitcode-stdio-1.0\n main-is: Spec.hs\n hs-source-dirs: test-inspection\n build-depends:\n\n default-language: Haskell2010\n ghc-options: -Wall\n build-depends:\n base,\n random,\n tasty >=1.0 && <1.5\n if impl(ghc >= 8.0)\n build-depends:\n tasty-inspection-testing\n other-modules:\n Spec.Inspection\n\nbenchmark legacy-bench\n type: exitcode-stdio-1.0\n main-is: SimpleRNGBench.hs\n hs-source-dirs: bench-legacy\n other-modules: BinSearch\n default-language: Haskell2010\n ghc-options:\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\n if impl(ghc >= 8.0)\n ghc-options:\n -Wno-deprecations\n\n build-depends:\n base,\n random,\n rdtsc,\n split >=0.2 && <0.3,\n time >=1.4 && <1.13\n\nbenchmark bench\n type: exitcode-stdio-1.0\n main-is: Main.hs\n hs-source-dirs: bench\n default-language: Haskell2010\n ghc-options: -Wall -O2\n build-depends:\n base,\n mtl,\n primitive >= 0.7.1,\n random,\n splitmix >=0.1 && <0.2,\n tasty-bench\n"; - } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/splitmix.nix b/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/splitmix.nix deleted file mode 100644 index 7918d356b1..0000000000 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/splitmix.nix +++ /dev/null @@ -1,140 +0,0 @@ -{ system - , compiler - , flags - , pkgs - , hsPkgs - , pkgconfPkgs - , errorHandler - , config - , ... }: - ({ - flags = { optimised-mixer = false; }; - package = { - specVersion = "1.10"; - identifier = { name = "splitmix"; version = "0.1.0.4"; }; - license = "BSD-3-Clause"; - copyright = ""; - maintainer = "Oleg Grenrus "; - author = ""; - homepage = ""; - url = ""; - synopsis = "Fast Splittable PRNG"; - description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; - buildType = "Simple"; - }; - components = { - "library" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ] ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) ((pkgs.lib).optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); - buildable = true; - }; - tests = { - "examples" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; - buildable = true; - }; - "splitmix-tests" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."base-compat" or (errorHandler.buildDepError "base-compat")) - (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) - (hsPkgs."math-functions" or (errorHandler.buildDepError "math-functions")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) - (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) - ]; - buildable = true; - }; - "montecarlo-pi" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; - buildable = true; - }; - "montecarlo-pi-32" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; - buildable = true; - }; - "splitmix-dieharder" = { - depends = [ - (hsPkgs."async" or (errorHandler.buildDepError "async")) - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) - (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - (hsPkgs."process" or (errorHandler.buildDepError "process")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) - (hsPkgs."vector" or (errorHandler.buildDepError "vector")) - ]; - buildable = true; - }; - "splitmix-testu01" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; - libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; - buildable = if !system.isLinux then false else true; - }; - "initialization" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; - buildable = true; - }; - }; - benchmarks = { - "comparison" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) - ]; - buildable = true; - }; - "simple-sum" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; - buildable = true; - }; - "range" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) - ]; - buildable = true; - }; - }; - }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/splitmix-0.1.0.4.tar.gz"; - sha256 = "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa"; - }); - }) // { - package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.4\nx-revision: 2\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.5\n || ==9.4.4\n || ==9.6.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.19\n , deepseq >=1.3.0.0 && <1.5\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.6\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , clock >=0.8 && <0.9\n , random\n , splitmix\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.13\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.13\n , bytestring >=0.9.1.8 && <0.12\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.13\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.13\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; - } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix deleted file mode 100644 index ab6a9d8c44..0000000000 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/unordered-containers.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ system - , compiler - , flags - , pkgs - , hsPkgs - , pkgconfPkgs - , errorHandler - , config - , ... }: - ({ - flags = { debug = false; }; - package = { - specVersion = "1.10"; - identifier = { name = "unordered-containers"; version = "0.2.19.1"; }; - license = "BSD-3-Clause"; - copyright = "2010-2014 Johan Tibell\n2010 Edward Z. Yang"; - maintainer = "simon.jakobi@gmail.com, David.Feuer@gmail.com"; - author = "Johan Tibell"; - homepage = "https://github.com/haskell-unordered-containers/unordered-containers"; - url = ""; - synopsis = "Efficient hashing-based container types"; - description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; - buildType = "Simple"; - }; - components = { - "library" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]; - buildable = true; - }; - tests = { - "unordered-containers-tests" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."ChasingBottoms" or (errorHandler.buildDepError "ChasingBottoms")) - (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) - (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) - (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) - (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); - buildable = true; - }; - }; - benchmarks = { - "benchmarks" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) - (hsPkgs."hashmap" or (errorHandler.buildDepError "hashmap")) - (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) - (hsPkgs."random" or (errorHandler.buildDepError "random")) - (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) - (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) - ]; - buildable = true; - }; - }; - }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; - sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; - }); - }) // { - package-description-override = "name: unordered-containers\r\nversion: 0.2.19.1\r\nx-revision: 2\r\nsynopsis: Efficient hashing-based container types\r\ndescription:\r\n Efficient hashing-based container types. The containers have been\r\n optimized for performance critical use, both in terms of large data\r\n quantities and high speed.\r\n .\r\n The declared cost of each operation is either worst-case or\r\n amortized, but remains valid even if structures are shared.\r\n .\r\n /Security/\r\n .\r\n This package currently provides no defenses against hash collision attacks\r\n such as HashDoS.\r\n Users who need to store input from untrusted sources are advised to use\r\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nauthor: Johan Tibell\r\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\r\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\r\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\r\ncopyright: 2010-2014 Johan Tibell\r\n 2010 Edward Z. Yang\r\ncategory: Data\r\nbuild-type: Simple\r\ncabal-version: >=1.10\r\nextra-source-files: CHANGES.md\r\n\r\ntested-with:\r\n GHC ==9.6.1\r\n || ==9.4.4\r\n || ==9.2.7\r\n || ==9.0.2\r\n || ==8.10.7\r\n || ==8.8.4\r\n || ==8.6.5\r\n || ==8.4.4\r\n || ==8.2.2\r\n\r\nflag debug\r\n description: Enable debug support\r\n default: False\r\n\r\nlibrary\r\n exposed-modules:\r\n Data.HashMap.Internal\r\n Data.HashMap.Internal.Array\r\n Data.HashMap.Internal.List\r\n Data.HashMap.Internal.Strict\r\n Data.HashMap.Lazy\r\n Data.HashMap.Strict\r\n Data.HashSet\r\n Data.HashSet.Internal\r\n\r\n build-depends:\r\n base >= 4.10 && < 5,\r\n deepseq >= 1.4.3,\r\n hashable >= 1.2.5 && < 1.5,\r\n template-haskell < 2.21\r\n\r\n default-language: Haskell2010\r\n\r\n other-extensions:\r\n RoleAnnotations,\r\n UnboxedTuples,\r\n ScopedTypeVariables,\r\n MagicHash,\r\n BangPatterns\r\n\r\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\r\n\r\n -- For dumping the generated code:\r\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\r\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\r\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\r\n\r\n if flag(debug)\r\n cpp-options: -DASSERTS\r\n\r\ntest-suite unordered-containers-tests\r\n hs-source-dirs: tests\r\n main-is: Main.hs\r\n type: exitcode-stdio-1.0\r\n other-modules:\r\n Regressions\r\n Properties\r\n Properties.HashMapLazy\r\n Properties.HashMapStrict\r\n Properties.HashSet\r\n Properties.List\r\n Strictness\r\n\r\n build-depends:\r\n base,\r\n ChasingBottoms,\r\n containers >= 0.5.8,\r\n hashable,\r\n HUnit,\r\n QuickCheck >= 2.4.0.1,\r\n random,\r\n tasty >= 1.4.0.3,\r\n tasty-hunit >= 0.10.0.3,\r\n tasty-quickcheck >= 0.10.1.2,\r\n unordered-containers\r\n\r\n if impl(ghc >= 8.6)\r\n build-depends:\r\n nothunks >= 0.1.3\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n cpp-options: -DASSERTS\r\n\r\nbenchmark benchmarks\r\n hs-source-dirs: benchmarks\r\n main-is: Benchmarks.hs\r\n type: exitcode-stdio-1.0\r\n\r\n other-modules:\r\n Util.ByteString\r\n Util.String\r\n Util.Int\r\n\r\n build-depends:\r\n base,\r\n bytestring >= 0.10.0.0,\r\n containers,\r\n deepseq,\r\n hashable,\r\n hashmap,\r\n mtl,\r\n random,\r\n tasty-bench >= 0.3.1,\r\n unordered-containers\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\r\n if impl(ghc >= 8.10)\r\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\r\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\r\n"; - } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix b/materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/ghc-platform.nix similarity index 91% rename from materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/ghc-platform.nix index eb369bf5fa..1e74a19dde 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/ghc-platform.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/ghc-platform.nix @@ -29,13 +29,13 @@ extraSrcFiles = []; extraTmpFiles = []; extraDocFiles = [ "CHANGELOG.md" ]; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; modules = [ "GHC/Platform/ArchOS" ]; hsSourceDirs = [ "src" ]; - }; }; - } // rec { src = (pkgs.lib).mkDefault ../../libraries/ghc-platform; } \ No newline at end of file + }; + } // rec { src = pkgs.lib.mkDefault ../../libraries/ghc-platform; } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix b/materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/ghc-toolchain.nix similarity index 94% rename from materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/ghc-toolchain.nix index 6a87e052dd..bcae793058 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/ghc-toolchain.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/ghc-toolchain.nix @@ -29,7 +29,7 @@ extraSrcFiles = []; extraTmpFiles = []; extraDocFiles = []; - }; + }; components = { "library" = { depends = [ @@ -40,7 +40,7 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."text" or (errorHandler.buildDepError "text")) (hsPkgs."ghc-platform" or (errorHandler.buildDepError "ghc-platform")) - ]; + ]; buildable = true; modules = [ "GHC/Toolchain" @@ -63,8 +63,8 @@ "GHC/Toolchain/Tools/Readelf" "GHC/Toolchain/Tools/MergeObjs" "GHC/Toolchain/Utils" - ]; + ]; hsSourceDirs = [ "src" ]; - }; }; - } // rec { src = (pkgs.lib).mkDefault ../../utils/ghc-toolchain; } \ No newline at end of file + }; + } // rec { src = pkgs.lib.mkDefault ../../utils/ghc-toolchain; } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix b/materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/hadrian.nix similarity index 93% rename from materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/hadrian.nix index 49e410a9c9..1ae09779ab 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/.plan.nix/hadrian.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/.plan.nix/hadrian.nix @@ -29,7 +29,7 @@ extraSrcFiles = []; extraTmpFiles = []; extraDocFiles = [ "README.md" ]; - }; + }; components = { exes = { "hadrian" = { @@ -52,7 +52,7 @@ (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) (hsPkgs."ghc-platform" or (errorHandler.buildDepError "ghc-platform")) (hsPkgs."ghc-toolchain" or (errorHandler.buildDepError "ghc-toolchain")) - ] ++ (pkgs.lib).optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); + ] ++ pkgs.lib.optional (flags.selftest) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")); buildable = true; modules = [ "Base" @@ -122,6 +122,7 @@ "Settings/Builders/Cc" "Settings/Builders/Configure" "Settings/Builders/DeriveConstants" + "Settings/Builders/GenApply" "Settings/Builders/GenPrimopCode" "Settings/Builders/Ghc" "Settings/Builders/GhcPkg" @@ -157,12 +158,12 @@ "Utilities" "Way" "Way/Type" - ] ++ (pkgs.lib).optional (flags.selftest) "Rules/Selftest"; + ] ++ pkgs.lib.optional (flags.selftest) "Rules/Selftest"; hsSourceDirs = [ "." "src" ]; mainPath = ([ "Main.hs" - ] ++ (pkgs.lib).optional (flags.threaded) "") ++ (pkgs.lib).optional (flags.selftest) ""; - }; + ] ++ pkgs.lib.optional (flags.threaded) "") ++ pkgs.lib.optional (flags.selftest) ""; }; }; - } // rec { src = (pkgs.lib).mkDefault ../.; } \ No newline at end of file + }; + } // rec { src = pkgs.lib.mkDefault ../.; } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/QuickCheck.nix similarity index 88% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/QuickCheck.nix index 31390ca93b..62e36aa8b6 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/QuickCheck.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/QuickCheck.nix @@ -21,99 +21,99 @@ synopsis = "Automatic testing of Haskell programs"; description = "QuickCheck is a library for random testing of program properties.\nThe programmer provides a specification of the program, in the form of\nproperties which functions should satisfy, and QuickCheck then tests that the\nproperties hold in a large number of randomly generated cases.\nSpecifications are expressed in Haskell, using combinators provided by\nQuickCheck. QuickCheck provides combinators to define properties, observe the\ndistribution of test data, and define test data generators.\n\nMost of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\nmodule. The main exception is the monadic property testing library in\n\"Test.QuickCheck.Monadic\".\n\nIf you are new to QuickCheck, you can try looking at the following resources:\n\n* The .\nIt's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\nbut is still full of good advice.\n* ,\na detailed tutorial written by a user of QuickCheck.\n\nThe \ncompanion package provides instances for types in Haskell Platform packages\nat the cost of additional dependencies."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((((((([ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - ] ++ [ + ] ++ [ (hsPkgs."random" or (errorHandler.buildDepError "random")) - ]) ++ (pkgs.lib).optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ (pkgs.lib).optionals (compiler.isGhc && true) [ + ]) ++ pkgs.lib.optional (!(compiler.isHugs && true)) (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix"))) ++ pkgs.lib.optionals (compiler.isGhc && true) [ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ (pkgs.lib).optionals (compiler.isUhc && true) [ + ]) ++ pkgs.lib.optional (compiler.isGhc && true && flags.templatehaskell) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2") (hsPkgs."random" or (errorHandler.buildDepError "random"))) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.4") (hsPkgs."containers" or (errorHandler.buildDepError "containers"))) ++ pkgs.lib.optionals (compiler.isUhc && true) [ (hsPkgs."old-time" or (errorHandler.buildDepError "old-time")) (hsPkgs."old-locale" or (errorHandler.buildDepError "old-locale")) - ]; + ]; buildable = true; - }; + }; tests = { "test-quickcheck" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gcoarbitrary" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-generators" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = if !flags.templatehaskell then false else true; - }; + }; "test-quickcheck-gshrink" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).ge "7.2" && (compiler.isGhc && (compiler.version).lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.2") + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "7.2" && (compiler.isGhc && compiler.version.lt "7.6")) (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")); + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.2") then false else true; - }; + }; "test-quickcheck-terminal" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-monadfix" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; + }; "test-quickcheck-split" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; + }; "test-quickcheck-misc" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; - buildable = if !flags.templatehaskell || !(compiler.isGhc && (compiler.version).ge "7.10") + ]; + buildable = if !flags.templatehaskell || !(compiler.isGhc && compiler.version.ge "7.10") then false else true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/QuickCheck-2.14.3.tar.gz"; sha256 = "5c0f22b36b28a1a8fa110b3819818d3f29494a3b0dedbae299f064123ca70501"; - }); - }) // { + }); + }) // { package-description-override = "Name: QuickCheck\nVersion: 2.14.3\nCabal-Version: >= 1.10\nBuild-type: Simple\nLicense: BSD3\nLicense-file: LICENSE\nCopyright: 2000-2019 Koen Claessen, 2006-2008 Björn Bringert, 2009-2019 Nick Smallbone\nAuthor: Koen Claessen \nMaintainer: Nick Smallbone \nBug-reports: https://github.com/nick8325/quickcheck/issues\nTested-with: GHC ==7.0.4 || ==7.2.2 || >= 7.4\nHomepage: https://github.com/nick8325/quickcheck\nCategory: Testing\nSynopsis: Automatic testing of Haskell programs\nDescription:\n QuickCheck is a library for random testing of program properties.\n The programmer provides a specification of the program, in the form of\n properties which functions should satisfy, and QuickCheck then tests that the\n properties hold in a large number of randomly generated cases.\n Specifications are expressed in Haskell, using combinators provided by\n QuickCheck. QuickCheck provides combinators to define properties, observe the\n distribution of test data, and define test data generators.\n .\n Most of QuickCheck's functionality is exported by the main \"Test.QuickCheck\"\n module. The main exception is the monadic property testing library in\n \"Test.QuickCheck.Monadic\".\n .\n If you are new to QuickCheck, you can try looking at the following resources:\n .\n * The .\n It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,\n but is still full of good advice.\n * ,\n a detailed tutorial written by a user of QuickCheck.\n .\n The \n companion package provides instances for types in Haskell Platform packages\n at the cost of additional dependencies.\n\nextra-source-files:\n README\n changelog\n examples/Heap.hs\n examples/Heap_Program.hs\n examples/Heap_ProgramAlgebraic.hs\n examples/Lambda.hs\n examples/Merge.hs\n examples/Set.hs\n examples/Simple.hs\n make-hugs\n test-hugs\n\nsource-repository head\n type: git\n location: https://github.com/nick8325/quickcheck\n\nsource-repository this\n type: git\n location: https://github.com/nick8325/quickcheck\n tag: 2.14.3\n\nflag templateHaskell\n Description: Build Test.QuickCheck.All, which uses Template Haskell.\n Default: True\n Manual: True\n\nflag old-random\n Description: Build against a pre-1.2.0 version of the random package.\n Default: False\n Manual: False\n\nlibrary\n Hs-source-dirs: src\n Build-depends: base >=4.3 && <5, containers\n Default-language: Haskell2010\n\n -- New vs old random.\n if flag(old-random)\n Build-depends: random >= 1.0.0.3 && < 1.2.0\n cpp-options: -DOLD_RANDOM\n else\n Build-depends: random >= 1.2.0 && < 1.3\n\n -- We always use splitmix directly rather than going through StdGen\n -- (it's somewhat more efficient).\n -- However, Hugs traps overflow on Word64, so we have to stick\n -- with StdGen there.\n if impl(hugs)\n cpp-options: -DNO_SPLITMIX\n else\n Build-depends: splitmix >= 0.1 && <0.2\n\n -- Modules that are always built.\n Exposed-Modules:\n Test.QuickCheck,\n Test.QuickCheck.Arbitrary,\n Test.QuickCheck.Gen,\n Test.QuickCheck.Gen.Unsafe,\n Test.QuickCheck.Monadic,\n Test.QuickCheck.Modifiers,\n Test.QuickCheck.Property,\n Test.QuickCheck.Test,\n Test.QuickCheck.Text,\n Test.QuickCheck.Poly,\n Test.QuickCheck.State,\n Test.QuickCheck.Random,\n Test.QuickCheck.Exception,\n Test.QuickCheck.Features\n\n -- GHC-specific modules.\n if impl(ghc)\n Exposed-Modules: Test.QuickCheck.Function\n Build-depends: transformers >= 0.3, deepseq >= 1.1.0.0\n else\n cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ\n\n if impl(ghc) && flag(templateHaskell)\n Build-depends: template-haskell >= 2.4\n if impl(ghc >=8.0)\n Other-Extensions: TemplateHaskellQuotes\n else\n Other-Extensions: TemplateHaskell\n Exposed-Modules: Test.QuickCheck.All\n else\n cpp-options: -DNO_TEMPLATE_HASKELL\n\n if !impl(ghc >= 7.4)\n cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS\n\n -- The new generics appeared in GHC 7.2...\n if impl(ghc < 7.2)\n cpp-options: -DNO_GENERICS\n -- ...but in 7.2-7.4 it lives in the ghc-prim package.\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n Build-depends: ghc-prim\n\n -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.\n if impl (ghc < 7.4)\n cpp-options: -DNO_SAFE_HASKELL\n\n -- random is explicitly Trustworthy since 1.0.1.0\n -- similar constraint for containers\n if impl(ghc >= 7.2)\n Build-depends: random >=1.0.1.0\n if impl(ghc >= 7.4)\n Build-depends: containers >=0.4.2.1\n\n if !impl(ghc >= 7.6)\n cpp-options: -DNO_POLYKINDS\n\n if !impl(ghc >= 8.0)\n cpp-options: -DNO_MONADFAIL\n\n -- Switch off most optional features on non-GHC systems.\n if !impl(ghc)\n -- If your Haskell compiler can cope without some of these, please\n -- send a message to the QuickCheck mailing list!\n cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS\n -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE -DNO_GADTS\n -DNO_EXTRA_METHODS_IN_APPLICATIVE -DOLD_RANDOM\n if !impl(hugs) && !impl(uhc)\n cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES\n\n -- LANGUAGE pragmas don't have any effect in Hugs.\n if impl(hugs)\n Default-Extensions: CPP\n\n if impl(uhc)\n -- Cabal under UHC needs pointing out all the dependencies of the\n -- random package.\n Build-depends: old-time, old-locale\n -- Plus some bits of the standard library are missing.\n cpp-options: -DNO_FIXED -DNO_EXCEPTIONS\n\nTest-Suite test-quickcheck\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs:\n examples\n main-is: Heap.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gcoarbitrary\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GCoArbitraryExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-generators\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Generators.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell)\n Buildable: False\n\nTest-Suite test-quickcheck-gshrink\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: GShrinkExample.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.2)\n buildable: False\n if impl(ghc >= 7.2) && impl(ghc < 7.6)\n build-depends: ghc-prim\n\nTest-Suite test-quickcheck-terminal\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Terminal.hs\n build-depends: base, process, deepseq >= 1.1.0.0, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-monadfix\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: MonadFix.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n\nTest-Suite test-quickcheck-split\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Split.hs\n build-depends: base, QuickCheck\n\nTest-Suite test-quickcheck-misc\n type: exitcode-stdio-1.0\n Default-language: Haskell2010\n hs-source-dirs: tests\n main-is: Misc.hs\n build-depends: base, QuickCheck\n if !flag(templateHaskell) || !impl(ghc >= 7.10)\n buildable: False\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/base16-bytestring.nix similarity index 54% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/base16-bytestring.nix index 31d3b31c55..c3d272500b 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/base16-bytestring.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/base16-bytestring.nix @@ -21,15 +21,15 @@ synopsis = "RFC 4648-compliant Base16 encodings for ByteStrings"; description = "This package provides support for encoding and decoding binary data according\nto @base16@ (see also ) for\nstrict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n\nSee the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\nprovides an uniform API providing conversion paths between more binary and textual types."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -41,10 +41,10 @@ (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -53,16 +53,16 @@ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/base16-bytestring-1.0.2.0.tar.gz"; sha256 = "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784"; - }); - }) // { - package-description-override = "cabal-version: 1.12\nname: base16-bytestring\nversion: 1.0.2.0\nsynopsis: RFC 4648-compliant Base16 encodings for ByteStrings\ndescription:\n This package provides support for encoding and decoding binary data according\n to @base16@ (see also ) for\n strict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n .\n See the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\n provides an uniform API providing conversion paths between more binary and textual types.\n\nhomepage: http://github.com/haskell/base16-bytestring\nbug-reports: http://github.com/haskell/base16-bytestring/issues\nlicense: BSD3\nlicense-file: LICENSE\ncopyright:\n Copyright 2011 MailRank, Inc.;\n Copyright 2010-2020 Bryan O'Sullivan et al.\n\nauthor: Bryan O'Sullivan \nmaintainer:\n Herbert Valerio Riedel ,\n Mikhail Glushenkov ,\n Emily Pillmore \n\ncategory: Data\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\n\ntested-with:\n GHC ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.1\n\nsource-repository head\n type: git\n location: http://github.com/haskell/base16-bytestring\n\nlibrary\n other-modules: Data.ByteString.Base16.Internal\n exposed-modules:\n Data.ByteString.Base16\n Data.ByteString.Base16.Lazy\n\n build-depends:\n base >=4.9 && <5\n , bytestring >=0.9 && <0.12\n\n ghc-options: -Wall -funbox-strict-fields\n default-language: Haskell2010\n\ntest-suite test\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends:\n base\n , base16-bytestring\n , bytestring\n , HUnit\n , QuickCheck\n , test-framework\n , test-framework-hunit\n , test-framework-quickcheck2\n\n default-language: Haskell2010\n\nbenchmark bench\n type: exitcode-stdio-1.0\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n build-depends:\n base >=4 && <5\n , base16-bytestring\n , bytestring\n , criterion\n , deepseq\n\n default-language: Haskell2010\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: base16-bytestring\nversion: 1.0.2.0\nx-revision: 1\nsynopsis: RFC 4648-compliant Base16 encodings for ByteStrings\ndescription:\n This package provides support for encoding and decoding binary data according\n to @base16@ (see also ) for\n strict (see \"Data.ByteString.Base16\") and lazy @ByteString@s (see \"Data.ByteString.Base16.Lazy\").\n .\n See the package which provides superior encoding and decoding performance as well as support for lazy, short, and strict variants of 'Text' and 'ByteString' values. Additionally, see the package which\n provides an uniform API providing conversion paths between more binary and textual types.\n\nhomepage: http://github.com/haskell/base16-bytestring\nbug-reports: http://github.com/haskell/base16-bytestring/issues\nlicense: BSD3\nlicense-file: LICENSE\ncopyright:\n Copyright 2011 MailRank, Inc.;\n Copyright 2010-2020 Bryan O'Sullivan et al.\n\nauthor: Bryan O'Sullivan \nmaintainer:\n Herbert Valerio Riedel ,\n Mikhail Glushenkov ,\n Emily Pillmore \n\ncategory: Data\nbuild-type: Simple\nextra-source-files:\n README.md\n CHANGELOG.md\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.3\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n\nsource-repository head\n type: git\n location: http://github.com/haskell/base16-bytestring\n\nlibrary\n other-modules: Data.ByteString.Base16.Internal\n exposed-modules:\n Data.ByteString.Base16\n Data.ByteString.Base16.Lazy\n\n build-depends:\n base >=4.9 && <5\n , bytestring >=0.9 && <0.13\n\n ghc-options: -Wall -funbox-strict-fields\n default-language: Haskell2010\n\ntest-suite test\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends:\n base\n , base16-bytestring\n , bytestring\n , HUnit\n , QuickCheck\n , test-framework\n , test-framework-hunit\n , test-framework-quickcheck2\n\n default-language: Haskell2010\n\nbenchmark bench\n type: exitcode-stdio-1.0\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n build-depends:\n base >=4 && <5\n , base16-bytestring\n , bytestring\n , criterion\n , deepseq\n\n default-language: Haskell2010\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/clock.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/clock.nix similarity index 68% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/clock.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/clock.nix index de66c1339a..1db6e2d90d 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/clock.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/clock.nix @@ -11,22 +11,22 @@ flags = { llvm = false; }; package = { specVersion = "1.10"; - identifier = { name = "clock"; version = "0.8.3"; }; + identifier = { name = "clock"; version = "0.8.4"; }; license = "BSD-3-Clause"; - copyright = "Copyright © Cetin Sert 2009-2016, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; - maintainer = "Cetin Sert , Corsis Research"; - author = "Cetin Sert , Corsis Research"; + copyright = "Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021."; + maintainer = "Cetin Sert , Elefunc, Inc."; + author = "Cetin Sert , Elefunc, Inc."; homepage = "https://github.com/corsis/clock"; url = ""; synopsis = "High-resolution clock functions: monotonic, realtime, cputime."; description = "A package for convenient access to high-resolution clock and\ntimer functions of different operating systems via a unified API.\n\nPOSIX code and surface API was developed by Cetin Sert in 2009.\n\nWindows code was contributed by Eugene Kirpichov in 2010.\n\nFreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n\nOS X code was contributed by Gerolf Seitz on 2013-10-15.\n\nDerived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n\nCorrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n\nWindows code corrected by Dimitri Sabadie on 2015-02-09.\n\nAdded @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n\nImported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n\nUnit tests and instance fixes by Christian Burger on 2015-06-25.\n\nRemoval of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n\nNew Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n\nReintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n\nFixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n\nRefreshment release in 2019-04 after numerous contributions.\n\nRefactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n\n[Version Scheme]\nMajor-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n\n* @PackagingOnly@ changes are made for quality assurance reasons."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "test" = { depends = [ @@ -34,26 +34,26 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "benchmarks" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/clock-0.8.3.tar.gz"; - sha256 = "845ce5db4c98cefd517323e005f87effceff886987305e421c4ef616dc0505d1"; - }); - }) // { - package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.3\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2016, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Corsis Research\nmaintainer: Cetin Sert , Corsis Research\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.2.1\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: git://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/clock-0.8.4.tar.gz"; + sha256 = "6ae9898afe788a5e334cd5fad5d18a3c2e8e59fa09aaf7b957dbb38a4767df2e"; + }); + }) // { + package-description-override = "cabal-version: >= 1.10\nname: clock\nversion: 0.8.4\nstability: stable\nsynopsis: High-resolution clock functions: monotonic, realtime, cputime.\ndescription: A package for convenient access to high-resolution clock and\n timer functions of different operating systems via a unified API.\n .\n POSIX code and surface API was developed by Cetin Sert in 2009.\n .\n Windows code was contributed by Eugene Kirpichov in 2010.\n .\n FreeBSD code was contributed by Finn Espen Gundersen on 2013-10-14.\n .\n OS X code was contributed by Gerolf Seitz on 2013-10-15.\n .\n Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.\n .\n Corrected dependency listing for @GHC < 7.6@ was contributed by Brian McKenna on 2014-09-30.\n .\n Windows code corrected by Dimitri Sabadie on 2015-02-09.\n .\n Added @timeSpecAsNanoSecs@ as observed widely-used by Chris Done on 2015-01-06, exported correctly on 2015-04-20.\n .\n Imported Control.Applicative operators correctly for Haskell Platform on Windows on 2015-04-21.\n .\n Unit tests and instance fixes by Christian Burger on 2015-06-25.\n .\n Removal of fromInteger : Integer -> TimeSpec by Cetin Sert on 2015-12-15.\n .\n New Linux-specific Clocks: MonotonicRaw, Boottime, MonotonicCoarse, RealtimeCoarse by Cetin Sert on 2015-12-15.\n .\n Reintroduction fromInteger : Integer -> TimeSpec by Cetin Sert on 2016-04-05.\n .\n Fixes for older Linux build failures introduced by new Linux-specific clocks by Mario Longobardi on 2016-04-18.\n .\n Refreshment release in 2019-04 after numerous contributions.\n .\n Refactoring for Windows, Mac implementation consistence by Alexander Vershilov on 2021-01-16.\n .\n [Version Scheme]\n Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly\n .\n * @PackagingOnly@ changes are made for quality assurance reasons.\n\ncopyright: Copyright © Cetin Sert 2009-2023, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 2015, Chris Done 2015, Dimitri Sabadie 2015, Christian Burger 2015, Mario Longobardi 2016, Alexander Vershilov 2021.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Cetin Sert , Elefunc, Inc.\nmaintainer: Cetin Sert , Elefunc, Inc.\nhomepage: https://github.com/corsis/clock\nbug-reports: https://github.com/corsis/clock/issues\ncategory: System\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n\nextra-source-files:\n CHANGELOG.md\n\n\nsource-repository head\n type: git\n location: https://github.com/corsis/clock.git\n\n\nflag llvm\n description: compile via LLVM\n default : False\n\n\nlibrary\n build-depends: base >= 4.7 && < 5\n\n exposed-modules: System.Clock\n System.Clock.Seconds\n\n default-language: Haskell2010\n default-extensions: DeriveGeneric\n DeriveDataTypeable\n ForeignFunctionInterface\n ScopedTypeVariables\n ViewPatterns\n GeneralizedNewtypeDeriving\n if os(windows)\n c-sources: cbits/hs_clock_win32.c\n include-dirs: cbits\n ghc-options: -O3 -Wall\n\n if flag(llvm)\n ghc-options: -fllvm -optlo-O3\n\n\ntest-suite test\n default-language: Haskell2010\n default-extensions: ScopedTypeVariables\n GeneralizedNewtypeDeriving\n StandaloneDeriving\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n tests\n main-is:\n test.hs\n build-depends:\n base\n , tasty >= 0.10\n , tasty-quickcheck\n , clock\n\nbenchmark benchmarks\n default-language: Haskell2010\n type:\n exitcode-stdio-1.0\n hs-source-dirs:\n bench\n main-is:\n benchmarks.hs\n build-depends:\n base\n , criterion\n , clock\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/cryptohash-sha256.nix similarity index 70% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/cryptohash-sha256.nix index 5d4a3157f0..7fe8a112a9 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/cryptohash-sha256.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/cryptohash-sha256.nix @@ -21,31 +21,31 @@ synopsis = "Fast, pure and practical SHA-256 implementation"; description = "A practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n\n\nAdditionally, this package provides support for\n\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n\n=== Relationship to the @cryptohash@ package and its API\n\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) - ] ++ (if flags.use-cbits + ] ++ (if flags.use-cbits then [ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ] + ] else [ (hsPkgs."cryptohash-sha256-pure" or (errorHandler.buildDepError "cryptohash-sha256-pure")) - ]); + ]); buildable = true; - }; + }; exes = { "sha256sum" = { - depends = (pkgs.lib).optionals (flags.exe) [ + depends = pkgs.lib.optionals (flags.exe) [ (hsPkgs."cryptohash-sha256" or (errorHandler.buildDepError "cryptohash-sha256")) (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) - ]; + ]; buildable = if flags.exe then true else false; - }; }; + }; tests = { "test-sha256" = { depends = [ @@ -57,10 +57,10 @@ (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench-sha256" = { depends = [ @@ -69,16 +69,16 @@ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/cryptohash-sha256-0.11.102.1.tar.gz"; sha256 = "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6"; - }); - }) // { - package-description-override = "cabal-version: 2.0\nname: cryptohash-sha256\nversion: 0.11.102.1\nx-revision: 2\n\nsynopsis: Fast, pure and practical SHA-256 implementation\ndescription: {\n\nA practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n.\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n.\n\n.\nAdditionally, this package provides support for\n.\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n.\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n.\n=== Relationship to the @cryptohash@ package and its API\n.\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n.\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).\n\n}\n\nlicense: BSD3\nlicense-file: LICENSE\ncopyright: Vincent Hanquez, Herbert Valerio Riedel\nmaintainer: Herbert Valerio Riedel \nhomepage: https://github.com/hvr/cryptohash-sha256\nbug-reports: https://github.com/hvr/cryptohash-sha256/issues\ncategory: Data, Cryptography\nbuild-type: Simple\n\ntested-with:\n GHC == 9.6.1\n GHC == 9.4.4\n GHC == 9.2.7\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n GHC == 7.8.4\n GHC == 7.6.3\n GHC == 7.4.2\n\nextra-source-files: cbits/hs_sha256.h\n changelog.md\n\nsource-repository head\n type: git\n location: https://github.com/hvr/cryptohash-sha256.git\n\nflag exe\n description: Enable building @sha256sum@ executable\n manual: True\n default: False\n\nflag use-cbits\n description: Use fast optimized C routines via FFI; if flag is disabled falls back to non-FFI Haskell optimized implementation.\n manual: True\n default: True\n\nlibrary\n default-language: Haskell2010\n\n ghc-options: -Wall\n\n build-depends: base >= 4.5 && < 4.19\n\n exposed-modules: Crypto.Hash.SHA256\n\n if flag(use-cbits)\n build-depends: bytestring ^>= 0.9.2 || ^>= 0.10.0 || ^>= 0.11.0\n\n other-extensions: BangPatterns\n CApiFFI\n CPP\n Trustworthy\n Unsafe\n\n hs-source-dirs: src\n other-modules: Crypto.Hash.SHA256.FFI\n Compat\n include-dirs: cbits\n else\n hs-source-dirs: src-pure\n build-depends: cryptohash-sha256-pure ^>= 0.1.0\n\nexecutable sha256sum\n default-language: Haskell2010\n hs-source-dirs: src-exe\n main-is: sha256sum.hs\n ghc-options: -Wall -threaded\n if flag(exe)\n other-extensions: RecordWildCards\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n else\n buildable: False\n\ntest-suite test-sha256\n default-language: Haskell2010\n other-extensions: OverloadedStrings\n type: exitcode-stdio-1.0\n hs-source-dirs: src-tests\n main-is: test-sha256.hs\n ghc-options: -Wall -threaded\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n , SHA ^>= 1.6.4\n , tasty ^>= 1.4\n , tasty-quickcheck ^>= 0.10\n , tasty-hunit ^>= 0.10\n\nbenchmark bench-sha256\n default-language: Haskell2010\n other-extensions: BangPatterns\n type: exitcode-stdio-1.0\n main-is: bench-sha256.hs\n hs-source-dirs: src-bench\n build-depends: cryptohash-sha256\n , SHA ^>= 1.6.4\n , base\n , bytestring\n , criterion ^>= 1.5 || ^>=1.6\n\n -- not yet public\n -- build-depends: cryptohash-sha256-pure ^>= 0.1.0\n"; - } \ No newline at end of file + }); + }) // { + package-description-override = "cabal-version: 2.0\nname: cryptohash-sha256\nversion: 0.11.102.1\nx-revision: 3\n\nsynopsis: Fast, pure and practical SHA-256 implementation\ndescription: {\n\nA practical incremental and one-pass, pure API to\nthe [SHA-256 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-2) according\nto [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)\nwith performance close to the fastest implementations available in other languages.\n.\nThe core SHA-256 algorithm is implemented in C and is thus expected\nto be as fast as the standard [sha256sum(1) tool](https://linux.die.net/man/1/sha256sum);\nfor instance, on an /Intel Core i7-3770/ at 3.40GHz this implementation can\ncompute a SHA-256 hash over 230 MiB of data in under one second.\n(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)\n.\n\n.\nAdditionally, this package provides support for\n.\n- HMAC-SHA-256: SHA-256-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)\n- HKDF-SHA-256: [HMAC-SHA-256-based Key Derivation Function](https://en.wikipedia.org/wiki/HKDF) (HKDF)\n.\nconforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..\n.\n=== Relationship to the @cryptohash@ package and its API\n.\nThis package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@\npackage had been deprecated and so this package continues to satisfy the need for a\nlightweight package providing the SHA-256 hash algorithm without any dependencies on packages\nother than @base@ and @bytestring@. The API exposed by @cryptohash-sha256-0.11.*@'s\n\"Crypto.Hash.SHA256\" module is guaranteed to remain a compatible superset of the API provided\nby the @cryptohash-0.11.7@'s module of the same name.\n.\nConsequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s\n\"Crypto.Hash.SHA256\" module, though with\na [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).\n\n}\n\nlicense: BSD3\nlicense-file: LICENSE\ncopyright: Vincent Hanquez, Herbert Valerio Riedel\nmaintainer: Herbert Valerio Riedel \nhomepage: https://github.com/hvr/cryptohash-sha256\nbug-reports: https://github.com/hvr/cryptohash-sha256/issues\ncategory: Data, Cryptography\nbuild-type: Simple\n\ntested-with:\n GHC == 9.8.0\n GHC == 9.6.2\n GHC == 9.4.7\n GHC == 9.2.8\n GHC == 9.0.2\n GHC == 8.10.7\n GHC == 8.8.4\n GHC == 8.6.5\n GHC == 8.4.4\n GHC == 8.2.2\n GHC == 8.0.2\n GHC == 7.10.3\n\nextra-source-files: cbits/hs_sha256.h\n changelog.md\n\nsource-repository head\n type: git\n location: https://github.com/hvr/cryptohash-sha256.git\n\nflag exe\n description: Enable building @sha256sum@ executable\n manual: True\n default: False\n\nflag use-cbits\n description: Use fast optimized C routines via FFI; if flag is disabled falls back to non-FFI Haskell optimized implementation.\n manual: True\n default: True\n\nlibrary\n default-language: Haskell2010\n\n ghc-options: -Wall\n\n build-depends: base >= 4.5 && < 4.20\n\n exposed-modules: Crypto.Hash.SHA256\n\n if flag(use-cbits)\n build-depends: bytestring ^>= 0.9.2.0 || ^>= 0.10.0.0 || ^>= 0.11.0.0 || ^>= 0.12.0.2\n\n other-extensions: BangPatterns\n CApiFFI\n CPP\n Trustworthy\n Unsafe\n\n hs-source-dirs: src\n other-modules: Crypto.Hash.SHA256.FFI\n Compat\n include-dirs: cbits\n else\n hs-source-dirs: src-pure\n build-depends: cryptohash-sha256-pure ^>= 0.1.0\n\nexecutable sha256sum\n default-language: Haskell2010\n hs-source-dirs: src-exe\n main-is: sha256sum.hs\n ghc-options: -Wall -threaded\n if flag(exe)\n other-extensions: RecordWildCards\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n else\n buildable: False\n\ntest-suite test-sha256\n default-language: Haskell2010\n other-extensions: OverloadedStrings\n type: exitcode-stdio-1.0\n hs-source-dirs: src-tests\n main-is: test-sha256.hs\n ghc-options: -Wall -threaded\n build-depends: cryptohash-sha256\n , base\n , bytestring\n\n , base16-bytestring ^>= 0.1.1 || ^>= 1.0.0\n , SHA ^>= 1.6.4\n , tasty ^>= 1.4 || ^>= 1.5\n , tasty-quickcheck ^>= 0.10\n , tasty-hunit ^>= 0.10\n\nbenchmark bench-sha256\n default-language: Haskell2010\n other-extensions: BangPatterns\n type: exitcode-stdio-1.0\n main-is: bench-sha256.hs\n hs-source-dirs: src-bench\n build-depends: cryptohash-sha256\n , SHA ^>= 1.6.4\n , base\n , bytestring\n , criterion ^>= 1.5 || ^>=1.6\n\n -- not yet public\n -- build-depends: cryptohash-sha256-pure ^>= 0.1.0\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/extra.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/extra.nix similarity index 94% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/extra.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/extra.nix index 450be82c4b..41668cf6bc 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/extra.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/extra.nix @@ -21,7 +21,7 @@ synopsis = "Extra functions I use."; description = "A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n\nThe module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -31,9 +31,9 @@ (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."clock" or (errorHandler.buildDepError "clock")) (hsPkgs."time" or (errorHandler.buildDepError "time")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; + }; tests = { "extra-test" = { depends = [ @@ -43,16 +43,16 @@ (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."quickcheck-instances" or (errorHandler.buildDepError "quickcheck-instances")) - ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/extra-1.7.14.tar.gz"; sha256 = "b6a909f8f0e4b8076a1653b4d34815a782f0a8c1e83d5267f4d00496471ef567"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: extra\nversion: 1.7.14\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2023\nsynopsis: Extra functions I use.\ndescription:\n A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2.\n .\n The module \"Extra\" documents all functions provided by this library. Modules such as \"Data.List.Extra\" provide extra functions over \"Data.List\" and also reexport \"Data.List\". Users are recommended to replace \"Data.List\" imports with \"Data.List.Extra\" if they need the extra functionality.\nhomepage: https://github.com/ndmitchell/extra#readme\nbug-reports: https://github.com/ndmitchell/extra/issues\ntested-with: GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8\n\nextra-doc-files:\n CHANGES.txt\n README.md\nextra-source-files:\n Generate.hs\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/extra.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9 && < 5,\n directory,\n filepath,\n process,\n clock >= 0.7,\n time\n if !os(windows)\n build-depends: unix\n\n other-modules:\n Partial\n exposed-modules:\n Extra\n Control.Concurrent.Extra\n Control.Exception.Extra\n Control.Monad.Extra\n Data.Foldable.Extra\n Data.Either.Extra\n Data.IORef.Extra\n Data.List.Extra\n Data.List.NonEmpty.Extra\n Data.Monoid.Extra\n Data.Tuple.Extra\n Data.Typeable.Extra\n Data.Version.Extra\n Numeric.Extra\n System.Directory.Extra\n System.Environment.Extra\n System.Info.Extra\n System.IO.Extra\n System.Process.Extra\n System.Time.Extra\n Text.Read.Extra\n\ntest-suite extra-test\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n build-depends:\n base == 4.*,\n directory,\n filepath,\n extra,\n QuickCheck >= 2.10,\n quickcheck-instances >= 0.3.17\n if !os(windows)\n build-depends: unix\n hs-source-dirs: test\n ghc-options: -main-is Test -threaded \"-with-rtsopts=-N4 -K1K\"\n main-is: Test.hs\n other-modules:\n TestCustom\n TestGen\n TestUtil\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/filepattern.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/filepattern.nix similarity index 97% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/filepattern.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/filepattern.nix index 13bbd09e88..385c502003 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/filepattern.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/filepattern.nix @@ -21,7 +21,7 @@ synopsis = "File path glob-like matching"; description = "A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\nrecursively under the @src@ directory. Features:\n\n* All matching is /O(n)/. Most functions precompute some information given only one argument.\n\n* See \"System.FilePattern\" and @?==@ simple matching and semantics.\n\n* Use @match@ and @substitute@ to extract suitable\nstrings from the @*@ and @**@ matches, and substitute them back into other patterns.\n\n* Use @step@ and @matchMany@ to perform bulk matching\nof many patterns against many paths simultaneously.\n\n* Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n\nOriginally taken from the ."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) - ]; + ]; buildable = true; - }; + }; tests = { "filepattern-test" = { depends = [ @@ -41,16 +41,16 @@ (hsPkgs."filepattern" or (errorHandler.buildDepError "filepattern")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/filepattern-0.1.3.tar.gz"; sha256 = "cc445d439ea2f65cac7604d3578aa2c3a62e5a91dc989f4ce5b3390db9e59636"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: filepattern\nversion: 0.1.3\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, FilePath\nauthor: Neil Mitchell , Evan Rutledge Borden \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: File path glob-like matching\ndescription:\n A library for matching files using patterns such as @\\\"src\\/**\\/*.png\\\"@ for all @.png@ files\n recursively under the @src@ directory. Features:\n .\n * All matching is /O(n)/. Most functions precompute some information given only one argument.\n .\n * See \"System.FilePattern\" and @?==@ simple matching and semantics.\n .\n * Use @match@ and @substitute@ to extract suitable\n strings from the @*@ and @**@ matches, and substitute them back into other patterns.\n .\n * Use @step@ and @matchMany@ to perform bulk matching\n of many patterns against many paths simultaneously.\n .\n * Use \"System.FilePattern.Directory\" to perform optimised directory traverals using patterns.\n .\n Originally taken from the .\nhomepage: https://github.com/ndmitchell/filepattern#readme\nbug-reports: https://github.com/ndmitchell/filepattern/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0\nextra-doc-files:\n CHANGES.txt\n README.md\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/filepattern.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*,\n directory,\n extra >= 1.6.2,\n filepath\n exposed-modules:\n System.FilePattern\n System.FilePattern.Directory\n other-modules:\n System.FilePattern.Core\n System.FilePattern.ListBy\n System.FilePattern.Monads\n System.FilePattern.Step\n System.FilePattern.Tree\n System.FilePattern.Wildcard\n\n\ntest-suite filepattern-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: test\n build-depends:\n base == 4.*,\n directory,\n extra,\n filepattern,\n filepath,\n QuickCheck >= 2.0\n other-modules:\n Test.Cases\n Test.Util\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/hashable.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/hashable.nix new file mode 100644 index 0000000000..4b125fa0bc --- /dev/null +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/hashable.nix @@ -0,0 +1,82 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { integer-gmp = true; random-initial-seed = false; }; + package = { + specVersion = "1.12"; + identifier = { name = "hashable"; version = "1.4.3.0"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = "Milan Straka \nJohan Tibell "; + homepage = "http://github.com/haskell-unordered-containers/hashable"; + url = ""; + synopsis = "A class for types that can be converted to a hash value"; + description = "This package defines a class, 'Hashable', for types that\ncan be converted to a hash value. This class\nexists for the benefit of hashing-based data\nstructures. The package provides instances for\nbasic types and a way to combine hash values.\n\nThe 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = (([ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.2")) (hsPkgs."base-orphans" or (errorHandler.buildDepError "base-orphans"))) ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.4")) (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte"))) ++ (if compiler.isGhc && compiler.version.ge "9" + then [ + (hsPkgs."ghc-bignum" or (errorHandler.buildDepError "ghc-bignum")) + ] ++ pkgs.lib.optional (!(compiler.isGhc && compiler.version.ge "9.0.2")) (hsPkgs."ghc-bignum-orphans" or (errorHandler.buildDepError "ghc-bignum-orphans")) + else if flags.integer-gmp + then [ + (hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp")) + ] + else [ + (hsPkgs."integer-simple" or (errorHandler.buildDepError "integer-simple")) + ]); + buildable = true; + }; + tests = { + "hashable-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + (hsPkgs."test-framework-quickcheck2" or (errorHandler.buildDepError "test-framework-quickcheck2")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ] ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")); + buildable = true; + }; + "hashable-examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/hashable-1.4.3.0.tar.gz"; + sha256 = "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5"; + }); + }) // { + package-description-override = "cabal-version: 1.12\nname: hashable\nversion: 1.4.3.0\nx-revision: 1\nsynopsis: A class for types that can be converted to a hash value\ndescription:\n This package defines a class, 'Hashable', for types that\n can be converted to a hash value. This class\n exists for the benefit of hashing-based data\n structures. The package provides instances for\n basic types and a way to combine hash values.\n .\n The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.\n\nhomepage: http://github.com/haskell-unordered-containers/hashable\n\n-- SPDX-License-Identifier : BSD-3-Clause\nlicense: BSD3\nlicense-file: LICENSE\nauthor:\n Milan Straka \n Johan Tibell \n\nmaintainer: Oleg Grenrus \nbug-reports:\n https://github.com/haskell-unordered-containers/hashable/issues\n\nstability: Provisional\ncategory: Data\nbuild-type: Simple\ntested-with:\n GHC ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.3\n || ==8.10.4\n || ==8.10.7\n || ==9.0.1\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n\nextra-source-files:\n CHANGES.md\n include/HsHashable.h\n README.md\n\nflag integer-gmp\n description:\n Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.\n\n manual: False\n default: True\n\nflag random-initial-seed\n description:\n Randomly initialize the initial seed on each final executable invocation\n This is useful for catching cases when you rely on (non-existent)\n stability of hashable's hash functions.\n This is not a security feature.\n\n manual: True\n default: False\n\nlibrary\n exposed-modules:\n Data.Hashable\n Data.Hashable.Generic\n Data.Hashable.Lifted\n\n other-modules:\n Data.Hashable.Class\n Data.Hashable.Generic.Instances\n Data.Hashable.Imports\n Data.Hashable.LowLevel\n\n c-sources: cbits/fnv.c\n include-dirs: include\n hs-source-dirs: src\n build-depends:\n base >=4.10.1.0 && <4.20\n , bytestring >=0.10.8.2 && <0.13\n , containers >=0.5.10.2 && <0.7\n , deepseq >=1.4.3.0 && <1.6\n , filepath >=1.4.1.2 && <1.5\n , ghc-prim\n , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2\n\n if !impl(ghc >=9.2)\n build-depends: base-orphans >=0.8.6 && <0.10\n\n if !impl(ghc >=9.4)\n build-depends: data-array-byte >=0.1.0.1 && <0.2\n\n -- Integer internals\n if impl(ghc >=9)\n build-depends: ghc-bignum >=1.0 && <1.4\n\n if !impl(ghc >=9.0.2)\n build-depends: ghc-bignum-orphans >=0.1 && <0.2\n\n else\n if flag(integer-gmp)\n build-depends: integer-gmp >=0.4 && <1.1\n\n else\n -- this is needed for the automatic flag to be well-balanced\n build-depends: integer-simple\n\n if (flag(random-initial-seed) && impl(ghc))\n cpp-options: -DHASHABLE_RANDOM_SEED=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n default-language: Haskell2010\n other-extensions:\n BangPatterns\n CPP\n DeriveDataTypeable\n FlexibleContexts\n FlexibleInstances\n GADTs\n KindSignatures\n MagicHash\n MultiParamTypeClasses\n ScopedTypeVariables\n Trustworthy\n TypeOperators\n UnliftedFFITypes\n\n ghc-options: -Wall -fwarn-tabs\n\n if impl(ghc >=9.0)\n -- these flags may abort compilation with GHC-8.10\n -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295\n ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode\n\ntest-suite hashable-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Main.hs\n other-modules:\n Properties\n Regress\n\n build-depends:\n base\n , bytestring\n , ghc-prim\n , hashable\n , HUnit\n , QuickCheck >=2.4.0.1\n , random >=1.0 && <1.3\n , test-framework >=0.3.3\n , test-framework-hunit\n , test-framework-quickcheck2 >=0.2.9\n , text >=0.11.0.5\n\n if !os(windows)\n build-depends: unix\n cpp-options: -DHAVE_MMAP\n other-modules: Regress.Mmap\n other-extensions: CApiFFI\n\n ghc-options: -Wall -fno-warn-orphans\n default-language: Haskell2010\n\ntest-suite hashable-examples\n type: exitcode-stdio-1.0\n build-depends:\n base\n , ghc-prim\n , hashable\n\n hs-source-dirs: examples\n main-is: Main.hs\n default-language: Haskell2010\n\nsource-repository head\n type: git\n location:\n https://github.com/haskell-unordered-containers/hashable.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/heaps.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/heaps.nix similarity index 96% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/heaps.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/heaps.nix index dc77aed1f4..e759e305bf 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/heaps.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/heaps.nix @@ -21,18 +21,18 @@ synopsis = "Asymptotically optimal Brodal/Okasaki heaps."; description = "Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/heaps-0.4.tar.gz"; sha256 = "89329df8b95ae99ef272e41e7a2d0fe2f1bb7eacfcc34bc01664414b33067cfd"; - }); - }) // { + }); + }) // { package-description-override = "name: heaps\nversion: 0.4\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Edward A. Kmett\nmaintainer: Edward A. Kmett \nstability: experimental\nhomepage: http://github.com/ekmett/heaps/\nbug-reports: http://github.com/ekmett/heaps/issues\ncategory: Data Structures\nsynopsis: Asymptotically optimal Brodal/Okasaki heaps.\ndescription: Asymptotically optimal Brodal\\/Okasaki bootstrapped skew-binomial heaps from the paper , extended with a 'Foldable' interface.\ncopyright: (c) 2010-2015 Edward A. Kmett\ntested-with: GHC == 7.0.4\n , GHC == 7.2.2\n , GHC == 7.4.2\n , GHC == 7.6.3\n , GHC == 7.8.4\n , GHC == 7.10.3\n , GHC == 8.0.2\n , GHC == 8.2.2\n , GHC == 8.4.4\n , GHC == 8.6.5\n , GHC == 8.8.3\n , GHC == 8.10.1\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files:\n .gitignore\n .hlint.yaml\n CHANGELOG.markdown\n README.markdown\n\nsource-repository head\n type: git\n location: git://github.com/ekmett/heaps.git\n\nlibrary\n exposed-modules: Data.Heap\n build-depends:\n base >= 4 && < 6\n hs-source-dirs: src\n ghc-options: -O2 -Wall\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-dgtable.nix similarity index 96% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-dgtable.nix index 0237404c41..40ea1148c6 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-dgtable.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-dgtable.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified jquery.dgtable code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jquery.dgtable version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-dgtable-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-dgtable" or (errorHandler.buildDepError "js-dgtable")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-dgtable-0.5.2.tar.gz"; sha256 = "e28dd65bee8083b17210134e22e01c6349dc33c3b7bd17705973cd014e9f20ac"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-dgtable\nversion: 0.5.2\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2019\nsynopsis: Obtain minified jquery.dgtable code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jquery.dgtable version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-dgtable#readme\nbug-reports: https://github.com/ndmitchell/js-dgtable/issues\ntested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3\nextra-source-files:\n javascript/jquery.dgtable.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.dgtable.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-dgtable.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.DGTable\n\n other-modules:\n Paths_js_dgtable\n\ntest-suite js-dgtable-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_dgtable\n build-depends:\n base == 4.*,\n js-dgtable\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-flot.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-flot.nix similarity index 96% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-flot.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-flot.nix index ba292fc8b2..67980dd7ba 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-flot.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-flot.nix @@ -21,27 +21,27 @@ synopsis = "Obtain minified flot code"; description = "This package bundles the minified code\n(a jQuery plotting library) into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream flot version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-flot-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-flot-0.8.3.tar.gz"; sha256 = "1ba2f2a6b8d85da76c41f526c98903cbb107f8642e506c072c1e7e3c20fe5e7a"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.10\nbuild-type: Simple\nname: js-flot\nversion: 0.8.3\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014\nsynopsis: Obtain minified flot code\ndescription:\n This package bundles the minified code\n (a jQuery plotting library) into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream flot version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-flot#readme\nbug-reports: https://github.com/ndmitchell/js-flot/issues\ntested-with: GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2\nextra-source-files:\n javascript/flot-0.8.3.zip\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery.flot.min.js\n jquery.flot.canvas.min.js\n jquery.flot.categories.min.js\n jquery.flot.crosshair.min.js\n jquery.flot.errorbars.min.js\n jquery.flot.fillbetween.min.js\n jquery.flot.image.min.js\n jquery.flot.navigate.min.js\n jquery.flot.pie.min.js\n jquery.flot.resize.min.js\n jquery.flot.selection.min.js\n jquery.flot.stack.min.js\n jquery.flot.symbol.min.js\n jquery.flot.threshold.min.js\n jquery.flot.time.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-flot.git\n\nlibrary\n default-language: Haskell2010\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.Flot\n\n other-modules:\n Paths_js_flot\n\ntest-suite js-flot-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n build-depends:\n base == 4.*,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-jquery.nix similarity index 96% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-jquery.nix index 9ecdc931ed..05e54a25ab 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/js-jquery.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/js-jquery.nix @@ -21,28 +21,28 @@ synopsis = "Obtain minified jQuery code"; description = "This package bundles the minified code into a Haskell package,\nso it can be depended upon by Cabal packages. The first three components of\nthe version number match the upstream jQuery version. The package is designed\nto meet the redistribution requirements of downstream users (e.g. Debian)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) ]; buildable = true; - }; + }; tests = { "js-jquery-test" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."js-jquery" or (errorHandler.buildDepError "js-jquery")) (hsPkgs."HTTP" or (errorHandler.buildDepError "HTTP")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/js-jquery-3.3.1.tar.gz"; sha256 = "e0e0681f0da1130ede4e03a051630ea439c458cb97216cdb01771ebdbe44069b"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: >= 1.18\nbuild-type: Simple\nname: js-jquery\nversion: 3.3.1\nlicense: MIT\nlicense-file: LICENSE\ncategory: Javascript\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2014-2018\nsynopsis: Obtain minified jQuery code\ndescription:\n This package bundles the minified code into a Haskell package,\n so it can be depended upon by Cabal packages. The first three components of\n the version number match the upstream jQuery version. The package is designed\n to meet the redistribution requirements of downstream users (e.g. Debian).\nhomepage: https://github.com/ndmitchell/js-jquery#readme\nbug-reports: https://github.com/ndmitchell/js-jquery/issues\ntested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2\nextra-source-files:\n javascript/jquery-3.3.1.js\nextra-doc-files:\n CHANGES.txt\n README.md\n\ndata-dir: javascript\ndata-files:\n jquery-3.3.1.min.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/js-jquery.git\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base == 4.*\n\n exposed-modules:\n Language.Javascript.JQuery\n\n other-modules:\n Paths_js_jquery\n\ntest-suite js-jquery-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: src/Test.hs\n other-modules:\n Paths_js_jquery\n build-depends:\n base == 4.*,\n js-jquery,\n HTTP\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/primitive.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/primitive.nix similarity index 63% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/primitive.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/primitive.nix index bbc2dd58da..b5683f2c83 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/primitive.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/primitive.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "2.0"; - identifier = { name = "primitive"; version = "0.8.0.0"; }; + identifier = { name = "primitive"; version = "0.9.0.0"; }; license = "BSD-3-Clause"; copyright = "(c) Roman Leshchinskiy 2009-2012"; maintainer = "libraries@haskell.org"; @@ -21,7 +21,7 @@ synopsis = "Primitive memory-related operations"; description = "This package provides various primitive memory-related operations."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ @@ -29,9 +29,9 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "9.4") (hsPkgs."data-array-byte" or (errorHandler.buildDepError "data-array-byte")); buildable = true; - }; + }; tests = { "test-qc" = { depends = [ @@ -46,10 +46,10 @@ (hsPkgs."tagged" or (errorHandler.buildDepError "tagged")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."transformers-compat" or (errorHandler.buildDepError "transformers-compat")) - ]; + ]; buildable = true; - }; }; + }; benchmarks = { "bench" = { depends = [ @@ -58,16 +58,16 @@ (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { - url = "http://hackage.haskell.org/package/primitive-0.8.0.0.tar.gz"; - sha256 = "5553c21b4a789f9b591eed69e598cc58484c274af29250e517b5a8bcc62b995f"; - }); - }) // { - package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.8.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n\n Build-Depends: base >= 4.9 && < 4.19\n , deepseq >= 1.1 && < 1.5\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; - } \ No newline at end of file + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/primitive-0.9.0.0.tar.gz"; + sha256 = "696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7"; + }); + }) // { + package-description-override = "Cabal-Version: 2.0\nName: primitive\nVersion: 0.9.0.0\nLicense: BSD3\nLicense-File: LICENSE\n\nAuthor: Roman Leshchinskiy \nMaintainer: libraries@haskell.org\nCopyright: (c) Roman Leshchinskiy 2009-2012\nHomepage: https://github.com/haskell/primitive\nBug-Reports: https://github.com/haskell/primitive/issues\nCategory: Data\nSynopsis: Primitive memory-related operations\nBuild-Type: Simple\nDescription: This package provides various primitive memory-related operations.\n\nExtra-Source-Files: changelog.md\n test/*.hs\n test/LICENSE\n\nTested-With:\n GHC == 8.0.2\n GHC == 8.2.2\n GHC == 8.4.4\n GHC == 8.6.5\n GHC == 8.8.4\n GHC == 8.10.7\n GHC == 9.0.2\n GHC == 9.2.5\n GHC == 9.4.4\n\nLibrary\n Default-Language: Haskell2010\n Default-Extensions:\n TypeOperators\n Other-Extensions:\n BangPatterns, CPP, DeriveDataTypeable,\n MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes\n\n Exposed-Modules:\n Control.Monad.Primitive\n Data.Primitive\n Data.Primitive.MachDeps\n Data.Primitive.Types\n Data.Primitive.Array\n Data.Primitive.ByteArray\n Data.Primitive.PrimArray\n Data.Primitive.SmallArray\n Data.Primitive.Ptr\n Data.Primitive.MutVar\n Data.Primitive.MVar\n Data.Primitive.PrimVar\n\n Other-Modules:\n Data.Primitive.Internal.Operations\n Data.Primitive.Internal.Read\n\n Build-Depends: base >= 4.9 && < 4.20\n , deepseq >= 1.1 && < 1.6\n , transformers >= 0.5 && < 0.7\n , template-haskell >= 2.11\n\n if impl(ghc >= 9.2)\n cpp-options: -DHAVE_KEEPALIVE\n\n if impl(ghc < 9.4)\n build-depends: data-array-byte >= 0.1 && < 0.1.1\n\n Ghc-Options: -O2\n\n Include-Dirs: cbits\n Install-Includes: primitive-memops.h\n includes: primitive-memops.h\n c-sources: cbits/primitive-memops.c\n if !os(solaris)\n cc-options: -ftree-vectorize\n if arch(i386) || arch(x86_64)\n cc-options: -msse2\n\ntest-suite test-qc\n Default-Language: Haskell2010\n hs-source-dirs: test\n test/src\n main-is: Main.hs\n Other-Modules: PrimLaws\n type: exitcode-stdio-1.0\n build-depends: base\n , base-orphans\n , ghc-prim\n , primitive\n , quickcheck-classes-base >= 0.6 && <0.7\n , QuickCheck >= 2.13 && < 2.15\n , tasty ^>= 1.2 || ^>= 1.3 || ^>= 1.4\n , tasty-quickcheck\n , tagged\n , transformers >= 0.5\n , transformers-compat\n\n cpp-options: -DHAVE_UNARY_LAWS\n ghc-options: -O2\n\nbenchmark bench\n Default-Language: Haskell2010\n hs-source-dirs: bench\n main-is: main.hs\n type: exitcode-stdio-1.0\n ghc-options: -O2\n other-modules:\n Array.Traverse.Closure\n Array.Traverse.Unsafe\n ByteArray.Compare\n PrimArray.Compare\n PrimArray.Traverse\n build-depends:\n base\n , primitive\n , deepseq\n , tasty-bench\n , transformers >= 0.5\n\nsource-repository head\n type: git\n location: https://github.com/haskell/primitive\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/random.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/random.nix new file mode 100644 index 0000000000..0dbaf8b099 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/random.nix @@ -0,0 +1,113 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = {}; + package = { + specVersion = "1.10"; + identifier = { name = "random"; version = "1.2.1.1"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "core-libraries-committee@haskell.org"; + author = ""; + homepage = ""; + url = ""; + synopsis = "Pseudo-random number generation"; + description = "This package provides basic pseudo-random number generation, including the\nability to split random number generators.\n\n== \"System.Random\": pure pseudo-random number interface\n\nIn pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\n\"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\nnumber generator like 'System.Random.StdGen'.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.uniformR':\n\n>>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\n>>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\n>>> let pureGen = mkStdGen 42\n>>> take 10 (rolls pureGen) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nSee \"System.Random\" for more details.\n\n== \"System.Random.Stateful\": monadic pseudo-random number interface\n\nIn monadic code, use 'System.Random.Stateful.uniformM' and\n'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\npseudo-random numbers with a monadic pseudo-random number generator, or\nusing a monadic adapter.\n\nAs an example, here is how you can simulate rolls of a six-sided die using\n'System.Random.Stateful.uniformRM':\n\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> let pureGen = mkStdGen 42\n>>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\n[1,1,3,2,4,5,3,4,6,2]\n\nThe monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\nthe pure pseudo-random number generator @pureGen@ into the\n'System.Random.Stateful.StatefulGen' context.\n\nThe monadic interface can also be used with existing monadic pseudo-random\nnumber generators. In this example, we use the one provided in the\n package:\n\n>>> import System.Random.MWC as MWC\n>>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\n>>> monadicGen <- MWC.create\n>>> replicateM 10 (rollM monadicGen) :: IO [Word]\n[2,3,6,6,4,4,3,1,5,4]\n\nSee \"System.Random.Stateful\" for more details."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")); + buildable = true; + }; + tests = { + "legacy-test" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + ]; + buildable = true; + }; + "doctests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."doctest" or (errorHandler.buildDepError "doctest")) + ] ++ pkgs.lib.optionals (compiler.isGhc && compiler.version.ge "8.2" && (compiler.isGhc && compiler.version.lt "8.10")) [ + (hsPkgs."mwc-random" or (errorHandler.buildDepError "mwc-random")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "spec" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."smallcheck" or (errorHandler.buildDepError "smallcheck")) + (hsPkgs."stm" or (errorHandler.buildDepError "stm")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-smallcheck" or (errorHandler.buildDepError "tasty-smallcheck")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) + ]; + buildable = true; + }; + "spec-inspection" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.0") (hsPkgs."tasty-inspection-testing" or (errorHandler.buildDepError "tasty-inspection-testing")); + buildable = true; + }; + }; + benchmarks = { + "legacy-bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."rdtsc" or (errorHandler.buildDepError "rdtsc")) + (hsPkgs."split" or (errorHandler.buildDepError "split")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + ]; + buildable = true; + }; + "bench" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/random-1.2.1.1.tar.gz"; + sha256 = "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\r\nname: random\r\nversion: 1.2.1.1\r\nx-revision: 1\r\nlicense: BSD3\r\nlicense-file: LICENSE\r\nmaintainer: core-libraries-committee@haskell.org\r\nbug-reports: https://github.com/haskell/random/issues\r\nsynopsis: Pseudo-random number generation\r\ndescription:\r\n This package provides basic pseudo-random number generation, including the\r\n ability to split random number generators.\r\n .\r\n == \"System.Random\": pure pseudo-random number interface\r\n .\r\n In pure code, use 'System.Random.uniform' and 'System.Random.uniformR' from\r\n \"System.Random\" to generate pseudo-random numbers with a pure pseudo-random\r\n number generator like 'System.Random.StdGen'.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.uniformR':\r\n .\r\n >>> let roll = uniformR (1, 6) :: RandomGen g => g -> (Word, g)\r\n >>> let rolls = unfoldr (Just . roll) :: RandomGen g => g -> [Word]\r\n >>> let pureGen = mkStdGen 42\r\n >>> take 10 (rolls pureGen) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n See \"System.Random\" for more details.\r\n .\r\n == \"System.Random.Stateful\": monadic pseudo-random number interface\r\n .\r\n In monadic code, use 'System.Random.Stateful.uniformM' and\r\n 'System.Random.Stateful.uniformRM' from \"System.Random.Stateful\" to generate\r\n pseudo-random numbers with a monadic pseudo-random number generator, or\r\n using a monadic adapter.\r\n .\r\n As an example, here is how you can simulate rolls of a six-sided die using\r\n 'System.Random.Stateful.uniformRM':\r\n .\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> let pureGen = mkStdGen 42\r\n >>> runStateGen_ pureGen (replicateM 10 . rollM) :: [Word]\r\n [1,1,3,2,4,5,3,4,6,2]\r\n .\r\n The monadic adapter 'System.Random.Stateful.runStateGen_' is used here to lift\r\n the pure pseudo-random number generator @pureGen@ into the\r\n 'System.Random.Stateful.StatefulGen' context.\r\n .\r\n The monadic interface can also be used with existing monadic pseudo-random\r\n number generators. In this example, we use the one provided in the\r\n package:\r\n .\r\n >>> import System.Random.MWC as MWC\r\n >>> let rollM = uniformRM (1, 6) :: StatefulGen g m => g -> m Word\r\n >>> monadicGen <- MWC.create\r\n >>> replicateM 10 (rollM monadicGen) :: IO [Word]\r\n [2,3,6,6,4,4,3,1,5,4]\r\n .\r\n See \"System.Random.Stateful\" for more details.\r\n\r\ncategory: System\r\nbuild-type: Simple\r\nextra-source-files:\r\n README.md\r\n CHANGELOG.md\r\ntested-with: GHC == 7.10.2\r\n , GHC == 7.10.3\r\n , GHC == 8.0.2\r\n , GHC == 8.2.2\r\n , GHC == 8.4.3\r\n , GHC == 8.4.4\r\n , GHC == 8.6.3\r\n , GHC == 8.6.4\r\n , GHC == 8.6.5\r\n , GHC == 8.8.1\r\n , GHC == 8.8.2\r\n , GHC == 8.10.1\r\n\r\nsource-repository head\r\n type: git\r\n location: https://github.com/haskell/random.git\r\n\r\n\r\nlibrary\r\n exposed-modules:\r\n System.Random\r\n System.Random.Internal\r\n System.Random.Stateful\r\n other-modules:\r\n System.Random.GFinite\r\n\r\n hs-source-dirs: src\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wincomplete-record-updates -Wincomplete-uni-patterns\r\n\r\n build-depends:\r\n base >=4.8 && <5,\r\n bytestring >=0.10.4 && <0.13,\r\n deepseq >=1.1 && <2,\r\n mtl >=2.2 && <2.4,\r\n splitmix >=0.1 && <0.2\r\n if impl(ghc < 8.0)\r\n build-depends:\r\n transformers\r\n\r\ntest-suite legacy-test\r\n type: exitcode-stdio-1.0\r\n main-is: Legacy.hs\r\n hs-source-dirs: test-legacy\r\n other-modules:\r\n T7936\r\n TestRandomIOs\r\n TestRandomRs\r\n Random1283\r\n RangeTest\r\n\r\n default-language: Haskell2010\r\n ghc-options: -with-rtsopts=-M8M\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n build-depends:\r\n base,\r\n containers >=0.5 && <0.7,\r\n random\r\n\r\ntest-suite doctests\r\n type: exitcode-stdio-1.0\r\n main-is: doctests.hs\r\n hs-source-dirs: test\r\n default-language: Haskell2010\r\n build-depends:\r\n base,\r\n doctest >=0.15 && <0.21\r\n if impl(ghc >= 8.2) && impl(ghc < 8.10)\r\n build-depends:\r\n mwc-random >=0.13 && <0.16,\r\n primitive >=0.6 && <0.8,\r\n random,\r\n stm,\r\n unliftio >=0.2 && <0.3,\r\n vector >= 0.10 && <0.14\r\n\r\ntest-suite spec\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test\r\n other-modules:\r\n Spec.Range\r\n Spec.Run\r\n Spec.Stateful\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n bytestring,\r\n random,\r\n smallcheck >=1.2 && <1.3,\r\n stm,\r\n tasty >=1.0 && <1.5,\r\n tasty-smallcheck >=0.8 && <0.9,\r\n tasty-hunit >=0.10 && <0.11,\r\n transformers\r\n\r\n-- Note. Fails when compiled with coverage:\r\n-- https://github.com/haskell/random/issues/107\r\ntest-suite spec-inspection\r\n type: exitcode-stdio-1.0\r\n main-is: Spec.hs\r\n hs-source-dirs: test-inspection\r\n build-depends:\r\n\r\n default-language: Haskell2010\r\n ghc-options: -Wall\r\n build-depends:\r\n base,\r\n random,\r\n tasty >=1.0 && <1.5\r\n if impl(ghc >= 8.0)\r\n build-depends:\r\n tasty-inspection-testing\r\n other-modules:\r\n Spec.Inspection\r\n\r\nbenchmark legacy-bench\r\n type: exitcode-stdio-1.0\r\n main-is: SimpleRNGBench.hs\r\n hs-source-dirs: bench-legacy\r\n other-modules: BinSearch\r\n default-language: Haskell2010\r\n ghc-options:\r\n -Wall -O2 -threaded -rtsopts -with-rtsopts=-N\r\n if impl(ghc >= 8.0)\r\n ghc-options:\r\n -Wno-deprecations\r\n\r\n build-depends:\r\n base,\r\n random,\r\n rdtsc,\r\n split >=0.2 && <0.3,\r\n time >=1.4 && <1.13\r\n\r\nbenchmark bench\r\n type: exitcode-stdio-1.0\r\n main-is: Main.hs\r\n hs-source-dirs: bench\r\n default-language: Haskell2010\r\n ghc-options: -Wall -O2\r\n build-depends:\r\n base,\r\n mtl,\r\n primitive >= 0.7.1,\r\n random,\r\n splitmix >=0.1 && <0.2,\r\n tasty-bench\r\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/shake.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/shake.nix similarity index 94% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/shake.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/shake.nix index e7eb5c6647..d40c2a8bbc 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/shake.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/shake.nix @@ -21,7 +21,7 @@ synopsis = "Build system library, like Make, but more accurate dependencies."; description = "Shake is a Haskell library for writing build systems - designed as a\nreplacement for @make@. See \"Development.Shake\" for an introduction,\nincluding an example. The homepage contains links to a user\nmanual, an academic paper and further information:\n\n\nTo use Shake the user writes a Haskell program\nthat imports \"Development.Shake\", defines some build rules, and calls\nthe 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\noperators, a simple Shake build system\nis not too dissimilar from a simple Makefile. However, as build systems\nget more complex, Shake is able to take advantage of the excellent\nabstraction facilities offered by Haskell and easily support much larger\nprojects. The Shake library provides all the standard features available in other\nbuild systems, including automatic parallelism and minimal rebuilds.\nShake also provides more accurate dependency tracking, including seamless\nsupport for generated files, and dependencies on system information\n(e.g. compiler version)."; buildType = "Simple"; - }; + }; components = { "library" = { depends = ((([ @@ -45,15 +45,15 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]; + ]; buildable = true; - }; + }; exes = { "shake" = { depends = (((([ @@ -77,16 +77,16 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; + }; tests = { "shake-test" = { depends = (((([ @@ -111,22 +111,22 @@ (hsPkgs."transformers" or (errorHandler.buildDepError "transformers")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ] ++ (pkgs.lib).optionals (flags.embed-files) [ + ] ++ pkgs.lib.optionals (flags.embed-files) [ (hsPkgs."file-embed" or (errorHandler.buildDepError "file-embed")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) - ]) ++ (pkgs.lib).optionals (!flags.portable) ((pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ (pkgs.lib).optionals (flags.cloud) [ + ]) ++ pkgs.lib.optionals (!flags.portable) (pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix")))) ++ pkgs.lib.optional (!system.isWindows) (hsPkgs."unix" or (errorHandler.buildDepError "unix"))) ++ pkgs.lib.optionals (flags.cloud) [ (hsPkgs."network" or (errorHandler.buildDepError "network")) (hsPkgs."network-uri" or (errorHandler.buildDepError "network-uri")) - ]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); + ]) ++ pkgs.lib.optional (compiler.isGhc && compiler.version.lt "8.0") (hsPkgs."semigroups" or (errorHandler.buildDepError "semigroups")); buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/shake-0.19.7.tar.gz"; sha256 = "352a56af12f70b50d564dcb61131555577281957ee196f1702a3723c0a3699d1"; - }); - }) // { + }); + }) // { package-description-override = "cabal-version: 1.18\nbuild-type: Simple\nname: shake\nversion: 0.19.7\nx-revision: 1\nlicense: BSD3\nlicense-file: LICENSE\ncategory: Development, Shake\nauthor: Neil Mitchell \nmaintainer: Neil Mitchell \ncopyright: Neil Mitchell 2011-2022\nsynopsis: Build system library, like Make, but more accurate dependencies.\ndescription:\n Shake is a Haskell library for writing build systems - designed as a\n replacement for @make@. See \"Development.Shake\" for an introduction,\n including an example. The homepage contains links to a user\n manual, an academic paper and further information:\n \n .\n To use Shake the user writes a Haskell program\n that imports \"Development.Shake\", defines some build rules, and calls\n the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n operators, a simple Shake build system\n is not too dissimilar from a simple Makefile. However, as build systems\n get more complex, Shake is able to take advantage of the excellent\n abstraction facilities offered by Haskell and easily support much larger\n projects. The Shake library provides all the standard features available in other\n build systems, including automatic parallelism and minimal rebuilds.\n Shake also provides more accurate dependency tracking, including seamless\n support for generated files, and dependencies on system information\n (e.g. compiler version).\nhomepage: https://shakebuild.com\nbug-reports: https://github.com/ndmitchell/shake/issues\ntested-with: GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6\nextra-doc-files:\n CHANGES.txt\n README.md\n docs/Manual.md\n docs/shake-progress.png\nextra-source-files:\n src/Paths.hs\n src/Test/C/constants.c\n src/Test/C/constants.h\n src/Test/C/main.c\n src/Test/Ninja/*.ninja\n src/Test/Ninja/*.output\n src/Test/Ninja/subdir/*.ninja\n src/Test/Progress/*.prog\n src/Test/Tar/list.txt\n src/Test/Tup/hello.c\n src/Test/Tup/newmath/root.cfg\n src/Test/Tup/newmath/square.c\n src/Test/Tup/newmath/square.h\n src/Test/Tup/root.cfg\ndata-files:\n docs/manual/build.bat\n docs/manual/Shakefile.hs\n docs/manual/build.sh\n docs/manual/constants.c\n docs/manual/constants.h\n docs/manual/main.c\n html/profile.html\n html/progress.html\n html/shake.js\n\nsource-repository head\n type: git\n location: https://github.com/ndmitchell/shake.git\n\nflag portable\n default: False\n manual: True\n description: Obtain FileTime using portable functions\n\nflag cloud\n default: False\n manual: True\n description: Enable cloud build features\n\nflag embed-files\n default: False\n manual: True\n description: Embed data files into the shake library\n\nlibrary\n default-language: Haskell2010\n hs-source-dirs: src\n build-depends:\n base >= 4.9,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory >= 1.2.7.0,\n extra >= 1.6.19,\n filepath >= 1.4,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n exposed-modules:\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Rule\n Development.Shake.Util\n\n other-modules:\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\nexecutable shake\n default-language: Haskell2010\n hs-source-dirs: src\n ghc-options: -main-is Run.main -rtsopts -threaded \"-with-rtsopts=-I0 -qg\"\n main-is: Run.hs\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n\n\ntest-suite shake-test\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n main-is: Test.hs\n hs-source-dirs: src\n ghc-options: -main-is Test.main -rtsopts -with-rtsopts=-K1K -threaded\n\n build-depends:\n base == 4.*,\n binary,\n bytestring,\n deepseq >= 1.1,\n directory,\n extra >= 1.6.19,\n filepath,\n filepattern,\n hashable >= 1.1.2.3,\n heaps >= 0.3.6.1,\n js-dgtable,\n js-flot,\n js-jquery,\n primitive,\n process >= 1.1,\n QuickCheck >= 2.0,\n random,\n time,\n transformers >= 0.2,\n unordered-containers >= 0.2.7,\n utf8-string >= 0.3\n\n if flag(embed-files)\n cpp-options: -DFILE_EMBED\n build-depends:\n file-embed >= 0.0.11,\n template-haskell\n\n if flag(portable)\n cpp-options: -DPORTABLE\n else\n if !os(windows)\n build-depends: unix >= 2.5.1\n if !os(windows)\n build-depends: unix\n\n if flag(cloud)\n cpp-options: -DNETWORK\n build-depends: network, network-uri\n\n if impl(ghc < 8.0)\n build-depends: semigroups >= 0.18\n\n other-modules:\n Development.Ninja.All\n Development.Ninja.Env\n Development.Ninja.Lexer\n Development.Ninja.Parse\n Development.Ninja.Type\n Development.Shake\n Development.Shake.Classes\n Development.Shake.Command\n Development.Shake.Config\n Development.Shake.Database\n Development.Shake.FilePath\n Development.Shake.Forward\n Development.Shake.Internal.Args\n Development.Shake.Internal.CmdOption\n Development.Shake.Internal.CompactUI\n Development.Shake.Internal.Core.Action\n Development.Shake.Internal.Core.Build\n Development.Shake.Internal.Core.Database\n Development.Shake.Internal.History.Shared\n Development.Shake.Internal.History.Symlink\n Development.Shake.Internal.History.Bloom\n Development.Shake.Internal.History.Cloud\n Development.Shake.Internal.History.Network\n Development.Shake.Internal.History.Server\n Development.Shake.Internal.History.Serialise\n Development.Shake.Internal.History.Types\n Development.Shake.Internal.Core.Monad\n Development.Shake.Internal.Core.Pool\n Development.Shake.Internal.Core.Rules\n Development.Shake.Internal.Core.Run\n Development.Shake.Internal.Core.Storage\n Development.Shake.Internal.Core.Types\n Development.Shake.Internal.Demo\n Development.Shake.Internal.Derived\n Development.Shake.Internal.Errors\n Development.Shake.Internal.FileInfo\n Development.Shake.Internal.FileName\n Development.Shake.Internal.FilePattern\n Development.Shake.Internal.Options\n Development.Shake.Internal.Paths\n Development.Shake.Internal.Profile\n Development.Shake.Internal.Progress\n Development.Shake.Internal.Resource\n Development.Shake.Internal.Rules.Default\n Development.Shake.Internal.Rules.Directory\n Development.Shake.Internal.Rules.File\n Development.Shake.Internal.Rules.Files\n Development.Shake.Internal.Rules.Oracle\n Development.Shake.Internal.Rules.OrderOnly\n Development.Shake.Internal.Rules.Rerun\n Development.Shake.Internal.Value\n Development.Shake.Rule\n Development.Shake.Util\n General.Bilist\n General.Binary\n General.Chunks\n General.Cleanup\n General.Fence\n General.EscCodes\n General.Extra\n General.FileLock\n General.GetOpt\n General.Ids\n General.Intern\n General.ListBuilder\n General.Makefile\n General.Pool\n General.Process\n General.Template\n General.Thread\n General.Timing\n General.TypeMap\n General.Wait\n Paths_shake\n Run\n Test.Basic\n Test.Batch\n Test.Benchmark\n Test.Builtin\n Test.BuiltinOverride\n Test.C\n Test.Cache\n Test.Cleanup\n Test.CloseFileHandles\n Test.Command\n Test.Config\n Test.Database\n Test.Digest\n Test.Directory\n Test.Docs\n Test.Errors\n Test.Existence\n Test.FileLock\n Test.FilePath\n Test.FilePattern\n Test.Files\n Test.Forward\n Test.History\n Test.Journal\n Test.Lint\n Test.Live\n Test.Manual\n Test.Match\n Test.Monad\n Test.Ninja\n Test.Oracle\n Test.OrderOnly\n Test.Parallel\n Test.Pool\n Test.Progress\n Test.Random\n Test.Rebuild\n Test.Reschedule\n Test.Resources\n Test.Self\n Test.SelfMake\n Test.Tar\n Test.Targets\n Test.Thread\n Test.Tup\n Test.Type\n Test.Unicode\n Test.Util\n Test.Verbosity\n Test.Version\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/splitmix.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/splitmix.nix new file mode 100644 index 0000000000..aa0dd88d31 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/splitmix.nix @@ -0,0 +1,139 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { optimised-mixer = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "splitmix"; version = "0.1.0.5"; }; + license = "BSD-3-Clause"; + copyright = ""; + maintainer = "Oleg Grenrus "; + author = ""; + homepage = ""; + url = ""; + synopsis = "Fast Splittable PRNG"; + description = "Pure Haskell implementation of SplitMix described in\n\nGuy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\nFast splittable pseudorandom number generators. In Proceedings\nof the 2014 ACM International Conference on Object Oriented\nProgramming Systems Languages & Applications (OOPSLA '14). ACM,\nNew York, NY, USA, 453-472. DOI:\n\n\nThe paper describes a new algorithm /SplitMix/ for /splittable/\npseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\noperations per 64 bits generated.\n\n/SplitMix/ is tested with two standard statistical test suites (DieHarder and\nTestU01, this implementation only using the former) and it appears to be\nadequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\ndata structures where speed is important.\n\nIn particular, it __should not be used for cryptographic or security applications__,\nbecause generated sequences of pseudorandom values are too predictable\n(the mixing functions are easily inverted, and two successive outputs\nsuffice to reconstruct the internal state)."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + ] ++ pkgs.lib.optionals (!(compiler.isGhcjs && true)) (pkgs.lib.optional (!(compiler.isGhc && true)) (hsPkgs."time" or (errorHandler.buildDepError "time"))); + buildable = true; + }; + tests = { + "examples" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat" or (errorHandler.buildDepError "base-compat")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."math-functions" or (errorHandler.buildDepError "math-functions")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."test-framework" or (errorHandler.buildDepError "test-framework")) + (hsPkgs."test-framework-hunit" or (errorHandler.buildDepError "test-framework-hunit")) + ]; + buildable = true; + }; + "montecarlo-pi" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "montecarlo-pi-32" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "splitmix-dieharder" = { + depends = [ + (hsPkgs."async" or (errorHandler.buildDepError "async")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + (hsPkgs."vector" or (errorHandler.buildDepError "vector")) + ]; + buildable = true; + }; + "splitmix-testu01" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."base-compat-batteries" or (errorHandler.buildDepError "base-compat-batteries")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + libs = [ (pkgs."testu01" or (errorHandler.sysDepError "testu01")) ]; + buildable = if !system.isLinux then false else true; + }; + "initialization" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + }; + benchmarks = { + "comparison" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."criterion" or (errorHandler.buildDepError "criterion")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + (hsPkgs."tf-random" or (errorHandler.buildDepError "tf-random")) + ]; + buildable = true; + }; + "simple-sum" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ]; + buildable = true; + }; + "range" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."splitmix" or (errorHandler.buildDepError "splitmix")) + ] ++ pkgs.lib.optional (!(compiler.isGhcjs && true)) (hsPkgs."clock" or (errorHandler.buildDepError "clock")); + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/splitmix-0.1.0.5.tar.gz"; + sha256 = "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002"; + }); + }) // { + package-description-override = "cabal-version: >=1.10\nname: splitmix\nversion: 0.1.0.5\nsynopsis: Fast Splittable PRNG\ndescription:\n Pure Haskell implementation of SplitMix described in\n .\n Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.\n Fast splittable pseudorandom number generators. In Proceedings\n of the 2014 ACM International Conference on Object Oriented\n Programming Systems Languages & Applications (OOPSLA '14). ACM,\n New York, NY, USA, 453-472. DOI:\n \n .\n The paper describes a new algorithm /SplitMix/ for /splittable/\n pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical\n operations per 64 bits generated.\n .\n /SplitMix/ is tested with two standard statistical test suites (DieHarder and\n TestU01, this implementation only using the former) and it appears to be\n adequate for \"everyday\" use, such as Monte Carlo algorithms and randomized\n data structures where speed is important.\n .\n In particular, it __should not be used for cryptographic or security applications__,\n because generated sequences of pseudorandom values are too predictable\n (the mixing functions are easily inverted, and two successive outputs\n suffice to reconstruct the internal state).\n\nlicense: BSD3\nlicense-file: LICENSE\nmaintainer: Oleg Grenrus \nbug-reports: https://github.com/haskellari/splitmix/issues\ncategory: System, Random\nbuild-type: Simple\ntested-with:\n GHC ==7.0.4\n || ==7.2.2\n || ==7.4.2\n || ==7.6.3\n || ==7.8.4\n || ==7.10.3\n || ==8.0.2\n || ==8.2.2\n || ==8.4.4\n || ==8.6.5\n || ==8.8.4\n || ==8.10.4\n || ==9.0.2\n || ==9.2.8\n || ==9.4.7\n || ==9.6.3\n || ==9.8.1\n , GHCJS ==8.4\n\nextra-source-files:\n Changelog.md\n make-hugs.sh\n README.md\n test-hugs.sh\n\nflag optimised-mixer\n description: Use JavaScript for mix32\n manual: True\n default: False\n\nlibrary\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: src src-compat\n exposed-modules:\n System.Random.SplitMix\n System.Random.SplitMix32\n\n other-modules:\n Data.Bits.Compat\n System.Random.SplitMix.Init\n\n -- dump-core\n -- build-depends: dump-core\n -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html\n\n build-depends:\n base >=4.3 && <4.20\n , deepseq >=1.3.0.0 && <1.6\n\n if flag(optimised-mixer)\n cpp-options: -DOPTIMISED_MIX32=1\n\n -- We don't want to depend on time, nor unix or Win32 packages\n -- because it's valuable that splitmix and QuickCheck doesn't\n -- depend on about anything\n\n if impl(ghcjs)\n cpp-options: -DSPLITMIX_INIT_GHCJS=1\n\n else\n if impl(ghc)\n cpp-options: -DSPLITMIX_INIT_C=1\n\n if os(windows)\n c-sources: cbits-win/init.c\n\n else\n c-sources: cbits-unix/init.c\n\n else\n cpp-options: -DSPLITMIX_INIT_COMPAT=1\n build-depends: time >=1.2.0.3 && <1.13\n\nsource-repository head\n type: git\n location: https://github.com/haskellari/splitmix.git\n\nbenchmark comparison\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: Bench.hs\n build-depends:\n base\n , containers >=0.4.2.1 && <0.7\n , criterion >=1.1.0.0 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n\nbenchmark simple-sum\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench\n main-is: SimpleSum.hs\n build-depends:\n base\n , random\n , splitmix\n\nbenchmark range\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: bench src-compat\n main-is: Range.hs\n other-modules: Data.Bits.Compat\n build-depends:\n base\n , random\n , splitmix\n\n if !impl(ghcjs)\n build-depends: clock >=0.8 && <0.9\n\ntest-suite examples\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Examples.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n\ntest-suite splitmix-tests\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: Tests.hs\n other-modules:\n MiniQC\n Uniformity\n\n build-depends:\n base\n , base-compat >=0.11.1 && <0.14\n , containers >=0.4.0.0 && <0.7\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , math-functions ==0.1.7.0 || >=0.3.3.0 && <0.4\n , splitmix\n , test-framework >=0.8.2.0 && <0.9\n , test-framework-hunit >=0.3.0.2 && <0.4\n\ntest-suite montecarlo-pi\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi.hs\n build-depends:\n base\n , splitmix\n\ntest-suite montecarlo-pi-32\n type: exitcode-stdio-1.0\n default-language: Haskell2010\n ghc-options: -Wall\n hs-source-dirs: tests\n main-is: SplitMixPi32.hs\n build-depends:\n base\n , splitmix\n\ntest-suite splitmix-dieharder\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Dieharder.hs\n build-depends:\n async >=2.2.1 && <2.3\n , base\n , base-compat-batteries >=0.10.5 && <0.14\n , bytestring >=0.9.1.8 && <0.13\n , deepseq\n , process >=1.0.1.5 && <1.7\n , random\n , splitmix\n , tf-random >=0.5 && <0.6\n , vector >=0.11.0.0 && <0.14\n\ntest-suite splitmix-testu01\n if !os(linux)\n buildable: False\n\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: TestU01.hs\n c-sources: tests/cbits/testu01.c\n extra-libraries: testu01\n build-depends:\n base\n , base-compat-batteries >=0.10.5 && <0.14\n , splitmix\n\ntest-suite initialization\n default-language: Haskell2010\n type: exitcode-stdio-1.0\n ghc-options: -Wall -threaded -rtsopts\n hs-source-dirs: tests\n main-is: Initialization.hs\n build-depends:\n base\n , HUnit ==1.3.1.2 || >=1.6.0.0 && <1.7\n , splitmix\n"; + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/unordered-containers.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/unordered-containers.nix new file mode 100644 index 0000000000..0aeaccb277 --- /dev/null +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/unordered-containers.nix @@ -0,0 +1,78 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { debug = false; }; + package = { + specVersion = "1.10"; + identifier = { name = "unordered-containers"; version = "0.2.19.1"; }; + license = "BSD-3-Clause"; + copyright = "2010-2014 Johan Tibell\n2010 Edward Z. Yang"; + maintainer = "simon.jakobi@gmail.com, David.Feuer@gmail.com"; + author = "Johan Tibell"; + homepage = "https://github.com/haskell-unordered-containers/unordered-containers"; + url = ""; + synopsis = "Efficient hashing-based container types"; + description = "Efficient hashing-based container types. The containers have been\noptimized for performance critical use, both in terms of large data\nquantities and high speed.\n\nThe declared cost of each operation is either worst-case or\namortized, but remains valid even if structures are shared.\n\n/Security/\n\nThis package currently provides no defenses against hash collision attacks\nsuch as HashDoS.\nUsers who need to store input from untrusted sources are advised to use\n@Data.Map@ or @Data.Set@ from the @containers@ package instead."; + buildType = "Simple"; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) + ]; + buildable = true; + }; + tests = { + "unordered-containers-tests" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."ChasingBottoms" or (errorHandler.buildDepError "ChasingBottoms")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty" or (errorHandler.buildDepError "tasty")) + (hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit")) + (hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ] ++ pkgs.lib.optional (compiler.isGhc && compiler.version.ge "8.6") (hsPkgs."nothunks" or (errorHandler.buildDepError "nothunks")); + buildable = true; + }; + }; + benchmarks = { + "benchmarks" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."hashable" or (errorHandler.buildDepError "hashable")) + (hsPkgs."hashmap" or (errorHandler.buildDepError "hashmap")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."tasty-bench" or (errorHandler.buildDepError "tasty-bench")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + ]; + buildable = true; + }; + }; + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { + url = "http://hackage.haskell.org/package/unordered-containers-0.2.19.1.tar.gz"; + sha256 = "1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2"; + }); + }) // { + package-description-override = "name: unordered-containers\nversion: 0.2.19.1\nx-revision: 3\nsynopsis: Efficient hashing-based container types\ndescription:\n Efficient hashing-based container types. The containers have been\n optimized for performance critical use, both in terms of large data\n quantities and high speed.\n .\n The declared cost of each operation is either worst-case or\n amortized, but remains valid even if structures are shared.\n .\n /Security/\n .\n This package currently provides no defenses against hash collision attacks\n such as HashDoS.\n Users who need to store input from untrusted sources are advised to use\n @Data.Map@ or @Data.Set@ from the @containers@ package instead.\nlicense: BSD3\nlicense-file: LICENSE\nauthor: Johan Tibell\nmaintainer: simon.jakobi@gmail.com, David.Feuer@gmail.com\nHomepage: https://github.com/haskell-unordered-containers/unordered-containers\nbug-reports: https://github.com/haskell-unordered-containers/unordered-containers/issues\ncopyright: 2010-2014 Johan Tibell\n 2010 Edward Z. Yang\ncategory: Data\nbuild-type: Simple\ncabal-version: >=1.10\nextra-source-files: CHANGES.md\n\ntested-with:\n GHC ==9.8.1\n || ==9.6.3\n || ==9.4.7\n || ==9.2.8\n || ==9.0.2\n || ==8.10.7\n || ==8.8.4\n || ==8.6.5\n || ==8.4.4\n || ==8.2.2\n\nflag debug\n description: Enable debug support\n default: False\n\nlibrary\n exposed-modules:\n Data.HashMap.Internal\n Data.HashMap.Internal.Array\n Data.HashMap.Internal.List\n Data.HashMap.Internal.Strict\n Data.HashMap.Lazy\n Data.HashMap.Strict\n Data.HashSet\n Data.HashSet.Internal\n\n build-depends:\n base >= 4.10 && < 5,\n deepseq >= 1.4.3,\n hashable >= 1.2.5 && < 1.5,\n template-haskell < 2.22\n\n default-language: Haskell2010\n\n other-extensions:\n RoleAnnotations,\n UnboxedTuples,\n ScopedTypeVariables,\n MagicHash,\n BangPatterns\n\n ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans\n\n -- For dumping the generated code:\n -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file\n -- ghc-options: -dsuppress-coercions -dsuppress-unfoldings -dsuppress-module-prefixes\n -- ghc-options: -dsuppress-uniques -dsuppress-timestamps\n\n if flag(debug)\n cpp-options: -DASSERTS\n\ntest-suite unordered-containers-tests\n hs-source-dirs: tests\n main-is: Main.hs\n type: exitcode-stdio-1.0\n other-modules:\n Regressions\n Properties\n Properties.HashMapLazy\n Properties.HashMapStrict\n Properties.HashSet\n Properties.List\n Strictness\n\n build-depends:\n base,\n ChasingBottoms,\n containers >= 0.5.8,\n hashable,\n HUnit,\n QuickCheck >= 2.4.0.1,\n random,\n tasty >= 1.4.0.3,\n tasty-hunit >= 0.10.0.3,\n tasty-quickcheck >= 0.10.1.2,\n unordered-containers\n\n if impl(ghc >= 8.6)\n build-depends:\n nothunks >= 0.1.3\n\n default-language: Haskell2010\n ghc-options: -Wall\n cpp-options: -DASSERTS\n\nbenchmark benchmarks\n hs-source-dirs: benchmarks\n main-is: Benchmarks.hs\n type: exitcode-stdio-1.0\n\n other-modules:\n Util.ByteString\n Util.String\n Util.Int\n\n build-depends:\n base >= 4.8.0,\n bytestring >= 0.10.0.0,\n containers,\n deepseq,\n hashable,\n hashmap,\n mtl,\n random,\n tasty-bench >= 0.3.1,\n unordered-containers\n\n default-language: Haskell2010\n ghc-options: -Wall -O2 -rtsopts -with-rtsopts=-A32m\n if impl(ghc >= 8.10)\n ghc-options: \"-with-rtsopts=-A32m --nonmoving-gc\"\n -- cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map\n\nsource-repository head\n type: git\n location: https://github.com/haskell-unordered-containers/unordered-containers.git\n"; + } \ No newline at end of file diff --git a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/utf8-string.nix similarity index 96% rename from materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/utf8-string.nix index ac9bde4057..a5ee5272da 100644 --- a/materialized/ghc962/hadrian-ghc99/hadrian/cabal-files/utf8-string.nix +++ b/materialized/ghc964/hadrian-ghc910/hadrian/cabal-files/utf8-string.nix @@ -21,31 +21,31 @@ synopsis = "Support for reading and writing UTF8 Strings"; description = "A UTF8 layer for Strings. The utf8-string\npackage provides operations for encoding UTF8\nstrings to Word8 lists and back, and for reading and\nwriting UTF8 without truncation."; buildType = "Simple"; - }; + }; components = { "library" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) - ]; + ]; buildable = true; - }; + }; tests = { "unit-tests" = { depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) - ]; + ]; buildable = true; - }; }; }; - } // { - src = (pkgs.lib).mkDefault (pkgs.fetchurl { + }; + } // { + src = pkgs.lib.mkDefault (pkgs.fetchurl { url = "http://hackage.haskell.org/package/utf8-string-1.0.2.tar.gz"; sha256 = "ee48deada7600370728c4156cb002441de770d0121ae33a68139a9ed9c19b09a"; - }); - }) // { + }); + }) // { package-description-override = "Name: utf8-string\nVersion: 1.0.2\nAuthor: Eric Mertens\nMaintainer: emertens@galois.com\nLicense: BSD3\nLicense-file: LICENSE\nHomepage: https://github.com/glguy/utf8-string/\nBug-Reports: https://github.com/glguy/utf8-string/issues\nSynopsis: Support for reading and writing UTF8 Strings\nDescription: A UTF8 layer for Strings. The utf8-string\n package provides operations for encoding UTF8\n strings to Word8 lists and back, and for reading and\n writing UTF8 without truncation.\nCategory: Codec\nBuild-type: Simple\ncabal-version: >= 1.10\nExtra-Source-Files: CHANGELOG.markdown\nTested-With: GHC==7.0.4, GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1\n\nsource-repository head\n type: git\n location: https://github.com/glguy/utf8-string\n\nlibrary\n Ghc-options: -W -O2\n\n build-depends: base >= 4.3 && < 5, bytestring >= 0.9\n\n Exposed-modules: Codec.Binary.UTF8.String\n Codec.Binary.UTF8.Generic\n Data.String.UTF8\n Data.ByteString.UTF8\n Data.ByteString.Lazy.UTF8\n\n default-language: Haskell2010\n\ntest-suite unit-tests\n type: exitcode-stdio-1.0\n hs-source-dirs: tests\n main-is: Tests.hs\n build-depends: base, HUnit >= 1.3 && < 1.7, utf8-string\n default-language: Haskell2010\n"; - } \ No newline at end of file + } \ No newline at end of file diff --git a/materialized/ghc964/hadrian-ghc99/hadrian/default.nix b/materialized/ghc964/hadrian-ghc910/hadrian/default.nix similarity index 100% rename from materialized/ghc964/hadrian-ghc99/hadrian/default.nix rename to materialized/ghc964/hadrian-ghc910/hadrian/default.nix From 7e50b15cfd6b4234789cb06dc27d9d1c83616016 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 May 2024 14:17:56 +1200 Subject: [PATCH 109/170] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c9773254f7..6d741ec7af 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; compiler = "ghc928"; config = import ./config.nix; From 14c2abb89e18ebf1f0f09ef7d2b9851276739e0d Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 May 2024 15:12:39 +1200 Subject: [PATCH 110/170] Update pins --- flake.lock | 12 ++++++------ flake.nix | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 759ba1e63f..6441ee12c1 100644 --- a/flake.lock +++ b/flake.lock @@ -529,11 +529,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1712867921, - "narHash": "sha256-edTFV4KldkCMdViC/rmpJa7oLIU8SE/S35lh/ukC7bg=", + "lastModified": 1716425819, + "narHash": "sha256-KV3uHxF0mKUMK7v8wsiH7r/TVdFkHHTB07h7DXkSgdI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "51651a540816273b67bc4dedea2d37d116c5f7fe", + "rev": "a520272adde270fd7b0d0d28fc30c91b90f17c86", "type": "github" }, "original": { @@ -561,11 +561,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1712883908, - "narHash": "sha256-icE1IJE9fHcbDfJ0+qWoDdcBXUoZCcIJxME4lMHwvSM=", + "lastModified": 1716358718, + "narHash": "sha256-NQbegJb2ZZnAqp2EJhWwTf6DrZXSpA6xZCEq+RGV1r0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a0c9e3aee1000ac2bfb0e5b98c94c946a5d180a9", + "rev": "3f316d2a50699a78afe5e77ca486ad553169061e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6d741ec7af..1beb9e7c7a 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From c6626776cdab46883f5ffe8c01056ee41f3bd91f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 May 2024 15:19:55 +1200 Subject: [PATCH 111/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1beb9e7c7a..c9773254f7 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From 8fcbd4d0d8c68d6b765dba13a6cca28e9fb86d68 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 May 2024 15:57:49 +1200 Subject: [PATCH 112/170] ifdLevel 0 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c9773254f7..5cf46e3ff6 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 0; compiler = "ghc928"; config = import ./config.nix; From 098716868e230182856aef02133e669a66f269c8 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 May 2024 16:58:10 +1200 Subject: [PATCH 113/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 5cf46e3ff6..1beb9e7c7a 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From 67a4439b4aff0ef259db11b37ae0822b49417bfe Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 24 May 2024 16:58:54 +1200 Subject: [PATCH 114/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1beb9e7c7a..c9773254f7 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From b351e516066d65d4132c4978bc4c8c17475922a6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 25 May 2024 00:47:43 +1200 Subject: [PATCH 115/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c9773254f7..1beb9e7c7a 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From 2fa57da640c853031b4ae63dc977e532576e6597 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 25 May 2024 02:17:39 +1200 Subject: [PATCH 116/170] Fix for new git --- lib/call-cabal-project-to-nix.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/call-cabal-project-to-nix.nix b/lib/call-cabal-project-to-nix.nix index 2d0f0e187d..70bf505c62 100644 --- a/lib/call-cabal-project-to-nix.nix +++ b/lib/call-cabal-project-to-nix.nix @@ -268,9 +268,14 @@ let sourceRepos = sourceReposBuild; inherit (repoResult) repos extra-hackages; makeFixedProjectFile = '' + HOME=$(mktemp -d) cp -f ${evalPackages.writeText "cabal.project" sourceRepoFixedProjectFile} ./cabal.project chmod +w -R ./cabal.project - ''; + '' + pkgs.lib.strings.concatStrings ( + map (f: '' + git config --global --add safe.directory ${f.location}/.git + '') sourceReposEval + ); # This will be used to replace refernces to the minimal git repos with just the index # of the repo. The index will be used in lib/import-and-filter-project.nix to # lookup the correct repository in `sourceReposBuild`. This avoids having From 6fd1917ebe72b523f3f52ecd9e535ebd1a3ba753 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 25 May 2024 10:48:44 +1200 Subject: [PATCH 117/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1beb9e7c7a..c9773254f7 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From c75c2da73b0cb2d4518bdc65c2407e61818be630 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 25 May 2024 13:37:49 +1200 Subject: [PATCH 118/170] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c9773254f7..6d741ec7af 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; compiler = "ghc928"; config = import ./config.nix; From d8516cc8208f1abd5057b58f197653286c29a92a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 26 May 2024 21:43:03 +1200 Subject: [PATCH 119/170] Use the old nixpkgs-unstable for now --- flake.lock | 8 ++++---- flake.nix | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 9367b69555..54a7e4d30f 100644 --- a/flake.lock +++ b/flake.lock @@ -561,17 +561,17 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1716358718, - "narHash": "sha256-NQbegJb2ZZnAqp2EJhWwTf6DrZXSpA6xZCEq+RGV1r0=", + "lastModified": 1694822471, + "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3f316d2a50699a78afe5e77ca486ad553169061e", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", "repo": "nixpkgs", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 6d741ec7af..705497df68 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,10 @@ nixpkgs-2211 = { url = "github:NixOS/nixpkgs/nixpkgs-22.11-darwin"; }; nixpkgs-2305 = { url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; }; nixpkgs-2311 = { url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin"; }; - nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; + # The libsodium bump in 85c6e70b555fe892a049fa3d9dce000dc23a9562 breaks th-dll tests. + # And later it breaks in th-dll due to some change in the windows libs. We should probably + # drop unsable. + nixpkgs-unstable = { url = "github:NixOS/nixpkgs?rev=47585496bcb13fb72e4a90daeea2f434e2501998"; }; # nixpkgs-unstable }; ghc910X = { flake = false; url = "git+https://gitlab.haskell.org/ghc/ghc?ref=ghc-9.10&submodules=1"; From c297c306403fd10d84ef8585fd792e6e1cb37d4e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 26 May 2024 23:31:27 +1200 Subject: [PATCH 120/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 705497df68..74279b43d5 100644 --- a/flake.nix +++ b/flake.nix @@ -98,7 +98,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From dad728c6ee0def87c3f9ec42d220d7ab33b82338 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 27 May 2024 09:10:29 +1200 Subject: [PATCH 121/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 74279b43d5..96cebe0352 100644 --- a/flake.nix +++ b/flake.nix @@ -98,7 +98,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From cc4339ef1e8275a1e76fb48d1ed73f36f27ed301 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 27 May 2024 10:22:53 +1200 Subject: [PATCH 122/170] Remove updated libsodium --- test/cabal.project.local | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 938248bc7d..7bc973c999 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -30,12 +30,13 @@ repository ghcjs-overlay -- This is needed because nixpkgs has 1.0.19, and libsodium has -- too tight bounds <1.0.18. -if !os(ghcjs) - source-repository-package - type: git - location: https://github.com/hamishmack/hs-libsodium.git - tag: c094f210f3bd34d97204451ea57855a5d17e2086 - --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= +-- TODO put this back in if hackage is still not updated when we update nixpkgs-unstable +--if !os(ghcjs) +-- source-repository-package +-- type: git +-- location: https://github.com/hamishmack/hs-libsodium.git +-- tag: c094f210f3bd34d97204451ea57855a5d17e2086 +-- --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= if !impl(ghc>=9.10) && !os(ghcjs) active-repositories: hackage.haskell.org From a3e0c17dd6a5950e21b2bc0511ef1ccf566d9dbf Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 27 May 2024 12:34:37 +1200 Subject: [PATCH 123/170] Use the old nixpkgs pins for now --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 54a7e4d30f..32facffbf6 100644 --- a/flake.lock +++ b/flake.lock @@ -513,11 +513,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1705033721, - "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", + "lastModified": 1701362232, + "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", + "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", "type": "github" }, "original": { @@ -529,11 +529,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1716425819, - "narHash": "sha256-KV3uHxF0mKUMK7v8wsiH7r/TVdFkHHTB07h7DXkSgdI=", + "lastModified": 1701386440, + "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a520272adde270fd7b0d0d28fc30c91b90f17c86", + "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", "type": "github" }, "original": { From 49a2b56cab9341e1aa1f7ee0e58a04e3f04d3465 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 27 May 2024 16:30:48 +1200 Subject: [PATCH 124/170] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 96cebe0352..705497df68 100644 --- a/flake.nix +++ b/flake.nix @@ -98,7 +98,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; compiler = "ghc928"; config = import ./config.nix; From d0e33ae63570450fec3aa536419ec21df9bf28d6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 29 May 2024 14:32:46 +1200 Subject: [PATCH 125/170] Put nixpkgs updates back in --- flake.lock | 20 ++++++++++---------- flake.nix | 5 +---- test/cabal.project.local | 13 ++++++------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 32facffbf6..9367b69555 100644 --- a/flake.lock +++ b/flake.lock @@ -513,11 +513,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1701362232, - "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", + "lastModified": 1705033721, + "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", + "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", "type": "github" }, "original": { @@ -529,11 +529,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1701386440, - "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", + "lastModified": 1716425819, + "narHash": "sha256-KV3uHxF0mKUMK7v8wsiH7r/TVdFkHHTB07h7DXkSgdI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", + "rev": "a520272adde270fd7b0d0d28fc30c91b90f17c86", "type": "github" }, "original": { @@ -561,17 +561,17 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1694822471, - "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", + "lastModified": 1716358718, + "narHash": "sha256-NQbegJb2ZZnAqp2EJhWwTf6DrZXSpA6xZCEq+RGV1r0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", + "rev": "3f316d2a50699a78afe5e77ca486ad553169061e", "type": "github" }, "original": { "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", - "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 705497df68..6d741ec7af 100644 --- a/flake.nix +++ b/flake.nix @@ -10,10 +10,7 @@ nixpkgs-2211 = { url = "github:NixOS/nixpkgs/nixpkgs-22.11-darwin"; }; nixpkgs-2305 = { url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; }; nixpkgs-2311 = { url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin"; }; - # The libsodium bump in 85c6e70b555fe892a049fa3d9dce000dc23a9562 breaks th-dll tests. - # And later it breaks in th-dll due to some change in the windows libs. We should probably - # drop unsable. - nixpkgs-unstable = { url = "github:NixOS/nixpkgs?rev=47585496bcb13fb72e4a90daeea2f434e2501998"; }; # nixpkgs-unstable }; + nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; ghc910X = { flake = false; url = "git+https://gitlab.haskell.org/ghc/ghc?ref=ghc-9.10&submodules=1"; diff --git a/test/cabal.project.local b/test/cabal.project.local index 7bc973c999..938248bc7d 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -30,13 +30,12 @@ repository ghcjs-overlay -- This is needed because nixpkgs has 1.0.19, and libsodium has -- too tight bounds <1.0.18. --- TODO put this back in if hackage is still not updated when we update nixpkgs-unstable ---if !os(ghcjs) --- source-repository-package --- type: git --- location: https://github.com/hamishmack/hs-libsodium.git --- tag: c094f210f3bd34d97204451ea57855a5d17e2086 --- --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= +if !os(ghcjs) + source-repository-package + type: git + location: https://github.com/hamishmack/hs-libsodium.git + tag: c094f210f3bd34d97204451ea57855a5d17e2086 + --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= if !impl(ghc>=9.10) && !os(ghcjs) active-repositories: hackage.haskell.org From 16a2598d8834b15f4ff980640ce8c1ae4df7a953 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 5 Jun 2024 01:24:34 +1200 Subject: [PATCH 126/170] ifdLevel 0 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 6d741ec7af..5cf46e3ff6 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 0; compiler = "ghc928"; config = import ./config.nix; From 1aae8412cd05109546246f9377c62f3a23918f37 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 5 Jun 2024 01:27:35 +1200 Subject: [PATCH 127/170] Bump nixpkgs pins --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 2175d7a83c..349e9cdf3f 100644 --- a/flake.lock +++ b/flake.lock @@ -529,11 +529,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1716425819, - "narHash": "sha256-KV3uHxF0mKUMK7v8wsiH7r/TVdFkHHTB07h7DXkSgdI=", + "lastModified": 1717152306, + "narHash": "sha256-RrgGB3ygQnHY1/0SsZiFIfFypJJ43mpSgV4RgfERPoo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a520272adde270fd7b0d0d28fc30c91b90f17c86", + "rev": "34cd4df4fbbaf4a1eddbc205e59bcae43ada9d46", "type": "github" }, "original": { @@ -561,11 +561,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1716358718, - "narHash": "sha256-NQbegJb2ZZnAqp2EJhWwTf6DrZXSpA6xZCEq+RGV1r0=", + "lastModified": 1717399147, + "narHash": "sha256-eCWaE/q1VItpFAxxLVt171MdtDcjEnwi6QB/yuF73JU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3f316d2a50699a78afe5e77ca486ad553169061e", + "rev": "4a4ecb0ab415c9fccfb005567a215e6a9564cdf5", "type": "github" }, "original": { From 46f5aa5a905da2813a344e652e3432fb88149b8e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 5 Jun 2024 12:06:06 +1200 Subject: [PATCH 128/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 5cf46e3ff6..1beb9e7c7a 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From 142ecc1fe6dad544b43072add9567f2846900600 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 5 Jun 2024 14:16:09 +1200 Subject: [PATCH 129/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1beb9e7c7a..c9773254f7 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From 72ae3a3ebdec71ff0b1f017ad10d0fb84115d7d5 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 5 Jun 2024 14:38:58 +1200 Subject: [PATCH 130/170] Fix for TH test --- test/js-template-haskell/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/js-template-haskell/default.nix b/test/js-template-haskell/default.nix index b3f5152cb6..68e157e6d5 100644 --- a/test/js-template-haskell/default.nix +++ b/test/js-template-haskell/default.nix @@ -10,9 +10,7 @@ let cabalProjectLocal = '' if arch(javascript) extra-packages: ghci - else - -- This fixes windows profiled builds - constraints: text source + constraints: text -simdutf, text source ''; }; From 6d524116725ab464bf559ac69a4b935856ecb778 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 5 Jun 2024 20:30:42 +1200 Subject: [PATCH 131/170] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c9773254f7..6d741ec7af 100644 --- a/flake.nix +++ b/flake.nix @@ -95,7 +95,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; compiler = "ghc928"; config = import ./config.nix; From 2c7db012c838d3c43ac34dd62f3860d0aa7924d1 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 12 Jun 2024 19:14:47 +1200 Subject: [PATCH 132/170] Use .dll.a file in th-dlls-minimal --- test/th-dlls-minimal/default.nix | 4 ++++ test/th-dlls-minimal/test-clib/Makefile | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/th-dlls-minimal/default.nix b/test/th-dlls-minimal/default.nix index 23c56c1b14..0e6ccb3be7 100644 --- a/test/th-dlls-minimal/default.nix +++ b/test/th-dlls-minimal/default.nix @@ -10,6 +10,10 @@ let cabalProjectLocal = builtins.readFile ../cabal.project.local; modules = [ ({pkgs, ...}: { + packages.th-dlls-minimal.components.library.preBuild = '' + export ISERV_ARGS=-v + export PROSY_ARGS=-v + ''; packages.test-lib.components.library.libs = mkForce [ (pkgs.stdenv.mkDerivation { name = "test-clib"; diff --git a/test/th-dlls-minimal/test-clib/Makefile b/test/th-dlls-minimal/test-clib/Makefile index 9a19ba0bc5..14d74160af 100644 --- a/test/th-dlls-minimal/test-clib/Makefile +++ b/test/th-dlls-minimal/test-clib/Makefile @@ -5,12 +5,13 @@ test.a: test.o $(AR) -rs test-clib.a test.o test.dll: test.o - $(CC) -o test-clib.dll -shared test.o + $(CC) -o test-clib-0.dll -shared test.o -Wl,--out-implib=test-clib.dll.a .PHONY: install install: test.a test.dll mkdir $(out)/bin mkdir $(out)/lib - mv test-clib.dll $(out)/bin + mv test-clib-0.dll $(out)/bin + mv test-clib.dll.a $(out)/bin mv test-clib.a $(out)/lib From 56d22960e675056accd38cb7aecedb8b67f27dca Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 19 Jun 2024 01:32:34 +1200 Subject: [PATCH 133/170] Add fix for DLL loading using a `.dll.a` file --- overlays/bootstrap.nix | 9 ++++-- ...indows-dll-dependent-symbol-type-fix.patch | 29 +++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 overlays/patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 73f91cd74c..866da9b7d0 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -254,9 +254,12 @@ in { # This patch will make windows stop emitting absolute relocations. This is one way in which binutils 2.36+ (with ASLR enabled), will just choke on the # assembly we generate because it's always absolute (32bit) addressing modes. # GHC from 9.6+ seems to have https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7449, which should fix this as well. - ++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && (final.stdenv.targetPlatform.isWindows)) ./patches/ghc/windows-pseudo-pic-8.10.patch - ++ final.lib.optional (versionAtLeast "9.0" && versionLessThan "9.2" && (final.stdenv.targetPlatform.isWindows)) ./patches/ghc/windows-pseudo-pic.patch - ++ final.lib.optional (versionAtLeast "9.2" && versionLessThan "9.4" && (final.stdenv.targetPlatform.isWindows)) ./patches/ghc/windows-pseudo-pic-9.2.patch + ++ onWindows (until "9.0" ./patches/ghc/windows-pseudo-pic-8.10.patch) + ++ onWindows (fromUntil "9.0" "9.2" ./patches/ghc/windows-pseudo-pic.patch) + ++ onWindows (fromUntil "9.2" "9.4" ./patches/ghc/windows-pseudo-pic-9.2.patch) + + # Fix issue loading windows dll using `.dll.a` file + ++ onWindows (fromUntil "9.10" "9.1" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { diff --git a/overlays/patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch b/overlays/patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch new file mode 100644 index 0000000000..43a68bbaf9 --- /dev/null +++ b/overlays/patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch @@ -0,0 +1,29 @@ +diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c +index 8622166..531ed4d 100644 +--- a/rts/linker/PEi386.c ++++ b/rts/linker/PEi386.c +@@ -1805,6 +1805,7 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + for the total range of 16 bits which is the function export limit + of DLLs. See note [GHC Linking model and import libraries]. */ + sname = (SymbolName*)section->start+2; ++ // load the symbol that specifies the dll we need to load to resolve this. + COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; + addr = get_sym_name( getSymShortName (info, sym), oc); + +@@ -2346,10 +2347,14 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl, ObjectCode *dependent, SymType + if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) + { + /* See Note [BFD import library]. */ +- HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, type); +- if (!dllInstance && pinfo->value) +- return pinfo->value; + ++ // we only want to _update_ the type, if the dependent symbol is _not_ a dllInstance. ++ SymType depType = 0; ++ HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, &depType); ++ if (!dllInstance && pinfo->value) { ++ *type = depType; ++ return pinfo->value; ++ } + if (!dllInstance) + { From 903e118eb84f1aa2c91a0b08899c69cda14abbbf Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 19 Jun 2024 12:17:45 +1200 Subject: [PATCH 134/170] Fix typo --- overlays/bootstrap.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 866da9b7d0..59b53616d3 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -118,7 +118,7 @@ in { ++ until "9.0.2" ./patches/ghc/MR6595-nonmoving-mutvar.patch # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6595 ++ until "9.2" ./patches/ghc/ghc-8.10-global-unique-counters-in-rts.patch # backport of https://gitlab.haskell.org/ghc/ghc/-/commit/9a28680d2e23e7b25dd7254a439aea31dfae32d5 ++ fromUntil "9.2" "9.4" ./patches/ghc/ghc-9.2-global-unique-counters-in-rts.patch # backport of https://gitlab.haskell.org/ghc/ghc/-/commit/9a28680d2e23e7b25dd7254a439aea31dfae32d5 - ++ until "9.1" ./patches/ghc/issue-18708.patch # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6554 + ++ until "9.2" ./patches/ghc/issue-18708.patch # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6554 ++ fromUntil "9.2.2" "9.4" ./patches/ghc/ghc-9.2.2-fix-warnings-building-with-self.patch # https://gitlab.haskell.org/ghc/ghc/-/commit/c41c478eb9003eaa9fc8081a0039652448124f5d ++ until "9.6" ./patches/ghc/ghc-hpc-response-files.patch # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8194 ++ fromUntil "9.2" "9.12" ./patches/ghc/sanity-check-find-file-name.patch @@ -259,7 +259,7 @@ in { ++ onWindows (fromUntil "9.2" "9.4" ./patches/ghc/windows-pseudo-pic-9.2.patch) # Fix issue loading windows dll using `.dll.a` file - ++ onWindows (fromUntil "9.10" "9.1" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) + ++ onWindows (fromUntil "9.10" "9.11" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { From 1748a4f90916598f3d4beb7dde7828b44afd20d6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 19 Jun 2024 15:09:45 +1200 Subject: [PATCH 135/170] Apply fix to more ghc versions --- overlays/bootstrap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 59b53616d3..5a51bde8bb 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -259,7 +259,7 @@ in { ++ onWindows (fromUntil "9.2" "9.4" ./patches/ghc/windows-pseudo-pic-9.2.patch) # Fix issue loading windows dll using `.dll.a` file - ++ onWindows (fromUntil "9.10" "9.11" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) + ++ onWindows (fromUntil "9.4" "9.12" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { From d7b153f5ec51a9c454bba49f74a438f1702a69c7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 19 Jun 2024 15:32:10 +1200 Subject: [PATCH 136/170] Patch remaining GHC versions --- overlays/bootstrap.nix | 1 + ...indows-dll-dependent-symbol-type-fix.patch | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 5a51bde8bb..0436a7502f 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -259,6 +259,7 @@ in { ++ onWindows (fromUntil "9.2" "9.4" ./patches/ghc/windows-pseudo-pic-9.2.patch) # Fix issue loading windows dll using `.dll.a` file + ++ onWindows (until "9.4" ./patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch) ++ onWindows (fromUntil "9.4" "9.12" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) ; in ({ diff --git a/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch b/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch new file mode 100644 index 0000000000..94787b4bed --- /dev/null +++ b/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch @@ -0,0 +1,21 @@ +diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c +index 8622166..531ed4d 100644 +--- a/rts/linker/PEi386.c ++++ b/rts/linker/PEi386.c +@@ -2076,10 +2076,13 @@ + } + else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) + { +- /* See Note [BFD import library]. */ +- HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, NULL); +- if (!dllInstance && pinfo->value) ++ // we only want to _update_ the type, if the dependent symbol is _not_ a dllInstance. ++ SymType depType = 0; ++ HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, &depType); ++ if (!dllInstance && pinfo->value) { ++ *type = depType; + return pinfo->value; ++ } + + if (!dllInstance) + { From 76c178dbf6966b38ae75ea698226dc1d1a74af81 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Wed, 19 Jun 2024 11:38:44 +0800 Subject: [PATCH 137/170] Update BUGLOG --- BUGLOG | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/BUGLOG b/BUGLOG index 52f1714a9e..73d5f07b82 100644 --- a/BUGLOG +++ b/BUGLOG @@ -61,4 +61,26 @@ in the 32bit slots. This was fixed in GHC upstream in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7449, while the patch in haskell.nix is a bit more pedestrian and just sets PIC on windows to -always be on, and then uses the PIC pipeline. \ No newline at end of file +always be on, and then uses the PIC pipeline. + +-------------------------------------------------------------------------------- +2024-06-18 x86_64-linux.unstable.ghc9101.ucrt64.tests.th-dlls-minimal.build + +0024:err:seh:call_stack_handlers invalid frame 00007FFFFF68EF18 (0000000000022000-0000000000220000) +0024:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception. +iserv-proxy: {handle: }: GHCi.Message.remoteCall: end of file + +This is due to GHC mislinking GNU import libraries (dll.a). What happens is that +GHC ends up creating GOT entries for function calls instead of PLT entries. The +loader/linker in GHC for Windows has logic to lazy load .dll's as referenced. For +this symbols get a dependency symbol attached, this could be a symbol indicating +the DLL that needs to be loaded. While walking the dependencies to find the dll to +load (or in some cases just the dependent symbol, not the dll), we override the +symbol type with the one of the dependent symbol. This however means we'll +override the type of a symbol with the DATA type each time the symbol leads to a +dllInstance to be loaded. Subsequently we end up creating a GOT entry instead of +a PLT entry for the symbol, irrepsective of the original symbol being a code or +data symbol. If code symbols end up getting GOT stubs, we see the above crash as +the control flow jumps to the location of the stub, and instead of a PLT/jump +island just lands in the address of the target symbol, which is in most cases +non-sensical machine code. From 769b7311ef6abab61eb1a71d7f04c1ed4331fe53 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 20 Jun 2024 13:00:11 +1200 Subject: [PATCH 138/170] Revert "Patch remaining GHC versions" This reverts commit d7b153f5ec51a9c454bba49f74a438f1702a69c7. --- overlays/bootstrap.nix | 1 - ...indows-dll-dependent-symbol-type-fix.patch | 21 ------------------- 2 files changed, 22 deletions(-) delete mode 100644 overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 0436a7502f..5a51bde8bb 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -259,7 +259,6 @@ in { ++ onWindows (fromUntil "9.2" "9.4" ./patches/ghc/windows-pseudo-pic-9.2.patch) # Fix issue loading windows dll using `.dll.a` file - ++ onWindows (until "9.4" ./patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch) ++ onWindows (fromUntil "9.4" "9.12" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) ; in ({ diff --git a/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch b/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch deleted file mode 100644 index 94787b4bed..0000000000 --- a/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c -index 8622166..531ed4d 100644 ---- a/rts/linker/PEi386.c -+++ b/rts/linker/PEi386.c -@@ -2076,10 +2076,13 @@ - } - else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) - { -- /* See Note [BFD import library]. */ -- HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, NULL); -- if (!dllInstance && pinfo->value) -+ // we only want to _update_ the type, if the dependent symbol is _not_ a dllInstance. -+ SymType depType = 0; -+ HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, &depType); -+ if (!dllInstance && pinfo->value) { -+ *type = depType; - return pinfo->value; -+ } - - if (!dllInstance) - { From 7e244cb9bf2810b717c9868ca66007c1b0851c64 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 20 Jun 2024 17:10:31 +1200 Subject: [PATCH 139/170] Update hackage repo hashes in cabal.project.local --- test/cabal.project.local | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 938248bc7d..f9e155be97 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -19,14 +19,14 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-dx4WtCafVcu1+IlaK1ABcqQ1UummqTN8HRo3svRdTOE= + --sha256: sha256-tSeUf84LWny6LAIKCV18rJxdWS2UCfM7UeYViJ/f9JU= repository ghcjs-overlay - url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ed91ac93832fdfc50471ab8df13b8174e91b35ed + url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/8ef1977ba226b9dea0a5f43824c2e3507280d306 secure: True root-keys: key-threshold: 0 - --sha256: sha256-+Eq62mUAS6rl0PYC5U0D3fH3P5tpnH/Y5qftZMgL7OM= + --sha256: sha256-jcOUSw6rtBdLXx5/yx1EMKaYfvVWJgpTVe567jA81Ls= -- This is needed because nixpkgs has 1.0.19, and libsodium has -- too tight bounds <1.0.18. From f7fc6f4c9b20e137e604fbe9f476ee834b140d6c Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 5 Jul 2024 10:32:54 +1200 Subject: [PATCH 140/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 86c3d58273..a2fcc01467 100644 --- a/flake.nix +++ b/flake.nix @@ -88,7 +88,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From d5e28de9561c61aaa7b1053bd627ee38283a6ca0 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 5 Jul 2024 12:36:14 +1200 Subject: [PATCH 141/170] Bump nixpkgs pins and add 24.05 --- ci.nix | 3 ++- flake.lock | 29 +++++++++++++++++++++++------ flake.nix | 4 +++- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ci.nix b/ci.nix index 582f030200..1403681b2a 100644 --- a/ci.nix +++ b/ci.nix @@ -22,6 +22,7 @@ "R2211" = inputs.nixpkgs-2211; "R2305" = inputs.nixpkgs-2305; "R2311" = inputs.nixpkgs-2311; + "R2405" = inputs.nixpkgs-2405; "unstable" = inputs.nixpkgs-unstable; }; @@ -56,7 +57,7 @@ # cabal-install and nix-tools plans. When removing a ghc version # from here (so that is no longer cached) also remove ./materialized/ghcXXX. # Update supported-ghc-versions.md to reflect any changes made here. - nixpkgs.lib.optionalAttrs (nixpkgsName == "R2311") { + nixpkgs.lib.optionalAttrs (nixpkgsName == "R2405") { ghc94 = false; ghc96 = false; ghc98 = false; diff --git a/flake.lock b/flake.lock index d3e287a261..e9841bab67 100644 --- a/flake.lock +++ b/flake.lock @@ -509,11 +509,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1717152306, - "narHash": "sha256-RrgGB3ygQnHY1/0SsZiFIfFypJJ43mpSgV4RgfERPoo=", + "lastModified": 1719957072, + "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "34cd4df4fbbaf4a1eddbc205e59bcae43ada9d46", + "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", "type": "github" }, "original": { @@ -523,6 +523,22 @@ "type": "github" } }, + "nixpkgs-2405": { + "locked": { + "lastModified": 1720122915, + "narHash": "sha256-Nby8WWxj0elBu1xuRaUcRjPi/rU3xVbkAt2kj4QwX2U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "835cf2d3f37989c5db6585a28de967a667a75fb1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-24.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -541,11 +557,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1717399147, - "narHash": "sha256-eCWaE/q1VItpFAxxLVt171MdtDcjEnwi6QB/yuF73JU=", + "lastModified": 1720087678, + "narHash": "sha256-uOhYJU3ldDKXYV+mFaXcPtyjq/UIMh/6SCuoVNU9rxM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a4ecb0ab415c9fccfb005567a215e6a9564cdf5", + "rev": "1afc5440469f94e7ed26e8648820971b102afdc3", "type": "github" }, "original": { @@ -605,6 +621,7 @@ "nixpkgs-2211": "nixpkgs-2211", "nixpkgs-2305": "nixpkgs-2305", "nixpkgs-2311": "nixpkgs-2311", + "nixpkgs-2405": "nixpkgs-2405", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" diff --git a/flake.nix b/flake.nix index a2fcc01467..c09da6c4ed 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ nixpkgs-2211 = { url = "github:NixOS/nixpkgs/nixpkgs-22.11-darwin"; }; nixpkgs-2305 = { url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; }; nixpkgs-2311 = { url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin"; }; + nixpkgs-2405 = { url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; }; nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; flake-compat = { url = "github:input-output-hk/flake-compat/hkm/gitlab-fix"; flake = false; }; "hls-1.10" = { url = "github:haskell/haskell-language-server/1.10.0.0"; flake = false; }; @@ -82,13 +83,14 @@ , nixpkgs-2211 , nixpkgs-2305 , nixpkgs-2311 + , nixpkgs-2405 , flake-compat , ... }@inputs: let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 0; compiler = "ghc928"; config = import ./config.nix; From 5198ff32d7dfc1ea7997742eb0a66d49fdcf06ef Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 5 Jul 2024 13:09:40 +1200 Subject: [PATCH 142/170] Pin libsodium to nixpkgs 23.11 version for ci --- ci.nix | 3 ++- default.nix | 6 ++++++ flake.nix | 2 +- test/cabal.project.local | 11 +---------- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ci.nix b/ci.nix index 1403681b2a..e6ca2c5c8c 100644 --- a/ci.nix +++ b/ci.nix @@ -30,10 +30,11 @@ # set checkMaterialization as per top-level argument overlays = [ haskellNix.overlay - (_final: prev: { + (final: prev: { haskell-nix = prev.haskell-nix // { inherit checkMaterialization; }; + inherit (import inputs.nixpkgs-2311 { system = final.system; }) libsodium; }) ]; # Needed for dwarf tests diff --git a/default.nix b/default.nix index f76eb21fee..ed9924ba00 100644 --- a/default.nix +++ b/default.nix @@ -88,6 +88,12 @@ self // { pkgs-2305 = import self.inputs.nixpkgs-2305 (nixpkgsArgs // { localSystem = { inherit system; }; }); + pkgs-2311 = import self.inputs.nixpkgs-2311 (nixpkgsArgs // { + localSystem = { inherit system; }; + }); + pkgs-2405 = import self.inputs.nixpkgs-2405 (nixpkgsArgs // { + localSystem = { inherit system; }; + }); pkgs-unstable = import self.inputs.nixpkgs-unstable (nixpkgsArgs // { localSystem = { inherit system; }; }); diff --git a/flake.nix b/flake.nix index c09da6c4ed..ebfa53c1e7 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; diff --git a/test/cabal.project.local b/test/cabal.project.local index 0a028563f0..ab9b45c0f4 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -29,16 +29,7 @@ repository ghcjs-overlay secure: True root-keys: key-threshold: 0 - --sha256: sha256-jcOUSw6rtBdLXx5/yx1EMKaYfvVWJgpTVe567jA81Ls=<<<<<<< HEAD - --- This is needed because nixpkgs has 1.0.19, and libsodium has --- too tight bounds <1.0.18. -if !os(ghcjs) - source-repository-package - type: git - location: https://github.com/hamishmack/hs-libsodium.git - tag: c094f210f3bd34d97204451ea57855a5d17e2086 - --sha256: sha256-6iCKvdLdjwg2jcoWMEj3qcFTvKe3P4BYxgKeXY3QwRM= + --sha256: sha256-jcOUSw6rtBdLXx5/yx1EMKaYfvVWJgpTVe567jA81Ls= if !impl(ghc>=9.11) && !os(ghcjs) active-repositories: hackage.haskell.org From 42a2f004d9b133f42d0c705c4a0cb6058803cb4b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 7 Jul 2024 12:45:51 +1200 Subject: [PATCH 143/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ebfa53c1e7..17031eeb64 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From 08b315609e9ce2a176940268489b43c6ddc9fcd5 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 7 Jul 2024 13:26:45 +1200 Subject: [PATCH 144/170] Fix libsodium pin --- ci.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index e6ca2c5c8c..783f921e14 100644 --- a/ci.nix +++ b/ci.nix @@ -34,7 +34,7 @@ haskell-nix = prev.haskell-nix // { inherit checkMaterialization; }; - inherit (import inputs.nixpkgs-2311 { system = final.system; }) libsodium; + libsodium = final.callPackage (inputs.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; }) ]; # Needed for dwarf tests From 14dbbef339dfe4fd6b1d28a1b635470158238423 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 7 Jul 2024 13:54:06 +1200 Subject: [PATCH 145/170] Pin libsodium for GHA as well --- test/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/default.nix b/test/default.nix index c4112872df..0d864d5af4 100644 --- a/test/default.nix +++ b/test/default.nix @@ -6,6 +6,11 @@ config = haskellNix.nixpkgsArgs.config // { permittedInsecurePackages = ["libdwarf-20210528" "libdwarf-20181024" "dwarfdump-20181024"]; }; + overlays = haskellNix.nixpkgsArgs.overlays ++ [ + (final: prev: { + libsodium = final.callPackage (haskellNix.sources.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; + }) + ]; } , evalPackages ? import pkgs.path nixpkgsArgs , ifdLevel ? 1000 From c9636712f2a8a04551dd974cbb56737b0101d561 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 7 Jul 2024 14:36:53 +1200 Subject: [PATCH 146/170] Update test/default.nix Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- test/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/default.nix b/test/default.nix index 0d864d5af4..40493b2685 100644 --- a/test/default.nix +++ b/test/default.nix @@ -7,7 +7,7 @@ permittedInsecurePackages = ["libdwarf-20210528" "libdwarf-20181024" "dwarfdump-20181024"]; }; overlays = haskellNix.nixpkgsArgs.overlays ++ [ - (final: prev: { + (final: _prev: { libsodium = final.callPackage (haskellNix.sources.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; }) ]; From b901e012bc0d023866be8fbdcb43a85cfbe03675 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 7 Jul 2024 21:34:31 +1200 Subject: [PATCH 147/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 17031eeb64..c09da6c4ed 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 0; compiler = "ghc928"; config = import ./config.nix; From b6c30c2618d5415dea26283dd8db57c68c3a846a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 7 Jul 2024 23:16:59 +1200 Subject: [PATCH 148/170] Only pin libsodium for haskell code in tests --- ci.nix | 5 ++++- test/default.nix | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ci.nix b/ci.nix index 783f921e14..14aa85b0d5 100644 --- a/ci.nix +++ b/ci.nix @@ -33,8 +33,11 @@ (final: prev: { haskell-nix = prev.haskell-nix // { inherit checkMaterialization; + extraPkgconfigMappings = prev.haskell-nix.extraPkgconfigMappings or {} // { + "libsodium" = [ "libsodium-18" ]; + }; }; - libsodium = final.callPackage (inputs.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; + libsodium-18 = final.callPackage (inputs.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; }) ]; # Needed for dwarf tests diff --git a/test/default.nix b/test/default.nix index 40493b2685..88208cb7fe 100644 --- a/test/default.nix +++ b/test/default.nix @@ -7,8 +7,13 @@ permittedInsecurePackages = ["libdwarf-20210528" "libdwarf-20181024" "dwarfdump-20181024"]; }; overlays = haskellNix.nixpkgsArgs.overlays ++ [ - (final: _prev: { - libsodium = final.callPackage (haskellNix.sources.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; + (final: prev: { + haskell-nix = prev.haskell-nix // { + extraPkgconfigMappings = prev.haskell-nix.extraPkgconfigMappings or {} // { + "libsodium" = [ "libsodium-18" ]; + }; + }; + libsodium-18 = final.callPackage (haskellNix.sources.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; }) ]; } From b98ce23c316c5b57c0c9e3f699995c0142734eaa Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 7 Jul 2024 23:19:25 +1200 Subject: [PATCH 149/170] Update nixpkgs-unstable pin --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 738547cfe9..e989a92734 100644 --- a/flake.lock +++ b/flake.lock @@ -557,11 +557,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1720087678, - "narHash": "sha256-uOhYJU3ldDKXYV+mFaXcPtyjq/UIMh/6SCuoVNU9rxM=", + "lastModified": 1720181791, + "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1afc5440469f94e7ed26e8648820971b102afdc3", + "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", "type": "github" }, "original": { From b900af99ba97e31549a240a5d5f51c9faba35b1b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sun, 7 Jul 2024 23:42:58 +1200 Subject: [PATCH 150/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c09da6c4ed..ebfa53c1e7 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From 628c2d943513aa38f8e119d0d238d691c969a351 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 8 Jul 2024 01:32:40 +1200 Subject: [PATCH 151/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ebfa53c1e7..17031eeb64 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From 7feb3d637dd7249275925537331061845f8acf5a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 8 Jul 2024 12:01:51 +1200 Subject: [PATCH 152/170] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 17031eeb64..a1c02d581e 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; compiler = "ghc928"; config = import ./config.nix; From 4fd7e26f63996480b6e6fccef9ae48613b23c2ac Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 8 Jul 2024 15:12:41 +1200 Subject: [PATCH 153/170] Fix musl libsodium tests --- ci.nix | 2 +- test/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.nix b/ci.nix index 14aa85b0d5..cb91d6321d 100644 --- a/ci.nix +++ b/ci.nix @@ -37,7 +37,7 @@ "libsodium" = [ "libsodium-18" ]; }; }; - libsodium-18 = final.callPackage (inputs.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; + libsodium-18 = (final.callPackage (inputs.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}).overrideAttrs (_: { dontDisableStatic = true; }); }) ]; # Needed for dwarf tests diff --git a/test/default.nix b/test/default.nix index 88208cb7fe..e1784beb49 100644 --- a/test/default.nix +++ b/test/default.nix @@ -13,7 +13,7 @@ "libsodium" = [ "libsodium-18" ]; }; }; - libsodium-18 = final.callPackage (haskellNix.sources.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}; + libsodium-18 = (final.callPackage (haskellNix.sources.nixpkgs-2311 + "/pkgs/development/libraries/libsodium") {}).overrideAttrs (_: { dontDisableStatic = true; }); }) ]; } From 3ec62f3146fa65a28b4a1777aa8e620f727dad0c Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Mon, 8 Jul 2024 07:45:18 +0000 Subject: [PATCH 154/170] Add 9.6 linker to 8.10 windows --- overlays/bootstrap.nix | 16 +- .../ghc/0001-Graft-9.10.1-linker-in.patch | 12100 ++++++++++++++++ .../ghc/0002-Disable-ReportMemoryMap.patch | 89 + ...le-is-really-just-HashTable-facepalm.patch | 24 + ...04-Add-includes-rts-Linker.h-as-well.patch | 53 + .../ghc/0005-Also-need-RtsSymbols.h.patch | 26 + .../ghc/0006-Also-need-pathutils.patch | 54 + ...ve-RtsSymbols.h-without-RtsSymbols.c.patch | 1161 ++ .../ghc/0008-Needs-linker_verbose-flag.patch | 48 + .../0009-Drop-non-existing-RtsSymbols.patch | 253 + .../ghc/0010-One-more-debug-flag-L.patch | 25 + .../patches/ghc/0011-Add-ENVIRON-check.patch | 54 + .../ghc/0012-fixup-HAVE_DECL_ENVIRON.patch | 28 + .../ghc/0013-add-STG_NORETURN-to-Stg.h.patch | 25 + ...indows-dll-dependent-symbol-type-fix.patch | 21 + 15 files changed, 13976 insertions(+), 1 deletion(-) create mode 100644 overlays/patches/ghc/0001-Graft-9.10.1-linker-in.patch create mode 100644 overlays/patches/ghc/0002-Disable-ReportMemoryMap.patch create mode 100644 overlays/patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch create mode 100644 overlays/patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch create mode 100644 overlays/patches/ghc/0005-Also-need-RtsSymbols.h.patch create mode 100644 overlays/patches/ghc/0006-Also-need-pathutils.patch create mode 100644 overlays/patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch create mode 100644 overlays/patches/ghc/0008-Needs-linker_verbose-flag.patch create mode 100644 overlays/patches/ghc/0009-Drop-non-existing-RtsSymbols.patch create mode 100644 overlays/patches/ghc/0010-One-more-debug-flag-L.patch create mode 100644 overlays/patches/ghc/0011-Add-ENVIRON-check.patch create mode 100644 overlays/patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch create mode 100644 overlays/patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch create mode 100644 overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 09063c142b..b07469fe5a 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -70,7 +70,7 @@ in { from = start: final.lib.optional (versionAtLeast start); until = end: final.lib.optional (versionLessThan end); always = final.lib.optional true; - onDarwin = final.lib.optionals final.stdenv.targetPlatform.isDarwin; + onDarwin = final.lib.optionals final.stdenv.targetPlatform.isDarwin; onMusl = final.lib.optionals final.stdenv.targetPlatform.isMusl; onWindows = final.lib.optionals final.stdenv.targetPlatform.isWindows; onWindowsOrMusl = final.lib.optionals (final.stdenv.targetPlatform.isWindows || final.stdenv.targetPlatform.isMusl); @@ -260,6 +260,20 @@ in { # Fix issue loading windows dll using `.dll.a` file ++ onWindows (fromUntil "9.4" "9.12" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0001-Graft-9.10.1-linker-in.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0002-Disable-ReportMemoryMap.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0005-Also-need-RtsSymbols.h.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0006-Also-need-pathutils.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0008-Needs-linker_verbose-flag.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0009-Drop-non-existing-RtsSymbols.patch) + # ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0010-One-more-debug-flag-L.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0011-Add-ENVIRON-check.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch) + ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch) ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { diff --git a/overlays/patches/ghc/0001-Graft-9.10.1-linker-in.patch b/overlays/patches/ghc/0001-Graft-9.10.1-linker-in.patch new file mode 100644 index 0000000000..fb36cd7f3c --- /dev/null +++ b/overlays/patches/ghc/0001-Graft-9.10.1-linker-in.patch @@ -0,0 +1,12100 @@ +From cbad89b70016a2f50516ae20bb306872a7f191fe Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 02:17:28 +0000 +Subject: [PATCH 01/12] Graft 9.10.1 linker in. + +--- + rts/Linker.c | 868 ++++++------ + rts/LinkerInternals.h | 295 +++-- + rts/linker/Elf.c | 731 ++++++---- + rts/linker/Elf.c.orig | 2274 ++++++++++++++++++++++++++++++++ + rts/linker/Elf.h | 6 +- + rts/linker/ElfTypes.h | 5 +- + rts/linker/InitFini.c | 201 +++ + rts/linker/InitFini.h | 23 + + rts/linker/LoadArchive.c | 44 +- + rts/linker/M32Alloc.c | 195 ++- + rts/linker/M32Alloc.h | 4 +- + rts/linker/MMap.c | 466 +++++++ + rts/linker/MMap.h | 82 ++ + rts/linker/MachO.c | 323 +++-- + rts/linker/MachO.h | 4 +- + rts/linker/PEi386.c | 1267 ++++++++++-------- + rts/linker/PEi386.c.orig | 1265 ++++++++++-------- + rts/linker/PEi386.h | 25 +- + rts/linker/PEi386Types.h | 20 +- + rts/linker/SymbolExtras.c | 15 +- + rts/linker/SymbolExtras.h | 5 +- + rts/linker/Wasm32Types.h | 9 + + rts/linker/elf_compat.h | 2 +- + rts/linker/elf_got.c | 15 +- + rts/linker/elf_plt_arm.c | 1 - + rts/linker/elf_reloc_aarch64.c | 76 +- + rts/linker/elf_tlsgd.c | 249 ++++ + rts/linker/macho/plt.c | 2 +- + 28 files changed, 6456 insertions(+), 2016 deletions(-) + create mode 100644 rts/linker/Elf.c.orig + create mode 100644 rts/linker/InitFini.c + create mode 100644 rts/linker/InitFini.h + create mode 100644 rts/linker/MMap.c + create mode 100644 rts/linker/MMap.h + create mode 100644 rts/linker/Wasm32Types.h + create mode 100644 rts/linker/elf_tlsgd.c + +diff --git a/rts/Linker.c b/rts/Linker.c +index 7a6e3b6..5b0f05a 100644 +--- a/rts/Linker.c ++++ b/rts/Linker.c +@@ -7,7 +7,7 @@ + * ---------------------------------------------------------------------------*/ + + #if 0 +-#include "PosixSource.h" ++#include "rts/PosixSource.h" + #endif + + #include "Rts.h" +@@ -31,10 +31,12 @@ + #include "linker/M32Alloc.h" + #include "linker/CacheFlush.h" + #include "linker/SymbolExtras.h" ++#include "linker/MMap.h" + #include "PathUtils.h" + #include "CheckUnload.h" // createOCSectionIndices ++#include "ReportMemoryMap.h" + +-#if !defined(mingw32_HOST_OS) ++#if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H) + #include "posix/Signals.h" + #endif + +@@ -51,7 +53,6 @@ + #include + #include + #include +-#include + #include + + #if defined(HAVE_SYS_STAT_H) +@@ -79,9 +80,36 @@ + #if defined(dragonfly_HOST_OS) + #include + #endif ++ ++/* ++ * Note [iconv and FreeBSD] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~ ++ * ++ * On FreeBSD libc.so provides an implementation of the iconv_* family of ++ * functions. However, due to their implementation, these symbols cannot be ++ * resolved via dlsym(); rather, they can only be resolved using the ++ * explicitly-versioned dlvsym(). ++ * ++ * This is problematic for the RTS linker since we may be asked to load ++ * an object that depends upon iconv. To handle this we include a set of ++ * fallback cases for these functions, allowing us to resolve them to the ++ * symbols provided by the libc against which the RTS is linked. ++ * ++ * See #20354. ++ */ ++ ++#if defined(freebsd_HOST_OS) ++extern void iconvctl(); ++extern void iconv_open_into(); ++extern void iconv_open(); ++extern void iconv_close(); ++extern void iconv_canonicalize(); ++extern void iconv(); ++#endif ++ + /* + Note [runtime-linker-support] +- ----------------------------- ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + When adding support for a new platform to the runtime linker please + update `$TOP/configure.ac` under heading `Does target have runtime + linker support?`. +@@ -95,19 +123,19 @@ + addresses of unloaded symbols. + + Note [runtime-linker-phases] +- -------------------------------------- ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Broadly the behavior of the runtime linker can be +- split into the following four phases: ++ split into the following five phases: + + - Indexing (e.g. ocVerifyImage and ocGetNames) +- - Initialization (e.g. ocResolve and ocRunInit) +- - Resolve (e.g. resolveObjs()) ++ - Initialization (e.g. ocResolve) ++ - RunInit (e.g. ocRunInit) + - Lookup (e.g. lookupSymbol) + + This is to enable lazy loading of symbols. Eager loading is problematic + as it means that all symbols must be available, even those which we will + never use. This is especially painful on Windows, where the number of +- libraries required to link things like mingwex grows to be quite high. ++ libraries required to link things like QT or WxWidgets grows to be quite high. + + We proceed through these stages as follows, + +@@ -131,14 +159,22 @@ + + * During resolve we attempt to resolve all the symbols needed for the + initial link. This essentially means, that for any ObjectCode given +- directly to the command-line we perform lookupSymbols on the required +- symbols. lookupSymbols may trigger the loading of additional ObjectCode +- if required. ++ directly to the command-line we perform lookupSymbol on the required ++ symbols. lookupSymbol may trigger the loading of additional ObjectCode ++ if required. After resolving an object we mark its text as executable and ++ not writable. + + This phase will produce ObjectCode with status `OBJECT_RESOLVED` if + the previous status was `OBJECT_NEEDED`. + +- * lookupSymbols is used to lookup any symbols required, both during initial ++ * During RunInit we run the initializers ("constructors") of the objects ++ that are in `OBJECT_RESOLVED` state and move them to `OBJECT_READY` state. ++ This must be in a separate phase since we must ensure that all needed ++ objects have been fully resolved before we can run their initializers. ++ This is particularly tricky in the presence of cyclic dependencies (see ++ #21253). ++ ++ * lookupSymbol is used to lookup any symbols required, both during initial + link and during statement and expression compilations in the REPL. + Declaration of e.g. a foreign import, will eventually call lookupSymbol + which will either fail (symbol unknown) or succeed (and possibly trigger a +@@ -157,79 +193,25 @@ + + 1) Dependency chains, if A.o required a .o in libB but A.o isn't required to link + then we don't need to load libB. This means the dependency chain for libraries +- such as mingw32 and mingwex can be broken down. ++ such as ucrt can be broken down. + + 2) The number of duplicate symbols, since now only symbols that are + true duplicates will display the error. + */ +-/*Str*/HashTable *symhash; ++StrHashTable *symhash; + + #if defined(THREADED_RTS) + /* This protects all the Linker's global state */ + Mutex linker_mutex; + #endif + +-/* Generic wrapper function to try and Resolve and RunInit oc files */ +-int ocTryLoad( ObjectCode* oc ); +- +-/* Link objects into the lower 2Gb on x86_64 and AArch64. GHC assumes the +- * small memory model on this architecture (see gcc docs, +- * -mcmodel=small). +- * +- * MAP_32BIT not available on OpenBSD/amd64 +- */ +-#if defined(MAP_32BIT) && (defined(x86_64_HOST_ARCH) || (defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH))) +-#define MAP_LOW_MEM +-#define TRY_MAP_32BIT MAP_32BIT +-#else +-#define TRY_MAP_32BIT 0 +-#endif ++/* Generic wrapper function to try and resolve oc files */ ++static int ocTryLoad( ObjectCode* oc ); ++/* Run initializers */ ++static int ocRunInit( ObjectCode* oc ); ++static int runPendingInitializers (void); + +-#if defined(aarch64_HOST_ARCH) +-// On AArch64 MAP_32BIT is not available but we are still bound by the small +-// memory model. Consequently we still try using the MAP_LOW_MEM allocation +-// strategy. +-#define MAP_LOW_MEM +-#endif +- +-/* +- * Note [MAP_LOW_MEM] +- * ~~~~~~~~~~~~~~~~~~ +- * Due to the small memory model (see above), on x86_64 and AArch64 we have to +- * map all our non-PIC object files into the low 2Gb of the address space (why +- * 2Gb and not 4Gb? Because all addresses must be reachable using a 32-bit +- * signed PC-relative offset). On x86_64 Linux we can do this using the +- * MAP_32BIT flag to mmap(), however on other OSs (e.g. *BSD, see #2063, and +- * also on Linux inside Xen, see #2512), we can't do this. So on these +- * systems, we have to pick a base address in the low 2Gb of the address space +- * and try to allocate memory from there. +- * +- * The same holds for aarch64, where the default, even with PIC, model +- * is 4GB. The linker is free to emit AARCH64_ADR_PREL_PG_HI21 +- * relocations. +- * +- * We pick a default address based on the OS, but also make this +- * configurable via an RTS flag (+RTS -xm) +- */ +- +-#if (defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH)) +-// Try to use stg_upd_frame_info as the base. We need to be within +-4GB of that +-// address, otherwise we violate the aarch64 memory model. Any object we load +-// can potentially reference any of the ones we bake into the binary (and list) +-// in RtsSymbols. Thus we'll need to be within +-4GB of those, +-// stg_upd_frame_info is a good candidate as it's referenced often. +-#define MMAP_32BIT_BASE_DEFAULT (void*)&stg_upd_frame_info; +-#elif defined(MAP_32BIT) || DEFAULT_LINKER_ALWAYS_PIC +-// Try to use MAP_32BIT +-#define MMAP_32BIT_BASE_DEFAULT 0 +-#else +-// A guess: 1Gb. +-#define MMAP_32BIT_BASE_DEFAULT 0x40000000 +-#endif +- +-static void *mmap_32bit_base = (void *)MMAP_32BIT_BASE_DEFAULT; +- +-static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key, ++static void ghciRemoveSymbolTable(StrHashTable *table, const SymbolName* key, + ObjectCode *owner) + { + RtsSymbolInfo *pinfo = lookupStrHashTable(table, key); +@@ -241,6 +223,17 @@ static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key, + stgFree(pinfo); + } + ++static const char * ++symbolTypeString (SymType type) ++{ ++ switch (type & ~(SYM_TYPE_DUP_DISCARD | SYM_TYPE_HIDDEN)) { ++ case SYM_TYPE_CODE: return "code"; ++ case SYM_TYPE_DATA: return "data"; ++ case SYM_TYPE_INDIRECT_DATA: return "indirect-data"; ++ default: barf("symbolTypeString: unknown symbol type (%d)", type); ++ } ++} ++ + /* ----------------------------------------------------------------------------- + * Insert symbols into hash tables, checking for duplicates. + * +@@ -248,7 +241,7 @@ static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key, + */ + /* + Note [weak-symbols-support] +- ------------------------------------- ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + While ghciInsertSymbolTable does implement extensive + logic for weak symbol support, weak symbols are not currently + fully supported by the RTS. This code is mostly here for COMDAT +@@ -264,34 +257,64 @@ static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key, + */ + int ghciInsertSymbolTable( + pathchar* obj_name, +- HashTable *table, ++ StrHashTable *table, + const SymbolName* key, + SymbolAddr* data, +- int flags, ++ SymStrength strength, ++ SymType type, + ObjectCode *owner) + { +- HsBool weak = flags & 1; +- HsBool hidden = flags & 2; +- + RtsSymbolInfo *pinfo = lookupStrHashTable(table, key); + if (!pinfo) /* new entry */ + { + pinfo = stgMallocBytes(sizeof (*pinfo), "ghciInsertToSymbolTable"); + pinfo->value = data; + pinfo->owner = owner; +- pinfo->weak = weak; +- pinfo->hidden = hidden; ++ pinfo->strength = strength; ++ pinfo->type = type; + insertStrHashTable(table, key, pinfo); + return 1; + } +- else if (weak && data && pinfo->weak && !pinfo->value) ++ else if (pinfo->type ^ type) ++ { ++ if(pinfo->type & SYM_TYPE_HIDDEN) ++ { ++ /* The existing symbol is hidden, let's replace it */ ++ pinfo->value = data; ++ pinfo->owner = owner; ++ pinfo->strength = strength; ++ pinfo->type = type; ++ return 1; ++ } ++ /* We were asked to discard the symbol on duplicates, do so quietly. */ ++ if (!(type & (SYM_TYPE_DUP_DISCARD | SYM_TYPE_HIDDEN))) ++ { ++ debugBelch("Symbol type mismatch (existing %d, new %d).\n", pinfo->type, type); ++ debugBelch("Symbol %s was defined by %" PATH_FMT " to be a %s symbol.\n", ++ key, obj_name, symbolTypeString(type)); ++ debugBelch(" yet was defined by %" PATH_FMT " to be a %s symbol.\n", ++ pinfo->owner ? pinfo->owner->fileName : WSTR(""), ++ symbolTypeString(pinfo->type)); ++ } ++ return 1; ++ } ++ else if (pinfo->strength == STRENGTH_STRONG) ++ { ++ /* The existing symbol is strong meaning we must never override it */ ++ IF_DEBUG(linker, debugBelch("%s is already defined as a strong symbol; ignoring redefinition...", key)); ++ return 1; ++ } ++ else if (strength == STRENGTH_WEAK && ++ data && ++ pinfo->strength == STRENGTH_WEAK && ++ !pinfo->value) + { + /* The existing symbol is weak with a zero value; replace it with the new symbol. */ + pinfo->value = data; + pinfo->owner = owner; + return 1; + } +- else if (weak) ++ else if (strength == STRENGTH_WEAK) + { + return 1; /* weak symbol, because the symbol is weak, data = 0 and we + already know of another copy throw this one away. +@@ -301,15 +324,16 @@ int ghciInsertSymbolTable( + This also preserves the semantics of linking against + the first symbol we find. */ + } +- else if (pinfo->weak && !weak) /* weak symbol is in the table */ ++ else if (pinfo->strength == STRENGTH_WEAK && strength != STRENGTH_WEAK) /* weak symbol is in the table */ + { + /* override the weak definition with the non-weak one */ + pinfo->value = data; + pinfo->owner = owner; +- pinfo->weak = HS_BOOL_FALSE; ++ pinfo->strength = strength; + return 1; + } + else if ( pinfo->owner ++ && pinfo->owner->status != OBJECT_READY + && pinfo->owner->status != OBJECT_RESOLVED + && pinfo->owner->status != OBJECT_NEEDED) + { +@@ -324,10 +348,12 @@ int ghciInsertSymbolTable( + This is essentially emulating the behavior of a linker wherein it will always + link in object files that are .o file arguments, but only take object files + from archives as needed. */ +- if (owner && (owner->status == OBJECT_NEEDED || owner->status == OBJECT_RESOLVED)) { ++ if (owner && (owner->status == OBJECT_NEEDED ++ || owner->status == OBJECT_RESOLVED ++ || owner->status == OBJECT_READY)) { + pinfo->value = data; + pinfo->owner = owner; +- pinfo->weak = weak; ++ pinfo->strength = strength; + } + + return 1; +@@ -344,22 +370,10 @@ int ghciInsertSymbolTable( + call this function again to trigger the duplicate error. */ + return 1; + } +- else if(pinfo->hidden && !hidden) +- { +- /* The existing symbol is hidden, let's replace it */ +- pinfo->value = data; +- pinfo->owner = owner; +- pinfo->weak = weak; + +- pinfo->hidden = hidden; +- return 1; +- } +- pathchar* archiveName = NULL; + debugBelch( + "GHC runtime linker: fatal error: I found a duplicate definition for symbol\n" + " %s\n" +- " new symbol is hidden: %d\n" +- " old symbol is hidden: %d\n" + "whilst processing object file\n" + " %" PATH_FMT "\n" + "The symbol was previously defined in\n" +@@ -370,19 +384,12 @@ int ghciInsertSymbolTable( + " * An incorrect `package.conf' entry, causing some object to be\n" + " loaded twice.\n", + (char*)key, +- hidden ? 1 : 0, +- pinfo->hidden ? 1 : 0, + obj_name, + pinfo->owner == NULL ? WSTR("(GHCi built-in symbols)") : +- pinfo->owner->archiveMemberName ? archiveName = mkPath(pinfo->owner->archiveMemberName) ++ pinfo->owner->archiveMemberName ? pinfo->owner->archiveMemberName + : pinfo->owner->fileName + ); + +- if (archiveName) +- { +- stgFree(archiveName); +- archiveName = NULL; +- } + return 0; + } + +@@ -392,7 +399,7 @@ int ghciInsertSymbolTable( + * Returns: 0 on failure and result is not set, + * nonzero on success and result set to nonzero pointer + */ +-HsBool ghciLookupSymbolInfo(HashTable *table, ++HsBool ghciLookupSymbolInfo(StrHashTable *table, + const SymbolName* key, RtsSymbolInfo **result) + { + RtsSymbolInfo *pinfo = lookupStrHashTable(table, key); +@@ -400,10 +407,11 @@ HsBool ghciLookupSymbolInfo(HashTable *table, + *result = NULL; + return HS_BOOL_FALSE; + } +- if (pinfo->weak) ++ if (pinfo->strength == STRENGTH_WEAK) { + IF_DEBUG(linker, debugBelch("lookupSymbolInfo: promoting %s\n", key)); +- /* Once it's looked up, it can no longer be overridden */ +- pinfo->weak = HS_BOOL_FALSE; ++ /* Once it's looked up, it can no longer be overridden */ ++ pinfo->strength = STRENGTH_NORMAL; ++ } + + *result = pinfo; + return HS_BOOL_TRUE; +@@ -421,7 +429,7 @@ static void *dl_prog_handle; + static regex_t re_invalid; + static regex_t re_realso; + #if defined(THREADED_RTS) +-static Mutex dl_mutex; // mutex to protect dlopen/dlerror critical section ++Mutex dl_mutex; // mutex to protect dlopen/dlerror critical section + #endif + #endif + +@@ -436,7 +444,6 @@ void initLinker (void) + void + initLinker_ (int retain_cafs) + { +- RtsSymbolVal *sym; + #if defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO) + int compileResult; + #endif +@@ -465,30 +472,20 @@ initLinker_ (int retain_cafs) + symhash = allocStrHashTable(); + + /* populate the symbol table with stuff from the RTS */ +- for (sym = rtsSyms; sym->lbl != NULL; sym++) { ++ for (const RtsSymbolVal *sym = rtsSyms; sym->lbl != NULL; sym++) { + if (! ghciInsertSymbolTable(WSTR("(GHCi built-in symbols)"), + symhash, sym->lbl, sym->addr, +- sym->weak | (HS_BOOL_FALSE << 1), NULL)) { ++ sym->strength, sym->type, NULL)) { + barf("ghciInsertSymbolTable failed"); + } + IF_DEBUG(linker, debugBelch("initLinker: inserting rts symbol %s, %p\n", sym->lbl, sym->addr)); + } + +- /* GCC defines a special symbol __dso_handle which is resolved to NULL if +- referenced from a statically linked module. We need to mimic this, but +- we cannot use NULL because we use it to mean nonexistent symbols. So we +- use an arbitrary (hopefully unique) address here. +- */ +- if (! ghciInsertSymbolTable(WSTR("(GHCi special symbols)"), +- symhash, "__dso_handle", (void *)0x12345687, HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), NULL)) { +- barf("ghciInsertSymbolTable failed"); +- } +- + // Redirect newCAF to newRetainedCAF if retain_cafs is true. + if (! ghciInsertSymbolTable(WSTR("(GHCi built-in symbols)"), symhash, + MAYBE_LEADING_UNDERSCORE_STR("newCAF"), + retain_cafs ? newRetainedCAF : newGCdCAF, +- HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), NULL)) { ++ HS_BOOL_FALSE, SYM_TYPE_CODE, NULL)) { + barf("ghciInsertSymbolTable failed"); + } + +@@ -538,7 +535,7 @@ exitLinker( void ) { + } + #endif + if (linker_init_done == 1) { +- freeHashTable(symhash, free); ++ freeStrHashTable(symhash, free); + exitUnloadCheck(); + } + #if defined(THREADED_RTS) +@@ -610,8 +607,27 @@ internal_dlopen(const char *dll_name) + // (see POSIX also) + + ACQUIRE_LOCK(&dl_mutex); ++ ++ // When dlopen() loads a profiled dynamic library, it calls the ++ // ctors which will call registerCcsList() to append the defined ++ // CostCentreStacks to CCS_LIST. This execution path starting from ++ // addDLL() was only protected by dl_mutex previously. However, ++ // another thread may be doing other things with the RTS linker ++ // that transitively calls refreshProfilingCCSs() which also ++ // accesses CCS_LIST, and those execution paths are protected by ++ // linker_mutex. So there's a risk of data race that may lead to ++ // segfaults (#24423), and we need to ensure the ctors are also ++ // protected by ccs_mutex. ++#if defined(PROFILING) ++ ACQUIRE_LOCK(&ccs_mutex); ++#endif ++ + hdl = dlopen(dll_name, RTLD_LAZY|RTLD_LOCAL); /* see Note [RTLD_LOCAL] */ + ++#if defined(PROFILING) ++ RELEASE_LOCK(&ccs_mutex); ++#endif ++ + errmsg = NULL; + if (hdl == NULL) { + /* dlopen failed; return a ptr to the error msg. */ +@@ -635,7 +651,7 @@ internal_dlopen(const char *dll_name) + + /* + Note [RTLD_LOCAL] +- ++ ~~~~~~~~~~~~~~~~~ + In GHCi we want to be able to override previous .so's with newly + loaded .so's when we recompile something. This further implies that + when we look up a symbol in internal_dlsym() we have to iterate +@@ -680,6 +696,10 @@ internal_dlsym(const char *symbol) { + } + RELEASE_LOCK(&dl_mutex); + ++ IF_DEBUG(linker, debugBelch("internal_dlsym: looking for symbol '%s' in special cases\n", symbol)); ++# define SPECIAL_SYMBOL(sym) \ ++ if (strcmp(symbol, #sym) == 0) return (void*)&sym; ++ + # if defined(HAVE_SYS_STAT_H) && defined(linux_HOST_OS) && defined(__GLIBC__) + // HACK: GLIBC implements these functions with a great deal of trickery where + // they are either inlined at compile time to their corresponding +@@ -689,18 +709,28 @@ internal_dlsym(const char *symbol) { + // We borrow the approach that the LLVM JIT uses to resolve these + // symbols. See http://llvm.org/PR274 and #7072 for more info. + +- IF_DEBUG(linker, debugBelch("internal_dlsym: looking for symbol '%s' in GLIBC special cases\n", symbol)); ++ SPECIAL_SYMBOL(stat); ++ SPECIAL_SYMBOL(fstat); ++ SPECIAL_SYMBOL(lstat); ++ SPECIAL_SYMBOL(stat64); ++ SPECIAL_SYMBOL(fstat64); ++ SPECIAL_SYMBOL(lstat64); ++ SPECIAL_SYMBOL(atexit); ++ SPECIAL_SYMBOL(mknod); ++# endif + +- if (strcmp(symbol, "stat") == 0) return (void*)&stat; +- if (strcmp(symbol, "fstat") == 0) return (void*)&fstat; +- if (strcmp(symbol, "lstat") == 0) return (void*)&lstat; +- if (strcmp(symbol, "stat64") == 0) return (void*)&stat64; +- if (strcmp(symbol, "fstat64") == 0) return (void*)&fstat64; +- if (strcmp(symbol, "lstat64") == 0) return (void*)&lstat64; +- if (strcmp(symbol, "atexit") == 0) return (void*)&atexit; +- if (strcmp(symbol, "mknod") == 0) return (void*)&mknod; ++ // See Note [iconv and FreeBSD] ++# if defined(freebsd_HOST_OS) ++ SPECIAL_SYMBOL(iconvctl); ++ SPECIAL_SYMBOL(iconv_open_into); ++ SPECIAL_SYMBOL(iconv_open); ++ SPECIAL_SYMBOL(iconv_close); ++ SPECIAL_SYMBOL(iconv_canonicalize); ++ SPECIAL_SYMBOL(iconv); + # endif + ++#undef SPECIAL_SYMBOL ++ + // we failed to find the symbol + return NULL; + } +@@ -752,7 +782,7 @@ addDLL( pathchar *dll_name ) + MAXLINE-1); + strncpy(line, (errmsg+(match[1].rm_so)),match_length); + line[match_length] = '\0'; // make sure string is null-terminated +- IF_DEBUG(linker, debugBelch ("file name = '%s'\n", line)); ++ IF_DEBUG(linker, debugBelch("file name = '%s'\n", line)); + if ((fp = __rts_fopen(line, "r")) == NULL) { + return errmsg; // return original error if open fails + } +@@ -855,14 +885,14 @@ HsBool removeLibrarySearchPath(HsPtr dll_path_index) + } + + /* ----------------------------------------------------------------------------- +- * insert a symbol in the hash table ++ * insert a code symbol in the hash table + * +- * Returns: 0 on failure, nozero on success ++ * Returns: 0 on failure, nonzero on success + */ + HsInt insertSymbol(pathchar* obj_name, SymbolName* key, SymbolAddr* data) + { +- return ghciInsertSymbolTable(obj_name, symhash, key, data, +- HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), NULL); ++ return ghciInsertSymbolTable(obj_name, symhash, key, data, HS_BOOL_FALSE, ++ SYM_TYPE_CODE, NULL); + } + + /* ----------------------------------------------------------------------------- +@@ -872,28 +902,64 @@ HsInt insertSymbol(pathchar* obj_name, SymbolName* key, SymbolAddr* data) + * symbol. + */ + #if defined(OBJFORMAT_PEi386) +-SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent) ++SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymType *type) + { +- (void)dependent; // TODO + ASSERT_LOCK_HELD(&linker_mutex); +- return lookupSymbol_PEi386(lbl); ++ return lookupSymbol_PEi386(lbl, dependent, type); + } + + #else + +-SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent) ++SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymType *type) + { + ASSERT_LOCK_HELD(&linker_mutex); +- IF_DEBUG(linker, debugBelch("lookupSymbol: looking up '%s'\n", lbl)); ++ IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: looking up '%s'\n", lbl)); + + ASSERT(symhash != NULL); + RtsSymbolInfo *pinfo; + ++ /* See Note [Resolving __dso_handle] */ ++ if (strcmp(lbl, MAYBE_LEADING_UNDERSCORE_STR("__dso_handle")) == 0) { ++ if (dependent) { ++ return dependent->image; ++ } else { ++ // In the case that we don't know which object the reference lives ++ // in we return a random symbol from the executable image. ++ return &lookupDependentSymbol; ++ } ++ } ++ if (strcmp(lbl, MAYBE_LEADING_UNDERSCORE_STR("__cxa_atexit")) == 0 && dependent) { ++ dependent->cxa_finalize = (cxa_finalize_fn) lookupDependentSymbol( ++ MAYBE_LEADING_UNDERSCORE_STR("__cxa_finalize"), ++ dependent, ++ NULL); ++ } ++ + if (!ghciLookupSymbolInfo(symhash, lbl, &pinfo)) { +- IF_DEBUG(linker, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl)); ++ IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl)); + + # if defined(OBJFORMAT_ELF) +- return internal_dlsym(lbl); ++ SymbolAddr *ret = internal_dlsym(lbl); ++ if (type) { ++ // We assume that the symbol is code since this is usually the case ++ // and dlsym doesn't tell us. ++ *type = SYM_TYPE_CODE; ++ } ++ ++ // Generally the dynamic linker would define _DYNAMIC, which is ++ // supposed to point to various bits of dynamic linker state (see ++ // [1]). However, if dynamic linking isn't supported (e.g. in the case ++ // of musl) then we can safely declare that it is NULL. ++ // ++ // [1] https://wiki.gentoo.org/wiki/Hardened/Introduction_to_Position_Independent_Code ++ if (ret == NULL && strcmp(lbl, "_DYNAMIC") == 0) { ++ static void *RTS_DYNAMIC = NULL; ++ ret = (SymbolAddr *) &RTS_DYNAMIC; ++ if (type) { ++ *type = SYM_TYPE_DATA; ++ } ++ } ++ return ret; + # elif defined(OBJFORMAT_MACHO) + + /* HACK: On OS X, all symbols are prefixed with an underscore. +@@ -904,14 +970,28 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent) + */ + IF_DEBUG(linker, debugBelch("lookupSymbol: looking up %s with dlsym\n", + lbl)); +- ASSERT(lbl[0] == '_'); ++ CHECK(lbl[0] == '_'); ++ if (type) { ++ // We assume that the symbol is code since this is usually the case ++ // and dlsym doesn't tell us. ++ *type = SYM_TYPE_CODE; ++ } + return internal_dlsym(lbl + 1); + +-# else +- ASSERT(false); ++# elif defined(OBJFORMAT_WASM32) + return NULL; ++# else ++# error No OBJFORMAT_* macro set + # endif + } else { ++ static void *RTS_NO_FINI = NULL; ++ if (strcmp(lbl, "__fini_array_end") == 0) { return (SymbolAddr *) &RTS_NO_FINI; } ++ if (strcmp(lbl, "__fini_array_start") == 0) { return (SymbolAddr *) &RTS_NO_FINI; } ++ if (type) { ++ // This is an assumption ++ *type = pinfo->type; ++ } ++ + if (dependent) { + // Add dependent as symbol's owner's dependency + ObjectCode *owner = pinfo->owner; +@@ -925,13 +1005,37 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent) + } + #endif /* OBJFORMAT_PEi386 */ + ++/* Note [Resolving __dso_handle] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * This symbol, which is defined by the C++ ABI, would typically be defined by ++ * the system's dynamic linker to act as a "handle", identifying a particular ++ * loaded dynamic object to the C++ standard library for the purpose of running ++ * destructors on unload. Here we behave the same way that the dynamic linker ++ * would, using some address (here the start address) of the loaded object as ++ * its handle. ++ * ++ * Note that references to __dso_handle may be relocated using ++ * relocations of bounded displacement and therefore __dso_handle must not be ++ * too far from the loaded object's code (hence using its start address). ++ * ++ * Finally, when we see a reference to __cxa_atexit in an object we take care ++ * to lookup and record the address of __cxa_finalize (largely to ensure that ++ * the symbol dependency is recorded) and call it with the appropriate handle ++ * when the object is unloaded. ++ * ++ * See #20493. ++ * See section 3.3.5 of the Itanium C++ ABI, version 1.83. ++ */ ++ + /* + * Load and relocate the object code for a symbol as necessary. + * Symbol name only used for diagnostics output. + */ + SymbolAddr* loadSymbol(SymbolName *lbl, RtsSymbolInfo *pinfo) { +- IF_DEBUG(linker, debugBelch("lookupSymbol: value of %s is %p\n", lbl, +- pinfo->value)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("lookupSymbol: value of %s is %p, owned by %" PATH_FMT "\n", lbl, ++ pinfo->value, ++ pinfo->owner ? OC_INFORMATIVE_FILENAME(pinfo->owner) : WSTR("No owner, probably built-in."))); + ObjectCode* oc = pinfo->owner; + + /* Symbol can be found during linking, but hasn't been relocated. Do so now. +@@ -944,26 +1048,48 @@ SymbolAddr* loadSymbol(SymbolName *lbl, RtsSymbolInfo *pinfo) { + if (!r) { + return NULL; + } +- +-#if defined(PROFILING) +- // collect any new cost centres & CCSs +- // that were defined during runInit +- refreshProfilingCCSs(); +-#endif + } + + return pinfo->value; + } + ++void ++printLoadedObjects(void) { ++ ObjectCode* oc; ++ for (oc = objects; oc; oc = oc->next) { ++ if (oc->sections != NULL) { ++ int i; ++ printf("%" PATH_FMT "\n", OC_INFORMATIVE_FILENAME(oc)); ++ for (i=0; i < oc->n_sections; i++) { ++ if(oc->sections[i].mapped_start != NULL || oc->sections[i].start != NULL) { ++ printf("\tsec %2d[alloc: %d; kind: %d]: %p - %p; mmaped: %p - %p\n", ++ i, oc->sections[i].alloc, oc->sections[i].kind, ++ oc->sections[i].start, ++ (void*)((uintptr_t)(oc->sections[i].start) + oc->sections[i].size), ++ oc->sections[i].mapped_start, ++ (void*)((uintptr_t)(oc->sections[i].mapped_start) + oc->sections[i].mapped_size)); ++ } ++ } ++ } ++ } ++} ++ + SymbolAddr* lookupSymbol( SymbolName* lbl ) + { + ACQUIRE_LOCK(&linker_mutex); +- SymbolAddr* r = lookupDependentSymbol(lbl, NULL); ++ // NULL for "don't add dependent". When adding a dependency we call ++ // lookupDependentSymbol directly. ++ SymbolAddr* r = lookupDependentSymbol(lbl, NULL, NULL); + if (!r) { + errorBelch("^^ Could not load '%s', dependency unresolved. " + "See top entry above.\n", lbl); ++ IF_DEBUG(linker, printLoadedObjects()); + fflush(stderr); + } ++ ++ if (!runPendingInitializers()) { ++ errorBelch("lookupSymbol: Failed to run initializers."); ++ } + RELEASE_LOCK(&linker_mutex); + return r; + } +@@ -1020,173 +1146,6 @@ resolveSymbolAddr (pathchar* buffer, int size, + #endif /* OBJFORMAT_PEi386 */ + } + +-#if RTS_LINKER_USE_MMAP +-// +-// Returns NULL on failure. +-// +-void * +-mmapForLinker (size_t bytes, uint32_t prot, uint32_t flags, int fd, int offset) +-{ +- void *map_addr = NULL; +- void *result; +- size_t size; +- uint32_t tryMap32Bit = RtsFlags.MiscFlags.linkerAlwaysPic +- ? 0 +- : TRY_MAP_32BIT; +- static uint32_t fixed = 0; +- +- IF_DEBUG(linker, debugBelch("mmapForLinker: start\n")); +- size = roundUpToPage(bytes); +- +-#if defined(MAP_LOW_MEM) +-mmap_again: +-#endif +- +- if (mmap_32bit_base != 0) { +- map_addr = mmap_32bit_base; +- } +- +- IF_DEBUG(linker, +- debugBelch("mmapForLinker: \tprotection %#0x\n", prot)); +- IF_DEBUG(linker, +- debugBelch("mmapForLinker: \tflags %#0x\n", +- MAP_PRIVATE | tryMap32Bit | fixed | flags)); +- +- result = mmap(map_addr, size, prot, +- MAP_PRIVATE|tryMap32Bit|fixed|flags, fd, offset); +- +- if (result == MAP_FAILED) { +- sysErrorBelch("mmap %" FMT_Word " bytes at %p",(W_)size,map_addr); +- errorBelch("Try specifying an address with +RTS -xm -RTS"); +- return NULL; +- } +- +-#if defined(MAP_LOW_MEM) +- if (RtsFlags.MiscFlags.linkerAlwaysPic) { +- } else if (mmap_32bit_base != 0) { +- if (result == map_addr) { +- mmap_32bit_base = (StgWord8*)map_addr + size; +- } else { +- if ((W_)result > 0x80000000) { +- // oops, we were given memory over 2Gb +- munmap(result,size); +-#if defined(freebsd_HOST_OS) || \ +- defined(kfreebsdgnu_HOST_OS) || \ +- defined(dragonfly_HOST_OS) +- // Some platforms require MAP_FIXED. This is normally +- // a bad idea, because MAP_FIXED will overwrite +- // existing mappings. +- fixed = MAP_FIXED; +- goto mmap_again; +-#else +- errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " +- "asked for %lu bytes at %p. " +- "Try specifying an address with +RTS -xm -RTS", +- size, map_addr); +- return NULL; +-#endif +- } else { +- // hmm, we were given memory somewhere else, but it's +- // still under 2Gb so we can use it. Next time, ask +- // for memory right after the place we just got some +- mmap_32bit_base = (StgWord8*)result + size; +- } +- } +- } else { +- if ((W_)result > 0x80000000) { +- // oops, we were given memory over 2Gb +- // ... try allocating memory somewhere else?; +- debugTrace(DEBUG_linker, +- "MAP_32BIT didn't work; gave us %lu bytes at 0x%p", +- bytes, result); +- munmap(result, size); +- +- // Set a base address and try again... (guess: 1Gb) +- mmap_32bit_base = (void*)0x40000000; +- goto mmap_again; +- } +- } +-#elif (defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH)) +- // for aarch64 we need to make sure we stay within 4GB of the +- // mmap_32bit_base, and we also do not want to update it. +-// if (mmap_32bit_base != (void*)&stg_upd_frame_info) { +- if (result == map_addr) { +- mmap_32bit_base = (void*)((uintptr_t)map_addr + size); +- } else { +- // upper limit 4GB - size of the object file - 1mb wiggle room. +- if(llabs((uintptr_t)result - (uintptr_t)&stg_upd_frame_info) > (2<<32) - size - (2<<20)) { +- // not within range :( +- debugTrace(DEBUG_linker, +- "MAP_32BIT didn't work; gave us %lu bytes at 0x%p", +- bytes, result); +- munmap(result, size); +- // TODO: some abort/mmap_32bit_base recomputation based on +- // if mmap_32bit_base is changed, or still at stg_upd_frame_info +- goto mmap_again; +- } else { +- mmap_32bit_base = (void*)((uintptr_t)result + size); +- } +- } +-// } +-#endif +- +- IF_DEBUG(linker, +- debugBelch("mmapForLinker: mapped %" FMT_Word +- " bytes starting at %p\n", (W_)size, result)); +- IF_DEBUG(linker, +- debugBelch("mmapForLinker: done\n")); +- +- return result; +-} +- +-/* +- * Map read/write pages in low memory. Returns NULL on failure. +- */ +-void * +-mmapAnonForLinker (size_t bytes) +-{ +- return mmapForLinker (bytes, PROT_READ|PROT_WRITE, MAP_ANONYMOUS, -1, 0); +-} +- +- +-/* Note [Memory protection in the linker] +- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- * For many years the linker would simply map all of its memory +- * with PROT_READ|PROT_WRITE|PROT_EXEC. However operating systems have been +- * becoming increasingly reluctant to accept this practice (e.g. #17353, +- * #12657) and for good reason: writable code is ripe for exploitation. +- * +- * Consequently mmapForLinker now maps its memory with PROT_READ|PROT_WRITE. +- * After the linker has finished filling/relocating the mapping it must then +- * call mmapForLinkerMarkExecutable on the sections of the mapping which +- * contain executable code. +- * +- * Note that the m32 allocator handles protection of its allocations. For this +- * reason the caller to m32_alloc() must tell the allocator whether the +- * allocation needs to be executable. The caller must then ensure that they +- * call m32_flush() after they are finished filling the region, which will +- * cause the allocator to change the protection bits to PROT_READ|PROT_EXEC. +- * +- */ +- +-/* +- * Mark an portion of a mapping previously reserved by mmapForLinker +- * as executable (but not writable). +- */ +-void mmapForLinkerMarkExecutable(void *start, size_t len) +-{ +- IF_DEBUG(linker, +- debugBelch("mmapForLinkerMarkExecutable: protecting %" FMT_Word +- " bytes starting at %p\n", (W_)len, start)); +- if (len == 0) { +- return; +- } +- if (mprotect(start, len, PROT_READ|PROT_EXEC) == -1) { +- barf("mmapForLinkerMarkExecutable: mprotect: %s\n", strerror(errno)); +- } +-} +-#endif +- + /* + * Remove symbols from the symbol table, and free oc->symbols. + * This operation is idempotent. +@@ -1237,7 +1196,7 @@ freePreloadObjectFile (ObjectCode *oc) + #else + + if (RTS_LINKER_USE_MMAP && oc->imageMapped) { +- munmap(oc->image, oc->fileSize); ++ munmapForLinker(oc->image, oc->fileSize, "freePreloadObjectFile"); + } + else { + stgFree(oc->image); +@@ -1256,6 +1215,37 @@ freePreloadObjectFile (ObjectCode *oc) + */ + void freeObjectCode (ObjectCode *oc) + { ++ IF_DEBUG(linker, ocDebugBelch(oc, "start\n")); ++ ++ // Run finalizers ++ if (oc->type == STATIC_OBJECT && ++ (oc->status == OBJECT_READY || oc->status == OBJECT_UNLOADED)) { ++ // Only run finalizers if the initializers have also been run, which ++ // happens when we resolve the object. ++#if defined(OBJFORMAT_ELF) ++ ocRunFini_ELF(oc); ++#elif defined(OBJFORMAT_PEi386) ++ ocRunFini_PEi386(oc); ++#elif defined(OBJFORMAT_MACHO) ++ ocRunFini_MachO(oc); ++#endif ++ } ++ ++ // See Note [Resolving __dso_handle] ++ if (oc->cxa_finalize) { ++ oc->cxa_finalize(oc->image); ++ } ++ ++ if (oc->type == DYNAMIC_OBJECT) { ++#if defined(OBJFORMAT_ELF) ++ ACQUIRE_LOCK(&dl_mutex); ++ freeNativeCode_ELF(oc); ++ RELEASE_LOCK(&dl_mutex); ++#else ++ barf("freeObjectCode: This shouldn't happen"); ++#endif ++ } ++ + freePreloadObjectFile(oc); + + if (oc->symbols != NULL) { +@@ -1264,7 +1254,7 @@ void freeObjectCode (ObjectCode *oc) + } + + if (oc->extraInfos != NULL) { +- freeHashTable(oc->extraInfos, NULL); ++ freeStrHashTable(oc->extraInfos, NULL); + oc->extraInfos = NULL; + } + +@@ -1275,14 +1265,13 @@ void freeObjectCode (ObjectCode *oc) + switch(oc->sections[i].alloc){ + #if RTS_LINKER_USE_MMAP + case SECTION_MMAP: +- munmap(oc->sections[i].mapped_start, +- oc->sections[i].mapped_size); ++ munmapForLinker( ++ oc->sections[i].mapped_start, ++ oc->sections[i].mapped_size, ++ "freeObjectCode"); + break; + #endif + case SECTION_M32: +- IF_DEBUG(zero_on_gc, +- memset(oc->sections[i].start, +- 0x00, oc->sections[i].size)); + // Freed by m32_allocator_free + break; + case SECTION_MALLOC: +@@ -1341,14 +1330,16 @@ void freeObjectCode (ObjectCode *oc) + } + + ObjectCode* +-mkOc( pathchar *path, char *image, int imageSize, +- bool mapped, char *archiveMemberName, int misalignment ) { ++mkOc( ObjectType type, pathchar *path, char *image, int imageSize, ++ bool mapped, pathchar *archiveMemberName, int misalignment ) { + ObjectCode* oc; + +- IF_DEBUG(linker, debugBelch("mkOc: start\n")); ++ ++ IF_DEBUG(linker, debugBelch("mkOc: %" PATH_FMT "\n", path)); + oc = stgMallocBytes(sizeof(ObjectCode), "mkOc(oc)"); + + oc->info = NULL; ++ oc->type = type; + + # if defined(OBJFORMAT_ELF) + oc->formatName = "ELF"; +@@ -1365,9 +1356,9 @@ mkOc( pathchar *path, char *image, int imageSize, + oc->fileName = pathdup(path); + + if (archiveMemberName) { +- oc->archiveMemberName = stgMallocBytes( strlen(archiveMemberName)+1, ++ oc->archiveMemberName = stgMallocBytes( (pathlen(archiveMemberName)+1) * pathsize, + "loadObj" ); +- strcpy(oc->archiveMemberName, archiveMemberName); ++ pathcopy(oc->archiveMemberName, archiveMemberName); + } else { + oc->archiveMemberName = NULL; + } +@@ -1379,6 +1370,7 @@ mkOc( pathchar *path, char *image, int imageSize, + } + + oc->fileSize = imageSize; ++ oc->n_symbols = 0; + oc->symbols = NULL; + oc->n_sections = 0; + oc->sections = NULL; +@@ -1394,6 +1386,7 @@ mkOc( pathchar *path, char *image, int imageSize, + oc->imageMapped = mapped; + + oc->misalignment = misalignment; ++ oc->cxa_finalize = NULL; + oc->extraInfos = NULL; + + /* chain it onto the list of objects */ +@@ -1401,6 +1394,8 @@ mkOc( pathchar *path, char *image, int imageSize, + oc->prev = NULL; + oc->next_loaded_object = NULL; + oc->mark = object_code_mark_bit; ++ /* this will get cleared by the caller if object is not safely unloadable */ ++ oc->unloadable = true; + oc->dependencies = allocHashSet(); + + #if defined(NEED_M32) +@@ -1408,7 +1403,13 @@ mkOc( pathchar *path, char *image, int imageSize, + oc->rx_m32 = m32_allocator_new(true); + #endif + +- IF_DEBUG(linker, debugBelch("mkOc: done\n")); ++#if defined(OBJFORMAT_ELF) && defined(SHN_XINDEX) ++ oc->shndx_table = SHNDX_TABLE_UNINIT; ++#endif ++ ++ oc->nc_ranges = NULL; ++ oc->dlopen_handle = NULL; ++ + return oc; + } + +@@ -1477,11 +1478,10 @@ preloadObjectFile (pathchar *path) + * + * See also the misalignment logic for darwin below. + */ +-#if defined(darwin_HOST_OS) +- image = mmapForLinker(fileSize, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); ++#if defined(darwin_HOST_OS) || defined(openbsd_HOST_OS) ++ image = mmapForLinker(fileSize, MEM_READ_WRITE, MAP_PRIVATE, fd, 0); + #else +- image = mmapForLinker(fileSize, PROT_READ|PROT_WRITE|PROT_EXEC, +- MAP_PRIVATE, fd, 0); ++ image = mmapForLinker(fileSize, MEM_READ_WRITE_EXECUTE, MAP_PRIVATE, fd, 0); + #endif + + if (image == MAP_FAILED) { +@@ -1520,7 +1520,7 @@ preloadObjectFile (pathchar *path) + + image = stgMallocBytes(fileSize, "loadObj(image)"); + +-#endif ++#endif /* !defined(darwin_HOST_OS) */ + + int n; + n = fread ( image, 1, fileSize, f ); +@@ -1536,7 +1536,7 @@ preloadObjectFile (pathchar *path) + IF_DEBUG(linker, debugBelch("loadObj: preloaded image at %p\n", (void *) image)); + + /* FIXME (AP): =mapped= parameter unconditionally set to true */ +- oc = mkOc(path, image, fileSize, true, NULL, misalignment); ++ oc = mkOc(STATIC_OBJECT, path, image, fileSize, true, NULL, misalignment); + + #if defined(OBJFORMAT_MACHO) + if (ocVerifyImage_MachO( oc )) +@@ -1565,6 +1565,17 @@ static HsInt loadObj_ (pathchar *path) + return 1; // success + } + ++ // Things that look like object files (e.g. end in `.o`) may nevertheless be ++ // archives, as noted in Note [Object merging] in GHC.Driver.Pipeline.Execute. ++ if (isArchive(path)) { ++ if (loadArchive_(path)) { ++ return 1; // success ++ } else { ++ IF_DEBUG(linker, ++ debugBelch("tried and failed to load %" PATH_FMT " as an archive\n", path)); ++ } ++ } ++ + ObjectCode *oc = preloadObjectFile(path); + if (oc == NULL) return 0; + +@@ -1595,7 +1606,7 @@ HsInt loadOc (ObjectCode* oc) + { + int r; + +- IF_DEBUG(linker, debugBelch("loadOc: start\n")); ++ IF_DEBUG(linker, ocDebugBelch(oc, "start\n")); + + /* verify the in-memory image */ + # if defined(OBJFORMAT_ELF) +@@ -1608,11 +1619,12 @@ HsInt loadOc (ObjectCode* oc) + barf("loadObj: no verify method"); + # endif + if (!r) { +- IF_DEBUG(linker, debugBelch("loadOc: ocVerifyImage_* failed\n")); ++ IF_DEBUG(linker, ocDebugBelch(oc, "ocVerifyImage_* failed\n")); + return r; + } + + /* Note [loadOc orderings] ++ ~~~~~~~~~~~~~~~~~~~~~~~ + The order of `ocAllocateExtras` and `ocGetNames` matters. For MachO + and ELF, `ocInit` and `ocGetNames` initialize a bunch of pointers based + on the offset to `oc->image`, but `ocAllocateExtras` may relocate +@@ -1625,8 +1637,7 @@ HsInt loadOc (ObjectCode* oc) + symbol table. Allocating space for jump tables in ocAllocateExtras + would just be a waste then as we'll be stopping further processing of the + library in the next few steps. If necessary, the actual allocation +- happens in `ocGetNames_PEi386` and `ocAllocateExtras_PEi386` simply +- set the correct pointers. ++ happens in `ocGetNames_PEi386` simply set the correct pointers. + */ + + #if defined(NEED_SYMBOL_EXTRAS) +@@ -1634,14 +1645,14 @@ HsInt loadOc (ObjectCode* oc) + r = ocAllocateExtras_MachO ( oc ); + if (!r) { + IF_DEBUG(linker, +- debugBelch("loadOc: ocAllocateExtras_MachO failed\n")); ++ ocDebugBelch(oc, "ocAllocateExtras_MachO failed\n")); + return r; + } + # elif defined(OBJFORMAT_ELF) + r = ocAllocateExtras_ELF ( oc ); + if (!r) { + IF_DEBUG(linker, +- debugBelch("loadOc: ocAllocateExtras_ELF failed\n")); ++ ocDebugBelch(oc, "ocAllocateExtras_ELF failed\n")); + return r; + } + # endif +@@ -1658,16 +1669,10 @@ HsInt loadOc (ObjectCode* oc) + barf("loadObj: no getNames method"); + # endif + if (!r) { +- IF_DEBUG(linker, debugBelch("loadOc: ocGetNames_* failed\n")); ++ IF_DEBUG(linker, ocDebugBelch(oc, "ocGetNames_* failed\n")); + return r; + } + +-#if defined(NEED_SYMBOL_EXTRAS) +-# if defined(OBJFORMAT_PEi386) +- ocAllocateExtras_PEi386 ( oc ); +-# endif +-#endif +- + /* Loaded, but not resolved yet, ensure the OC is in a consistent state. + If a target has requested the ObjectCode not to be resolved then honor + this requests. Usually this means the ObjectCode has not been initialized +@@ -1679,7 +1684,7 @@ HsInt loadOc (ObjectCode* oc) + oc->status = OBJECT_LOADED; + } + } +- IF_DEBUG(linker, debugBelch("loadOc: done.\n")); ++ IF_DEBUG(linker, ocDebugBelch(oc, "done\n")); + + return 1; + } +@@ -1702,12 +1707,10 @@ int ocTryLoad (ObjectCode* oc) { + are to be loaded by this call. + + This call is intended to have no side-effects when a non-duplicate +- symbol is re-inserted. A symbol is only a duplicate if the object file +- it is defined in has had it's relocations resolved. A resolved object +- file means the symbols inside it are required. ++ symbol is re-inserted. + +- The symbol address is not used to distinguish symbols. Duplicate symbols +- are distinguished by name, oc and attributes (weak symbols etc). ++ We set the Address to NULL since that is not used to distinguish ++ symbols. Duplicate symbols are distinguished by name and oc. + */ + int x; + Symbol_t symbol; +@@ -1716,12 +1719,13 @@ int ocTryLoad (ObjectCode* oc) { + if ( symbol.name + && !ghciInsertSymbolTable(oc->fileName, symhash, symbol.name, + symbol.addr, +- isSymbolWeak(oc, symbol.name) | (HS_BOOL_FALSE << 1), +- oc)) { ++ isSymbolWeak(oc, symbol.name), ++ symbol.type, oc)) { + return 0; + } + } + ++ IF_DEBUG(linker, ocDebugBelch(oc, "resolving\n")); + # if defined(OBJFORMAT_ELF) + r = ocResolve_ELF ( oc ); + # elif defined(OBJFORMAT_PEi386) +@@ -1731,8 +1735,12 @@ int ocTryLoad (ObjectCode* oc) { + # else + barf("ocTryLoad: not implemented on this platform"); + # endif +- if (!r) { return r; } ++ if (!r) { ++ IF_DEBUG(linker, ocDebugBelch(oc, "resolution failed\n")); ++ return r; ++ } + ++ IF_DEBUG(linker, ocDebugBelch(oc, "protecting mappings\n")); + #if defined(NEED_SYMBOL_EXTRAS) + ocProtectExtras(oc); + #endif +@@ -1744,12 +1752,24 @@ int ocTryLoad (ObjectCode* oc) { + m32_allocator_flush(oc->rw_m32); + #endif + +- // run init/init_array/ctors/mod_init_func ++ IF_DEBUG(linker, ocDebugBelch(oc, "resolved\n")); ++ oc->status = OBJECT_RESOLVED; ++ ++ return 1; ++} ++ ++// run init/init_array/ctors/mod_init_func ++int ocRunInit(ObjectCode *oc) ++{ ++ if (oc->status != OBJECT_RESOLVED) { ++ return 1; ++ } + +- IF_DEBUG(linker, debugBelch("ocTryLoad: ocRunInit start\n")); ++ IF_DEBUG(linker, ocDebugBelch(oc, "running initializers\n")); + + // See Note [Tracking foreign exports] in ForeignExports.c + foreignExportsLoadingObject(oc); ++ int r; + #if defined(OBJFORMAT_ELF) + r = ocRunInit_ELF ( oc ); + #elif defined(OBJFORMAT_PEi386) +@@ -1762,8 +1782,27 @@ int ocTryLoad (ObjectCode* oc) { + foreignExportsFinishedLoadingObject(); + + if (!r) { return r; } ++ oc->status = OBJECT_READY; + +- oc->status = OBJECT_RESOLVED; ++ return 1; ++} ++ ++int runPendingInitializers (void) ++{ ++ for (ObjectCode *oc = objects; oc; oc = oc->next) { ++ int r = ocRunInit(oc); ++ if (!r) { ++ errorBelch("Could not run initializers of Object Code %" PATH_FMT ".\n", OC_INFORMATIVE_FILENAME(oc)); ++ IF_DEBUG(linker, printLoadedObjects()); ++ fflush(stderr); ++ return r; ++ } ++ } ++ ++#if defined(PROFILING) ++ // collect any new cost centres & CCSs that were defined during runInit ++ refreshProfilingCCSs(); ++#endif + + return 1; + } +@@ -1779,18 +1818,17 @@ static HsInt resolveObjs_ (void) + + for (ObjectCode *oc = objects; oc; oc = oc->next) { + int r = ocTryLoad(oc); +- if (!r) +- { ++ if (!r) { + errorBelch("Could not load Object Code %" PATH_FMT ".\n", OC_INFORMATIVE_FILENAME(oc)); ++ IF_DEBUG(linker, printLoadedObjects()); + fflush(stderr); + return r; + } + } + +-#if defined(PROFILING) +- // collect any new cost centres & CCSs that were defined during runInit +- refreshProfilingCCSs(); +-#endif ++ if (!runPendingInitializers()) { ++ return 0; ++ } + + IF_DEBUG(linker, debugBelch("resolveObjs: done\n")); + return 1; +@@ -1867,7 +1905,7 @@ HsInt purgeObj (pathchar *path) + return r; + } + +-static OStatus getObjectLoadStatus_ (pathchar *path) ++OStatus getObjectLoadStatus_ (pathchar *path) + { + for (ObjectCode *o = objects; o; o = o->next) { + if (0 == pathcmp(o->fileName, path)) { +@@ -1957,6 +1995,64 @@ addSection (Section *s, SectionKind kind, SectionAlloc alloc, + size, kind )); + } + ++#define UNUSED(x) (void)(x) ++ ++#if defined(OBJFORMAT_ELF) ++void * loadNativeObj (pathchar *path, char **errmsg) ++{ ++ ACQUIRE_LOCK(&linker_mutex); ++ void *r = loadNativeObj_ELF(path, errmsg); ++ RELEASE_LOCK(&linker_mutex); ++ return r; ++} ++#else ++void * STG_NORETURN ++loadNativeObj (pathchar *path, char **errmsg) ++{ ++ UNUSED(path); ++ UNUSED(errmsg); ++ barf("loadNativeObj: not implemented on this platform"); ++} ++#endif ++ ++HsInt unloadNativeObj (void *handle) ++{ ++ bool unloadedAnyObj = false; ++ ++ IF_DEBUG(linker, debugBelch("unloadNativeObj: %p\n", handle)); ++ ++ ObjectCode *prev = NULL, *next; ++ for (ObjectCode *nc = loaded_objects; nc; nc = next) { ++ next = nc->next_loaded_object; // we might move nc ++ ++ if (nc->type == DYNAMIC_OBJECT && nc->dlopen_handle == handle) { ++ nc->status = OBJECT_UNLOADED; ++ n_unloaded_objects += 1; ++ ++ // dynamic objects have no symbols ++ CHECK(nc->symbols == NULL); ++ freeOcStablePtrs(nc); ++ ++ // Remove object code from root set ++ if (prev == NULL) { ++ loaded_objects = nc->next_loaded_object; ++ } else { ++ prev->next_loaded_object = nc->next_loaded_object; ++ } ++ unloadedAnyObj = true; ++ } else { ++ prev = nc; ++ } ++ } ++ ++ if (unloadedAnyObj) { ++ return 1; ++ } else { ++ errorBelch("unloadObjNativeObj_ELF: can't find `%p' to unload", handle); ++ return 0; ++ } ++} ++ + /* ----------------------------------------------------------------------------- + * Segment management + */ +@@ -1974,23 +2070,23 @@ initSegment (Segment *s, void *start, size_t size, SegmentProt prot, int n_secti + void freeSegments (ObjectCode *oc) + { + if (oc->segments != NULL) { +- IF_DEBUG(linker, debugBelch("freeSegments: freeing %d segments\n", oc->n_segments)); ++ IF_DEBUG(linker, ocDebugBelch(oc, "freeing %d segments\n", oc->n_segments)); + + for (int i = 0; i < oc->n_segments; i++) { + Segment *s = &oc->segments[i]; + +- IF_DEBUG(linker, debugBelch("freeSegments: freeing segment %d at %p size %zu\n", +- i, s->start, s->size)); ++ IF_DEBUG(linker, ocDebugBelch(oc, "freeing segment %d at %p size %zu\n", ++ i, s->start, s->size)); + + stgFree(s->sections_idx); + s->sections_idx = NULL; + + if (0 == s->size) { +- IF_DEBUG(linker, debugBelch("freeSegment: skipping segment of 0 size\n")); ++ IF_DEBUG(linker, ocDebugBelch(oc, "skipping segment of 0 size\n")); + continue; + } else { + #if RTS_LINKER_USE_MMAP +- CHECKM(0 == munmap(s->start, s->size), "freeSegments: failed to unmap memory"); ++ munmapForLinker(s->start, s->size, "freeSegments"); + #else + stgFree(s->start); + #endif +diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h +index b40d14e..60acbf0 100644 +--- a/rts/LinkerInternals.h ++++ b/rts/LinkerInternals.h +@@ -16,10 +16,71 @@ + #include + #endif + +-#include "BeginPrivate.h" ++void printLoadedObjects(void); ++ ++/* Which object file format are we targeting? */ ++#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) \ ++|| defined(linux_android_HOST_OS) \ ++|| defined(freebsd_HOST_OS) || defined(kfreebsdgnu_HOST_OS) \ ++|| defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) \ ++|| defined(openbsd_HOST_OS) || defined(gnu_HOST_OS) ++# define OBJFORMAT_ELF ++#elif defined(mingw32_HOST_OS) ++# define OBJFORMAT_PEi386 ++#elif defined(darwin_HOST_OS) || defined(ios_HOST_OS) ++# define OBJFORMAT_MACHO ++#elif defined(wasm32_HOST_ARCH) ++# define OBJFORMAT_WASM32 ++#endif + + typedef void SymbolAddr; + typedef char SymbolName; ++typedef struct _ObjectCode ObjectCode; ++typedef struct _Section Section; ++ ++/* ++ * Note [Processing overflowed relocations] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * When processing relocations whose targets exceed the relocation's maximum ++ * displacement, we can take advantage of knowledge of the symbol type to avoid ++ * linker failures. In particular, if we know that a symbol is a code symbol ++ * then we can handle the relocation by creating a "jump island", a small bit ++ * of code which immediately jumps (with an instruction sequence capable of ++ * larger displacement) to the target. ++ * ++ * This is not possible for data symbols (or, for that matter, Haskell symbols ++ * when TNTC is in use). In these cases we have to rather fail and ask the user ++ * to recompile their program as position-independent. ++ */ ++ ++/* What kind of thing a symbol identifies. We need to know this to determine how ++ * to process overflowing relocations. See Note [Processing overflowed relocations]. ++ * This is bitfield however only the option SYM_TYPE_DUP_DISCARD can be combined ++ * with the other values. */ ++typedef enum _SymType { ++ SYM_TYPE_CODE = 1 << 0, /* the symbol is a function and can be relocated via a jump island */ ++ SYM_TYPE_DATA = 1 << 1, /* the symbol is data */ ++ SYM_TYPE_INDIRECT_DATA = 1 << 2, /* see Note [_iob_func symbol] */ ++ SYM_TYPE_DUP_DISCARD = 1 << 3, /* the symbol is a symbol in a BFD import library ++ however if a duplicate is found with a mismatching ++ SymType then discard this one. */ ++ SYM_TYPE_HIDDEN = 1 << 4, /* the symbol is hidden and should not be exported */ ++ ++} SymType; ++ ++ ++#if defined(OBJFORMAT_ELF) ++# include "linker/ElfTypes.h" ++#elif defined(OBJFORMAT_PEi386) ++# include "linker/PEi386Types.h" ++#elif defined(OBJFORMAT_MACHO) ++# include "linker/MachOTypes.h" ++#elif defined(OBJFORMAT_WASM32) ++# include "linker/Wasm32Types.h" ++#else ++# error "Unknown OBJECT_FORMAT for HOST_OS" ++#endif ++ + + /* Hold extended information about a symbol in case we need to resolve it at a + late stage. */ +@@ -27,8 +88,16 @@ typedef struct _Symbol + { + SymbolName *name; + SymbolAddr *addr; ++ SymType type; + } Symbol_t; + ++typedef struct NativeCodeRange_ { ++ void *start, *end; ++ ++ /* Allow a chain of these things */ ++ struct NativeCodeRange_ *next; ++} NativeCodeRange; ++ + /* Indication of section kinds for loaded objects. Needed by + the GC for deciding whether or not a pointer on the stack + is a code pointer. +@@ -42,16 +111,26 @@ typedef + /* Static initializer section. e.g. .ctors. */ + SECTIONKIND_INIT_ARRAY, + /* Static finalizer section. e.g. .dtors. */ +- SECTIONKIND_FINIT_ARRAY, ++ SECTIONKIND_FINI_ARRAY, + /* We don't know what the section is and don't care. */ + SECTIONKIND_OTHER, ++ ++ /* ++ * Windows-specific section kinds ++ */ ++ + /* Section contains debug information. e.g. .debug$. */ + SECTIONKIND_DEBUG, ++ /* Section contains exception table. e.g. .pdata. */ ++ SECTIONKIND_EXCEPTION_TABLE, ++ /* Section contains unwind info. e.g. .xdata. */ ++ SECTIONKIND_EXCEPTION_UNWIND, + /* Section belongs to an import section group. e.g. .idata$. */ + SECTIONKIND_IMPORT, ++ /* Section defines the head section of a BFD-style import library, e.g. idata$7. */ ++ SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD, + /* Section defines an import library entry, e.g. idata$7. */ +- SECTIONKIND_IMPORT_LIBRARY, +- SECTIONKIND_NOINFOAVAIL ++ SECTIONKIND_BFD_IMPORT_LIBRARY, + } + SectionKind; + +@@ -74,17 +153,16 @@ typedef enum { + SEGMENT_PROT_RO = PROT_READ, + SEGMENT_PROT_RX = PROT_READ | PROT_EXEC, + SEGMENT_PROT_RWO = PROT_READ | PROT_WRITE, +- SEGMENT_PROT_RWX = PROT_READ | PROT_WRITE | PROT_EXEC + #else + SEGMENT_PROT_RO, + SEGMENT_PROT_RX, + SEGMENT_PROT_RWO, +- SEGMENT_PROT_RWX + #endif + } SegmentProt; + + /* + * Note [No typedefs for customizable types] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * Some pointer-to-struct types are defined opaquely + * first, and customized later to architecture/ABI-specific + * instantiations. Having the usual +@@ -95,26 +173,24 @@ typedef enum { + * and always refer to it with the 'struct' qualifier. + */ + +-typedef +- struct _Section { +- void* start; /* actual start of section in memory */ +- StgWord size; /* actual size of section in memory */ +- SectionKind kind; +- SectionAlloc alloc; +- +- /* +- * The following fields are relevant for SECTION_MMAP sections only +- */ +- StgWord mapped_offset; /* offset from the image of mapped_start */ +- void* mapped_start; /* start of mmap() block */ +- StgWord mapped_size; /* size of mmap() block */ +- +- /* A customizable type to augment the Section type. +- * See Note [No typedefs for customizable types] +- */ +- struct SectionFormatInfo* info; +- } +- Section; ++struct _Section { ++ void* start; /* actual start of section in memory */ ++ StgWord size; /* actual size of section in memory */ ++ SectionKind kind; ++ SectionAlloc alloc; ++ ++ /* ++ * The following fields are relevant for SECTION_MMAP sections only ++ */ ++ StgWord mapped_offset; /* offset from the image of mapped_start */ ++ void* mapped_start; /* start of mmap() block */ ++ StgWord mapped_size; /* size of mmap() block */ ++ ++ /* A customizable type to augment the Section type. ++ * See Note [No typedefs for customizable types] ++ */ ++ struct SectionFormatInfo* info; ++}; + + typedef + struct _ProddableBlock { +@@ -142,7 +218,7 @@ typedef struct _Segment { + * We use the m32 allocator for symbol extras on Windows and other mmap-using + * platforms. + */ +-#if RTS_LINKER_USE_MMAP ++#if RTS_LINKER_USE_MMAP || defined(mingw32_HOST_ARCH) + #define NEED_M32 1 + #endif + +@@ -159,26 +235,37 @@ typedef struct { + } jumpIsland; + #elif defined(x86_64_HOST_ARCH) + uint64_t addr; +- uint8_t jumpIsland[6]; ++ // See Note [TLSGD relocation] in elf_tlsgd.c ++ uint8_t jumpIsland[8]; + #elif defined(arm_HOST_ARCH) + uint8_t jumpIsland[16]; + #endif + } SymbolExtra; + ++typedef enum { ++ /* Objects that were loaded by this linker */ ++ STATIC_OBJECT, ++ ++ /* Objects that were loaded by dlopen */ ++ DYNAMIC_OBJECT, ++} ObjectType; ++ ++typedef void (*cxa_finalize_fn)(void *); + + /* Top-level structure for an object module. One of these is allocated + * for each object file in use. + */ +-typedef struct _ObjectCode { ++struct _ObjectCode { + OStatus status; + pathchar *fileName; + int fileSize; /* also mapped image size when using mmap() */ +- char* formatName; /* eg "ELF32", "DLL", "COFF", etc. */ ++ char* formatName; /* e.g. "ELF32", "DLL", "COFF", etc. */ ++ ObjectType type; /* who loaded this object? */ + + /* If this object is a member of an archive, archiveMemberName is + * like "libarchive.a(object.o)". Otherwise it's NULL. + */ +- char* archiveMemberName; ++ pathchar* archiveMemberName; + + /* An array containing ptrs to all the symbol names copied from + this object into the global symbol hash table. This is so that +@@ -202,6 +289,11 @@ typedef struct _ObjectCode { + after allocation, so that we can use realloc */ + int misalignment; + ++ /* The address of __cxa_finalize; set when at least one finalizer was ++ * register and therefore we must call __cxa_finalize before unloading. ++ * See Note [Resolving __dso_handle]. */ ++ cxa_finalize_fn cxa_finalize; ++ + /* The section-kind entries for this object module. An array. */ + int n_sections; + Section* sections; +@@ -223,8 +315,14 @@ typedef struct _ObjectCode { + struct _ObjectCode *next_loaded_object; + + // Mark bit ++ // N.B. This is a full word as we CAS it. + StgWord mark; + ++ // Can this object be safely unloaded? Not true for ++ // dynamic objects when dlinfo is not available as ++ // we cannot determine liveness. ++ bool unloadable; ++ + // Set of dependencies (ObjectCode*) of the object file. Traverse + // dependencies using `iterHashTable`. + // +@@ -246,19 +344,13 @@ typedef struct _ObjectCode { + outside one of these is an error in the linker. */ + ProddableBlock* proddables; + +-#if defined(ia64_HOST_ARCH) +- /* Procedure Linkage Table for this object */ +- void *plt; +- unsigned int pltIndex; +-#endif +- + #if defined(NEED_SYMBOL_EXTRAS) + SymbolExtra *symbol_extras; + unsigned long first_symbol_extra; + unsigned long n_symbol_extras; + #endif + /* Additional memory that is preallocated and contiguous with image +- which can be used used to relocate bss sections. */ ++ which can be used to relocate bss sections. */ + char* bssBegin; + char* bssEnd; + +@@ -267,7 +359,7 @@ typedef struct _ObjectCode { + + /* Holds the list of symbols in the .o file which + require extra information.*/ +- HashTable *extraInfos; ++ StrHashTable *extraInfos; + + #if defined(NEED_M32) + /* The m32 allocators used for allocating small sections and symbol extras +@@ -275,7 +367,37 @@ typedef struct _ObjectCode { + * (read-only/executable) code. */ + m32_allocator *rw_m32, *rx_m32; + #endif +-} ObjectCode; ++ ++#if defined(OBJFORMAT_ELF) && defined(SHN_XINDEX) ++ /* Cached address of ELF's shndx table, or SHNDX_TABLE_UNINIT if not ++ * initialized yet. It would be better to put it info ELF-specific ++ * ObjectCodeFormatInfo, but unfortunately shndx table is needed in ++ * ocVerifyImage_ELF which runs before ObjectCodeFormatInfo is ++ * initialized by ocInit_ELF. */ ++ Elf_Word *shndx_table; ++#endif ++ ++ /* ++ * The following are only valid if .type == DYNAMIC_OBJECT ++ */ ++ ++ /* handle returned from dlopen */ ++ void *dlopen_handle; ++ ++ /* virtual memory ranges of loaded code. NULL if no range information is ++ * available (e.g. if dlinfo is unavailable on the current platform). ++ */ ++ NativeCodeRange *nc_ranges; ++}; ++ ++#if defined(OBJFORMAT_ELF) && defined(SHN_XINDEX) ++/* We cannot simply use NULL to signal uninitialised shndx_table because NULL ++ * is valid return value of get_shndx_table. Thus SHNDX_TABLE_UNINIT is defined ++ * as the address of global variable shndx_table_uninit_label, defined in ++ * rts/linker/Elf.c, which is definitely unequal to any heap-allocated address */ ++extern Elf_Word shndx_table_uninit_label; ++#define SHNDX_TABLE_UNINIT (&shndx_table_uninit_label) ++#endif + + #define OC_INFORMATIVE_FILENAME(OC) \ + ( (OC)->archiveMemberName ? \ +@@ -283,13 +405,33 @@ typedef struct _ObjectCode { + (OC)->fileName \ + ) + ++#define ocDebugBelch(oc, s, ...) \ ++ debugBelch("%s(%" PATH_FMT ": " s, \ ++ __func__, \ ++ OC_INFORMATIVE_FILENAME(oc), \ ++ ##__VA_ARGS__) ++ ++ + #if defined(THREADED_RTS) + extern Mutex linker_mutex; ++ ++#if defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO) ++extern Mutex dl_mutex; + #endif ++#endif /* THREADED_RTS */ + +-/* Type of the initializer */ ++/* Type of an initializer */ + typedef void (*init_t) (int argc, char **argv, char **env); + ++/* Type of a finalizer */ ++typedef void (*fini_t) (void); ++ ++typedef enum _SymStrength { ++ STRENGTH_NORMAL, ++ STRENGTH_WEAK, ++ STRENGTH_STRONG, ++} SymStrength; ++ + /* SymbolInfo tracks a symbol's address, the object code from which + it originated, and whether or not it's weak. + +@@ -305,19 +447,17 @@ typedef void (*init_t) (int argc, char **argv, char **env); + typedef struct _RtsSymbolInfo { + SymbolAddr* value; + ObjectCode *owner; +- HsBool weak; +- HsBool hidden; ++ SymStrength strength; ++ SymType type; + } RtsSymbolInfo; + ++#include "BeginPrivate.h" ++ + void exitLinker( void ); + + void freeObjectCode (ObjectCode *oc); + SymbolAddr* loadSymbol(SymbolName *lbl, RtsSymbolInfo *pinfo); + +-void *mmapAnonForLinker (size_t bytes); +-void *mmapForLinker (size_t bytes, uint32_t prot, uint32_t flags, int fd, int offset); +-void mmapForLinkerMarkExecutable (void *start, size_t len); +- + void addProddableBlock ( ObjectCode* oc, void* start, int size ); + void checkProddableBlock (ObjectCode *oc, void *addr, size_t size ); + void freeProddableBlocks (ObjectCode *oc); +@@ -326,27 +466,36 @@ void addSection (Section *s, SectionKind kind, SectionAlloc alloc, + void* start, StgWord size, StgWord mapped_offset, + void* mapped_start, StgWord mapped_size); + +-HsBool ghciLookupSymbolInfo(HashTable *table, ++HsBool ghciLookupSymbolInfo(StrHashTable *table, + const SymbolName* key, RtsSymbolInfo **result); + + int ghciInsertSymbolTable( + pathchar* obj_name, +- HashTable *table, ++ StrHashTable *table, + const SymbolName* key, + SymbolAddr* data, +- int flags, ++ SymStrength weak, ++ SymType type, + ObjectCode *owner); + + /* Lock-free version of lookupSymbol. When 'dependent' is not NULL, adds it as a +- * dependent to the owner of the symbol. */ +-SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent); ++ * dependent to the owner of the symbol. The type of the symbol is stored in 'type'. */ ++SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymType *type); ++ ++/* Perform TLSGD symbol lookup returning the address of the resulting GOT entry, ++ * which in this case holds the module id and the symbol offset. */ ++StgInt64 lookupTlsgdSymbol(const char *, unsigned long, ObjectCode *); + +-extern /*Str*/HashTable *symhash; ++extern StrHashTable *symhash; + + pathchar* + resolveSymbolAddr (pathchar* buffer, int size, + SymbolAddr* symbol, uintptr_t* top); + ++/* defined in LoadArchive.c */ ++bool isArchive (pathchar *path); ++HsInt loadArchive_ (pathchar *path); ++ + /************************************************* + * Various bits of configuration + *************************************************/ +@@ -368,48 +517,16 @@ resolveSymbolAddr (pathchar* buffer, int size, + #define USE_CONTIGUOUS_MMAP 0 + #endif + ++ + HsInt isAlreadyLoaded( pathchar *path ); ++OStatus getObjectLoadStatus_ (pathchar *path); + HsInt loadOc( ObjectCode* oc ); +-ObjectCode* mkOc( pathchar *path, char *image, int imageSize, +- bool mapped, char *archiveMemberName, ++ObjectCode* mkOc( ObjectType type, pathchar *path, char *image, int imageSize, ++ bool mapped, pathchar *archiveMemberName, + int misalignment + ); + + void initSegment(Segment *s, void *start, size_t size, SegmentProt prot, int n_sections); + void freeSegments(ObjectCode *oc); + +-/* MAP_ANONYMOUS is MAP_ANON on some systems, +- e.g. OS X (before Sierra), OpenBSD etc */ +-#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) +-#define MAP_ANONYMOUS MAP_ANON +-#endif +- +-/* Which object file format are we targetting? */ +-#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) \ +-|| defined(linux_android_HOST_OS) \ +-|| defined(freebsd_HOST_OS) || defined(kfreebsdgnu_HOST_OS) \ +-|| defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) \ +-|| defined(openbsd_HOST_OS) || defined(gnu_HOST_OS) +-# define OBJFORMAT_ELF +-# include "linker/ElfTypes.h" +-#elif defined(mingw32_HOST_OS) +-# define OBJFORMAT_PEi386 +-# include "linker/PEi386Types.h" +-#elif defined(darwin_HOST_OS) || defined(ios_HOST_OS) +-# define OBJFORMAT_MACHO +-# include "linker/MachOTypes.h" +-#else +-#error "Unknown OBJECT_FORMAT for HOST_OS" +-#endif +- +-/* In order to simplify control flow a bit, some references to mmap-related +- definitions are blocked off by a C-level if statement rather than a CPP-level +- #if statement. Since those are dead branches when !RTS_LINKER_USE_MMAP, we +- just stub out the relevant symbols here +-*/ +-#if !RTS_LINKER_USE_MMAP +-#define munmap(x,y) /* nothing */ +-#define MAP_ANONYMOUS 0 +-#endif +- + #include "EndPrivate.h" +diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c +index e166e20..82ec0c8 100644 +--- a/rts/linker/Elf.c ++++ b/rts/linker/Elf.c +@@ -15,18 +15,26 @@ + + #include "RtsUtils.h" + #include "RtsSymbolInfo.h" ++#include "CheckUnload.h" ++#include "LinkerInternals.h" ++#include "linker/MMap.h" + #include "linker/Elf.h" + #include "linker/CacheFlush.h" + #include "linker/M32Alloc.h" + #include "linker/SymbolExtras.h" ++#include "ForeignExports.h" ++#include "Profiling.h" + #include "sm/OSMem.h" +-#include "GetEnv.h" + #include "linker/util.h" + #include "linker/elf_util.h" + ++#include + #include + #include + #include ++#if defined(HAVE_DLFCN_H) ++#include ++#endif + #if defined(HAVE_SYS_STAT_H) + #include + #endif +@@ -79,9 +87,7 @@ + */ + #define X86_64_ELF_NONPIC_HACK (!RtsFlags.MiscFlags.linkerAlwaysPic) + +-#if defined(sparc_HOST_ARCH) +-# define ELF_TARGET_SPARC /* Used inside */ +-#elif defined(i386_HOST_ARCH) ++#if defined(i386_HOST_ARCH) + # define ELF_TARGET_386 /* Used inside */ + #elif defined(x86_64_HOST_ARCH) + # define ELF_TARGET_X64_64 +@@ -95,18 +101,17 @@ + # include + #endif + ++#include "elf_got.h" ++ + #if defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH) +-# define NEED_GOT + # define NEED_PLT +-# include "elf_got.h" + # include "elf_plt.h" + # include "elf_reloc.h" + #endif + + /* +- + Note [Many ELF Sections] +- ++ ~~~~~~~~~~~~~~~~~~~~~~~~ + The normal section number fields in ELF are limited to 16 bits, which runs + out of bits when you try to cram in more sections than that. + +@@ -127,6 +132,11 @@ + + */ + ++#if defined(SHN_XINDEX) ++/* global variable which address is used to signal an uninitialised shndx_table */ ++Elf_Word shndx_table_uninit_label = 0; ++#endif ++ + static Elf_Word elf_shnum(Elf_Ehdr* ehdr) + { + Elf_Shdr* shdr = (Elf_Shdr*) ((char*)ehdr + ehdr->e_shoff); +@@ -149,16 +159,22 @@ static Elf_Word elf_shstrndx(Elf_Ehdr* ehdr) + + #if defined(SHN_XINDEX) + static Elf_Word* +-get_shndx_table(Elf_Ehdr* ehdr) ++get_shndx_table(ObjectCode* oc) + { ++ if (RTS_LIKELY(oc->shndx_table != SHNDX_TABLE_UNINIT)) { ++ return oc->shndx_table; ++ } ++ + Elf_Word i; +- char* ehdrC = (char*)ehdr; ++ char* ehdrC = oc->image; ++ Elf_Ehdr* ehdr = (Elf_Ehdr*)ehdrC; + Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); + const Elf_Word shnum = elf_shnum(ehdr); + + for (i = 0; i < shnum; i++) { + if (shdr[i].sh_type == SHT_SYMTAB_SHNDX) { +- return (Elf32_Word*)(ehdrC + shdr[i].sh_offset); ++ oc->shndx_table = (Elf32_Word*)(ehdrC + shdr[i].sh_offset); ++ return oc->shndx_table; + } + } + return NULL; +@@ -188,6 +204,10 @@ ocInit_ELF(ObjectCode * oc) + + oc->n_sections = elf_shnum(oc->info->elfHeader); + ++ ElfRelocationTable *relTableLast = NULL; ++ ElfRelocationATable *relaTableLast = NULL; ++ ElfSymbolTable *symbolTablesLast = NULL; ++ + /* get the symbol table(s) */ + for(int i=0; i < oc->n_sections; i++) { + if(SHT_REL == oc->info->sectionHeader[i].sh_type) { +@@ -205,12 +225,12 @@ ocInit_ELF(ObjectCode * oc) + + relTab->sectionHeader = &oc->info->sectionHeader[i]; + +- if(oc->info->relTable == NULL) { ++ if(relTableLast == NULL) { + oc->info->relTable = relTab; ++ relTableLast = relTab; + } else { +- ElfRelocationTable * tail = oc->info->relTable; +- while(tail->next != NULL) tail = tail->next; +- tail->next = relTab; ++ relTableLast->next = relTab; ++ relTableLast = relTab; + } + + } else if(SHT_RELA == oc->info->sectionHeader[i].sh_type) { +@@ -228,12 +248,12 @@ ocInit_ELF(ObjectCode * oc) + + relTab->sectionHeader = &oc->info->sectionHeader[i]; + +- if(oc->info->relaTable == NULL) { ++ if(relaTableLast == NULL) { + oc->info->relaTable = relTab; ++ relaTableLast = relTab; + } else { +- ElfRelocationATable * tail = oc->info->relaTable; +- while(tail->next != NULL) tail = tail->next; +- tail->next = relTab; ++ relaTableLast->next = relTab; ++ relaTableLast = relTab; + } + + } else if(SHT_SYMTAB == oc->info->sectionHeader[i].sh_type) { +@@ -274,12 +294,12 @@ ocInit_ELF(ObjectCode * oc) + } + + /* append the ElfSymbolTable */ +- if(oc->info->symbolTables == NULL) { ++ if(symbolTablesLast == NULL) { + oc->info->symbolTables = symTab; ++ symbolTablesLast = symTab; + } else { +- ElfSymbolTable * tail = oc->info->symbolTables; +- while(tail->next != NULL) tail = tail->next; +- tail->next = symTab; ++ symbolTablesLast->next = symTab; ++ symbolTablesLast = symTab; + } + } + } +@@ -324,6 +344,9 @@ ocDeinit_ELF(ObjectCode * oc) + + stgFree(oc->info); + oc->info = NULL; ++#if defined(SHN_XINDEX) ++ oc->shndx_table = SHNDX_TABLE_UNINIT; ++#endif + } + } + +@@ -370,7 +393,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + errorBelch("%s: not a relocatable object (.o) file", oc->fileName); + return 0; + } +- IF_DEBUG(linker, debugBelch( "Is a relocatable object (.o) file\n" )); ++ IF_DEBUG(linker,debugBelch( "Is a relocatable object (.o) file\n" )); + + IF_DEBUG(linker,debugBelch( "Architecture is " )); + switch (ehdr->e_machine) { +@@ -405,6 +428,18 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + #endif + #if defined(EM_AARCH64) + case EM_AARCH64: IF_DEBUG(linker,debugBelch( "aarch64" )); break; ++#endif ++#if defined(EM_RISCV) ++ case EM_RISCV: IF_DEBUG(linker,debugBelch( "riscv" )); ++ errorBelch("%s: RTS linker not implemented on riscv", ++ oc->fileName); ++ return 0; ++#endif ++#if defined(EM_LOONGARCH) ++ case EM_LOONGARCH: IF_DEBUG(linker,debugBelch( "loongarch64" )); ++ errorBelch("%s: RTS linker not implemented on loongarch64", ++ oc->fileName); ++ return 0; + #endif + default: IF_DEBUG(linker,debugBelch( "unknown" )); + errorBelch("%s: unknown architecture (e_machine == %d)" +@@ -417,7 +452,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + "\nSection header table: start %ld, n_entries %d, ent_size %d\n", + (long)ehdr->e_shoff, shnum, ehdr->e_shentsize )); + +- ASSERT(ehdr->e_shentsize == sizeof(Elf_Shdr)); ++ CHECK(ehdr->e_shentsize == sizeof(Elf_Shdr)); + + shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); + +@@ -432,11 +467,11 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + } + + for (i = 0; i < shnum; i++) { +- IF_DEBUG(linker,debugBelch("%2d: ", i )); +- IF_DEBUG(linker,debugBelch("type=%2d ", (int)shdr[i].sh_type )); +- IF_DEBUG(linker,debugBelch("size=%4d ", (int)shdr[i].sh_size )); +- IF_DEBUG(linker,debugBelch("offs=%4d ", (int)shdr[i].sh_offset )); +- IF_DEBUG(linker,debugBelch(" (%p .. %p) ", ++ IF_DEBUG(linker_verbose,debugBelch("%2d: ", i )); ++ IF_DEBUG(linker_verbose,debugBelch("type=%2d ", (int)shdr[i].sh_type )); ++ IF_DEBUG(linker_verbose,debugBelch("size=%4d ", (int)shdr[i].sh_size )); ++ IF_DEBUG(linker_verbose,debugBelch("offs=%4d ", (int)shdr[i].sh_offset )); ++ IF_DEBUG(linker_verbose,debugBelch(" (%p .. %p) ", + ehdrC + shdr[i].sh_offset, + ehdrC + shdr[i].sh_offset + shdr[i].sh_size - 1)); + +@@ -446,7 +481,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + + case SHT_REL: + case SHT_RELA: +- IF_DEBUG(linker,debugBelch( shdr[i].sh_type == SHT_REL ? "Rel " : "RelA ")); ++ IF_DEBUG(linker_verbose,debugBelch( shdr[i].sh_type == SHT_REL ? "Rel " : "RelA ")); + + if (!SECTION_INDEX_VALID(shdr[i].sh_link)) { + if (shdr[i].sh_link == SHN_UNDEF) +@@ -474,7 +509,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + + break; + case SHT_SYMTAB: +- IF_DEBUG(linker,debugBelch("Sym ")); ++ IF_DEBUG(linker_verbose,debugBelch("Sym ")); + + if (!SECTION_INDEX_VALID(shdr[i].sh_link)) { + errorBelch("\n%s: symbol table section #%d has an invalid link field (%d)\n", +@@ -489,15 +524,15 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + return 0; + } + break; +- case SHT_STRTAB: IF_DEBUG(linker,debugBelch("Str ")); break; +- default: IF_DEBUG(linker,debugBelch(" ")); break; ++ case SHT_STRTAB: IF_DEBUG(linker_verbose,debugBelch("Str ")); break; ++ default: IF_DEBUG(linker_verbose,debugBelch(" ")); break; + } + if (sh_strtab) { +- IF_DEBUG(linker,debugBelch("sname=%s\n", sh_strtab + shdr[i].sh_name )); ++ IF_DEBUG(linker_verbose,debugBelch("sname=%s\n", sh_strtab + shdr[i].sh_name )); + } + } + +- IF_DEBUG(linker,debugBelch( "\nString tables\n" )); ++ IF_DEBUG(linker_verbose,debugBelch( "\nString tables\n" )); + nstrtab = 0; + for (i = 0; i < shnum; i++) { + if (shdr[i].sh_type == SHT_STRTAB +@@ -507,25 +542,25 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + debugging info. */ + && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8) + ) { +- IF_DEBUG(linker,debugBelch(" section %d is a normal string table\n", i )); ++ IF_DEBUG(linker_verbose,debugBelch(" section %d is a normal string table\n", i )); + nstrtab++; + } + } + if (nstrtab == 0) { +- IF_DEBUG(linker,debugBelch(" no normal string tables (potentially, but not necessarily a problem)\n")); ++ IF_DEBUG(linker_verbose,debugBelch(" no normal string tables (potentially, but not necessarily a problem)\n")); + } + #if defined(SHN_XINDEX) +- Elf_Word* shndxTable = get_shndx_table(ehdr); ++ Elf_Word* shndxTable = get_shndx_table(oc); + #endif + nsymtabs = 0; +- IF_DEBUG(linker,debugBelch( "Symbol tables\n" )); ++ IF_DEBUG(linker_verbose,debugBelch( "Symbol tables\n" )); + for (i = 0; i < shnum; i++) { + if (shdr[i].sh_type != SHT_SYMTAB) continue; +- IF_DEBUG(linker,debugBelch( "section %d is a symbol table\n", i )); ++ IF_DEBUG(linker_verbose,debugBelch( "section %d is a symbol table\n", i )); + nsymtabs++; + stab = (Elf_Sym*) (ehdrC + shdr[i].sh_offset); + nent = shdr[i].sh_size / sizeof(Elf_Sym); +- IF_DEBUG(linker,debugBelch( " number of entries is apparently %d (%ld rem)\n", ++ IF_DEBUG(linker_verbose,debugBelch( " number of entries is apparently %d (%ld rem)\n", + nent, + (long)shdr[i].sh_size % sizeof(Elf_Sym) + )); +@@ -538,38 +573,38 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + #if defined(SHN_XINDEX) + /* See Note [Many ELF Sections] */ + if (secno == SHN_XINDEX) { +- ASSERT(shndxTable); ++ CHECK(shndxTable); + secno = shndxTable[j]; + } + #endif +- IF_DEBUG(linker,debugBelch(" %2d ", j )); +- IF_DEBUG(linker,debugBelch(" sec=%-5d size=%-3d val=%5p ", ++ IF_DEBUG(linker_verbose,debugBelch(" %2d ", j )); ++ IF_DEBUG(linker_verbose,debugBelch(" sec=%-5d size=%-3d val=%5p ", + (int)secno, + (int)stab[j].st_size, + (char*)stab[j].st_value )); + +- IF_DEBUG(linker,debugBelch("type=" )); ++ IF_DEBUG(linker_verbose,debugBelch("type=" )); + switch (ELF_ST_TYPE(stab[j].st_info)) { +- case STT_NOTYPE: IF_DEBUG(linker,debugBelch("notype " )); break; +- case STT_OBJECT: IF_DEBUG(linker,debugBelch("object " )); break; +- case STT_FUNC : IF_DEBUG(linker,debugBelch("func " )); break; +- case STT_SECTION: IF_DEBUG(linker,debugBelch("section" )); break; +- case STT_FILE: IF_DEBUG(linker,debugBelch("file " )); break; +- default: IF_DEBUG(linker,debugBelch("? " )); break; ++ case STT_NOTYPE: IF_DEBUG(linker_verbose,debugBelch("notype " )); break; ++ case STT_OBJECT: IF_DEBUG(linker_verbose,debugBelch("object " )); break; ++ case STT_FUNC : IF_DEBUG(linker_verbose,debugBelch("func " )); break; ++ case STT_SECTION: IF_DEBUG(linker_verbose,debugBelch("section" )); break; ++ case STT_FILE: IF_DEBUG(linker_verbose,debugBelch("file " )); break; ++ default: IF_DEBUG(linker_verbose,debugBelch("? " )); break; + } +- IF_DEBUG(linker,debugBelch(" " )); ++ IF_DEBUG(linker_verbose,debugBelch(" " )); + +- IF_DEBUG(linker,debugBelch("bind=" )); ++ IF_DEBUG(linker_verbose,debugBelch("bind=" )); + switch (ELF_ST_BIND(stab[j].st_info)) { +- case STB_LOCAL : IF_DEBUG(linker,debugBelch("local " )); break; +- case STB_GLOBAL: IF_DEBUG(linker,debugBelch("global" )); break; +- case STB_WEAK : IF_DEBUG(linker,debugBelch("weak " )); break; +- default: IF_DEBUG(linker,debugBelch("? " )); break; ++ case STB_LOCAL : IF_DEBUG(linker_verbose,debugBelch("local " )); break; ++ case STB_GLOBAL: IF_DEBUG(linker_verbose,debugBelch("global" )); break; ++ case STB_WEAK : IF_DEBUG(linker_verbose,debugBelch("weak " )); break; ++ default: IF_DEBUG(linker_verbose,debugBelch("? " )); break; + } +- IF_DEBUG(linker,debugBelch(" " )); ++ IF_DEBUG(linker_verbose,debugBelch(" " )); + +- IF_DEBUG(linker,debugBelch("other=%2x ", stab[j].st_other )); +- IF_DEBUG(linker,debugBelch("name=%s [%x]\n", ++ IF_DEBUG(linker_verbose,debugBelch("other=%2x ", stab[j].st_other )); ++ IF_DEBUG(linker_verbose,debugBelch("name=%s [%x]\n", + ehdrC + shdr[shdr[i].sh_link].sh_offset + + stab[j].st_name, stab[j].st_name )); + } +@@ -579,7 +614,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) + // Not having a symbol table is not in principle a problem. + // When an object file has no symbols then the 'strip' program + // typically will remove the symbol table entirely. +- IF_DEBUG(linker,debugBelch(" no symbol tables (potentially, but not necessarily a problem)\n")); ++ IF_DEBUG(linker_verbose,debugBelch(" no symbol tables (potentially, but not necessarily a problem)\n")); + } + + return 1; +@@ -615,6 +650,13 @@ static SectionKind getSectionKind_ELF( Elf_Shdr *hdr, int *is_bss ) + /* .init_array section */ + return SECTIONKIND_INIT_ARRAY; + } ++#endif /* not SHT_INIT_ARRAY */ ++#if defined(SHT_FINI_ARRAY) ++ if (hdr->sh_type == SHT_FINI_ARRAY ++ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { ++ /* .fini_array section */ ++ return SECTIONKIND_FINI_ARRAY; ++ } + #endif /* not SHT_INIT_ARRAY */ + if (hdr->sh_type == SHT_NOBITS + && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { +@@ -638,7 +680,7 @@ mapObjectFileSection (int fd, Elf_Word offset, Elf_Word size, + + pageOffset = roundDownToPage(offset); + pageSize = roundUpToPage(offset-pageOffset+size); +- p = mmapForLinker(pageSize, PROT_READ | PROT_WRITE, 0, fd, pageOffset); ++ p = mmapForLinker(pageSize, MEM_READ_WRITE, 0, fd, pageOffset); + if (p == NULL) return NULL; + *mapped_size = pageSize; + *mapped_offset = pageOffset; +@@ -659,7 +701,7 @@ ocGetNames_ELF ( ObjectCode* oc ) + Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); + Section * sections; + #if defined(SHN_XINDEX) +- Elf_Word* shndxTable = get_shndx_table(ehdr); ++ Elf_Word* shndxTable = get_shndx_table(oc); + #endif + const Elf_Word shnum = elf_shnum(ehdr); + +@@ -691,12 +733,72 @@ ocGetNames_ELF ( ObjectCode* oc ) + StgWord size = shdr[i].sh_size; + StgWord offset = shdr[i].sh_offset; + StgWord align = shdr[i].sh_addralign; ++ const char *sh_name = oc->info->sectionHeaderStrtab + shdr[i].sh_name; ++ ++ /* ++ * Identify initializer and finalizer lists ++ * ++ * See Note [Initializers and finalizers (ELF)]. ++ */ ++ if (kind == SECTIONKIND_CODE_OR_RODATA ++ && 0 == memcmp(".init", sh_name, 5)) { ++ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_INIT, 0); ++ } else if (kind == SECTIONKIND_CODE_OR_RODATA ++ && 0 == memcmp(".fini", sh_name, 5)) { ++ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_FINI, 0); ++ } else if (kind == SECTIONKIND_INIT_ARRAY ++ || 0 == memcmp(".init_array", sh_name, 11)) { ++ uint32_t prio; ++ if (sscanf(sh_name, ".init_array.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ prio += 0x10000; // .init_arrays run after .ctors ++ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_INIT_ARRAY, prio); ++ kind = SECTIONKIND_INIT_ARRAY; ++ } else if (kind == SECTIONKIND_FINI_ARRAY ++ || 0 == memcmp(".fini_array", sh_name, 11)) { ++ uint32_t prio; ++ if (sscanf(sh_name, ".fini_array.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ prio += 0x10000; // .fini_arrays run before .dtors ++ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_FINI_ARRAY, prio); ++ kind = SECTIONKIND_FINI_ARRAY; ++ ++ /* N.B. a compilation unit may have more than one .ctor section; we ++ * must run them all. See #21618 for a case where this happened */ ++ } else if (0 == memcmp(".ctors", sh_name, 6)) { ++ uint32_t prio; ++ if (sscanf(sh_name, ".ctors.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ // .ctors/.dtors are executed in reverse order: higher numbers are ++ // executed first ++ prio = 0xffff - prio; ++ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_CTORS, prio); ++ kind = SECTIONKIND_INIT_ARRAY; ++ } else if (0 == memcmp(".dtors", sh_name, 6)) { ++ uint32_t prio; ++ if (sscanf(sh_name, ".dtors.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ // .ctors/.dtors are executed in reverse order: higher numbers are ++ // executed first ++ prio = 0xffff - prio; ++ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_DTORS, prio); ++ kind = SECTIONKIND_FINI_ARRAY; ++ } ++ + + if (is_bss && size > 0) { + /* This is a non-empty .bss section. Allocate zeroed space for + it, and set its .sh_offset field such that + ehdrC + .sh_offset == addr_of_zeroed_space. */ +-#if defined(NEED_GOT) || RTS_LINKER_USE_MMAP ++#if RTS_LINKER_USE_MMAP + if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { + /* The space for bss sections is already preallocated */ + CHECK(oc->bssBegin != NULL); +@@ -760,9 +862,9 @@ ocGetNames_ELF ( ObjectCode* oc ) + + void * mem = mmapAnonForLinker(size+stub_space); + +- if( mem == NULL ) { +- barf("failed to mmap allocated memory to load section %d. " +- "errno = %d", i, errno); ++ if( mem == MAP_FAILED ) { ++ barf("failed to mmap allocated memory to load section %d. " ++ "errno = %d", i, errno); + } + + /* copy only the image part over; we don't want to copy data +@@ -783,17 +885,19 @@ ocGetNames_ELF ( ObjectCode* oc ) + alloc = SECTION_NOMEM; + } + // use the m32 allocator if either the image is not mapped +- // (i.e. we cannot map the secions separately), or if the section ++ // (i.e. we cannot map the sections separately), or if the section + // size is small. + else if (!oc->imageMapped || size < getPageSize() / 3) { + bool executable = kind == SECTIONKIND_CODE_OR_RODATA; + m32_allocator *allocator = executable ? oc->rx_m32 : oc->rw_m32; +- // align on 16 bytes. The reason being that llvm will emit see +- // paddq statements for x86_64 under optimisation and load from +- // RODATA sections. Specifically .rodata.cst16. However we don't +- // handle the cst part in any way what so ever, so 16 seems +- // better than 8. +- start = m32_alloc(allocator, size, 16); ++ // Correctly align the section. This is particularly important for ++ // the alignment of .rodata.cstNN sections. ++ // ++ // llvm will emit see paddq statements for x86_64 under ++ // optimisation and load from RODATA sections, specifically ++ // .rodata.cst16. Also we may encounter .rodata.cst32 sections ++ // in objects using AVX instructions (see #23066). ++ start = m32_alloc(allocator, size, align); + if (start == NULL) goto fail; + memcpy(start, oc->image + offset, size); + alloc = SECTION_M32; +@@ -829,13 +933,9 @@ ocGetNames_ELF ( ObjectCode* oc ) + oc->sections[i].info->stub_size = 0; + oc->sections[i].info->stubs = NULL; + } +- oc->sections[i].info->name = oc->info->sectionHeaderStrtab +- + shdr[i].sh_name; ++ oc->sections[i].info->name = sh_name; + oc->sections[i].info->sectionHeader = &shdr[i]; + +- +- +- + if (shdr[i].sh_type != SHT_SYMTAB) continue; + + /* copy stuff into this module's object symbol table */ +@@ -899,7 +999,7 @@ ocGetNames_ELF ( ObjectCode* oc ) + secno = shndx; + #if defined(SHN_XINDEX) + if (shndx == SHN_XINDEX) { +- ASSERT(shndxTable); ++ CHECK(shndxTable); + secno = shndxTable[j]; + } + #endif +@@ -908,15 +1008,15 @@ ocGetNames_ELF ( ObjectCode* oc ) + + if (shndx == SHN_COMMON) { + isLocal = false; +- ASSERT(common_used < common_size); +- ASSERT(common_mem); ++ CHECK(common_used < common_size); ++ CHECK(common_mem); + symbol->addr = (void*)((uintptr_t)common_mem + common_used); + common_used += symbol->elf_sym->st_size; +- ASSERT(common_used <= common_size); ++ CHECK(common_used <= common_size); + +- IF_DEBUG(linker, +- debugBelch("COMMON symbol, size %ld name %s allocated at %p\n", +- symbol->elf_sym->st_size, nm, symbol->addr)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("COMMON symbol, size %llu name %s allocated at %p\n", ++ (long long unsigned int) symbol->elf_sym->st_size, nm, symbol->addr)); + + /* Pointless to do addProddableBlock() for this area, + since the linker should never poke around in it. */ +@@ -941,7 +1041,7 @@ ocGetNames_ELF ( ObjectCode* oc ) + ) + ) { + /* Section 0 is the undefined section, hence > and not >=. */ +- ASSERT(secno > 0 && secno < shnum); ++ CHECK(secno > 0 && secno < shnum); + /* + if (shdr[secno].sh_type == SHT_NOBITS) { + debugBelch(" BSS symbol, size %d off %d name %s\n", +@@ -951,12 +1051,12 @@ ocGetNames_ELF ( ObjectCode* oc ) + symbol->addr = (SymbolAddr*)( + (intptr_t) oc->sections[secno].start + + (intptr_t) symbol->elf_sym->st_value); +- ASSERT(symbol->addr != 0x0); ++ CHECK(symbol->addr != 0x0); + if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL) { + isLocal = true; + isWeak = false; + } else { /* STB_GLOBAL or STB_WEAK */ +- IF_DEBUG(linker, ++ IF_DEBUG(linker_verbose, + debugBelch("addOTabName(GLOB): %10p %s %s\n", + symbol->addr, oc->fileName, nm)); + isLocal = false; +@@ -965,10 +1065,20 @@ ocGetNames_ELF ( ObjectCode* oc ) + } + } + ++ SymType sym_type; ++ if (ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_FUNC) { ++ sym_type = SYM_TYPE_CODE; ++ } else { ++ sym_type = SYM_TYPE_DATA; ++ } ++ if(ELF_ST_VISIBILITY(symbol->elf_sym->st_other) == STV_HIDDEN) { ++ sym_type |= SYM_TYPE_HIDDEN; ++ } ++ + /* And the decision is ... */ + + if (symbol->addr != NULL) { +- ASSERT(nm != NULL); ++ CHECK(nm != NULL); + /* Acquire! */ + if (!isLocal) { + +@@ -976,18 +1086,18 @@ ocGetNames_ELF ( ObjectCode* oc ) + setWeakSymbol(oc, nm); + } + if (!ghciInsertSymbolTable(oc->fileName, symhash, +- nm, symbol->addr, +- isWeak | ((ELF_ST_VISIBILITY(symbol->elf_sym->st_other) == STV_HIDDEN) << 1), +- oc) ++ nm, symbol->addr, isWeak, sym_type, oc) + ) { + goto fail; + } +- oc->symbols[curSymbol++].name = nm; ++ oc->symbols[curSymbol].name = nm; + oc->symbols[curSymbol].addr = symbol->addr; ++ oc->symbols[curSymbol].type = sym_type; ++ curSymbol++; + } + } else { + /* Skip. */ +- IF_DEBUG(linker, ++ IF_DEBUG(linker_verbose, + debugBelch("skipping `%s'\n", + nm) + ); +@@ -1006,13 +1116,11 @@ ocGetNames_ELF ( ObjectCode* oc ) + } + } + +-#if defined(NEED_GOT) + if(makeGot( oc )) + errorBelch("Failed to create GOT for %s", + oc->archiveMemberName + ? oc->archiveMemberName + : oc->fileName); +-#endif + result = 1; + goto end; + +@@ -1052,16 +1160,16 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + break; + } + } +- ASSERT(stab != NULL); ++ CHECK(stab != NULL); + + targ = (Elf_Word*)oc->sections[target_shndx].start; +- IF_DEBUG(linker,debugBelch( ++ IF_DEBUG(linker_verbose,debugBelch( + "relocations for section %d using symtab %d\n", + target_shndx, symtab_shndx)); + + /* Skip sections that we're not interested in. */ + if (oc->sections[target_shndx].kind == SECTIONKIND_OTHER) { +- IF_DEBUG(linker,debugBelch( "skipping (target section not loaded)")); ++ IF_DEBUG(linker_verbose,debugBelch( "skipping (target section not loaded)")); + return 1; + } + +@@ -1101,10 +1209,10 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + + ElfSymbol * symbol = NULL; + +- IF_DEBUG(linker,debugBelch( "Rel entry %3d is raw(%6p %6p): ", ++ IF_DEBUG(linker_verbose,debugBelch( "Rel entry %3d is raw(%6p %6p): ", + j, (void*)offset, (void*)info )); + if (!info) { +- IF_DEBUG(linker,debugBelch( " ZERO" )); ++ IF_DEBUG(linker_verbose,debugBelch( " ZERO" )); + S = 0; + } else { + symbol = &stab->symbols[ELF_R_SYM(info)]; +@@ -1112,7 +1220,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL || strncmp(symbol->name, "_GLOBAL_OFFSET_TABLE_", 21) == 0) { + S = (Elf_Addr)symbol->addr; + } else { +- S_tmp = lookupDependentSymbol( symbol->name, oc ); ++ S_tmp = lookupDependentSymbol( symbol->name, oc, NULL ); + S = (Elf_Addr)S_tmp; + } + if (!S) { +@@ -1120,7 +1228,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + oc->fileName, symbol->name); + return 0; + } +- IF_DEBUG(linker,debugBelch( "`%s' resolves to %p\n", symbol->name, ++ IF_DEBUG(linker_verbose,debugBelch( "`%s' resolves to %p\n", symbol->name, + (void*)S )); + + #if defined(arm_HOST_ARCH) +@@ -1159,9 +1267,14 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + } + + int reloc_type = ELF_R_TYPE(info); +- IF_DEBUG(linker,debugBelch("Reloc: P = %p S = %p A = %p type=%d\n", +- (void*)P, (void*)S, (void*)A, reloc_type )); ++ IF_DEBUG(linker_verbose, ++ debugBelch("Reloc: P = %p S = %p A = %p type=%d\n", ++ (void*)P, (void*)S, (void*)A, reloc_type )); ++#if defined(DEBUG) + checkProddableBlock ( oc, pP, sizeof(Elf_Word) ); ++#else ++ (void) pP; /* suppress unused varialbe warning in non-debug build */ ++#endif + + #if defined(i386_HOST_ARCH) + value = S + A; +@@ -1233,6 +1346,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + + if(needs_veneer) { /* overflow or thum interworking */ + // Note [PC bias] ++ // ~~~~~~~~~~~~~~ + // From the ELF for the ARM Architecture documentation: + // > 4.6.1.1 Addends and PC-bias compensation + // > A binary file may use REL or RELA relocations or a mixture +@@ -1258,7 +1372,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + result = ((S + A) | T) - P; + result &= ~1; // Clear thumb indicator bit + +- ASSERT(isInt(26, result)); /* X in range */ ++ CHECK(isInt(26, result)); /* X in range */ + } + + // Update the branch target +@@ -1273,7 +1387,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + const StgWord32 hBit = (result & 0x2) >> 1; + // Change instruction to BLX + *word = (*word & ~0xFF000000) | ((0xfa | hBit) << 24); +- IF_DEBUG(linker, debugBelch("Changed BL to BLX at %p\n", word)); ++ IF_DEBUG(linker_verbose, debugBelch("Changed BL to BLX at %p\n", word)); + } + break; + } +@@ -1433,7 +1547,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + case COMPAT_R_ARM_GOT_PREL: { + int32_t A = *pP; + void* GOT_S = symbol->got_addr; +- ASSERT(GOT_S); ++ CHECK(GOT_S); + *(uint32_t *)P = (uint32_t) GOT_S + A - P; + break; + } +@@ -1449,8 +1563,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, + return 1; + } + +-/* Do ELF relocations for which explicit addends are supplied. +- sparc-solaris relocations appear to be of this form. */ ++/* Do ELF relocations for which explicit addends are supplied. */ + static int + do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, + Elf_Shdr* shdr, int shnum ) +@@ -1465,10 +1578,9 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, + int strtab_shndx = shdr[symtab_shndx].sh_link; + int target_shndx = shdr[shnum].sh_info; + #if defined(SHN_XINDEX) +- Elf_Word* shndx_table = get_shndx_table((Elf_Ehdr*)ehdrC); ++ Elf_Word* shndx_table = get_shndx_table(oc); + #endif +-#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ +- || defined(x86_64_HOST_ARCH) ++#if defined(DEBUG) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) + /* This #if def only serves to avoid unused-var warnings. */ + Elf_Addr targ = (Elf_Addr) oc->sections[target_shndx].start; + #endif +@@ -1476,49 +1588,75 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, + stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset); + strtab= (char*) (ehdrC + shdr[ strtab_shndx ].sh_offset); + +- IF_DEBUG(linker,debugBelch( "relocations for section %d using symtab %d\n", ++ IF_DEBUG(linker_verbose,debugBelch( "relocations for section %d using symtab %d\n", + target_shndx, symtab_shndx )); + + /* Skip sections that we're not interested in. */ + if (oc->sections[target_shndx].kind == SECTIONKIND_OTHER) { +- IF_DEBUG(linker,debugBelch( "skipping (target section not loaded)")); ++ IF_DEBUG(linker_verbose,debugBelch( "skipping (target section not loaded)")); + return 1; + } + + for (j = 0; j < nent; j++) { +-#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ +- || defined(x86_64_HOST_ARCH) ++#if defined(DEBUG) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) + /* This #if def only serves to avoid unused-var warnings. */ + Elf_Addr offset = rtab[j].r_offset; + Elf_Addr P = targ + offset; + Elf_Addr A = rtab[j].r_addend; + #endif +-#if defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ +- || defined(x86_64_HOST_ARCH) ++#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) + Elf_Addr value; + #endif + Elf_Addr info = rtab[j].r_info; + Elf_Addr S; + void* S_tmp; +-# if defined(sparc_HOST_ARCH) +- Elf_Word* pP = (Elf_Word*)P; +- Elf_Word w1, w2; +-# elif defined(powerpc_HOST_ARCH) ++# if defined(powerpc_HOST_ARCH) + Elf_Sword delta; + # endif + +- IF_DEBUG(linker,debugBelch( "Rel entry %3d is raw(%6p %6p %6p) ", ++ IF_DEBUG(linker_verbose,debugBelch( "Rel entry %3d is raw(%6p %6p %6p) ", + j, (void*)offset, (void*)info, + (void*)A )); + if (!info) { +- IF_DEBUG(linker,debugBelch( " ZERO" )); ++ IF_DEBUG(linker_verbose,debugBelch( " ZERO" )); + S = 0; + } else { + Elf_Sym sym = stab[ELF_R_SYM(info)]; +- /* First see if it is a local symbol. */ +- if (ELF_ST_BIND(sym.st_info) == STB_LOCAL) { +- /* Yes, so we can get the address directly from the ELF symbol +- table. */ ++ if (ELF_R_TYPE(info) == COMPAT_R_X86_64_TLSGD) { ++ /* ++ * No support for TLSGD variables *defined* by the object, ++ * only references to *external* TLS variables in already ++ * loaded shared objects (the executable, libc, ...) are ++ * supported. See Note [TLSGD relocation] in elf_tlsgd.c. ++ */ ++ symbol = sym.st_name == 0 ? "(noname)" : strtab+sym.st_name; ++ if (ELF_ST_BIND(sym.st_info) == STB_LOCAL ++ || sym.st_value != 0 || sym.st_name == 0) { ++ errorBelch("%s: unsupported internal ELF TLSGD relocation for" ++ " symbol `%s'", oc->fileName, symbol); ++ return 0; ++ } ++#if defined(x86_64_HOST_ARCH) && defined(freebsd_HOST_OS) ++ S = lookupTlsgdSymbol(symbol, ELF_R_SYM(info), oc); ++#else ++ errorBelch("%s: ELF TLSGD relocation for symbol `%s'" ++ " not supported on the target platform", ++ oc->fileName, symbol); ++ return 0; ++#endif ++ } else if (ELF_ST_BIND(sym.st_info) == STB_LOCAL) { ++ /* ++ * For local symbols, we can get the address directly from the ELF ++ * symbol table. ++ * ++ * XXX: Is STB_LOCAL the right test here? Should we instead be ++ * checking whether the symbol is *defined* by the current object? ++ * Defined globals also need relocation. Perhaps the point is that ++ * conflicts are resolved in favour of any prior definition, so we ++ * must look at the accumulated symbol table instead (which has ++ * already been updated with our global symbols by the time we get ++ * here). ++ */ + symbol = sym.st_name==0 ? "(noname)" : strtab+sym.st_name; + /* See Note [Many ELF Sections] */ + Elf_Word secno = sym.st_shndx; +@@ -1530,78 +1668,30 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, + S = (Elf_Addr)oc->sections[secno].start + + stab[ELF_R_SYM(info)].st_value; + } else { +- /* No, so look up the name in our global table. */ ++ /* If not local, look up the name in our global table. */ + symbol = strtab + sym.st_name; +- S_tmp = lookupDependentSymbol( symbol, oc ); ++ S_tmp = lookupDependentSymbol( symbol, oc, NULL ); + S = (Elf_Addr)S_tmp; + } + if (!S) { + errorBelch("%s: unknown symbol `%s'", oc->fileName, symbol); + return 0; + } +- IF_DEBUG(linker,debugBelch("`%s' resolves to %p\n", symbol, (void*)S)); ++ IF_DEBUG(linker_verbose,debugBelch("`%s' resolves to %p\n", symbol, (void*)S)); + } + +-#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ +- || defined(x86_64_HOST_ARCH) +- IF_DEBUG(linker,debugBelch("Reloc: P = %p S = %p A = %p\n", +- (void*)P, (void*)S, (void*)A )); ++#if defined(DEBUG) ++ IF_DEBUG(linker_verbose,debugBelch("Reloc: P = %p S = %p A = %p\n", ++ (void*)P, (void*)S, (void*)A )); + checkProddableBlock(oc, (void*)P, sizeof(Elf_Word)); + #endif + +-#if defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ +- || defined(x86_64_HOST_ARCH) ++#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) + value = S + A; + #endif + + switch (ELF_R_TYPE(info)) { +-# if defined(sparc_HOST_ARCH) +- case R_SPARC_WDISP30: +- w1 = *pP & 0xC0000000; +- w2 = (Elf_Word)((value - P) >> 2); +- ASSERT((w2 & 0xC0000000) == 0); +- w1 |= w2; +- *pP = w1; +- break; +- case R_SPARC_HI22: +- w1 = *pP & 0xFFC00000; +- w2 = (Elf_Word)(value >> 10); +- ASSERT((w2 & 0xFFC00000) == 0); +- w1 |= w2; +- *pP = w1; +- break; +- case R_SPARC_LO10: +- w1 = *pP & ~0x3FF; +- w2 = (Elf_Word)(value & 0x3FF); +- ASSERT((w2 & ~0x3FF) == 0); +- w1 |= w2; +- *pP = w1; +- break; +- +- /* According to the Sun documentation: +- R_SPARC_UA32 +- This relocation type resembles R_SPARC_32, except it refers to an +- unaligned word. That is, the word to be relocated must be treated +- as four separate bytes with arbitrary alignment, not as a word +- aligned according to the architecture requirements. +- */ +- case R_SPARC_UA32: +- w2 = (Elf_Word)value; +- +- // SPARC doesn't do misaligned writes of 32 bit words, +- // so we have to do this one byte-at-a-time. +- char *pPc = (char*)pP; +- pPc[0] = (char) ((Elf_Word)(w2 & 0xff000000) >> 24); +- pPc[1] = (char) ((Elf_Word)(w2 & 0x00ff0000) >> 16); +- pPc[2] = (char) ((Elf_Word)(w2 & 0x0000ff00) >> 8); +- pPc[3] = (char) ((Elf_Word)(w2 & 0x000000ff)); +- break; +- +- case R_SPARC_32: +- w2 = (Elf_Word)value; +- *pP = w2; +- break; +-# elif defined(powerpc_HOST_ARCH) ++# if defined(powerpc_HOST_ARCH) + case R_PPC_ADDR16_LO: + *(Elf32_Half*) P = value; + break; +@@ -1753,6 +1843,19 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, + memcpy((void*)P, &payload, sizeof(payload)); + break; + } ++ case COMPAT_R_X86_64_TLSGD: ++ { ++ StgInt64 off = S + A - P; ++ if (off != (Elf64_Sword)off) { ++ barf( ++ "COMPAT_R_X86_64_TLSGD relocation out of range: " ++ "%s = %" PRIx64 " in %s.", ++ symbol, off, oc->fileName); ++ } ++ Elf64_Sword payload = off; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } + #if defined(dragonfly_HOST_OS) + case COMPAT_R_X86_64_GOTTPOFF: + { +@@ -1820,7 +1923,7 @@ ocMprotect_Elf( ObjectCode *oc ) + if (section->alloc != SECTION_M32) { + // N.B. m32 handles protection of its allocations during + // flushing. +- mmapForLinkerMarkExecutable(section->mapped_start, section->mapped_size); ++ mprotectForLinker(section->mapped_start, section->mapped_size, MEM_READ_EXECUTE); + } + break; + default: +@@ -1840,7 +1943,7 @@ ocResolve_ELF ( ObjectCode* oc ) + const Elf_Word shnum = elf_shnum(ehdr); + + #if defined(SHN_XINDEX) +- Elf_Word* shndxTable = get_shndx_table(ehdr); ++ Elf_Word* shndxTable = get_shndx_table(oc); + #endif + + /* resolve section symbols +@@ -1873,25 +1976,23 @@ ocResolve_ELF ( ObjectCode* oc ) + Elf_Word secno = symbol->elf_sym->st_shndx; + #if defined(SHN_XINDEX) + if (secno == SHN_XINDEX) { +- ASSERT(shndxTable); ++ CHECK(shndxTable); + secno = shndxTable[i]; + } + #endif +- ASSERT(symbol->elf_sym->st_name == 0); +- ASSERT(symbol->elf_sym->st_value == 0); +- ASSERT(0x0 != oc->sections[ secno ].start); ++ CHECK(symbol->elf_sym->st_name == 0); ++ CHECK(symbol->elf_sym->st_value == 0); ++ CHECK(0x0 != oc->sections[ secno ].start); + symbol->addr = oc->sections[ secno ].start; + } + } + } + +-#if defined(NEED_GOT) + if(fillGot( oc )) + return 0; + /* silence warnings */ + (void) shnum; + (void) shdr; +-#endif /* NEED_GOT */ + + #if defined(aarch64_HOST_ARCH) + /* use new relocation design */ +@@ -1921,61 +2022,209 @@ ocResolve_ELF ( ObjectCode* oc ) + return ocMprotect_Elf(oc); + } + ++/* ++ * Note [Initializers and finalizers (ELF)] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * The System V ABI describes a facility for allowing object code to mark ++ * functions to be run at load time. These functions are known as ++ * "initializers" (or "constructors"). Initializers are recorded in a section ++ * marked with the DT_INIT tag (often with the name `.init`). ++ * ++ * There is also a similar mechanism for code to be run at unload time (e.g. ++ * during program termination). These are known as finalizers and are collected ++ * in `.fini` section. ++ * ++ * For more about how the code generator emits initializers and finalizers see ++ * Note [Initializers and finalizers in Cmm] in GHC.Cmm.InitFini. ++ * ++ * See also: the "Initialization and Termination Functions" section of the ++ * System V ABI. ++ * ++ * Note [GCC 6 init/fini section workaround] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * The System V ABI specifies that .init_array and .fini_array sections should ++ * be marked with the SHT_INIT_ARRAY/SHT_FINI_ARRAY section types. However, it ++ * seems that GCC 6 (at least on i386) produces sections *named* ++ * .init_array/.fini_array but marks them as SHT_PROGBITS. Consequently we need ++ * to augment the usual section type check (which in an ideal world would be ++ * sufficient) with a check looking at the section name to catch this case. ++ */ ++ ++// Run the constructors/initializers of an ObjectCode. ++// Returns 1 on success. ++// See Note [Initializers and finalizers (ELF)]. + int ocRunInit_ELF( ObjectCode *oc ) + { +- Elf_Word i; +- char* ehdrC = (char*)(oc->image); +- Elf_Ehdr* ehdr = (Elf_Ehdr*) ehdrC; +- Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); +- char* sh_strtab = ehdrC + shdr[elf_shstrndx(ehdr)].sh_offset; +- int argc, envc; +- char **argv, **envv; +- +- getProgArgv(&argc, &argv); +- getProgEnvv(&envc, &envv); +- +- // XXX Apparently in some archs .init may be something +- // special! See DL_DT_INIT_ADDRESS macro in glibc +- // as well as ELF_FUNCTION_PTR_IS_SPECIAL. We've not handled +- // it here, please file a bug report if it affects you. +- for (i = 0; i < elf_shnum(ehdr); i++) { +- init_t *init_start, *init_end, *init; +- int is_bss = false; +- SectionKind kind = getSectionKind_ELF(&shdr[i], &is_bss); +- if (kind == SECTIONKIND_CODE_OR_RODATA +- && 0 == memcmp(".init", sh_strtab + shdr[i].sh_name, 5)) { +- init_t init_f = (init_t)(oc->sections[i].start); +- init_f(argc, argv, envv); +- } ++ if (oc && oc->info && oc->info->init) { ++ return runInit(&oc->info->init); ++ } ++ return true; ++} + +- if (kind == SECTIONKIND_INIT_ARRAY) { +- char *init_startC = oc->sections[i].start; +- init_start = (init_t*)init_startC; +- init_end = (init_t*)(init_startC + shdr[i].sh_size); +- for (init = init_start; init < init_end; init++) { +- ASSERT(0x0 != *init); +- (*init)(argc, argv, envv); +- } +- } ++// Run the finalizers of an ObjectCode. ++// Returns 1 on success. ++// See Note [Initializers and finalizers (ELF)]. ++int ocRunFini_ELF( ObjectCode *oc ) ++{ ++ if (oc && oc->info && oc->info->fini) { ++ return runFini(&oc->info->fini); ++ } ++ return true; ++} + +- // XXX could be more strict and assert that it's +- // SECTIONKIND_RWDATA; but allowing RODATA seems harmless enough. +- if ((kind == SECTIONKIND_RWDATA || kind == SECTIONKIND_CODE_OR_RODATA) +- && 0 == memcmp(".ctors", sh_strtab + shdr[i].sh_name, 6)) { +- char *init_startC = oc->sections[i].start; +- init_start = (init_t*)init_startC; +- init_end = (init_t*)(init_startC + shdr[i].sh_size); +- // ctors run in reverse +- for (init = init_end - 1; init >= init_start; init--) { +- (*init)(argc, argv, envv); +- } ++/* ++ * Shared object loading ++ */ ++ ++#if defined(HAVE_DLINFO) ++struct piterate_cb_info { ++ ObjectCode *nc; ++ void *l_addr; /* base virtual address of the loaded code */ ++}; ++ ++static int loadNativeObjCb_(struct dl_phdr_info *info, ++ size_t _size STG_UNUSED, void *data) { ++ struct piterate_cb_info *s = (struct piterate_cb_info *) data; ++ ++ // This logic mimicks _dl_addr_inside_object from glibc ++ // For reference: ++ // int ++ // internal_function ++ // _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) ++ // { ++ // int n = l->l_phnum; ++ // const ElfW(Addr) reladdr = addr - l->l_addr; ++ // ++ // while (--n >= 0) ++ // if (l->l_phdr[n].p_type == PT_LOAD ++ // && reladdr - l->l_phdr[n].p_vaddr >= 0 ++ // && reladdr - l->l_phdr[n].p_vaddr < l->l_phdr[n].p_memsz) ++ // return 1; ++ // return 0; ++ // } ++ ++ if ((void*) info->dlpi_addr == s->l_addr) { ++ int n = info->dlpi_phnum; ++ while (--n >= 0) { ++ if (info->dlpi_phdr[n].p_type == PT_LOAD) { ++ NativeCodeRange* ncr = ++ stgMallocBytes(sizeof(NativeCodeRange), "loadNativeObjCb_"); ++ ncr->start = (void*) ((char*) s->l_addr + info->dlpi_phdr[n].p_vaddr); ++ ncr->end = (void*) ((char*) ncr->start + info->dlpi_phdr[n].p_memsz); ++ ++ ncr->next = s->nc->nc_ranges; ++ s->nc->nc_ranges = ncr; + } ++ } ++ } ++ return 0; ++} ++#endif /* defined(HAVE_DLINFO) */ ++ ++static void copyErrmsg(char** errmsg_dest, char* errmsg) { ++ if (errmsg == NULL) errmsg = "loadNativeObj_ELF: unknown error"; ++ *errmsg_dest = stgMallocBytes(strlen(errmsg)+1, "loadNativeObj_ELF"); ++ strcpy(*errmsg_dest, errmsg); ++} ++ ++// need dl_mutex ++void freeNativeCode_ELF (ObjectCode *nc) { ++ dlclose(nc->dlopen_handle); ++ ++ NativeCodeRange *ncr = nc->nc_ranges; ++ while (ncr) { ++ NativeCodeRange* last_ncr = ncr; ++ ncr = ncr->next; ++ stgFree(last_ncr); ++ } ++} ++ ++void * loadNativeObj_ELF (pathchar *path, char **errmsg) ++{ ++ ObjectCode* nc; ++ void *hdl, *retval; ++ ++ IF_DEBUG(linker, debugBelch("loadNativeObj_ELF %" PATH_FMT "\n", path)); ++ ++ retval = NULL; ++ ACQUIRE_LOCK(&dl_mutex); ++ ++ /* Loading the same object multiple times will lead to chaos ++ * as we will have two ObjectCodes but one underlying dlopen ++ * handle. Fail if this happens. ++ */ ++ if (getObjectLoadStatus_(path) != OBJECT_NOT_LOADED) { ++ copyErrmsg(errmsg, "loadNativeObj_ELF: Already loaded"); ++ goto dlopen_fail; + } + +- freeProgEnvv(envc, envv); +- return 1; ++ nc = mkOc(DYNAMIC_OBJECT, path, NULL, 0, false, NULL, 0); ++ ++ foreignExportsLoadingObject(nc); ++ hdl = dlopen(path, RTLD_NOW|RTLD_LOCAL); ++ nc->dlopen_handle = hdl; ++ foreignExportsFinishedLoadingObject(); ++ if (hdl == NULL) { ++ /* dlopen failed; save the message in errmsg */ ++ copyErrmsg(errmsg, dlerror()); ++ goto dlopen_fail; ++ } ++ ++#if defined(HAVE_DLINFO) ++ struct link_map *map; ++ if (dlinfo(hdl, RTLD_DI_LINKMAP, &map) == -1) { ++ /* dlinfo failed; save the message in errmsg */ ++ copyErrmsg(errmsg, dlerror()); ++ goto dlinfo_fail; ++ } ++ ++ hdl = NULL; // pass handle ownership to nc ++ ++ struct piterate_cb_info piterate_info = { ++ .nc = nc, ++ .l_addr = (void *) map->l_addr ++ }; ++ dl_iterate_phdr(loadNativeObjCb_, &piterate_info); ++ if (!nc->nc_ranges) { ++ copyErrmsg(errmsg, "dl_iterate_phdr failed to find obj"); ++ goto dl_iterate_phdr_fail; ++ } ++ nc->unloadable = true; ++#else ++ nc->nc_ranges = NULL; ++ nc->unloadable = false; ++#endif /* defined (HAVE_DLINFO) */ ++ ++ insertOCSectionIndices(nc); ++ ++ nc->next_loaded_object = loaded_objects; ++ loaded_objects = nc; ++ ++ retval = nc->dlopen_handle; ++ ++#if defined(PROFILING) ++ // collect any new cost centres that were defined in the loaded object. ++ refreshProfilingCCSs(); ++#endif ++ ++ goto success; ++ ++dl_iterate_phdr_fail: ++ // already have dl_mutex ++ freeNativeCode_ELF(nc); ++dlinfo_fail: ++ if (hdl) dlclose(hdl); ++dlopen_fail: ++success: ++ ++ RELEASE_LOCK(&dl_mutex); ++ ++ IF_DEBUG(linker, debugBelch("loadNativeObj_ELF result=%p\n", retval)); ++ ++ return retval; + } + ++ + /* + * PowerPC & X86_64 ELF specifics + */ +diff --git a/rts/linker/Elf.c.orig b/rts/linker/Elf.c.orig +new file mode 100644 +index 0000000..f668cfe +--- /dev/null ++++ b/rts/linker/Elf.c.orig +@@ -0,0 +1,2274 @@ ++#include "Rts.h" ++ ++#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) \ ++|| defined(linux_android_HOST_OS) \ ++|| defined(freebsd_HOST_OS) || defined(kfreebsdgnu_HOST_OS) \ ++|| defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) \ ++|| defined(openbsd_HOST_OS) || defined(gnu_HOST_OS) ++ ++// It is essential that this is included before any is included. ++// defines R_XXX relocations, which would interfere with the COMPAT_R_XXX ++// relocations we generate. E.g. COMPAT_ ## R_ARM_ARM32 would end up as ++// const unsigned COMPAT_3 = 0x03; instead of ++// const unsigned COMPAT_R_ARM_ARM32 = 0x03; ++#include "elf_compat.h" ++ ++#include "RtsUtils.h" ++#include "RtsSymbolInfo.h" ++#include "CheckUnload.h" ++#include "LinkerInternals.h" ++#include "linker/MMap.h" ++#include "linker/Elf.h" ++#include "linker/CacheFlush.h" ++#include "linker/M32Alloc.h" ++#include "linker/SymbolExtras.h" ++#include "ForeignExports.h" ++#include "Profiling.h" ++#include "sm/OSMem.h" ++#include "linker/util.h" ++#include "linker/elf_util.h" ++ ++#include ++#include ++#include ++#include ++#if defined(HAVE_DLFCN_H) ++#include ++#endif ++#if defined(HAVE_SYS_STAT_H) ++#include ++#endif ++#if defined(HAVE_SYS_TYPES_H) ++#include ++#endif ++#if defined(HAVE_FCNTL_H) ++#include ++#endif ++#if defined(dragonfly_HOST_OS) ++#include ++#endif ++ ++/* on x86_64 we have a problem with relocating symbol references in ++ * code that was compiled without -fPIC. By default, the small memory ++ * model is used, which assumes that symbol references can fit in a ++ * 32-bit slot. The system dynamic linker makes this work for ++ * references to shared libraries by either (a) allocating a jump ++ * table slot for code references, or (b) moving the symbol at load ++ * time (and copying its contents, if necessary) for data references. ++ * ++ * We unfortunately can't tell whether symbol references are to code ++ * or data. So for now we assume they are code (the vast majority ++ * are), and allocate jump-table slots. Unfortunately this will ++ * SILENTLY generate crashing code for data references. This hack is ++ * enabled by X86_64_ELF_NONPIC_HACK. ++ * ++ * One workaround is to use shared Haskell libraries. This is the case ++ * when dynamically-linked GHCi is used. ++ * ++ * Another workaround is to keep the static libraries but compile them ++ * with -fPIC -fexternal-dynamic-refs, because that will generate PIC ++ * references to data which can be relocated. This is the case when ++ * +RTS -xp is passed. ++ * ++ * See bug #781 ++ * See thread http://www.haskell.org/pipermail/cvs-ghc/2007-September/038458.html ++ * ++ * Naming Scheme for Symbol Macros ++ * ++ * SymI_*: symbol is internal to the RTS. It resides in an object ++ * file/library that is statically. ++ * SymE_*: symbol is external to the RTS library. It might be linked ++ * dynamically. ++ * ++ * Sym*_HasProto : the symbol prototype is imported in an include file ++ * or defined explicitly ++ * Sym*_NeedsProto: the symbol is undefined and we add a dummy ++ * default proto extern void sym(void); ++ */ ++#define X86_64_ELF_NONPIC_HACK (!RtsFlags.MiscFlags.linkerAlwaysPic) ++ ++#if defined(i386_HOST_ARCH) ++# define ELF_TARGET_386 /* Used inside */ ++#elif defined(x86_64_HOST_ARCH) ++# define ELF_TARGET_X64_64 ++# define ELF_TARGET_AMD64 /* Used inside on Solaris 11 */ ++#endif ++ ++#if !defined(openbsd_HOST_OS) ++# include ++#else ++/* openbsd elf has things in different places, with diff names */ ++# include ++#endif ++ ++#include "elf_got.h" ++ ++#if defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH) ++# define NEED_PLT ++# include "elf_plt.h" ++# include "elf_reloc.h" ++#endif ++ ++/* ++ Note [Many ELF Sections] ++ ~~~~~~~~~~~~~~~~~~~~~~~~ ++ The normal section number fields in ELF are limited to 16 bits, which runs ++ out of bits when you try to cram in more sections than that. ++ ++ To solve this, the fields e_shnum and e_shstrndx in the ELF header have an ++ escape value (different for each case), and the actual section number is ++ stashed into unused fields in the first section header. ++ ++ For symbols, there seems to have been no place in the actual symbol table ++ for the extra bits, so the indexes have been moved into an auxiliary ++ section instead. ++ For symbols in sections beyond 0xff00, the symbol's st_shndx will be an ++ escape value (SHN_XINDEX), and the actual 32-bit section number for symbol N ++ is stored at index N in the SHT_SYMTAB_SHNDX table. ++ ++ These extensions seem to be undocumented in version 4.1 of the ABI and only ++ appear in the drafts for the "next" version: ++ https://refspecs.linuxfoundation.org/elf/gabi4+/contents.html ++ ++*/ ++ ++#if defined(SHN_XINDEX) ++/* global variable which address is used to signal an uninitialised shndx_table */ ++Elf_Word shndx_table_uninit_label = 0; ++#endif ++ ++static Elf_Word elf_shnum(Elf_Ehdr* ehdr) ++{ ++ Elf_Shdr* shdr = (Elf_Shdr*) ((char*)ehdr + ehdr->e_shoff); ++ Elf_Half shnum = ehdr->e_shnum; ++ return shnum != SHN_UNDEF ? shnum : shdr[0].sh_size; ++} ++ ++static Elf_Word elf_shstrndx(Elf_Ehdr* ehdr) ++{ ++ Elf_Half shstrndx = ehdr->e_shstrndx; ++#if defined(SHN_XINDEX) ++ Elf_Shdr* shdr = (Elf_Shdr*) ((char*)ehdr + ehdr->e_shoff); ++ return shstrndx != SHN_XINDEX ? shstrndx : shdr[0].sh_link; ++#else ++ // some OSes do not support SHN_XINDEX yet, let's revert to ++ // old way ++ return shstrndx; ++#endif ++} ++ ++#if defined(SHN_XINDEX) ++static Elf_Word* ++get_shndx_table(ObjectCode* oc) ++{ ++ if (RTS_LIKELY(oc->shndx_table != SHNDX_TABLE_UNINIT)) { ++ return oc->shndx_table; ++ } ++ ++ Elf_Word i; ++ char* ehdrC = oc->image; ++ Elf_Ehdr* ehdr = (Elf_Ehdr*)ehdrC; ++ Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); ++ const Elf_Word shnum = elf_shnum(ehdr); ++ ++ for (i = 0; i < shnum; i++) { ++ if (shdr[i].sh_type == SHT_SYMTAB_SHNDX) { ++ oc->shndx_table = (Elf32_Word*)(ehdrC + shdr[i].sh_offset); ++ return oc->shndx_table; ++ } ++ } ++ return NULL; ++} ++#endif ++ ++/* ++ * ocInit and ocDeinit ++ */ ++ ++void ++ocInit_ELF(ObjectCode * oc) ++{ ++ ocDeinit_ELF(oc); ++ ++ oc->info = (struct ObjectCodeFormatInfo*)stgCallocBytes( ++ 1, sizeof *oc->info, ++ "ocInit_Elf(ObjectCodeFormatInfo)"); ++ // TODO: fill info ++ oc->info->elfHeader = (Elf_Ehdr *)oc->image; ++ oc->info->programHeader = (Elf_Phdr *) ((uint8_t*)oc->image ++ + oc->info->elfHeader->e_phoff); ++ oc->info->sectionHeader = (Elf_Shdr *) ((uint8_t*)oc->image ++ + oc->info->elfHeader->e_shoff); ++ oc->info->sectionHeaderStrtab = (char*)((uint8_t*)oc->image + ++ oc->info->sectionHeader[oc->info->elfHeader->e_shstrndx].sh_offset); ++ ++ oc->n_sections = elf_shnum(oc->info->elfHeader); ++ ++ ElfRelocationTable *relTableLast = NULL; ++ ElfRelocationATable *relaTableLast = NULL; ++ ElfSymbolTable *symbolTablesLast = NULL; ++ ++ /* get the symbol table(s) */ ++ for(int i=0; i < oc->n_sections; i++) { ++ if(SHT_REL == oc->info->sectionHeader[i].sh_type) { ++ ElfRelocationTable *relTab = (ElfRelocationTable *)stgCallocBytes( ++ 1, sizeof(ElfRelocationTable), ++ "ocInit_Elf(ElfRelocationTable"); ++ relTab->index = i; ++ ++ relTab->relocations = ++ (Elf_Rel*) ((uint8_t*)oc->info->elfHeader ++ + oc->info->sectionHeader[i].sh_offset); ++ relTab->n_relocations = oc->info->sectionHeader[i].sh_size ++ / sizeof(Elf_Rel); ++ relTab->targetSectionIndex = oc->info->sectionHeader[i].sh_info; ++ ++ relTab->sectionHeader = &oc->info->sectionHeader[i]; ++ ++ if(relTableLast == NULL) { ++ oc->info->relTable = relTab; ++ relTableLast = relTab; ++ } else { ++ relTableLast->next = relTab; ++ relTableLast = relTab; ++ } ++ ++ } else if(SHT_RELA == oc->info->sectionHeader[i].sh_type) { ++ ElfRelocationATable *relTab = (ElfRelocationATable *)stgCallocBytes( ++ 1, sizeof(ElfRelocationATable), ++ "ocInit_Elf(ElfRelocationTable"); ++ relTab->index = i; ++ ++ relTab->relocations = ++ (Elf_Rela*) ((uint8_t*)oc->info->elfHeader ++ + oc->info->sectionHeader[i].sh_offset); ++ relTab->n_relocations = oc->info->sectionHeader[i].sh_size ++ / sizeof(Elf_Rela); ++ relTab->targetSectionIndex = oc->info->sectionHeader[i].sh_info; ++ ++ relTab->sectionHeader = &oc->info->sectionHeader[i]; ++ ++ if(relaTableLast == NULL) { ++ oc->info->relaTable = relTab; ++ relaTableLast = relTab; ++ } else { ++ relaTableLast->next = relTab; ++ relaTableLast = relTab; ++ } ++ ++ } else if(SHT_SYMTAB == oc->info->sectionHeader[i].sh_type) { ++ ++ ElfSymbolTable *symTab = (ElfSymbolTable *)stgCallocBytes( ++ 1, sizeof(ElfSymbolTable), ++ "ocInit_Elf(ElfSymbolTable"); ++ ++ symTab->index = i; /* store the original index, so we can later ++ * find or assert that we are dealing with the ++ * correct symbol table */ ++ ++ Elf_Sym *stab = (Elf_Sym*)((uint8_t*)oc->info->elfHeader ++ + oc->info->sectionHeader[i].sh_offset); ++ symTab->n_symbols = oc->info->sectionHeader[i].sh_size ++ / sizeof(Elf_Sym); ++ symTab->symbols = (ElfSymbol *)stgCallocBytes( ++ symTab->n_symbols, sizeof(ElfSymbol), ++ "ocInit_Elf(ElfSymbol)"); ++ ++ /* get the strings table */ ++ size_t lnkIdx = oc->info->sectionHeader[i].sh_link; ++ symTab->names = (char*)(uint8_t*)oc->info->elfHeader ++ + oc->info->sectionHeader[lnkIdx].sh_offset; ++ ++ /* build the ElfSymbols from the symbols */ ++ for(size_t j=0; j < symTab->n_symbols; j++) { ++ ++ symTab->symbols[j].name = stab[j].st_name == 0 ++ ? "(noname)" ++ : symTab->names + stab[j].st_name; ++ symTab->symbols[j].elf_sym = &stab[j]; ++ /* we don't have an address for this symbol yet; this will be ++ * populated during ocGetNames. hence addr = NULL. ++ */ ++ symTab->symbols[j].addr = NULL; ++ symTab->symbols[j].got_addr = NULL; ++ } ++ ++ /* append the ElfSymbolTable */ ++ if(symbolTablesLast == NULL) { ++ oc->info->symbolTables = symTab; ++ symbolTablesLast = symTab; ++ } else { ++ symbolTablesLast->next = symTab; ++ symbolTablesLast = symTab; ++ } ++ } ++ } ++} ++ ++void ++ocDeinit_ELF(ObjectCode * oc) ++{ ++ /* free all ElfSymbolTables, and their associated ++ * ElfSymbols ++ */ ++ if(oc->info != NULL) { ++#if defined(NEED_GOT) ++ freeGot(oc); ++#endif ++ ElfSymbolTable * last = oc->info->symbolTables; ++ ++ while(last != NULL) { ++ ElfSymbolTable * t = last; ++ last = last->next; ++ stgFree(t->symbols); ++ stgFree(t); ++ } ++ ++ { ++ ElfRelocationTable *last = oc->info->relTable; ++ while (last != NULL) { ++ ElfRelocationTable *t = last; ++ last = last->next; ++ stgFree(t); ++ } ++ } ++ ++ { ++ ElfRelocationATable *last = oc->info->relaTable; ++ while (last != NULL) { ++ ElfRelocationATable *t = last; ++ last = last->next; ++ stgFree(t); ++ } ++ } ++ ++ stgFree(oc->info); ++ oc->info = NULL; ++#if defined(SHN_XINDEX) ++ oc->shndx_table = SHNDX_TABLE_UNINIT; ++#endif ++ } ++} ++ ++/* ++ * Generic ELF functions ++ */ ++ ++int ++ocVerifyImage_ELF ( ObjectCode* oc ) ++{ ++ Elf_Shdr* shdr; ++ Elf_Sym* stab; ++ int j, nent, nstrtab, nsymtabs; ++ Elf_Word i, shnum, shstrndx; ++ char* sh_strtab; ++ ++ char* ehdrC = (char*)(oc->image); ++ Elf_Ehdr* ehdr = (Elf_Ehdr*)ehdrC; ++ ++ if (ehdr->e_ident[EI_MAG0] != ELFMAG0 || ++ ehdr->e_ident[EI_MAG1] != ELFMAG1 || ++ ehdr->e_ident[EI_MAG2] != ELFMAG2 || ++ ehdr->e_ident[EI_MAG3] != ELFMAG3) { ++ errorBelch("%s: not an ELF object", oc->fileName); ++ return 0; ++ } ++ ++ if (ehdr->e_ident[EI_CLASS] != ELFCLASS) { ++ errorBelch("%s: unsupported ELF format", oc->fileName); ++ return 0; ++ } ++ ++ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) { ++ IF_DEBUG(linker,debugBelch( "Is little-endian\n" )); ++ } else ++ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) { ++ IF_DEBUG(linker,debugBelch( "Is big-endian\n" )); ++ } else { ++ errorBelch("%s: unknown endianness", oc->fileName); ++ return 0; ++ } ++ ++ if (ehdr->e_type != ET_REL) { ++ errorBelch("%s: not a relocatable object (.o) file", oc->fileName); ++ return 0; ++ } ++ IF_DEBUG(linker,debugBelch( "Is a relocatable object (.o) file\n" )); ++ ++ IF_DEBUG(linker,debugBelch( "Architecture is " )); ++ switch (ehdr->e_machine) { ++#if defined(EM_ARM) ++ case EM_ARM: IF_DEBUG(linker,debugBelch( "arm" )); break; ++#endif ++ case EM_386: IF_DEBUG(linker,debugBelch( "x86" )); break; ++#if defined(EM_SPARC32PLUS) ++ case EM_SPARC32PLUS: ++#endif ++ case EM_SPARC: IF_DEBUG(linker,debugBelch( "sparc" )); break; ++#if defined(EM_IA_64) ++ case EM_IA_64: IF_DEBUG(linker,debugBelch( "ia64" )); break; ++#endif ++ case EM_PPC: IF_DEBUG(linker,debugBelch( "powerpc32" )); break; ++#if defined(EM_PPC64) ++ case EM_PPC64: IF_DEBUG(linker,debugBelch( "powerpc64" )); ++ errorBelch("%s: RTS linker not implemented on PowerPC 64-bit", ++ oc->fileName); ++ return 0; ++#endif ++#if defined(EM_S390) ++ case EM_S390: IF_DEBUG(linker,debugBelch( "s390" )); ++ errorBelch("%s: RTS linker not implemented on s390", ++ oc->fileName); ++ return 0; ++#endif ++#if defined(EM_X86_64) ++ case EM_X86_64: IF_DEBUG(linker,debugBelch( "x86_64" )); break; ++#elif defined(EM_AMD64) ++ case EM_AMD64: IF_DEBUG(linker,debugBelch( "amd64" )); break; ++#endif ++#if defined(EM_AARCH64) ++ case EM_AARCH64: IF_DEBUG(linker,debugBelch( "aarch64" )); break; ++#endif ++#if defined(EM_RISCV) ++ case EM_RISCV: IF_DEBUG(linker,debugBelch( "riscv" )); ++ errorBelch("%s: RTS linker not implemented on riscv", ++ oc->fileName); ++ return 0; ++#endif ++#if defined(EM_LOONGARCH) ++ case EM_LOONGARCH: IF_DEBUG(linker,debugBelch( "loongarch64" )); ++ errorBelch("%s: RTS linker not implemented on loongarch64", ++ oc->fileName); ++ return 0; ++#endif ++ default: IF_DEBUG(linker,debugBelch( "unknown" )); ++ errorBelch("%s: unknown architecture (e_machine == %d)" ++ , oc->fileName, ehdr->e_machine); ++ return 0; ++ } ++ ++ shnum = elf_shnum(ehdr); ++ IF_DEBUG(linker,debugBelch( ++ "\nSection header table: start %ld, n_entries %d, ent_size %d\n", ++ (long)ehdr->e_shoff, shnum, ehdr->e_shentsize )); ++ ++ CHECK(ehdr->e_shentsize == sizeof(Elf_Shdr)); ++ ++ shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); ++ ++ shstrndx = elf_shstrndx(ehdr); ++ if (shstrndx == SHN_UNDEF) { ++ errorBelch("%s: no section header string table", oc->fileName); ++ return 0; ++ } else { ++ IF_DEBUG(linker,debugBelch( "Section header string table is section %d\n", ++ shstrndx)); ++ sh_strtab = ehdrC + shdr[shstrndx].sh_offset; ++ } ++ ++ for (i = 0; i < shnum; i++) { ++ IF_DEBUG(linker_verbose,debugBelch("%2d: ", i )); ++ IF_DEBUG(linker_verbose,debugBelch("type=%2d ", (int)shdr[i].sh_type )); ++ IF_DEBUG(linker_verbose,debugBelch("size=%4d ", (int)shdr[i].sh_size )); ++ IF_DEBUG(linker_verbose,debugBelch("offs=%4d ", (int)shdr[i].sh_offset )); ++ IF_DEBUG(linker_verbose,debugBelch(" (%p .. %p) ", ++ ehdrC + shdr[i].sh_offset, ++ ehdrC + shdr[i].sh_offset + shdr[i].sh_size - 1)); ++ ++#define SECTION_INDEX_VALID(ndx) (ndx > SHN_UNDEF && ndx < shnum) ++ ++ switch (shdr[i].sh_type) { ++ ++ case SHT_REL: ++ case SHT_RELA: ++ IF_DEBUG(linker_verbose,debugBelch( shdr[i].sh_type == SHT_REL ? "Rel " : "RelA ")); ++ ++ if (!SECTION_INDEX_VALID(shdr[i].sh_link)) { ++ if (shdr[i].sh_link == SHN_UNDEF) ++ errorBelch("\n%s: relocation section #%d has no symbol table\n" ++ "This object file has probably been fully stripped. " ++ "Such files cannot be linked.\n", ++ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, i); ++ else ++ errorBelch("\n%s: relocation section #%d has an invalid link field (%d)\n", ++ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, ++ i, shdr[i].sh_link); ++ return 0; ++ } ++ if (shdr[shdr[i].sh_link].sh_type != SHT_SYMTAB) { ++ errorBelch("\n%s: relocation section #%d does not link to a symbol table\n", ++ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, i); ++ return 0; ++ } ++ if (!SECTION_INDEX_VALID(shdr[i].sh_info)) { ++ errorBelch("\n%s: relocation section #%d has an invalid info field (%d)\n", ++ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, ++ i, shdr[i].sh_info); ++ return 0; ++ } ++ ++ break; ++ case SHT_SYMTAB: ++ IF_DEBUG(linker_verbose,debugBelch("Sym ")); ++ ++ if (!SECTION_INDEX_VALID(shdr[i].sh_link)) { ++ errorBelch("\n%s: symbol table section #%d has an invalid link field (%d)\n", ++ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, ++ i, shdr[i].sh_link); ++ return 0; ++ } ++ if (shdr[shdr[i].sh_link].sh_type != SHT_STRTAB) { ++ errorBelch("\n%s: symbol table section #%d does not link to a string table\n", ++ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, i); ++ ++ return 0; ++ } ++ break; ++ case SHT_STRTAB: IF_DEBUG(linker_verbose,debugBelch("Str ")); break; ++ default: IF_DEBUG(linker_verbose,debugBelch(" ")); break; ++ } ++ if (sh_strtab) { ++ IF_DEBUG(linker_verbose,debugBelch("sname=%s\n", sh_strtab + shdr[i].sh_name )); ++ } ++ } ++ ++ IF_DEBUG(linker_verbose,debugBelch( "\nString tables\n" )); ++ nstrtab = 0; ++ for (i = 0; i < shnum; i++) { ++ if (shdr[i].sh_type == SHT_STRTAB ++ /* Ignore the section header's string table. */ ++ && i != shstrndx ++ /* Ignore string tables named .stabstr, as they contain ++ debugging info. */ ++ && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8) ++ ) { ++ IF_DEBUG(linker_verbose,debugBelch(" section %d is a normal string table\n", i )); ++ nstrtab++; ++ } ++ } ++ if (nstrtab == 0) { ++ IF_DEBUG(linker_verbose,debugBelch(" no normal string tables (potentially, but not necessarily a problem)\n")); ++ } ++#if defined(SHN_XINDEX) ++ Elf_Word* shndxTable = get_shndx_table(oc); ++#endif ++ nsymtabs = 0; ++ IF_DEBUG(linker_verbose,debugBelch( "Symbol tables\n" )); ++ for (i = 0; i < shnum; i++) { ++ if (shdr[i].sh_type != SHT_SYMTAB) continue; ++ IF_DEBUG(linker_verbose,debugBelch( "section %d is a symbol table\n", i )); ++ nsymtabs++; ++ stab = (Elf_Sym*) (ehdrC + shdr[i].sh_offset); ++ nent = shdr[i].sh_size / sizeof(Elf_Sym); ++ IF_DEBUG(linker_verbose,debugBelch( " number of entries is apparently %d (%ld rem)\n", ++ nent, ++ (long)shdr[i].sh_size % sizeof(Elf_Sym) ++ )); ++ if (0 != shdr[i].sh_size % sizeof(Elf_Sym)) { ++ errorBelch("%s: non-integral number of symbol table entries", oc->fileName); ++ return 0; ++ } ++ for (j = 0; j < nent; j++) { ++ Elf_Word secno = stab[j].st_shndx; ++#if defined(SHN_XINDEX) ++ /* See Note [Many ELF Sections] */ ++ if (secno == SHN_XINDEX) { ++ CHECK(shndxTable); ++ secno = shndxTable[j]; ++ } ++#endif ++ IF_DEBUG(linker_verbose,debugBelch(" %2d ", j )); ++ IF_DEBUG(linker_verbose,debugBelch(" sec=%-5d size=%-3d val=%5p ", ++ (int)secno, ++ (int)stab[j].st_size, ++ (char*)stab[j].st_value )); ++ ++ IF_DEBUG(linker_verbose,debugBelch("type=" )); ++ switch (ELF_ST_TYPE(stab[j].st_info)) { ++ case STT_NOTYPE: IF_DEBUG(linker_verbose,debugBelch("notype " )); break; ++ case STT_OBJECT: IF_DEBUG(linker_verbose,debugBelch("object " )); break; ++ case STT_FUNC : IF_DEBUG(linker_verbose,debugBelch("func " )); break; ++ case STT_SECTION: IF_DEBUG(linker_verbose,debugBelch("section" )); break; ++ case STT_FILE: IF_DEBUG(linker_verbose,debugBelch("file " )); break; ++ default: IF_DEBUG(linker_verbose,debugBelch("? " )); break; ++ } ++ IF_DEBUG(linker_verbose,debugBelch(" " )); ++ ++ IF_DEBUG(linker_verbose,debugBelch("bind=" )); ++ switch (ELF_ST_BIND(stab[j].st_info)) { ++ case STB_LOCAL : IF_DEBUG(linker_verbose,debugBelch("local " )); break; ++ case STB_GLOBAL: IF_DEBUG(linker_verbose,debugBelch("global" )); break; ++ case STB_WEAK : IF_DEBUG(linker_verbose,debugBelch("weak " )); break; ++ default: IF_DEBUG(linker_verbose,debugBelch("? " )); break; ++ } ++ IF_DEBUG(linker_verbose,debugBelch(" " )); ++ ++ IF_DEBUG(linker_verbose,debugBelch("other=%2x ", stab[j].st_other )); ++ IF_DEBUG(linker_verbose,debugBelch("name=%s [%x]\n", ++ ehdrC + shdr[shdr[i].sh_link].sh_offset ++ + stab[j].st_name, stab[j].st_name )); ++ } ++ } ++ ++ if (nsymtabs == 0) { ++ // Not having a symbol table is not in principle a problem. ++ // When an object file has no symbols then the 'strip' program ++ // typically will remove the symbol table entirely. ++ IF_DEBUG(linker_verbose,debugBelch(" no symbol tables (potentially, but not necessarily a problem)\n")); ++ } ++ ++ return 1; ++} ++ ++/* Figure out what kind of section it is. Logic derived from ++ Figure 1.14 ("Special Sections") of the ELF document ++ ("Portable Formats Specification, Version 1.1"). */ ++static SectionKind getSectionKind_ELF( Elf_Shdr *hdr, int *is_bss ) ++{ ++ *is_bss = false; ++ ++ if (hdr->sh_type == SHT_PROGBITS ++ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_EXECINSTR)) { ++ /* .text-style section */ ++ return SECTIONKIND_CODE_OR_RODATA; ++ } ++ ++ if (hdr->sh_type == SHT_PROGBITS ++ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { ++ /* .data-style section */ ++ return SECTIONKIND_RWDATA; ++ } ++ ++ if (hdr->sh_type == SHT_PROGBITS ++ && (hdr->sh_flags & SHF_ALLOC) && !(hdr->sh_flags & SHF_WRITE)) { ++ /* .rodata-style section */ ++ return SECTIONKIND_CODE_OR_RODATA; ++ } ++#if defined(SHT_INIT_ARRAY) ++ if (hdr->sh_type == SHT_INIT_ARRAY ++ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { ++ /* .init_array section */ ++ return SECTIONKIND_INIT_ARRAY; ++ } ++#endif /* not SHT_INIT_ARRAY */ ++#if defined(SHT_FINI_ARRAY) ++ if (hdr->sh_type == SHT_FINI_ARRAY ++ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { ++ /* .fini_array section */ ++ return SECTIONKIND_FINI_ARRAY; ++ } ++#endif /* not SHT_INIT_ARRAY */ ++ if (hdr->sh_type == SHT_NOBITS ++ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { ++ /* .bss-style section */ ++ *is_bss = true; ++ return SECTIONKIND_RWDATA; ++ } ++ ++ return SECTIONKIND_OTHER; ++} ++ ++#if !defined(NEED_PLT) ++ ++static void * ++mapObjectFileSection (int fd, Elf_Word offset, Elf_Word size, ++ void **mapped_start, StgWord *mapped_size, ++ StgWord *mapped_offset) ++{ ++ void *p; ++ size_t pageOffset, pageSize; ++ ++ pageOffset = roundDownToPage(offset); ++ pageSize = roundUpToPage(offset-pageOffset+size); ++ p = mmapForLinker(pageSize, MEM_READ_WRITE, 0, fd, pageOffset); ++ if (p == NULL) return NULL; ++ *mapped_size = pageSize; ++ *mapped_offset = pageOffset; ++ *mapped_start = p; ++ return (void*)((StgWord)p + offset - pageOffset); ++} ++#endif ++ ++int ++ocGetNames_ELF ( ObjectCode* oc ) ++{ ++ Elf_Word i; ++ int result, fd = -1; ++ ++ char* ehdrC = (char*)(oc->image); ++ Elf_Ehdr* ehdr = (Elf_Ehdr*)ehdrC; ++ ++ Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); ++ Section * sections; ++#if defined(SHN_XINDEX) ++ Elf_Word* shndxTable = get_shndx_table(oc); ++#endif ++ const Elf_Word shnum = elf_shnum(ehdr); ++ ++ ASSERT(symhash != NULL); ++ ++ sections = (Section*)stgCallocBytes(sizeof(Section), shnum, ++ "ocGetNames_ELF(sections)"); ++ oc->sections = sections; ++ oc->n_sections = shnum; ++ ++ if (oc->imageMapped) { ++#if defined(openbsd_HOST_OS) ++ fd = open(oc->fileName, O_RDONLY, S_IRUSR); ++#else ++ fd = open(oc->fileName, O_RDONLY); ++#endif ++ if (fd == -1) { ++ errorBelch("loadObj: can't open %" PATH_FMT, oc->fileName); ++ return 0; ++ } ++ } ++ ++ for (i = 0; i < shnum; i++) { ++ int is_bss = false; ++ SectionKind kind = getSectionKind_ELF(&shdr[i], &is_bss); ++ SectionAlloc alloc = SECTION_NOMEM; ++ void *start = NULL, *mapped_start = NULL; ++ StgWord mapped_size = 0, mapped_offset = 0; ++ StgWord size = shdr[i].sh_size; ++ StgWord offset = shdr[i].sh_offset; ++ StgWord align = shdr[i].sh_addralign; ++ const char *sh_name = oc->info->sectionHeaderStrtab + shdr[i].sh_name; ++ ++ /* ++ * Identify initializer and finalizer lists ++ * ++ * See Note [Initializers and finalizers (ELF)]. ++ */ ++ if (kind == SECTIONKIND_CODE_OR_RODATA ++ && 0 == memcmp(".init", sh_name, 5)) { ++ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_INIT, 0); ++ } else if (kind == SECTIONKIND_CODE_OR_RODATA ++ && 0 == memcmp(".fini", sh_name, 5)) { ++ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_FINI, 0); ++ } else if (kind == SECTIONKIND_INIT_ARRAY ++ || 0 == memcmp(".init_array", sh_name, 11)) { ++ uint32_t prio; ++ if (sscanf(sh_name, ".init_array.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ prio += 0x10000; // .init_arrays run after .ctors ++ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_INIT_ARRAY, prio); ++ kind = SECTIONKIND_INIT_ARRAY; ++ } else if (kind == SECTIONKIND_FINI_ARRAY ++ || 0 == memcmp(".fini_array", sh_name, 11)) { ++ uint32_t prio; ++ if (sscanf(sh_name, ".fini_array.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ prio += 0x10000; // .fini_arrays run before .dtors ++ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_FINI_ARRAY, prio); ++ kind = SECTIONKIND_FINI_ARRAY; ++ ++ /* N.B. a compilation unit may have more than one .ctor section; we ++ * must run them all. See #21618 for a case where this happened */ ++ } else if (0 == memcmp(".ctors", sh_name, 6)) { ++ uint32_t prio; ++ if (sscanf(sh_name, ".ctors.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ // .ctors/.dtors are executed in reverse order: higher numbers are ++ // executed first ++ prio = 0xffff - prio; ++ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_CTORS, prio); ++ kind = SECTIONKIND_INIT_ARRAY; ++ } else if (0 == memcmp(".dtors", sh_name, 6)) { ++ uint32_t prio; ++ if (sscanf(sh_name, ".dtors.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ // .ctors/.dtors are executed in reverse order: higher numbers are ++ // executed first ++ prio = 0xffff - prio; ++ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_DTORS, prio); ++ kind = SECTIONKIND_FINI_ARRAY; ++ } ++ ++ ++ if (is_bss && size > 0) { ++ /* This is a non-empty .bss section. Allocate zeroed space for ++ it, and set its .sh_offset field such that ++ ehdrC + .sh_offset == addr_of_zeroed_space. */ ++#if RTS_LINKER_USE_MMAP ++ if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { ++ /* The space for bss sections is already preallocated */ ++ CHECK(oc->bssBegin != NULL); ++ alloc = SECTION_NOMEM; ++ CHECK(oc->image != 0x0); ++ start = ++ oc->image + roundUpToAlign(oc->bssBegin - oc->image, align); ++ oc->bssBegin = (char*)start + size; ++ CHECK(oc->bssBegin <= oc->bssEnd); ++ } else { ++ /* Use mmapForLinker to allocate .bss, otherwise the malloced ++ * address might be out of range for sections that are mmaped. ++ */ ++ alloc = SECTION_MMAP; ++ start = mmapAnonForLinker(size); ++ if (start == NULL) { ++ barf("failed to mmap memory for bss. " ++ "errno = %d", errno); ++ } ++ mapped_start = start; ++ mapped_offset = 0; ++ mapped_size = roundUpToPage(size); ++ } ++ CHECK(start != 0x0); ++#else ++ alloc = SECTION_MALLOC; ++ start = stgCallocBytes(1, size, "ocGetNames_ELF(BSS)"); ++ mapped_start = start; ++#endif ++ /* ++ debugBelch("BSS section at 0x%x, size %d\n", ++ zspace, shdr[i].sh_size); ++ */ ++ addSection(§ions[i], kind, alloc, start, size, ++ mapped_offset, mapped_start, mapped_size); ++ ++ oc->sections[i].info->nstubs = 0; ++ oc->sections[i].info->stub_offset = NULL; ++ oc->sections[i].info->stub_size = 0; ++ oc->sections[i].info->stubs = NULL; ++ } else if (kind != SECTIONKIND_OTHER && size > 0) { ++ ++#if defined(NEED_PLT) ++ /* To support stubs next to sections, we will use the following ++ * layout: ++ * ++ * .--------------. ++ * | Section data | ++ * |--------------| ++ * | Stub space | ++ * '--------------' ++ * ++ * This ensures that the plt stubs are in range for the section data, ++ * Unless the section data exceeds the size for relative jump, in ++ * which case I wouldn't know how to solve this, without starting to ++ * break up the section itself. ++ */ ++ ++ unsigned nstubs = numberOfStubsForSection(oc, i); ++ unsigned stub_space = STUB_SIZE * nstubs; ++ ++ void * mem = mmapAnonForLinker(size+stub_space); ++ ++ if( mem == MAP_FAILED ) { ++ barf("failed to mmap allocated memory to load section %d. " ++ "errno = %d", i, errno); ++ } ++ ++ /* copy only the image part over; we don't want to copy data ++ * into the stub part. ++ */ ++ memcpy( mem, oc->image + offset, size ); ++ ++ alloc = SECTION_MMAP; ++ ++ mapped_offset = 0; ++ mapped_size = roundUpToPage(size+stub_space); ++ start = mem; ++ mapped_start = mem; ++#else ++ if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { ++ // already mapped. ++ start = oc->image + offset; ++ alloc = SECTION_NOMEM; ++ } ++ // use the m32 allocator if either the image is not mapped ++ // (i.e. we cannot map the sections separately), or if the section ++ // size is small. ++ else if (!oc->imageMapped || size < getPageSize() / 3) { ++ bool executable = kind == SECTIONKIND_CODE_OR_RODATA; ++ m32_allocator *allocator = executable ? oc->rx_m32 : oc->rw_m32; ++ // Correctly align the section. This is particularly important for ++ // the alignment of .rodata.cstNN sections. ++ // ++ // llvm will emit see paddq statements for x86_64 under ++ // optimisation and load from RODATA sections, specifically ++ // .rodata.cst16. Also we may encounter .rodata.cst32 sections ++ // in objects using AVX instructions (see #23066). ++ start = m32_alloc(allocator, size, align); ++ if (start == NULL) goto fail; ++ memcpy(start, oc->image + offset, size); ++ alloc = SECTION_M32; ++ } else { ++ start = mapObjectFileSection(fd, offset, size, ++ &mapped_start, &mapped_size, ++ &mapped_offset); ++ if (start == NULL) goto fail; ++ alloc = SECTION_MMAP; ++ } ++#endif ++ addSection(§ions[i], kind, alloc, start, size, ++ mapped_offset, mapped_start, mapped_size); ++ ++#if defined(NEED_PLT) ++ oc->sections[i].info->nstubs = 0; ++ oc->sections[i].info->stub_offset = (uint8_t*)mem + size; ++ oc->sections[i].info->stub_size = stub_space; ++ oc->sections[i].info->stubs = NULL; ++#else ++ oc->sections[i].info->nstubs = 0; ++ oc->sections[i].info->stub_offset = NULL; ++ oc->sections[i].info->stub_size = 0; ++ oc->sections[i].info->stubs = NULL; ++#endif ++ ++ addProddableBlock(oc, start, size); ++ } else { ++ addSection(&oc->sections[i], kind, alloc, oc->image+offset, size, ++ 0, 0, 0); ++ oc->sections[i].info->nstubs = 0; ++ oc->sections[i].info->stub_offset = NULL; ++ oc->sections[i].info->stub_size = 0; ++ oc->sections[i].info->stubs = NULL; ++ } ++ oc->sections[i].info->name = sh_name; ++ oc->sections[i].info->sectionHeader = &shdr[i]; ++ ++ if (shdr[i].sh_type != SHT_SYMTAB) continue; ++ ++ /* copy stuff into this module's object symbol table */ ++ ++ oc->n_symbols = 0; ++ for(ElfSymbolTable *symTab = oc->info->symbolTables; ++ symTab != NULL; symTab = symTab->next) { ++ oc->n_symbols += symTab->n_symbols; ++ } ++ ++ oc->symbols = stgCallocBytes(oc->n_symbols, sizeof(Symbol_t), ++ "ocGetNames_ELF(oc->symbols)"); ++ // Note calloc: if we fail partway through initializing symbols, we need ++ // to undo the additions to the symbol table so far. We know which ones ++ // have been added by whether the entry is NULL or not. ++ ++ unsigned curSymbol = 0; ++ ++ unsigned long common_size = 0; ++ unsigned long common_used = 0; ++ for(ElfSymbolTable *symTab = oc->info->symbolTables; ++ symTab != NULL; symTab = symTab->next) { ++ for (size_t j = 0; j < symTab->n_symbols; j++) { ++ ElfSymbol *symbol = &symTab->symbols[j]; ++ if (SHN_COMMON == symTab->symbols[j].elf_sym->st_shndx) { ++ common_size += symbol->elf_sym->st_size; ++ } ++ } ++ } ++ void * common_mem = NULL; ++ if(common_size > 0) { ++ common_mem = mmapAnonForLinker(common_size); ++ if (common_mem == NULL) { ++ barf("ocGetNames_ELF: Failed to allocate memory for SHN_COMMONs"); ++ } ++ } ++ ++ //TODO: we ignore local symbols anyway right? So we can use the ++ // shdr[i].sh_info to get the index of the first non-local symbol ++ // ie we should use j = shdr[i].sh_info ++ for(ElfSymbolTable *symTab = oc->info->symbolTables; ++ symTab != NULL; symTab = symTab->next) { ++ for (size_t j = 0; j < symTab->n_symbols; j++) { ++ ++ char isLocal = false; /* avoids uninit-var warning */ ++ HsBool isWeak = HS_BOOL_FALSE; ++ SymbolName *nm = symTab->symbols[j].name; ++ unsigned short shndx = symTab->symbols[j].elf_sym->st_shndx; ++ ++ ElfSymbol *symbol = &symTab->symbols[j]; ++ ++ Elf_Word secno; ++ ++ ++ /* See Note [Many ELF Sections] */ ++ /* Note that future checks for special SHN_* numbers should check ++ * the shndx variable, not the section number in secno. Sections ++ * with the real number in the SHN_LORESERVE..HIRESERVE range ++ * will have shndx SHN_XINDEX and a secno with one of the ++ * reserved values. */ ++ secno = shndx; ++#if defined(SHN_XINDEX) ++ if (shndx == SHN_XINDEX) { ++ CHECK(shndxTable); ++ secno = shndxTable[j]; ++ } ++#endif ++ /* Figure out if we want to add it; if so, set ad to its ++ address. Otherwise leave ad == NULL. */ ++ ++ if (shndx == SHN_COMMON) { ++ isLocal = false; ++ CHECK(common_used < common_size); ++ CHECK(common_mem); ++ symbol->addr = (void*)((uintptr_t)common_mem + common_used); ++ common_used += symbol->elf_sym->st_size; ++ CHECK(common_used <= common_size); ++ ++ IF_DEBUG(linker_verbose, ++ debugBelch("COMMON symbol, size %llu name %s allocated at %p\n", ++ (long long unsigned int) symbol->elf_sym->st_size, nm, symbol->addr)); ++ ++ /* Pointless to do addProddableBlock() for this area, ++ since the linker should never poke around in it. */ ++ } else if ((ELF_ST_BIND(symbol->elf_sym->st_info) == STB_GLOBAL ++ || ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL ++ || ELF_ST_BIND(symbol->elf_sym->st_info) == STB_WEAK ++ ) ++ /* and not an undefined symbol */ ++ && shndx != SHN_UNDEF ++ /* and not in a "special section" */ ++ && (shndx < SHN_LORESERVE ++#if defined(SHN_XINDEX) ++ || shndx == SHN_XINDEX ++#endif ++ ) ++ && ++ /* and it's a not a section or string table or ++ * anything silly */ ++ (ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_FUNC ++ || ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_OBJECT ++ || ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_NOTYPE ++ ) ++ ) { ++ /* Section 0 is the undefined section, hence > and not >=. */ ++ CHECK(secno > 0 && secno < shnum); ++ /* ++ if (shdr[secno].sh_type == SHT_NOBITS) { ++ debugBelch(" BSS symbol, size %d off %d name %s\n", ++ stab[j].st_size, stab[j].st_value, nm); ++ } ++ */ ++ symbol->addr = (SymbolAddr*)( ++ (intptr_t) oc->sections[secno].start + ++ (intptr_t) symbol->elf_sym->st_value); ++ CHECK(symbol->addr != 0x0); ++ if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL) { ++ isLocal = true; ++ isWeak = false; ++ } else { /* STB_GLOBAL or STB_WEAK */ ++ IF_DEBUG(linker_verbose, ++ debugBelch("addOTabName(GLOB): %10p %s %s\n", ++ symbol->addr, oc->fileName, nm)); ++ isLocal = false; ++ isWeak = ELF_ST_BIND(symbol->elf_sym->st_info) ++ == STB_WEAK; ++ } ++ } ++ ++ SymType sym_type; ++ if (ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_FUNC) { ++ sym_type = SYM_TYPE_CODE; ++ } else { ++ sym_type = SYM_TYPE_DATA; ++ } ++ ++ /* And the decision is ... */ ++ ++ if (symbol->addr != NULL) { ++ CHECK(nm != NULL); ++ /* Acquire! */ ++ if (!isLocal) { ++ ++ if (isWeak == HS_BOOL_TRUE) { ++ setWeakSymbol(oc, nm); ++ } ++ if (!ghciInsertSymbolTable(oc->fileName, symhash, ++ nm, symbol->addr, isWeak, sym_type, oc) ++ ) { ++ goto fail; ++ } ++ oc->symbols[curSymbol].name = nm; ++ oc->symbols[curSymbol].addr = symbol->addr; ++ oc->symbols[curSymbol].type = sym_type; ++ curSymbol++; ++ } ++ } else { ++ /* Skip. */ ++ IF_DEBUG(linker_verbose, ++ debugBelch("skipping `%s'\n", ++ nm) ++ ); ++ ++ /* ++ debugBelch( ++ "skipping bind = %d, type = %d, secno = %d `%s'\n", ++ (int)ELF_ST_BIND(stab[j].st_info), ++ (int)ELF_ST_TYPE(stab[j].st_info), ++ (int)secno, ++ nm ++ ); ++ */ ++ } ++ } ++ } ++ } ++ ++ if(makeGot( oc )) ++ errorBelch("Failed to create GOT for %s", ++ oc->archiveMemberName ++ ? oc->archiveMemberName ++ : oc->fileName); ++ result = 1; ++ goto end; ++ ++fail: ++ result = 0; ++ goto end; ++ ++end: ++ if (fd >= 0) close(fd); ++ return result; ++} ++ ++// the aarch64 linker uses relocacteObjectCodeAarch64, ++// see elf_reloc_aarch64.{h,c} ++#if !defined(aarch64_HOST_ARCH) ++ ++/* Do ELF relocations which lack an explicit addend. All x86-linux ++ and arm-linux relocations appear to be of this form. */ ++static int ++do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, ++ Elf_Shdr* shdr, int shnum ) ++{ ++ int j; ++ ++ Elf_Word* targ; ++ Elf_Rel* rtab = (Elf_Rel*) (ehdrC + shdr[shnum].sh_offset); ++ ++ int nent = shdr[shnum].sh_size / sizeof(Elf_Rel); ++ int target_shndx = shdr[shnum].sh_info; ++ int symtab_shndx = shdr[shnum].sh_link; ++ ++ ElfSymbolTable *stab = NULL; ++ for(ElfSymbolTable * st = oc->info->symbolTables; ++ st != NULL; st = st->next) { ++ if((int)st->index == symtab_shndx) { ++ stab = st; ++ break; ++ } ++ } ++ CHECK(stab != NULL); ++ ++ targ = (Elf_Word*)oc->sections[target_shndx].start; ++ IF_DEBUG(linker_verbose,debugBelch( ++ "relocations for section %d using symtab %d\n", ++ target_shndx, symtab_shndx)); ++ ++ /* Skip sections that we're not interested in. */ ++ if (oc->sections[target_shndx].kind == SECTIONKIND_OTHER) { ++ IF_DEBUG(linker_verbose,debugBelch( "skipping (target section not loaded)")); ++ return 1; ++ } ++ ++ /* The following nomenclature is used for the operation: ++ * - S -- (when used on its own) is the address of the symbol. ++ * - A -- is the addend for the relocation. ++ * - P -- is the address of the place being relocated (derived from r_offset). ++ * - Pa - is the adjusted address of the place being relocated, defined as (P & 0xFFFFFFFC). ++ * - T -- is 1 if the target symbol S has type STT_FUNC and the symbol addresses a Thumb instruction; it is 0 otherwise. ++ * - B(S) is the addressing origin of the output segment defining the symbol S. The origin is not required to be the ++ * base address of the segment. This value must always be word-aligned. ++ * - GOT_ORG is the addressing origin of the Global Offset Table (the indirection table for imported data addresses). ++ * This value must always be word-aligned. See §4.6.1.8, Proxy generating relocations. ++ * - GOT(S) is the address of the GOT entry for the symbol S. ++ * ++ * See the ELF for "ARM Specification" for details: ++ * https://developer.arm.com/architectures/system-architectures/software-standards/abi ++ */ ++ ++ for (j = 0; j < nent; j++) { ++ Elf_Addr offset = rtab[j].r_offset; ++ Elf_Addr info = rtab[j].r_info; ++ ++ Elf_Addr P = ((Elf_Addr)targ) + offset; ++ Elf_Word* pP = (Elf_Word*)P; ++#if defined(i386_HOST_ARCH) || defined(DEBUG) ++ Elf_Addr A = *pP; ++#endif ++ Elf_Addr S; ++ void* S_tmp; ++#if defined(i386_HOST_ARCH) ++ Elf_Addr value; ++#endif ++#if defined(arm_HOST_ARCH) ++ int is_target_thm=0, T=0; ++#endif ++ ++ ElfSymbol * symbol = NULL; ++ ++ IF_DEBUG(linker_verbose,debugBelch( "Rel entry %3d is raw(%6p %6p): ", ++ j, (void*)offset, (void*)info )); ++ if (!info) { ++ IF_DEBUG(linker_verbose,debugBelch( " ZERO" )); ++ S = 0; ++ } else { ++ symbol = &stab->symbols[ELF_R_SYM(info)]; ++ /* First see if it is a local symbol. */ ++ if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL || strncmp(symbol->name, "_GLOBAL_OFFSET_TABLE_", 21) == 0) { ++ S = (Elf_Addr)symbol->addr; ++ } else { ++ S_tmp = lookupDependentSymbol( symbol->name, oc, NULL ); ++ S = (Elf_Addr)S_tmp; ++ } ++ if (!S) { ++ errorBelch("%s: unknown symbol `%s'", ++ oc->fileName, symbol->name); ++ return 0; ++ } ++ IF_DEBUG(linker_verbose,debugBelch( "`%s' resolves to %p\n", symbol->name, ++ (void*)S )); ++ ++#if defined(arm_HOST_ARCH) ++ /* ++ * 4.5.3 Symbol Values ++ * ++ * In addition to the normal rules for symbol values the following ++ * rules shall also apply to symbols of type STT_FUNC: ++ * - If the symbol addresses an ARM instruction, its value is the ++ * address of the instruction (in a relocatable object, the ++ * offset of the instruction from the start of the section ++ * containing it). ++ * - If the symbol addresses a Thumb instruction, its value is the ++ * address of the instruction with bit zero set (in a relocatable ++ * object, the section offset with bit zero set). ++ * - For the purposes of relocation the value used shall be the ++ * address of the instruction (st_value & ~1). ++ * ++ * Note: This allows a linker to distinguish ARM and Thumb code ++ * symbols without having to refer to the map. An ARM symbol ++ * will always have an even value, while a Thumb symbol will ++ * always have an odd value. However, a linker should strip ++ * the discriminating bit from the value before using it for ++ * relocation. ++ * ++ * (source: ELF for the ARM Architecture ++ * ARM IHI 0044F, current through ABI release 2.10 ++ * 24th November 2015) ++ */ ++ if(ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_FUNC) { ++ is_target_thm = S & 0x1; ++ T = is_target_thm; ++ S &= ~1; ++ } ++#endif ++ } ++ ++ int reloc_type = ELF_R_TYPE(info); ++ IF_DEBUG(linker_verbose, ++ debugBelch("Reloc: P = %p S = %p A = %p type=%d\n", ++ (void*)P, (void*)S, (void*)A, reloc_type )); ++#if defined(DEBUG) ++ checkProddableBlock ( oc, pP, sizeof(Elf_Word) ); ++#else ++ (void) pP; /* suppress unused varialbe warning in non-debug build */ ++#endif ++ ++#if defined(i386_HOST_ARCH) ++ value = S + A; ++#endif ++ ++ switch (reloc_type) { ++# if defined(i386_HOST_ARCH) ++ case COMPAT_R_386_NONE: break; ++ case COMPAT_R_386_32: *pP = value; break; ++ case COMPAT_R_386_PC32: *pP = value - P; break; ++# endif ++ ++# if defined(arm_HOST_ARCH) ++ case COMPAT_R_ARM_ABS32: /* (S + A) | T */ ++ // Specified by Linux ARM ABI to be equivalent to ABS32 ++ case COMPAT_R_ARM_TARGET1: ++ *(Elf32_Word *)P += S; ++ *(Elf32_Word *)P |= T; ++ break; ++ ++ case COMPAT_R_ARM_REL32: /* ((S + A) | T) – P */ ++ *(Elf32_Word *)P += S; ++ *(Elf32_Word *)P |= T; ++ *(Elf32_Word *)P -= P; ++ break; ++ ++ case COMPAT_R_ARM_BASE_PREL: /* B(S) + A – P */ ++ { ++ int32_t A = *pP; ++ // bfd used to encode sb (B(S)) as 0. ++ *(uint32_t *)P += 0 + A - P; ++ break; ++ } ++ ++ case COMPAT_R_ARM_GOT_BREL: /* GOT(S) + A – GOT_ORG */ ++ { ++ int32_t A = *pP; ++ void* GOT_S = symbol->got_addr; ++ *(uint32_t *)P = (uint32_t) GOT_S + A - (uint32_t) oc->info->got_start; ++ break; ++ } ++ ++ case COMPAT_R_ARM_CALL: ++ case COMPAT_R_ARM_JUMP24: ++ { ++ // N.B. LLVM's LLD linker's relocation implementation is a fantastic ++ // resource ++ StgWord32 *word = (StgWord32 *)P; ++ StgInt32 imm = (*word & ((1<<24)-1)) << 2; ++ ++ const StgBool is_blx = (*word & 0xf0000000) == 0xf0000000; ++ const StgWord32 hBit = is_blx ? ((*word >> 24) & 1) : 0; ++ imm |= hBit << 1; ++ ++ // Sign extend to 32 bits ++ // I would have thought this would be 24 bits but LLD uses 26 here. ++ // Hmm. ++ int32_t A = signExtend32(26, imm); ++ ++ S = S + A; A = 0; ++ ++ StgWord32 result = ((S + A) | T) - P; ++ ++ const StgBool overflow = !isInt(26, (StgInt32) result); ++ // Handle overflow and Thumb interworking ++ const StgBool needs_veneer = ++ (is_target_thm && ELF_R_TYPE(info) == COMPAT_R_ARM_JUMP24) ++ || overflow; ++ ++ if(needs_veneer) { /* overflow or thum interworking */ ++ // Note [PC bias] ++ // ~~~~~~~~~~~~~~ ++ // From the ELF for the ARM Architecture documentation: ++ // > 4.6.1.1 Addends and PC-bias compensation ++ // > A binary file may use REL or RELA relocations or a mixture ++ // > of the two (but multiple relocations for the same address ++ // > must use only one type). ++ // > If the relocation is pc-relative then compensation for the ++ // > PC bias (the PC value is 8 bytes ahead of the executing ++ // > instruction in ARM state and 4 bytes in Thumb state) must ++ // > be encoded in the relocation by the object producer. ++ int32_t bias = 8; ++ ++ S += bias; ++ /* try to locate an existing stub for this target */ ++ if(findStub(&oc->sections[target_shndx], (void**)&S, 0)) { ++ /* didn't find any. Need to create one */ ++ if(makeStub(&oc->sections[target_shndx], (void**)&S, 0)) { ++ errorBelch("Unable to create veneer for ARM_CALL\n"); ++ return 0; ++ } ++ } ++ S -= bias; ++ ++ result = ((S + A) | T) - P; ++ result &= ~1; // Clear thumb indicator bit ++ ++ CHECK(isInt(26, result)); /* X in range */ ++ } ++ ++ // Update the branch target ++ const StgWord32 imm24 = (result & 0x03fffffc) >> 2; ++ *word = (*word & ~0x00ffffff) ++ | (imm24 & 0x00ffffff); ++ ++ // Change the relocated branch into a BLX if necessary ++ const StgBool switch_mode = ++ is_target_thm && (reloc_type == COMPAT_R_ARM_CALL); ++ if (!needs_veneer && switch_mode) { ++ const StgWord32 hBit = (result & 0x2) >> 1; ++ // Change instruction to BLX ++ *word = (*word & ~0xFF000000) | ((0xfa | hBit) << 24); ++ IF_DEBUG(linker_verbose, debugBelch("Changed BL to BLX at %p\n", word)); ++ } ++ break; ++ } ++ ++ case COMPAT_R_ARM_MOVT_ABS: ++ case COMPAT_R_ARM_MOVW_ABS_NC: ++ { ++ StgWord32 *word = (StgWord32 *)P; ++ StgWord32 imm12 = *word & 0xfff; ++ StgWord32 imm4 = (*word >> 16) & 0xf; ++ StgInt32 offset = imm4 << 12 | imm12; ++ StgWord32 result = (S + offset) | T; ++ ++ if (reloc_type == COMPAT_R_ARM_MOVT_ABS) ++ result = (result & 0xffff0000) >> 16; ++ ++ StgWord32 result12 = result & 0xfff; ++ StgWord32 result4 = (result >> 12) & 0xf; ++ *word = (*word & ~0xf0fff) | (result4 << 16) | result12; ++ break; ++ } ++ ++ case COMPAT_R_ARM_THM_CALL: ++ case COMPAT_R_ARM_THM_JUMP24: ++ { ++ StgWord16 *upper = (StgWord16 *)P; ++ StgWord16 *lower = (StgWord16 *)(P + 2); ++ ++ int overflow; ++ int to_thm = (*lower >> 12) & 1; ++ int sign = (*upper >> 10) & 1; ++ int j1, j2, i1, i2; ++ ++ // Decode immediate value ++ j1 = (*lower >> 13) & 1; i1 = ~(j1 ^ sign) & 1; ++ j2 = (*lower >> 11) & 1; i2 = ~(j2 ^ sign) & 1; ++ ++ StgInt32 A = (sign << 24) ++ | (i1 << 23) ++ | (i2 << 22) ++ | ((*upper & 0x03ff) << 12) ++ | ((*lower & 0x07ff) << 1); ++ ++ // Sign extend 25 to 32 bits ++ if (A & 0x01000000) ++ A -= 0x02000000; ++ ++ S = S + A; A = 0; ++ ++ offset = ((S + A) | T) - P; ++ overflow = offset <= (StgWord32)0xff000000 ++ || offset >= (StgWord32)0x01000000; ++ ++ if ((!is_target_thm && ELF_R_TYPE(info) == COMPAT_R_ARM_THM_JUMP24) ++ || overflow) { ++ // Generate veneer ++ ++ // see [PC bias] above. ++ int32_t bias = 4; ++ S += bias; ++ // set the Thumb indicator to S, the final address should ++ // carry the correct thumb indicator. ++ S |= T; ++ /* try to locate an existing stub for this target */ ++ if(findStub(&oc->sections[target_shndx], (void**)&S, 1)) { ++ /* didn't find any. Need to create one */ ++ if(makeStub(&oc->sections[target_shndx], (void**)&S, 1)) { ++ errorBelch("Unable to create veneer for ARM_THM_CALL\n"); ++ return 0; ++ } ++ } ++ S -= bias; ++ ++ offset = ((S + A) | T) - P; ++ ++ sign = offset >> 31; ++ to_thm = 1; ++ } else if (!is_target_thm ++ && ELF_R_TYPE(info) == COMPAT_R_ARM_THM_CALL) { ++ offset &= ~0x3; ++ to_thm = 0; ++ } ++ ++ // Reencode instruction ++ i1 = ~(offset >> 23) & 1; j1 = sign ^ i1; ++ i2 = ~(offset >> 22) & 1; j2 = sign ^ i2; ++ *upper = ( (*upper & 0xf800) ++ | (sign << 10) ++ | ((offset >> 12) & 0x03ff) ); ++ *lower = ( (*lower & 0xd000) ++ | (j1 << 13) ++ | (to_thm << 12) ++ | (j2 << 11) ++ | ((offset >> 1) & 0x07ff) ); ++ break; ++ } ++ ++ case COMPAT_R_ARM_THM_MOVT_ABS: ++ case COMPAT_R_ARM_THM_MOVW_ABS_NC: ++ { ++ StgWord16 *upper = (StgWord16 *)P; ++ StgWord16 *lower = (StgWord16 *)(P + 2); ++ StgInt32 offset = ((*upper & 0x000f) << 12) ++ | ((*upper & 0x0400) << 1) ++ | ((*lower & 0x7000) >> 4) ++ | (*lower & 0x00ff); ++ ++ offset = (offset ^ 0x8000) - 0x8000; // Sign extend ++ offset += S; ++ if (ELF_R_TYPE(info) == COMPAT_R_ARM_THM_MOVW_ABS_NC) ++ offset |= T; ++ else if (ELF_R_TYPE(info) == COMPAT_R_ARM_THM_MOVT_ABS) ++ offset >>= 16; ++ ++ *upper = ( (*upper & 0xfbf0) ++ | ((offset & 0xf000) >> 12) ++ | ((offset & 0x0800) >> 1) ); ++ *lower = ( (*lower & 0x8f00) ++ | ((offset & 0x0700) << 4) ++ | (offset & 0x00ff) ); ++ break; ++ } ++ ++ case COMPAT_R_ARM_THM_JUMP8: ++ { ++ StgWord16 *word = (StgWord16 *)P; ++ StgWord offset = *word & 0x01fe; ++ offset += S - P; ++ if (!is_target_thm) { ++ errorBelch("%s: Thumb to ARM transition with JUMP8 relocation " ++ "not supported\n", ++ oc->fileName); ++ return 0; ++ } ++ ++ *word = (*word & ~0x01fe) ++ | (offset & 0x01fe); ++ break; ++ } ++ ++ case COMPAT_R_ARM_THM_JUMP11: ++ { ++ StgWord16 *word = (StgWord16 *)P; ++ StgWord offset = *word & 0x0ffe; ++ offset += S - P; ++ if (!is_target_thm) { ++ errorBelch("%s: Thumb to ARM transition with JUMP11 relocation " ++ "not supported\n", ++ oc->fileName); ++ return 0; ++ } ++ ++ *word = (*word & ~0x0ffe) ++ | (offset & 0x0ffe); ++ break; ++ } ++ case COMPAT_R_ARM_GOT_PREL: { ++ int32_t A = *pP; ++ void* GOT_S = symbol->got_addr; ++ CHECK(GOT_S); ++ *(uint32_t *)P = (uint32_t) GOT_S + A - P; ++ break; ++ } ++# endif // arm_HOST_ARCH ++ ++ default: ++ errorBelch("%s: unhandled ELF relocation(Rel) type %" FMT_Word "\n", ++ oc->fileName, (W_)ELF_R_TYPE(info)); ++ return 0; ++ } ++ ++ } ++ return 1; ++} ++ ++/* Do ELF relocations for which explicit addends are supplied. */ ++static int ++do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, ++ Elf_Shdr* shdr, int shnum ) ++{ ++ int j; ++ SymbolName* symbol = NULL; ++ Elf_Rela* rtab = (Elf_Rela*) (ehdrC + shdr[shnum].sh_offset); ++ Elf_Sym* stab; ++ char* strtab; ++ int nent = shdr[shnum].sh_size / sizeof(Elf_Rela); ++ int symtab_shndx = shdr[shnum].sh_link; ++ int strtab_shndx = shdr[symtab_shndx].sh_link; ++ int target_shndx = shdr[shnum].sh_info; ++#if defined(SHN_XINDEX) ++ Elf_Word* shndx_table = get_shndx_table(oc); ++#endif ++#if defined(DEBUG) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) ++ /* This #if def only serves to avoid unused-var warnings. */ ++ Elf_Addr targ = (Elf_Addr) oc->sections[target_shndx].start; ++#endif ++ ++ stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset); ++ strtab= (char*) (ehdrC + shdr[ strtab_shndx ].sh_offset); ++ ++ IF_DEBUG(linker_verbose,debugBelch( "relocations for section %d using symtab %d\n", ++ target_shndx, symtab_shndx )); ++ ++ /* Skip sections that we're not interested in. */ ++ if (oc->sections[target_shndx].kind == SECTIONKIND_OTHER) { ++ IF_DEBUG(linker_verbose,debugBelch( "skipping (target section not loaded)")); ++ return 1; ++ } ++ ++ for (j = 0; j < nent; j++) { ++#if defined(DEBUG) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) ++ /* This #if def only serves to avoid unused-var warnings. */ ++ Elf_Addr offset = rtab[j].r_offset; ++ Elf_Addr P = targ + offset; ++ Elf_Addr A = rtab[j].r_addend; ++#endif ++#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) ++ Elf_Addr value; ++#endif ++ Elf_Addr info = rtab[j].r_info; ++ Elf_Addr S; ++ void* S_tmp; ++# if defined(powerpc_HOST_ARCH) ++ Elf_Sword delta; ++# endif ++ ++ IF_DEBUG(linker_verbose,debugBelch( "Rel entry %3d is raw(%6p %6p %6p) ", ++ j, (void*)offset, (void*)info, ++ (void*)A )); ++ if (!info) { ++ IF_DEBUG(linker_verbose,debugBelch( " ZERO" )); ++ S = 0; ++ } else { ++ Elf_Sym sym = stab[ELF_R_SYM(info)]; ++ if (ELF_R_TYPE(info) == COMPAT_R_X86_64_TLSGD) { ++ /* ++ * No support for TLSGD variables *defined* by the object, ++ * only references to *external* TLS variables in already ++ * loaded shared objects (the executable, libc, ...) are ++ * supported. See Note [TLSGD relocation] in elf_tlsgd.c. ++ */ ++ symbol = sym.st_name == 0 ? "(noname)" : strtab+sym.st_name; ++ if (ELF_ST_BIND(sym.st_info) == STB_LOCAL ++ || sym.st_value != 0 || sym.st_name == 0) { ++ errorBelch("%s: unsupported internal ELF TLSGD relocation for" ++ " symbol `%s'", oc->fileName, symbol); ++ return 0; ++ } ++#if defined(x86_64_HOST_ARCH) && defined(freebsd_HOST_OS) ++ S = lookupTlsgdSymbol(symbol, ELF_R_SYM(info), oc); ++#else ++ errorBelch("%s: ELF TLSGD relocation for symbol `%s'" ++ " not supported on the target platform", ++ oc->fileName, symbol); ++ return 0; ++#endif ++ } else if (ELF_ST_BIND(sym.st_info) == STB_LOCAL) { ++ /* ++ * For local symbols, we can get the address directly from the ELF ++ * symbol table. ++ * ++ * XXX: Is STB_LOCAL the right test here? Should we instead be ++ * checking whether the symbol is *defined* by the current object? ++ * Defined globals also need relocation. Perhaps the point is that ++ * conflicts are resolved in favour of any prior definition, so we ++ * must look at the accumulated symbol table instead (which has ++ * already been updated with our global symbols by the time we get ++ * here). ++ */ ++ symbol = sym.st_name==0 ? "(noname)" : strtab+sym.st_name; ++ /* See Note [Many ELF Sections] */ ++ Elf_Word secno = sym.st_shndx; ++#if defined(SHN_XINDEX) ++ if (secno == SHN_XINDEX) { ++ secno = shndx_table[ELF_R_SYM(info)]; ++ } ++#endif ++ S = (Elf_Addr)oc->sections[secno].start ++ + stab[ELF_R_SYM(info)].st_value; ++ } else { ++ /* If not local, look up the name in our global table. */ ++ symbol = strtab + sym.st_name; ++ S_tmp = lookupDependentSymbol( symbol, oc, NULL ); ++ S = (Elf_Addr)S_tmp; ++ } ++ if (!S) { ++ errorBelch("%s: unknown symbol `%s'", oc->fileName, symbol); ++ return 0; ++ } ++ IF_DEBUG(linker_verbose,debugBelch("`%s' resolves to %p\n", symbol, (void*)S)); ++ } ++ ++#if defined(DEBUG) ++ IF_DEBUG(linker_verbose,debugBelch("Reloc: P = %p S = %p A = %p\n", ++ (void*)P, (void*)S, (void*)A )); ++ checkProddableBlock(oc, (void*)P, sizeof(Elf_Word)); ++#endif ++ ++#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) ++ value = S + A; ++#endif ++ ++ switch (ELF_R_TYPE(info)) { ++# if defined(powerpc_HOST_ARCH) ++ case R_PPC_ADDR16_LO: ++ *(Elf32_Half*) P = value; ++ break; ++ ++ case R_PPC_ADDR16_HI: ++ *(Elf32_Half*) P = value >> 16; ++ break; ++ ++ case R_PPC_ADDR16_HA: ++ *(Elf32_Half*) P = (value + 0x8000) >> 16; ++ break; ++ ++ case R_PPC_ADDR32: ++ *(Elf32_Word *) P = value; ++ break; ++ ++ case R_PPC_REL32: ++ *(Elf32_Word *) P = value - P; ++ break; ++ ++ case R_PPC_PLTREL24: ++ value -= 0x8000; /* See Note [.LCTOC1 in PPC PIC code] */ ++ FALLTHROUGH; ++ case R_PPC_REL24: ++ delta = value - P; ++ ++ if( delta << 6 >> 6 != delta ) ++ { ++ value = (Elf_Addr)(&makeSymbolExtra( oc, ELF_R_SYM(info), value ) ++ ->jumpIsland); ++ delta = value - P; ++ ++ if( value == 0 || delta << 6 >> 6 != delta ) ++ { ++ barf( "Unable to make SymbolExtra for #%d", ++ ELF_R_SYM(info) ); ++ return 0; ++ } ++ } ++ ++ *(Elf_Word *) P = (*(Elf_Word *) P & 0xfc000003) ++ | (delta & 0x3fffffc); ++ break; ++ ++ case R_PPC_REL16_LO: ++ *(Elf32_Half*) P = value - P; ++ break; ++ ++ case R_PPC_REL16_HI: ++ *(Elf32_Half*) P = (value - P) >> 16; ++ break; ++ ++ case R_PPC_REL16_HA: ++ *(Elf32_Half*) P = (value + 0x8000 - P) >> 16; ++ break; ++# endif ++ ++#if defined(x86_64_HOST_ARCH) ++ case COMPAT_R_X86_64_NONE: ++ break; ++ ++ case COMPAT_R_X86_64_64: ++ { ++ Elf64_Xword payload = value; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++ ++ case COMPAT_R_X86_64_PC32: ++ { ++ StgInt64 off = value - P; ++ if (off != (Elf64_Sword)off && X86_64_ELF_NONPIC_HACK) { ++ StgInt64 pltAddress = ++ (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S) ++ -> jumpIsland; ++ off = pltAddress + A - P; ++ } ++ if (off != (Elf64_Sword)off) { ++ errorBelch( ++ "R_X86_64_PC32 relocation out of range: %s = %" PRIx64 ++ "\nRecompile %s with -fPIC -fexternal-dynamic-refs.", ++ symbol, off, oc->fileName); ++ return 0; ++ } ++ Elf64_Sword payload = off; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++ ++ case COMPAT_R_X86_64_PC64: ++ { ++ Elf64_Sxword payload = value - P; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++ ++ case COMPAT_R_X86_64_32: ++ { ++ if (value != (Elf64_Word)value && X86_64_ELF_NONPIC_HACK) { ++ StgInt64 pltAddress = ++ (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S) ++ -> jumpIsland; ++ value = pltAddress + A; ++ } ++ if (value != (Elf64_Word)value) { ++ errorBelch( ++ "R_X86_64_32 relocation out of range: %s = %" PRIx64 ++ "\nRecompile %s with -fPIC -fexternal-dynamic-refs.", ++ symbol, value, oc->fileName); ++ return 0; ++ } ++ Elf64_Word payload = value; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++ ++ case COMPAT_R_X86_64_32S: ++ { ++ if ((StgInt64)value != (Elf64_Sword)value && X86_64_ELF_NONPIC_HACK) { ++ StgInt64 pltAddress = ++ (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S) ++ -> jumpIsland; ++ value = pltAddress + A; ++ } ++ if ((StgInt64)value != (Elf64_Sword)value) { ++ errorBelch( ++ "R_X86_64_32S relocation out of range: %s = %" PRIx64 ++ "\nRecompile %s with -fPIC -fexternal-dynamic-refs.", ++ symbol, value, oc->fileName); ++ return 0; ++ } ++ Elf64_Sword payload = value; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++ case COMPAT_R_X86_64_REX_GOTPCRELX: ++ case COMPAT_R_X86_64_GOTPCRELX: ++ case COMPAT_R_X86_64_GOTPCREL: ++ { ++ StgInt64 gotAddress = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S)->addr; ++ StgInt64 off = gotAddress + A - P; ++ if (off != (Elf64_Sword)off) { ++ barf( ++ "COMPAT_R_X86_64_GOTPCREL relocation out of range: " ++ "%s = %" PRIx64 " in %s.", ++ symbol, off, oc->fileName); ++ } ++ Elf64_Sword payload = off; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++ case COMPAT_R_X86_64_TLSGD: ++ { ++ StgInt64 off = S + A - P; ++ if (off != (Elf64_Sword)off) { ++ barf( ++ "COMPAT_R_X86_64_TLSGD relocation out of range: " ++ "%s = %" PRIx64 " in %s.", ++ symbol, off, oc->fileName); ++ } ++ Elf64_Sword payload = off; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++#if defined(dragonfly_HOST_OS) ++ case COMPAT_R_X86_64_GOTTPOFF: ++ { ++ /* determine the offset of S to the current thread's tls ++ area ++ XXX: Move this to the beginning of function */ ++ struct tls_info ti; ++ get_tls_area(0, &ti, sizeof(ti)); ++ /* make entry in GOT that contains said offset */ ++ StgInt64 gotEntry = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), ++ (S - (Elf64_Addr)(ti.base)))->addr; ++ StgInt64 off = gotEntry + A - P; ++ if (off != (Elf64_Sword)off) { ++ barf( ++ "COMPAT_R_X86_64_GOTTPOFF relocation out of range: " ++ "%s = %" PRIx64 " in %s.", ++ symbol, off, oc->fileName); ++ } ++ Elf64_SWord payload = off; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++#endif ++ ++ case COMPAT_R_X86_64_PLT32: ++ { ++ StgInt64 off = value - P; ++ if (off != (Elf64_Sword)off) { ++ StgInt64 pltAddress = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S) ++ -> jumpIsland; ++ off = pltAddress + A - P; ++ } ++ if (off != (Elf64_Sword)off) { ++ barf( ++ "R_X86_64_PLT32 relocation out of range: " ++ "%s = %" PRIx64 " in %s.", ++ symbol, off, oc->fileName); ++ } ++ Elf64_Sword payload = off; ++ memcpy((void*)P, &payload, sizeof(payload)); ++ break; ++ } ++#endif ++ ++ default: ++ barf("%s: unhandled ELF relocation(RelA) type %" FMT_Word "\n", ++ oc->fileName, (W_)ELF_R_TYPE(info)); ++ return 0; ++ } ++ ++ } ++ return 1; ++} ++#endif /* !aarch64_HOST_ARCH */ ++ ++ ++static bool ++ocMprotect_Elf( ObjectCode *oc ) ++{ ++ for(int i=0; i < oc->n_sections; i++) { ++ Section *section = &oc->sections[i]; ++ if(section->size == 0) continue; ++ switch (section->kind) { ++ case SECTIONKIND_CODE_OR_RODATA: ++ if (section->alloc != SECTION_M32) { ++ // N.B. m32 handles protection of its allocations during ++ // flushing. ++ mprotectForLinker(section->mapped_start, section->mapped_size, MEM_READ_EXECUTE); ++ } ++ break; ++ default: ++ break; ++ } ++ } ++ ++ return true; ++} ++ ++int ++ocResolve_ELF ( ObjectCode* oc ) ++{ ++ char* ehdrC = (char*)(oc->image); ++ Elf_Ehdr* ehdr = (Elf_Ehdr*) ehdrC; ++ Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); ++ const Elf_Word shnum = elf_shnum(ehdr); ++ ++#if defined(SHN_XINDEX) ++ Elf_Word* shndxTable = get_shndx_table(oc); ++#endif ++ ++ /* resolve section symbols ++ * these are special symbols that point to sections, and have no name. ++ * Usually there should be one symbol for each text and data section. ++ * ++ * We need to resolve (assign addresses) to them, to be able to use them ++ * during relocation. ++ */ ++ for(ElfSymbolTable *symTab = oc->info->symbolTables; ++ symTab != NULL; symTab = symTab->next) { ++ for (size_t i = 0; i < symTab->n_symbols; i++) { ++ ElfSymbol *symbol = &symTab->symbols[i]; ++ if(STT_SECTION == ELF_ST_TYPE(symbol->elf_sym->st_info)) { ++ /* NOTE: We assume that oc->sections corresponds to the ++ * sections in the object file. This is currently true, ++ * and will stay true, unless we start to compress ++ * oc->sections by not having an entry for sections we ++ * are not interested in. ++ */ ++ ++ ++ /* See Note [Many ELF Sections] */ ++ /* Note that future checks for special SHN_* numbers should ++ * check the shndx variable, not the section number in secno. ++ * Sections with the real number in the SHN_LORESERVE..HIRESERVE ++ * range will have shndx SHN_XINDEX and a secno with one of the ++ * reserved values. ++ */ ++ Elf_Word secno = symbol->elf_sym->st_shndx; ++#if defined(SHN_XINDEX) ++ if (secno == SHN_XINDEX) { ++ CHECK(shndxTable); ++ secno = shndxTable[i]; ++ } ++#endif ++ CHECK(symbol->elf_sym->st_name == 0); ++ CHECK(symbol->elf_sym->st_value == 0); ++ CHECK(0x0 != oc->sections[ secno ].start); ++ symbol->addr = oc->sections[ secno ].start; ++ } ++ } ++ } ++ ++ if(fillGot( oc )) ++ return 0; ++ /* silence warnings */ ++ (void) shnum; ++ (void) shdr; ++ ++#if defined(aarch64_HOST_ARCH) ++ /* use new relocation design */ ++ if(relocateObjectCode( oc )) ++ return 0; ++#else ++ /* Process the relocation sections. */ ++ for (Elf_Word i = 0; i < shnum; i++) { ++ if (shdr[i].sh_type == SHT_REL) { ++ bool ok = do_Elf_Rel_relocations ( oc, ehdrC, shdr, i ); ++ if (!ok) ++ return ok; ++ } ++ else ++ if (shdr[i].sh_type == SHT_RELA) { ++ bool ok = do_Elf_Rela_relocations ( oc, ehdrC, shdr, i ); ++ if (!ok) ++ return ok; ++ } ++ } ++#endif ++ ++#if defined(powerpc_HOST_ARCH) ++ ocFlushInstructionCache( oc ); ++#endif ++ ++ return ocMprotect_Elf(oc); ++} ++ ++/* ++ * Note [Initializers and finalizers (ELF)] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * The System V ABI describes a facility for allowing object code to mark ++ * functions to be run at load time. These functions are known as ++ * "initializers" (or "constructors"). Initializers are recorded in a section ++ * marked with the DT_INIT tag (often with the name `.init`). ++ * ++ * There is also a similar mechanism for code to be run at unload time (e.g. ++ * during program termination). These are known as finalizers and are collected ++ * in `.fini` section. ++ * ++ * For more about how the code generator emits initializers and finalizers see ++ * Note [Initializers and finalizers in Cmm] in GHC.Cmm.InitFini. ++ * ++ * See also: the "Initialization and Termination Functions" section of the ++ * System V ABI. ++ * ++ * Note [GCC 6 init/fini section workaround] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * The System V ABI specifies that .init_array and .fini_array sections should ++ * be marked with the SHT_INIT_ARRAY/SHT_FINI_ARRAY section types. However, it ++ * seems that GCC 6 (at least on i386) produces sections *named* ++ * .init_array/.fini_array but marks them as SHT_PROGBITS. Consequently we need ++ * to augment the usual section type check (which in an ideal world would be ++ * sufficient) with a check looking at the section name to catch this case. ++ */ ++ ++// Run the constructors/initializers of an ObjectCode. ++// Returns 1 on success. ++// See Note [Initializers and finalizers (ELF)]. ++int ocRunInit_ELF( ObjectCode *oc ) ++{ ++ if (oc && oc->info && oc->info->init) { ++ return runInit(&oc->info->init); ++ } ++ return true; ++} ++ ++// Run the finalizers of an ObjectCode. ++// Returns 1 on success. ++// See Note [Initializers and finalizers (ELF)]. ++int ocRunFini_ELF( ObjectCode *oc ) ++{ ++ if (oc && oc->info && oc->info->fini) { ++ return runFini(&oc->info->fini); ++ } ++ return true; ++} ++ ++/* ++ * Shared object loading ++ */ ++ ++#if defined(HAVE_DLINFO) ++struct piterate_cb_info { ++ ObjectCode *nc; ++ void *l_addr; /* base virtual address of the loaded code */ ++}; ++ ++static int loadNativeObjCb_(struct dl_phdr_info *info, ++ size_t _size STG_UNUSED, void *data) { ++ struct piterate_cb_info *s = (struct piterate_cb_info *) data; ++ ++ // This logic mimicks _dl_addr_inside_object from glibc ++ // For reference: ++ // int ++ // internal_function ++ // _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) ++ // { ++ // int n = l->l_phnum; ++ // const ElfW(Addr) reladdr = addr - l->l_addr; ++ // ++ // while (--n >= 0) ++ // if (l->l_phdr[n].p_type == PT_LOAD ++ // && reladdr - l->l_phdr[n].p_vaddr >= 0 ++ // && reladdr - l->l_phdr[n].p_vaddr < l->l_phdr[n].p_memsz) ++ // return 1; ++ // return 0; ++ // } ++ ++ if ((void*) info->dlpi_addr == s->l_addr) { ++ int n = info->dlpi_phnum; ++ while (--n >= 0) { ++ if (info->dlpi_phdr[n].p_type == PT_LOAD) { ++ NativeCodeRange* ncr = ++ stgMallocBytes(sizeof(NativeCodeRange), "loadNativeObjCb_"); ++ ncr->start = (void*) ((char*) s->l_addr + info->dlpi_phdr[n].p_vaddr); ++ ncr->end = (void*) ((char*) ncr->start + info->dlpi_phdr[n].p_memsz); ++ ++ ncr->next = s->nc->nc_ranges; ++ s->nc->nc_ranges = ncr; ++ } ++ } ++ } ++ return 0; ++} ++#endif /* defined(HAVE_DLINFO) */ ++ ++static void copyErrmsg(char** errmsg_dest, char* errmsg) { ++ if (errmsg == NULL) errmsg = "loadNativeObj_ELF: unknown error"; ++ *errmsg_dest = stgMallocBytes(strlen(errmsg)+1, "loadNativeObj_ELF"); ++ strcpy(*errmsg_dest, errmsg); ++} ++ ++// need dl_mutex ++void freeNativeCode_ELF (ObjectCode *nc) { ++ dlclose(nc->dlopen_handle); ++ ++ NativeCodeRange *ncr = nc->nc_ranges; ++ while (ncr) { ++ NativeCodeRange* last_ncr = ncr; ++ ncr = ncr->next; ++ stgFree(last_ncr); ++ } ++} ++ ++void * loadNativeObj_ELF (pathchar *path, char **errmsg) ++{ ++ ObjectCode* nc; ++ void *hdl, *retval; ++ ++ IF_DEBUG(linker, debugBelch("loadNativeObj_ELF %" PATH_FMT "\n", path)); ++ ++ retval = NULL; ++ ACQUIRE_LOCK(&dl_mutex); ++ ++ /* Loading the same object multiple times will lead to chaos ++ * as we will have two ObjectCodes but one underlying dlopen ++ * handle. Fail if this happens. ++ */ ++ if (getObjectLoadStatus_(path) != OBJECT_NOT_LOADED) { ++ copyErrmsg(errmsg, "loadNativeObj_ELF: Already loaded"); ++ goto dlopen_fail; ++ } ++ ++ nc = mkOc(DYNAMIC_OBJECT, path, NULL, 0, false, NULL, 0); ++ ++ foreignExportsLoadingObject(nc); ++ hdl = dlopen(path, RTLD_NOW|RTLD_LOCAL); ++ nc->dlopen_handle = hdl; ++ foreignExportsFinishedLoadingObject(); ++ if (hdl == NULL) { ++ /* dlopen failed; save the message in errmsg */ ++ copyErrmsg(errmsg, dlerror()); ++ goto dlopen_fail; ++ } ++ ++#if defined(HAVE_DLINFO) ++ struct link_map *map; ++ if (dlinfo(hdl, RTLD_DI_LINKMAP, &map) == -1) { ++ /* dlinfo failed; save the message in errmsg */ ++ copyErrmsg(errmsg, dlerror()); ++ goto dlinfo_fail; ++ } ++ ++ hdl = NULL; // pass handle ownership to nc ++ ++ struct piterate_cb_info piterate_info = { ++ .nc = nc, ++ .l_addr = (void *) map->l_addr ++ }; ++ dl_iterate_phdr(loadNativeObjCb_, &piterate_info); ++ if (!nc->nc_ranges) { ++ copyErrmsg(errmsg, "dl_iterate_phdr failed to find obj"); ++ goto dl_iterate_phdr_fail; ++ } ++ nc->unloadable = true; ++#else ++ nc->nc_ranges = NULL; ++ nc->unloadable = false; ++#endif /* defined (HAVE_DLINFO) */ ++ ++ insertOCSectionIndices(nc); ++ ++ nc->next_loaded_object = loaded_objects; ++ loaded_objects = nc; ++ ++ retval = nc->dlopen_handle; ++ ++#if defined(PROFILING) ++ // collect any new cost centres that were defined in the loaded object. ++ refreshProfilingCCSs(); ++#endif ++ ++ goto success; ++ ++dl_iterate_phdr_fail: ++ // already have dl_mutex ++ freeNativeCode_ELF(nc); ++dlinfo_fail: ++ if (hdl) dlclose(hdl); ++dlopen_fail: ++success: ++ ++ RELEASE_LOCK(&dl_mutex); ++ ++ IF_DEBUG(linker, debugBelch("loadNativeObj_ELF result=%p\n", retval)); ++ ++ return retval; ++} ++ ++ ++/* ++ * PowerPC & X86_64 ELF specifics ++ */ ++ ++#if defined(NEED_SYMBOL_EXTRAS) ++ ++int ocAllocateExtras_ELF( ObjectCode *oc ) ++{ ++ Elf_Ehdr *ehdr = (Elf_Ehdr *) oc->image; ++ Elf_Shdr* shdr = (Elf_Shdr *) ( ((char *)oc->image) + ehdr->e_shoff ); ++ Elf_Shdr* symtab = NULL; ++ Elf_Word shnum = elf_shnum(ehdr); ++ int bssSize = 0; ++ ++ for (Elf_Word i = 0; i < shnum; ++i) { ++ if(shdr[i].sh_type == SHT_SYMTAB) { ++ symtab = &shdr[i]; ++ } else { ++ int isBss = 0; ++ getSectionKind_ELF(&shdr[i], &isBss); ++ if (isBss && shdr[i].sh_size > 0) { ++ bssSize += roundUpToAlign(shdr[i].sh_size, shdr[i].sh_addralign); ++ } ++ } ++ } ++ ++ if (symtab == NULL) ++ { ++ // Not having a symbol table is not in principle a problem. ++ // When an object file has no symbols then the 'strip' program ++ // typically will remove the symbol table entirely. ++ IF_DEBUG(linker, debugBelch( "The ELF file %s contains no symtab\n", ++ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName )); ++ return 1; ++ } ++ ++ if( symtab->sh_entsize != sizeof( Elf_Sym ) ) ++ { ++ errorBelch( "The entry size (%d) of the symtab isn't %d\n", ++ (int) symtab->sh_entsize, (int) sizeof( Elf_Sym ) ); ++ ++ return 0; ++ } ++ ++ return ocAllocateExtras(oc, symtab->sh_size / sizeof( Elf_Sym ), 0, bssSize); ++} ++ ++#endif /* NEED_SYMBOL_EXTRAS */ ++ ++#endif /* elf */ +diff --git a/rts/linker/Elf.h b/rts/linker/Elf.h +index 30c993b..2b9ad87 100644 +--- a/rts/linker/Elf.h ++++ b/rts/linker/Elf.h +@@ -2,17 +2,19 @@ + + #include "Rts.h" + #include "LinkerInternals.h" ++#include "linker/ElfTypes.h" + + #include "BeginPrivate.h" + +-#include +- + void ocInit_ELF ( ObjectCode* oc ); + void ocDeinit_ELF ( ObjectCode* oc ); + int ocVerifyImage_ELF ( ObjectCode* oc ); + int ocGetNames_ELF ( ObjectCode* oc ); + int ocResolve_ELF ( ObjectCode* oc ); + int ocRunInit_ELF ( ObjectCode* oc ); ++int ocRunFini_ELF ( ObjectCode* oc ); + int ocAllocateExtras_ELF ( ObjectCode *oc ); ++void freeNativeCode_ELF ( ObjectCode *nc ); ++void *loadNativeObj_ELF ( pathchar *path, char **errmsg ); + + #include "EndPrivate.h" +diff --git a/rts/linker/ElfTypes.h b/rts/linker/ElfTypes.h +index 0a8e44a..d3524e1 100644 +--- a/rts/linker/ElfTypes.h ++++ b/rts/linker/ElfTypes.h +@@ -6,6 +6,7 @@ + #include "ghcplatform.h" + + #include ++#include "linker/InitFini.h" + + /* + * Define a set of types which can be used for both ELF32 and ELF64 +@@ -143,6 +144,8 @@ struct ObjectCodeFormatInfo { + ElfRelocationTable *relTable; + ElfRelocationATable *relaTable; + ++ struct InitFiniList* init; // Freed by ocRunInit_PEi386 ++ struct InitFiniList* fini; // Freed by ocRunFini_PEi386 + + /* pointer to the global offset table */ + void * got_start; +@@ -170,7 +173,7 @@ struct SectionFormatInfo { + size_t nstubs; + Stub * stubs; + +- char * name; ++ const char * name; + + Elf_Shdr *sectionHeader; + }; +diff --git a/rts/linker/InitFini.c b/rts/linker/InitFini.c +new file mode 100644 +index 0000000..6c787fe +--- /dev/null ++++ b/rts/linker/InitFini.c +@@ -0,0 +1,201 @@ ++#include "Rts.h" ++#include "RtsUtils.h" ++#include "LinkerInternals.h" ++#include "GetEnv.h" ++#include "InitFini.h" ++ ++/* ++ * Note [Initializers and finalizers (PEi386/ELF)] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * Most ABIs allow an object to define initializers and finalizers to be run ++ * at load/unload time, respectively. These are represented in two ways: ++ * ++ * - a `.init`/`.fini` section which contains a function of type init_t which ++ * is to be executed during initialization/finalization. ++ * ++ * - `.ctors`/`.dtors` sections; these contain an array of pointers to ++ * `init_t`/`fini_t` functions, all of which should be executed at ++ * initialization/finalization time. The `.ctors` entries are run in reverse ++ * order. The list may end in a 0 or -1 sentinel value. ++ * ++ * - `.init_array`/`.fini_array` sections; these contain an array ++ * of pointers to `init_t`/`fini_t` functions. ++ * ++ * Objects may contain multiple `.ctors`/`.dtors` and ++ * `.init_array`/`.fini_array` sections, each optionally suffixed with an ++ * 16-bit integer priority (e.g. `.init_array.1234`). Confusingly, `.ctors` ++ * priorities and `.init_array` priorities have different orderings: `.ctors` ++ * sections are run from high to low priority whereas `.init_array` sections ++ * are run from low-to-high. ++ * ++ * Sections without a priority (e.g. `.ctors`) are assumed to run last (that ++ * is, are given a priority of 0xffff). ++ * ++ * In general, we run finalizers in the reverse order of the associated ++ * initializers. That is to say, e.g., .init_array entries are run from first ++ * to last entry and therefore .fini_array entries are run from last-to-first. ++ * ++ * To determine the ordering among the various section types, we follow glibc's ++ * model: ++ * ++ * - first run .ctors (last entry to first entry) ++ * - then run .init_arrays (first-to-last) ++ * ++ * and on unload we run in opposite order: ++ * ++ * - first run fini_arrays (first-to-last) ++ * - then run .dtors (last-to-first) ++ * ++ * For more about how the code generator emits initializers and finalizers see ++ * Note [Initializers and finalizers in Cmm] in GHC.Cmm.InitFini. ++ */ ++ ++// Priority follows the init_array definition: initializers are run ++// lowest-to-highest, finalizers run highest-to-lowest. ++void addInitFini(struct InitFiniList **head, Section *section, enum InitFiniKind kind, uint32_t priority) ++{ ++ struct InitFiniList *slist = stgMallocBytes(sizeof(struct InitFiniList), "addInitFini"); ++ slist->section = section; ++ slist->kind = kind; ++ slist->priority = priority; ++ slist->next = *head; ++ *head = slist; ++} ++ ++enum SortOrder { INCREASING, DECREASING }; ++ ++// Sort a InitFiniList by priority. ++static void sortInitFiniList(struct InitFiniList **slist, enum SortOrder order) ++{ ++ // Bubble sort ++ bool done = false; ++ while (!done) { ++ struct InitFiniList **last = slist; ++ done = true; ++ while (*last != NULL && (*last)->next != NULL) { ++ struct InitFiniList *s0 = *last; ++ struct InitFiniList *s1 = s0->next; ++ bool flip; ++ switch (order) { ++ case INCREASING: flip = s0->priority > s1->priority; break; ++ case DECREASING: flip = s0->priority < s1->priority; break; ++ } ++ if (flip) { ++ s0->next = s1->next; ++ s1->next = s0; ++ *last = s1; ++ done = false; ++ } else { ++ last = &s0->next; ++ } ++ } ++ } ++} ++ ++void freeInitFiniList(struct InitFiniList *slist) ++{ ++ while (slist != NULL) { ++ struct InitFiniList *next = slist->next; ++ stgFree(slist); ++ slist = next; ++ } ++} ++ ++static bool runInitFini(struct InitFiniList **head) ++{ ++ int argc, envc; ++ char **argv, **envv; ++ ++ getProgArgv(&argc, &argv); ++ getProgEnvv(&envc, &envv); ++ ++ for (struct InitFiniList *slist = *head; ++ slist != NULL; ++ slist = slist->next) ++ { ++ Section *section = slist->section; ++ switch (slist->kind) { ++ case INITFINI_INIT: { ++ init_t *init = (init_t*)section->start; ++ (*init)(argc, argv, envv); ++ break; ++ } ++ case INITFINI_FINI: { ++ fini_t *fini = (fini_t*)section->start; ++ (*fini)(); ++ break; ++ } ++ case INITFINI_CTORS: { ++ uint8_t *init_startC = section->start; ++ init_t *init_start = (init_t*)init_startC; ++ init_t *init_end = (init_t*)(init_startC + section->size); ++ ++ // ctors are run *backwards*! ++ for (init_t *init = init_end - 1; init >= init_start; init--) { ++ if ((intptr_t) *init == 0x0 || (intptr_t)*init == -1) { ++ continue; ++ } ++ (*init)(argc, argv, envv); ++ } ++ break; ++ } ++ case INITFINI_DTORS: { ++ char *fini_startC = section->start; ++ fini_t *fini_start = (fini_t*)fini_startC; ++ fini_t *fini_end = (fini_t*)(fini_startC + section->size); ++ for (fini_t *fini = fini_start; fini < fini_end; fini++) { ++ if ((intptr_t) *fini == 0x0 || (intptr_t) *fini == -1) { ++ continue; ++ } ++ (*fini)(); ++ } ++ break; ++ } ++ case INITFINI_INIT_ARRAY: { ++ char *init_startC = section->start; ++ init_t *init_start = (init_t*)init_startC; ++ init_t *init_end = (init_t*)(init_startC + section->size); ++ for (init_t *init = init_start; init < init_end; init++) { ++ CHECK(0x0 != *init); ++ (*init)(argc, argv, envv); ++ } ++ break; ++ } ++ case INITFINI_FINI_ARRAY: { ++ char *fini_startC = section->start; ++ fini_t *fini_start = (fini_t*)fini_startC; ++ fini_t *fini_end = (fini_t*)(fini_startC + section->size); ++ // .fini_array finalizers are run backwards ++ for (fini_t *fini = fini_end - 1; fini >= fini_start; fini--) { ++ CHECK(0x0 != *fini); ++ (*fini)(); ++ } ++ break; ++ } ++ default: barf("unknown InitFiniKind"); ++ } ++ } ++ freeInitFiniList(*head); ++ *head = NULL; ++ ++ freeProgEnvv(envc, envv); ++ return true; ++} ++ ++// Run the constructors/initializers of an ObjectCode. ++// Returns 1 on success. ++// See Note [Initializers and finalizers (PEi386/ELF)]. ++bool runInit(struct InitFiniList **head) ++{ ++ sortInitFiniList(head, INCREASING); ++ return runInitFini(head); ++} ++ ++// Run the finalizers of an ObjectCode. ++// Returns 1 on success. ++// See Note [Initializers and finalizers (PEi386/ELF)]. ++bool runFini(struct InitFiniList **head) ++{ ++ sortInitFiniList(head, DECREASING); ++ return runInitFini(head); ++} +diff --git a/rts/linker/InitFini.h b/rts/linker/InitFini.h +new file mode 100644 +index 0000000..c0a0444 +--- /dev/null ++++ b/rts/linker/InitFini.h +@@ -0,0 +1,23 @@ ++#pragma once ++ ++enum InitFiniKind { ++ INITFINI_INIT, // .init section ++ INITFINI_FINI, // .fini section ++ INITFINI_CTORS, // .ctors section ++ INITFINI_DTORS, // .dtors section ++ INITFINI_INIT_ARRAY, // .init_array section ++ INITFINI_FINI_ARRAY, // .fini_array section ++}; ++ ++// A linked-list of initializer or finalizer sections. ++struct InitFiniList { ++ Section *section; ++ uint32_t priority; ++ enum InitFiniKind kind; ++ struct InitFiniList *next; ++}; ++ ++void addInitFini(struct InitFiniList **slist, Section *section, enum InitFiniKind kind, uint32_t priority); ++void freeInitFiniList(struct InitFiniList *slist); ++bool runInit(struct InitFiniList **slist); ++bool runFini(struct InitFiniList **slist); +diff --git a/rts/linker/LoadArchive.c b/rts/linker/LoadArchive.c +index 366b45d..3c35a02 100644 +--- a/rts/linker/LoadArchive.c ++++ b/rts/linker/LoadArchive.c +@@ -7,6 +7,7 @@ + #include "LinkerInternals.h" + #include "CheckUnload.h" // loaded_objects, insertOCSectionIndices + #include "linker/M32Alloc.h" ++#include "linker/MMap.h" + + /* Platform specific headers */ + #if defined(OBJFORMAT_PEi386) +@@ -240,11 +241,12 @@ lookupGNUArchiveIndex(int gnuFileIndexSize, char **fileName_, + return true; + } + +-static HsInt loadArchive_ (pathchar *path) ++HsInt loadArchive_ (pathchar *path) + { + char *image = NULL; + HsInt retcode = 0; + int memberSize; ++ int memberIdx = 0; + FILE *f = NULL; + int n; + size_t thisFileNameSize = (size_t)-1; /* shut up bogus GCC warning */ +@@ -440,7 +442,7 @@ static HsInt loadArchive_ (pathchar *path) + break; + } + } +- /* If we didn't find a '/', then a space teminates the ++ /* If we didn't find a '/', then a space terminates the + filename. Note that if we don't find one, then + thisFileNameSize ends up as 16, and we already have the + '\0' at the end. */ +@@ -468,6 +470,7 @@ static HsInt loadArchive_ (pathchar *path) + #if defined(OBJFORMAT_PEi386) + /* + * Note [MSVC import files (ext .lib)] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * MSVC compilers store the object files in + * the import libraries with extension .dll + * so on Windows we should look for those too. +@@ -483,7 +486,7 @@ static HsInt loadArchive_ (pathchar *path) + DEBUG_LOG("\tisObject = %d\n", isObject); + + if (isObject) { +- char *archiveMemberName; ++ pathchar *archiveMemberName; + + DEBUG_LOG("Member is an object file...loading...\n"); + +@@ -515,12 +518,16 @@ static HsInt loadArchive_ (pathchar *path) + } + } + +- archiveMemberName = stgMallocBytes(pathlen(path) + thisFileNameSize + 3, +- "loadArchive(file)"); +- sprintf(archiveMemberName, "%" PATH_FMT "(%.*s)", +- path, (int)thisFileNameSize, fileName); ++ int size = pathprintf(NULL, 0, WSTR("%" PATH_FMT "(#%d:%.*s)"), ++ path, memberIdx, (int)thisFileNameSize, fileName); ++ // I don't understand why this extra +1 is needed here; pathprintf ++ // should have given us the correct length but in practice it seems ++ // to be one byte short on Win32. ++ archiveMemberName = stgMallocBytes((size+1+1) * sizeof(pathchar), "loadArchive(file)"); ++ pathprintf(archiveMemberName, size+1, WSTR("%" PATH_FMT "(#%d:%.*s)"), ++ path, memberIdx, (int)thisFileNameSize, fileName); + +- ObjectCode *oc = mkOc(path, image, memberSize, false, archiveMemberName, ++ ObjectCode *oc = mkOc(STATIC_OBJECT, path, image, memberSize, false, archiveMemberName, + misalignment); + #if defined(OBJFORMAT_MACHO) + ocInit_MachO( oc ); +@@ -601,6 +608,7 @@ while reading filename from `%" PATH_FMT "'", path); + } + DEBUG_LOG("successfully read one pad byte\n"); + } ++ memberIdx ++; + DEBUG_LOG("reached end of archive loading while loop\n"); + } + retcode = 1; +@@ -612,7 +620,7 @@ fail: + stgFree(fileName); + if (gnuFileIndex != NULL) { + #if RTS_LINKER_USE_MMAP +- munmap(gnuFileIndex, gnuFileIndexSize + 1); ++ munmapForLinker(gnuFileIndex, gnuFileIndexSize + 1, "loadArchive_"); + #else + stgFree(gnuFileIndex); + #endif +@@ -629,3 +637,21 @@ HsInt loadArchive (pathchar *path) + RELEASE_LOCK(&linker_mutex); + return r; + } ++ ++bool isArchive (pathchar *path) ++{ ++ static const char ARCHIVE_HEADER[] = "!\n"; ++ char buffer[10]; ++ FILE *f = pathopen(path, WSTR("rb")); ++ if (f == NULL) { ++ return false; ++ } ++ ++ size_t ret = fread(buffer, 1, sizeof(buffer), f); ++ fclose(f); ++ if (ret < sizeof(buffer)) { ++ return false; ++ } ++ return strncmp(ARCHIVE_HEADER, buffer, sizeof(ARCHIVE_HEADER)-1) == 0; ++} ++ +diff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.c +index d2b9114..17d3d12 100644 +--- a/rts/linker/M32Alloc.c ++++ b/rts/linker/M32Alloc.c +@@ -10,7 +10,8 @@ + #include "sm/OSMem.h" + #include "RtsUtils.h" + #include "linker/M32Alloc.h" +-#include "LinkerInternals.h" ++#include "linker/MMap.h" ++#include "ReportMemoryMap.h" + + #include + #include +@@ -18,10 +19,8 @@ + #include + + /* +- + Note [Compile Time Trickery] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- + This file implements two versions of each of the `m32_*` functions. At the top + of the file there is the real implementation (compiled in when + `NEED_M32` is true) and a dummy implementation that exists only to +@@ -45,10 +44,8 @@ still check the call for syntax and correct function parameter types. + #if defined(NEED_M32) + + /* +- + Note [M32 Allocator] + ~~~~~~~~~~~~~~~~~~~~ +- + A memory allocator that allocates only pages in the 32-bit range (lower 2GB). + This is useful on 64-bit platforms to ensure that addresses of allocated + objects can be referenced with a 32-bit relative offset. +@@ -97,7 +94,7 @@ life-cycle it is in: + allocation) + + Allocation (in the case of a small request) consists of walking the nursery to +-find a page that will accomodate the request. If none exists then we allocate a ++find a page that will accommodate the request. If none exists then we allocate a + new nursery page (flushing an existing one to the filled list if the nursery is + full). + +@@ -135,6 +132,11 @@ The allocator is *not* thread-safe. + + */ + ++// Enable internal consistency checking ++#if defined(DEBUG) ++#define M32_DEBUG ++#endif ++ + #define ROUND_UP(x,size) ((x + size - 1) & ~(size - 1)) + #define ROUND_DOWN(x,size) (x & ~(size - 1)) + +@@ -147,7 +149,21 @@ The allocator is *not* thread-safe. + /* How many pages should we map at once when re-filling the free page pool? */ + #define M32_MAP_PAGES 32 + /* Upper bound on the number of pages to keep in the free page pool */ +-#define M32_MAX_FREE_PAGE_POOL_SIZE 64 ++#define M32_MAX_FREE_PAGE_POOL_SIZE 256 ++ ++/* A utility to verify that a given address is "acceptable" for use by m32. */ ++static bool ++is_okay_address(void *p) { ++ int8_t *here = LINKER_LOAD_BASE; ++ ssize_t displacement = (int8_t *) p - here; ++ return (displacement > -0x7fffffff) && (displacement < 0x7fffffff); ++} ++ ++enum m32_page_type { ++ FREE_PAGE, // a page in the free page pool ++ NURSERY_PAGE, // a nursery page ++ FILLED_PAGE, // a page on the filled list ++}; + + /** + * Page header +@@ -161,8 +177,7 @@ struct m32_page_t { + // unprotected_list or protected_list are linked together with this field. + struct { + uint32_t size; +- uint32_t next; // this is a m32_page_t*, truncated to 32-bits. This is safe +- // as we are only allocating in the bottom 32-bits ++ struct m32_page_t *next; + } filled_page; + + // Pages in the small-allocation nursery encode their current allocation +@@ -174,21 +189,64 @@ struct m32_page_t { + struct m32_page_t *next; + } free_page; + }; ++#if defined(M32_DEBUG) ++ enum m32_page_type type; ++#endif ++ uint8_t contents[]; + }; + ++/* Consistency-checking infrastructure */ ++#if defined(M32_DEBUG) ++static void ASSERT_PAGE_ALIGNED(void *page) { ++ const size_t pgsz = getPageSize(); ++ if ((((uintptr_t) page) & (pgsz-1)) != 0) { ++ barf("m32: invalid page alignment"); ++ } ++} ++static void ASSERT_VALID_PAGE(struct m32_page_t *page) { ++ ASSERT_PAGE_ALIGNED(page); ++ switch (page->type) { ++ case FREE_PAGE: ++ case NURSERY_PAGE: ++ case FILLED_PAGE: ++ break; ++ default: ++ barf("m32: invalid page state\n"); ++ } ++} ++static void ASSERT_PAGE_TYPE(struct m32_page_t *page, enum m32_page_type ty) { ++ if (page->type != ty) { barf("m32: unexpected page type"); } ++} ++static void ASSERT_PAGE_NOT_FREE(struct m32_page_t *page) { ++ if (page->type == FREE_PAGE) { barf("m32: unexpected free page"); } ++} ++static void SET_PAGE_TYPE(struct m32_page_t *page, enum m32_page_type ty) { ++ page->type = ty; ++} ++#else ++#define ASSERT_PAGE_ALIGNED(page) ++#define ASSERT_VALID_PAGE(page) ++#define ASSERT_PAGE_NOT_FREE(page) ++#define ASSERT_PAGE_TYPE(page, ty) ++#define SET_PAGE_TYPE(page, ty) ++#endif ++ ++/* Accessors */ + static void + m32_filled_page_set_next(struct m32_page_t *page, struct m32_page_t *next) + { +- if (next > (struct m32_page_t *) 0xffffffff) { +- barf("m32_filled_page_set_next: Page not in lower 32-bits"); ++ ASSERT_PAGE_TYPE(page, FILLED_PAGE); ++ if (next != NULL && ! is_okay_address(next)) { ++ barf("m32_filled_page_set_next: Page %p not within 4GB of program text", next); + } +- page->filled_page.next = (uint32_t) (uintptr_t) next; ++ page->filled_page.next = next; + } + + static struct m32_page_t * + m32_filled_page_get_next(struct m32_page_t *page) + { +- return (struct m32_page_t *) (uintptr_t) page->filled_page.next; ++ ASSERT_PAGE_TYPE(page, FILLED_PAGE); ++ return (struct m32_page_t *) (uintptr_t) page->filled_page.next; + } + + /** +@@ -213,40 +271,42 @@ struct m32_allocator_t { + * We keep a small pool of free pages around to avoid fragmentation. + */ + struct m32_page_t *m32_free_page_pool = NULL; ++/** Number of pages in free page pool */ + unsigned int m32_free_page_pool_size = 0; +-// TODO +- +-/** +- * Wrapper for `unmap` that handles error cases. +- * This is the real implementation. There is another dummy implementation below. +- * See the note titled "Compile Time Trickery" at the top of this file. +- */ +-static void +-munmapForLinker (void * addr, size_t size) +-{ +- IF_DEBUG(linker, +- debugBelch("m32_alloc: Unmapping %zu bytes at %p\n", +- size, addr)); +- +- int r = munmap(addr,size); +- if (r == -1) { +- // Should we abort here? +- sysErrorBelch("munmap"); +- } +-} + + /** +- * Free a page or, if possible, place it in the free page pool. ++ * Free a filled page or, if possible, place it in the free page pool. + */ + static void + m32_release_page(struct m32_page_t *page) + { +- if (m32_free_page_pool_size < M32_MAX_FREE_PAGE_POOL_SIZE) { +- page->free_page.next = m32_free_page_pool; +- m32_free_page_pool = page; +- m32_free_page_pool_size ++; +- } else { +- munmapForLinker((void *) page, getPageSize()); ++ // Some sanity-checking ++ ASSERT_VALID_PAGE(page); ++ ASSERT_PAGE_NOT_FREE(page); ++ ++ const size_t pgsz = getPageSize(); ++ ssize_t sz = page->filled_page.size; ++ ++ // Break the page, which may be a large multi-page allocation, into ++ // individual pages for the page pool ++ while (sz > 0) { ++ if (m32_free_page_pool_size < M32_MAX_FREE_PAGE_POOL_SIZE) { ++ mprotectForLinker(page, pgsz, MEM_READ_WRITE); ++ IF_DEBUG(sanity, memset(page, 0xaa, pgsz)); ++ SET_PAGE_TYPE(page, FREE_PAGE); ++ page->free_page.next = m32_free_page_pool; ++ m32_free_page_pool = page; ++ m32_free_page_pool_size ++; ++ } else { ++ break; ++ } ++ page = (struct m32_page_t *) ((uint8_t *) page + pgsz); ++ sz -= pgsz; ++ } ++ ++ // The free page pool is full, release the rest back to the system ++ if (sz > 0) { ++ munmapForLinker((void *) page, ROUND_UP(sz, pgsz), "m32_release_page"); + } + } + +@@ -265,13 +325,16 @@ m32_alloc_page(void) + const size_t pgsz = getPageSize(); + const size_t map_sz = pgsz * M32_MAP_PAGES; + uint8_t *chunk = mmapAnonForLinker(map_sz); +- if (chunk + map_sz > (uint8_t *) 0xffffffff) { +- barf("m32_alloc_page: failed to get allocation in lower 32-bits"); ++ if (! is_okay_address(chunk + map_sz)) { ++ reportMemoryMap(); ++ barf("m32_alloc_page: failed to allocate pages within 4GB of program text (got %p)", chunk); + } ++ IF_DEBUG(sanity, memset(chunk, 0xaa, map_sz)); + + #define GET_PAGE(i) ((struct m32_page_t *) (chunk + (i) * pgsz)) + for (int i=0; i < M32_MAP_PAGES; i++) { + struct m32_page_t *page = GET_PAGE(i); ++ SET_PAGE_TYPE(page, FREE_PAGE); + page->free_page.next = GET_PAGE(i+1); + } + +@@ -284,6 +347,7 @@ m32_alloc_page(void) + struct m32_page_t *page = m32_free_page_pool; + m32_free_page_pool = page->free_page.next; + m32_free_page_pool_size --; ++ ASSERT_PAGE_TYPE(page, FREE_PAGE); + return page; + } + +@@ -309,8 +373,9 @@ static void + m32_allocator_unmap_list(struct m32_page_t *head) + { + while (head != NULL) { ++ ASSERT_VALID_PAGE(head); + struct m32_page_t *next = m32_filled_page_get_next(head); +- munmapForLinker((void *) head, head->filled_page.size); ++ m32_release_page(head); + head = next; + } + } +@@ -325,10 +390,9 @@ void m32_allocator_free(m32_allocator *alloc) + m32_allocator_unmap_list(alloc->protected_list); + + /* free partially-filled pages */ +- const size_t pgsz = getPageSize(); + for (int i=0; i < M32_MAX_PAGES; i++) { + if (alloc->pages[i]) { +- munmapForLinker(alloc->pages[i], pgsz); ++ m32_release_page(alloc->pages[i]); + } + } + +@@ -341,6 +405,8 @@ void m32_allocator_free(m32_allocator *alloc) + static void + m32_allocator_push_filled_list(struct m32_page_t **head, struct m32_page_t *page) + { ++ ASSERT_PAGE_TYPE(page, FILLED_PAGE); ++ // N.B. it's the caller's responsibility to set the pagetype to FILLED_PAGE + m32_filled_page_set_next(page, *head); + *head = page; + } +@@ -367,6 +433,7 @@ m32_allocator_flush(m32_allocator *alloc) { + m32_release_page(alloc->pages[i]); + } else { + // the page contains data, move it to the unprotected list ++ SET_PAGE_TYPE(alloc->pages[i], FILLED_PAGE); + m32_allocator_push_filled_list(&alloc->unprotected_list, alloc->pages[i]); + } + alloc->pages[i] = NULL; +@@ -376,9 +443,10 @@ m32_allocator_flush(m32_allocator *alloc) { + if (alloc->executable) { + struct m32_page_t *page = alloc->unprotected_list; + while (page != NULL) { ++ ASSERT_PAGE_TYPE(page, FILLED_PAGE); + struct m32_page_t *next = m32_filled_page_get_next(page); + m32_allocator_push_filled_list(&alloc->protected_list, page); +- mmapForLinkerMarkExecutable(page, page->filled_page.size); ++ mprotectForLinker(page, page->filled_page.size, MEM_READ_EXECUTE); + page = next; + } + alloc->unprotected_list = NULL; +@@ -394,6 +462,15 @@ m32_is_large_object(size_t size, size_t alignment) + return size >= getPageSize() - ROUND_UP(sizeof(struct m32_page_t), alignment); + } + ++static void ++m32_report_allocation(struct m32_allocator_t *alloc STG_UNUSED, void *addr STG_UNUSED, size_t size STG_UNUSED) ++{ ++ IF_DEBUG(linker_verbose, debugBelch( ++ "m32_allocated(%p:%s): %p - %p\n", ++ alloc, alloc->executable ? "RX": "RW", ++ addr, (uint8_t*) addr + size)); ++} ++ + /** + * Allocate `size` bytes of memory with the given alignment. + * +@@ -408,17 +485,23 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) + if (m32_is_large_object(size,alignment)) { + // large object + size_t alsize = ROUND_UP(sizeof(struct m32_page_t), alignment); ++ // TODO: lower-bound allocation size to allocation granularity and return ++ // remainder to free pool. + struct m32_page_t *page = mmapAnonForLinker(alsize+size); + if (page == NULL) { + sysErrorBelch("m32_alloc: Failed to map pages for %zd bytes", size); + return NULL; +- } else if (page > (struct m32_page_t *) 0xffffffff) { +- debugBelch("m32_alloc: warning: Allocation of %zd bytes resulted in pages above 4GB (%p)", +- size, page); ++ } else if (! is_okay_address(page)) { ++ reportMemoryMap(); ++ barf("m32_alloc: warning: Allocation of %zd bytes resulted in pages above 4GB (%p)", ++ size, page); + } ++ SET_PAGE_TYPE(page, FILLED_PAGE); + page->filled_page.size = alsize + size; + m32_allocator_push_filled_list(&alloc->unprotected_list, (struct m32_page_t *) page); +- return (char*) page + alsize; ++ uint8_t *res = (uint8_t *) page + alsize; ++ m32_report_allocation(alloc, res, size); ++ return res; + } + + // small object +@@ -434,10 +517,13 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) + } + + // page can contain the buffer? ++ ASSERT_VALID_PAGE(alloc->pages[i]); ++ ASSERT_PAGE_TYPE(alloc->pages[i], NURSERY_PAGE); + size_t alsize = ROUND_UP(alloc->pages[i]->current_size, alignment); + if (size <= pgsz - alsize) { + void * addr = (char*)alloc->pages[i] + alsize; + alloc->pages[i]->current_size = alsize + size; ++ m32_report_allocation(alloc, addr, size); + return addr; + } + +@@ -451,6 +537,7 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) + + // If we haven't found an empty page, flush the most filled one + if (empty == -1) { ++ SET_PAGE_TYPE(alloc->pages[most_filled], FILLED_PAGE); + m32_allocator_push_filled_list(&alloc->unprotected_list, alloc->pages[most_filled]); + alloc->pages[most_filled] = NULL; + empty = most_filled; +@@ -461,11 +548,13 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) + if (page == NULL) { + return NULL; + } ++ SET_PAGE_TYPE(page, NURSERY_PAGE); + alloc->pages[empty] = page; + // Add header size and padding +- alloc->pages[empty]->current_size = +- size+ROUND_UP(sizeof(struct m32_page_t),alignment); +- return (char*)page + ROUND_UP(sizeof(struct m32_page_t),alignment); ++ alloc->pages[empty]->current_size = size + ROUND_UP(sizeof(struct m32_page_t),alignment); ++ uint8_t *res = (uint8_t *) page + ROUND_UP(sizeof(struct m32_page_t), alignment); ++ m32_report_allocation(alloc, res, size); ++ return res; + } + + #else +diff --git a/rts/linker/M32Alloc.h b/rts/linker/M32Alloc.h +index 8a349a3..c866029 100644 +--- a/rts/linker/M32Alloc.h ++++ b/rts/linker/M32Alloc.h +@@ -12,7 +12,7 @@ + * We use the m32 allocator for symbol extras on Windows and other mmap-using + * platforms. + */ +-#if RTS_LINKER_USE_MMAP ++#if RTS_LINKER_USE_MMAP || defined(mingw32_HOST_OS) + #define NEED_M32 1 + #endif + +@@ -21,7 +21,7 @@ + #if defined(NEED_M32) + #define M32_NO_RETURN /* Nothing */ + #else +-#define M32_NO_RETURN GNUC3_ATTRIBUTE(__noreturn__) ++#define M32_NO_RETURN STG_NORETURN + #endif + + struct m32_allocator_t; +diff --git a/rts/linker/MMap.c b/rts/linker/MMap.c +new file mode 100644 +index 0000000..30abad1 +--- /dev/null ++++ b/rts/linker/MMap.c +@@ -0,0 +1,466 @@ ++#include "Rts.h" ++ ++#include "sm/OSMem.h" ++#include "linker/MMap.h" ++#include "Trace.h" ++#include "ReportMemoryMap.h" ++ ++#if RTS_LINKER_USE_MMAP ++#include ++#endif ++ ++/* Link objects into the lower 2Gb on x86_64 and AArch64. GHC assumes the ++ * small memory model on this architecture (see gcc docs, ++ * -mcmodel=small). ++ * ++ * MAP_32BIT not available on OpenBSD/amd64 ++ */ ++#if defined(MAP_32BIT) && (defined(x86_64_HOST_ARCH) || (defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH))) ++#define MAP_LOW_MEM ++#define TRY_MAP_32BIT MAP_32BIT ++#else ++#define TRY_MAP_32BIT 0 ++#endif ++ ++/* MAP_ANONYMOUS is MAP_ANON on some systems, ++ e.g. OS X (before Sierra), OpenBSD etc */ ++#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) ++#define MAP_ANONYMOUS MAP_ANON ++#endif ++ ++/* In order to simplify control flow a bit, some references to mmap-related ++ definitions are blocked off by a C-level if statement rather than a CPP-level ++ #if statement. Since those are dead branches when !RTS_LINKER_USE_MMAP, we ++ just stub out the relevant symbols here ++*/ ++#if !RTS_LINKER_USE_MMAP ++#define munmap(x,y) /* nothing */ ++#define MAP_ANONYMOUS 0 ++#endif ++ ++void *mmap_32bit_base = LINKER_LOAD_BASE; ++ ++static const char *memoryAccessDescription(MemoryAccess mode) ++{ ++ switch (mode) { ++ case MEM_NO_ACCESS: return "no-access"; ++ case MEM_READ_ONLY: return "read-only"; ++ case MEM_READ_WRITE: return "read-write"; ++ case MEM_READ_WRITE_THEN_READ_EXECUTE: ++ return "read-write-then-read-execute"; ++ case MEM_READ_EXECUTE: return "read-execute"; ++ case MEM_READ_WRITE_EXECUTE: ++ return "read-write-execute"; ++ default: barf("invalid MemoryAccess"); ++ } ++} ++ ++/* A region of memory that we might map into. */ ++struct MemoryRegion { ++ void *start; ++ void *end; ++ void *last; ++ /* the end of the last mapping which we made into this region. ++ * this is where we will start searching next time we need to allocate. ++ */ ++}; ++ ++#if defined(mingw32_HOST_OS) ++ ++/* A wrapper for VirtualQuery() providing useful debug output */ ++static int virtualQuery(void *baseAddr, PMEMORY_BASIC_INFORMATION info) ++{ ++ int res = VirtualQuery (baseAddr, info, sizeof (*info)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("Probing region 0x%p (0x%p) - 0x%p (%" FMT_SizeT ") [%ld] with base 0x%p\n", ++ baseAddr, ++ info->BaseAddress, ++ (uint8_t *) info->BaseAddress + info->RegionSize, ++ info->RegionSize, info->State, ++ info->AllocationBase)); ++ if (!res) { ++ IF_DEBUG(linker_verbose, debugBelch("Querying 0x%p failed. Aborting..\n", baseAddr)); ++ return 1; ++ } ++ return 0; ++} ++ ++static inline uintptr_t round_up(uintptr_t num, uint64_t factor) ++{ ++ return num + factor - 1 - (num + factor - 1) % factor; ++} ++ ++/* ++ * Try and find a location in the VMMAP to allocate SZ bytes starting at ++ * BASEADDR. If successful then location to use is returned and the amount of ++ * bytes you *must* allocate is returned in REQ. You are free to use less but ++ * you must allocate the amount given in REQ. If not successful NULL. ++ */ ++static void *allocateBytes(void* baseAddr, void *endAddr, size_t sz, size_t *req) ++{ ++ SYSTEM_INFO sys; ++ GetSystemInfo(&sys); ++ ++ IF_DEBUG(linker_verbose, debugBelch("Requesting mapping of %" FMT_SizeT " bytes between %p and %p\n", ++ sz, baseAddr, endAddr)); ++ ++ MEMORY_BASIC_INFORMATION info; ++ uint8_t *initialAddr = baseAddr; ++ uint8_t *region = NULL; ++ while (!region ++ && initialAddr <= (uint8_t *) endAddr ++ && (void *) initialAddr < sys.lpMaximumApplicationAddress) ++ { ++ int res = virtualQuery(initialAddr, &info); ++ if (res) { ++ return NULL; ++ } ++ ++ if ((info.State & MEM_FREE) == MEM_FREE) { ++ IF_DEBUG(linker_verbose, debugBelch("Free range at 0x%p of %zu bytes\n", ++ info.BaseAddress, info.RegionSize)); ++ ++ if (info.RegionSize >= sz) { ++ if (info.AllocationBase == 0) { ++ size_t needed_sz = round_up (sz, sys.dwAllocationGranularity); ++ if (info.RegionSize >= needed_sz) { ++ IF_DEBUG(linker_verbose, debugBelch("Range is unmapped, Allocation " ++ "required by granule...\n")); ++ *req = needed_sz; ++ region ++ = (void*)(uintptr_t)round_up ((uintptr_t)initialAddr, ++ sys.dwAllocationGranularity); ++ IF_DEBUG(linker_verbose, debugBelch("Requested %" PRId64 ", rounded: %" ++ PRId64 ".\n", sz, *req)); ++ IF_DEBUG(linker_verbose, debugBelch("Aligned region claimed 0x%p -> " ++ "0x%p.\n", initialAddr, region)); ++ } ++ } else { ++ IF_DEBUG(linker_verbose, debugBelch("Range is usable for us, claiming...\n")); ++ *req = sz; ++ region = initialAddr; ++ } ++ } ++ } ++ initialAddr = (uint8_t *) info.BaseAddress + info.RegionSize; ++ } ++ ++ return region; ++} ++ ++/* Find free address space for mapping anonymous memory. */ ++static void *allocateLocalBytes(size_t sz, size_t *req) ++{ ++ // We currently don't attempt to take address space from the region below ++ // the image as malloc() tends to like to use this space, but we could do if ++ // necessary. ++ size_t max_range = 0x7fffffff - sz; ++ ++ static void *base_addr = NULL; ++ if (base_addr == NULL) { ++ base_addr = GetModuleHandleW(NULL); ++ } ++ uint8_t *end_addr = (uint8_t *) base_addr + max_range; ++ ++ // We track the location of the last allocation to avoid having to ++ // do a linear search of address space looking for space on every allocation ++ // as this can easily devolve into quadratic complexity. ++ static void *last_alloca = NULL; ++ if (last_alloca == NULL) { ++ // Start the search at the image base ++ last_alloca = base_addr; ++ } ++ ++ void *result = NULL; ++ result = allocateBytes (last_alloca, end_addr, sz, req); ++ if (result == NULL) { ++ // We failed to find suitable address space; restart the search at base_addr. ++ result = allocateBytes (base_addr, end_addr, sz, req); ++ } ++ ++ if (result != NULL) { ++ last_alloca = (uint8_t *) result + *req; ++ } ++ return result; ++} ++ ++static DWORD ++memoryAccessToProt(MemoryAccess access) ++{ ++ switch (access) { ++ case MEM_NO_ACCESS: return PAGE_NOACCESS; ++ case MEM_READ_ONLY: return PAGE_READONLY; ++ case MEM_READ_WRITE: return PAGE_READWRITE; ++ case MEM_READ_WRITE_THEN_READ_EXECUTE: ++ return PAGE_READWRITE; ++ case MEM_READ_EXECUTE: return PAGE_EXECUTE_READ; ++ case MEM_READ_WRITE_EXECUTE: ++ return PAGE_EXECUTE_READWRITE; ++ default: barf("invalid MemoryAccess"); ++ } ++} ++ ++// ++// Returns NULL on failure. ++// ++void * ++mmapAnonForLinker (size_t bytes) ++{ ++ size_t size = 0; ++ /* For linking purposes we want to load code within a 4GB range from the ++ load address of the application. As such we need to find a location to ++ allocate at. */ ++ void* region = allocateLocalBytes (bytes, &size); ++ if (region == NULL) { ++ return NULL; ++ } ++ return VirtualAlloc(region, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); ++} ++ ++void ++munmapForLinker (void *addr, size_t bytes, const char *caller) ++{ ++ if (VirtualFree(addr, 0, MEM_RELEASE) == 0) { ++ sysErrorBelch("munmapForLinker: %s: Failed to unmap %zd bytes at %p", ++ caller, bytes, addr); ++ } ++} ++ ++/** ++ * Change the allowed access modes of a region of memory previously allocated ++ * with mmapAnonForLinker. ++ */ ++void ++mprotectForLinker(void *start, size_t len, MemoryAccess mode) ++{ ++ DWORD old; ++ if (len == 0) { ++ return; ++ } ++ DWORD prot = memoryAccessToProt(mode); ++ ++ if (VirtualProtect(start, len, prot, &old) == 0) { ++ sysErrorBelch("mprotectForLinker: failed to protect %zd bytes at %p as %s", ++ len, start, memoryAccessDescription(mode)); ++ ASSERT(false); ++ } ++} ++ ++#elif RTS_LINKER_USE_MMAP ++ ++static int ++memoryAccessToProt(MemoryAccess access) ++{ ++ switch (access) { ++ case MEM_NO_ACCESS: return 0; ++ case MEM_READ_ONLY: return PROT_READ; ++ case MEM_READ_WRITE: return PROT_READ | PROT_WRITE; ++ case MEM_READ_WRITE_THEN_READ_EXECUTE: ++# if defined(netbsd_HOST_OS) ++ /* PROT_MPROTECT(PROT_EXEC) means that the pages are going to be ++ * marked as executable in the future. On NetBSD requesting ++ * additional permissions with mprotect(2) only succeeds when ++ * permissions were initially requested in this manner. ++ */ ++ return PROT_READ | PROT_WRITE | PROT_MPROTECT(PROT_EXEC); ++# else ++ return PROT_READ | PROT_WRITE; ++# endif ++ case MEM_READ_EXECUTE: return PROT_READ | PROT_EXEC; ++ case MEM_READ_WRITE_EXECUTE: ++ return PROT_READ | PROT_WRITE | PROT_EXEC; ++ default: barf("invalid MemoryAccess"); ++ } ++} ++ ++static void * ++doMmap(void *map_addr, size_t bytes, int prot, uint32_t flags, int fd, int offset) ++{ ++ flags |= MAP_PRIVATE; ++ ++ IF_DEBUG(linker_verbose, ++ debugBelch("mmapForLinker: \tprotection %#0x\n", prot)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("mmapForLinker: \tflags %#0x\n", flags)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("mmapForLinker: \tsize %#0zx\n", bytes)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("mmapForLinker: \tmap_addr %p\n", map_addr)); ++ ++ void * result = mmap(map_addr, bytes, prot, flags, fd, offset); ++ if (result == MAP_FAILED) { ++ sysErrorBelch("mmap %zx bytes at %p", bytes, map_addr); ++ reportMemoryMap(); ++ errorBelch("Try specifying an address with +RTS -xm -RTS"); ++ return NULL; ++ } ++ return result; ++} ++ ++ ++static struct MemoryRegion * ++nearImage(void) { ++ static struct MemoryRegion region = { NULL, NULL, NULL }; ++ if (region.end == NULL) { ++ region.start = mmap_32bit_base; ++ region.end = (uint8_t *) region.start + 0x80000000; ++ region.last = region.start; ++ } ++ return ®ion; ++} ++ ++static void * ++mmapAnywhere ( ++ size_t bytes, ++ MemoryAccess access, ++ uint32_t flags, ++ int fd, ++ int offset) ++{ ++ int prot = memoryAccessToProt(access); ++ return doMmap(NULL, bytes, prot, flags, fd, offset); ++} ++ ++static void * ++mmapInRegion ( ++ struct MemoryRegion *region, ++ size_t bytes, ++ MemoryAccess access, ++ uint32_t flags, ++ int fd, ++ int offset) ++{ ++ bool wrapped = false; ++ int prot = memoryAccessToProt(access); ++ void *p = region->last; ++ while (1) { ++ void *result = doMmap(p, bytes, prot, flags, fd, offset); ++ if (result == NULL) { ++ // The mapping failed ++ return NULL; ++ } else if (result < region->start) { ++ // Uh oh, we assume that mmap() will only give us a ++ // an address at or after the requested address. ++ // Try again. ++ p = (uint8_t *) result + bytes; ++ } else if (result < region->end) { ++ // Success! ++ region->last = (uint8_t *) result + bytes; ++ return result; ++ } else if (wrapped) { ++ // We failed to find a suitable mapping ++ munmap(result, bytes); ++ reportMemoryMap(); ++ errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " ++ "asked for %zu bytes at %p. " ++ "Try specifying an address with +RTS -xm -RTS", ++ bytes, p); ++ return NULL; ++ } ++ ++ // mmap() gave us too high an address; wrap around and try again ++ munmap(result, bytes); ++ wrapped = true; ++ p = region->start; ++ } ++} ++ ++/* ++ * Map memory for code. ++ * Returns NULL on failure. ++ */ ++void * ++mmapForLinker (size_t bytes, MemoryAccess access, uint32_t flags, int fd, int offset) ++{ ++ bytes = roundUpToPage(bytes); ++ struct MemoryRegion *region; ++ ++ IF_DEBUG(linker_verbose, debugBelch("mmapForLinker: start\n")); ++ if (RtsFlags.MiscFlags.linkerAlwaysPic) { ++ /* make no attempt at mapping low memory if we are assuming PIC */ ++ region = NULL; ++ } else { ++ region = nearImage(); ++ } ++ ++ /* Use MAP_32BIT if appropriate */ ++ if (region && region->end <= (void *) 0xffffffff) { ++ flags |= TRY_MAP_32BIT; ++ } ++ ++ void *result; ++ if (region) { ++ result = mmapInRegion(region, bytes, access, flags, fd, offset); ++ } ++ else { ++ result = mmapAnywhere(bytes, access, flags, fd, offset); ++ } ++ IF_DEBUG(linker_verbose, ++ debugBelch("mmapForLinker: mapped %zd bytes starting at %p\n", ++ bytes, result)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("mmapForLinker: done\n")); ++ return result; ++} ++ ++/* ++ * Map read/write pages in low memory. Returns NULL on failure. ++ */ ++void * ++mmapAnonForLinker (size_t bytes) ++{ ++ return mmapForLinker (bytes, MEM_READ_WRITE_THEN_READ_EXECUTE, MAP_ANONYMOUS, -1, 0); ++} ++ ++void munmapForLinker (void *addr, size_t bytes, const char *caller) ++{ ++ int r = munmap(addr, bytes); ++ if (r == -1) { ++ // Should we abort here? ++ sysErrorBelch("munmap: %s", caller); ++ } ++} ++ ++/* Note [Memory protection in the linker] ++ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ * For many years the linker would simply map all of its memory ++ * with PROT_READ|PROT_WRITE|PROT_EXEC. However operating systems have been ++ * becoming increasingly reluctant to accept this practice (e.g. #17353, ++ * #12657) and for good reason: writable code is ripe for exploitation. ++ * ++ * Consequently mmapForLinker now maps its memory with PROT_READ|PROT_WRITE. ++ * After the linker has finished filling/relocating the mapping it must then ++ * call mprotectForLinker on the sections of the mapping which ++ * contain executable code. ++ * ++ * Note that the m32 allocator handles protection of its allocations. For this ++ * reason the caller to m32_alloc() must tell the allocator whether the ++ * allocation needs to be executable. The caller must then ensure that they ++ * call m32_allocator_flush() after they are finished filling the region, which ++ * will cause the allocator to change the protection bits to ++ * PROT_READ|PROT_EXEC. ++ * ++ */ ++ ++/* ++ * Mark an portion of a mapping previously reserved by mmapForLinker ++ * as executable (but not writable). ++ */ ++void mprotectForLinker(void *start, size_t len, MemoryAccess mode) ++{ ++ if (len == 0) { ++ return; ++ } ++ IF_DEBUG(linker_verbose, ++ debugBelch("mprotectForLinker: protecting %" FMT_Word ++ " bytes starting at %p as %s\n", ++ (W_)len, start, memoryAccessDescription(mode))); ++ ++ int prot = memoryAccessToProt(mode); ++ ++ if (mprotect(start, len, prot) == -1) { ++ sysErrorBelch("mprotectForLinker: failed to protect %zd bytes at %p as %s", ++ len, start, memoryAccessDescription(mode)); ++ } ++} ++#endif +diff --git a/rts/linker/MMap.h b/rts/linker/MMap.h +new file mode 100644 +index 0000000..683ec1f +--- /dev/null ++++ b/rts/linker/MMap.h +@@ -0,0 +1,82 @@ ++#pragma once ++ ++#include "BeginPrivate.h" ++ ++#if defined(aarch64_HOST_ARCH) ++// On AArch64 MAP_32BIT is not available but we are still bound by the small ++// memory model. Consequently we still try using the MAP_LOW_MEM allocation ++// strategy. ++#define MAP_LOW_MEM ++#endif ++ ++/* ++ * Note [MAP_LOW_MEM] ++ * ~~~~~~~~~~~~~~~~~~ ++ * Due to the small memory model (see above), on x86_64 and AArch64 we have to ++ * map all our non-PIC object files into the low 2Gb of the address space (why ++ * 2Gb and not 4Gb? Because all addresses must be reachable using a 32-bit ++ * signed PC-relative offset). On x86_64 Linux we can do this using the ++ * MAP_32BIT flag to mmap(), however on other OSs (e.g. *BSD, see #2063, and ++ * also on Linux inside Xen, see #2512), we can't do this. So on these ++ * systems, we have to pick a base address in the low 2Gb of the address space ++ * and try to allocate memory from there. ++ * ++ * The same holds for aarch64, where the default, even with PIC, model ++ * is 4GB. The linker is free to emit AARCH64_ADR_PREL_PG_HI21 ++ * relocations. ++ * ++ * We pick a default address based on the OS, but also make this ++ * configurable via an RTS flag (+RTS -xm) ++ */ ++ ++#if defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH) ++// Try to use stg_upd_frame_info as the base. We need to be within +-4GB of that ++// address, otherwise we violate the aarch64 memory model. Any object we load ++// can potentially reference any of the ones we bake into the binary (and list) ++// in RtsSymbols. Thus we'll need to be within +-4GB of those, ++// stg_upd_frame_info is a good candidate as it's referenced often. ++#define LINKER_LOAD_BASE ((void *) &stg_upd_frame_info) ++#elif defined(x86_64_HOST_ARCH) && defined(mingw32_HOST_OS) ++// On Windows (which now uses high-entropy ASLR by default) we need to ensure ++// that we map code near the executable image. We use stg_upd_frame_info as a ++// proxy for the image location. ++#define LINKER_LOAD_BASE ((void *) &stg_upd_frame_info) ++#elif defined(MAP_32BIT) || DEFAULT_LINKER_ALWAYS_PIC ++// Try to use MAP_32BIT ++#define LINKER_LOAD_BASE ((void *) 0x0) ++#else ++// A guess: 1 GB. ++#define LINKER_LOAD_BASE ((void *) 0x40000000) ++#endif ++ ++/** Access modes for mprotectForLinker */ ++typedef enum { ++ MEM_NO_ACCESS, ++ MEM_READ_ONLY, ++ MEM_READ_WRITE, ++ // Initially map pages as rw- and then switch to r-x later. ++ MEM_READ_WRITE_THEN_READ_EXECUTE, ++ MEM_READ_EXECUTE, ++ MEM_READ_WRITE_EXECUTE, ++} MemoryAccess; ++ ++extern void *mmap_32bit_base; ++ ++// Map read/write anonymous memory. ++void *mmapAnonForLinker (size_t bytes); ++ ++// Change protection of previous mapping memory. ++void mprotectForLinker(void *start, size_t len, MemoryAccess mode); ++ ++// Release a mapping. ++void munmapForLinker (void *addr, size_t bytes, const char *caller); ++ ++#if !defined(mingw32_HOST_OS) ++// Map a file. ++// ++// Note that this not available on Windows since file mapping on Windows is ++// sufficiently different to warrant its own interface. ++void *mmapForLinker (size_t bytes, MemoryAccess prot, uint32_t flags, int fd, int offset); ++#endif ++ ++#include "EndPrivate.h" +diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c +index d633699..a9b5f0c 100644 +--- a/rts/linker/MachO.c ++++ b/rts/linker/MachO.c +@@ -11,6 +11,7 @@ + #include "linker/MachO.h" + #include "linker/CacheFlush.h" + #include "linker/SymbolExtras.h" ++#include "linker/MMap.h" + + #include + #include +@@ -55,7 +56,7 @@ int64_t signExtend(uint64_t val, uint8_t bits); + static bool isVectorOp(uint32_t *p); + static bool isLoadStore(uint32_t *p); + +-/* aarch64 relocations may contain an addend alreay in the position ++/* aarch64 relocations may contain an addend already in the position + * where we want to write the address offset to. Thus decoding as well + * as encoding is needed. + */ +@@ -240,7 +241,7 @@ resolveImports( + addr = (SymbolAddr*) (symbol->nlist->n_value); + IF_DEBUG(linker, debugBelch("resolveImports: undefined external %s has value %p\n", symbol->name, addr)); + } else { +- addr = lookupDependentSymbol(symbol->name, oc); ++ addr = lookupDependentSymbol(symbol->name, oc, NULL); + IF_DEBUG(linker, debugBelch("resolveImports: looking up %s, %p\n", symbol->name, addr)); + } + +@@ -250,7 +251,6 @@ resolveImports( + "%s: unknown symbol `%s'", oc->fileName, symbol->name); + return 0; + } +- ASSERT(addr); + + checkProddableBlock(oc, + ((void**)(oc->image + sect->offset)) + i, +@@ -289,13 +289,23 @@ decodeAddend(ObjectCode * oc, Section * section, MachORelocationInfo * ri) { + checkProddableBlock(oc, (void*)p, 1 << ri->r_length); + + switch(ri->r_type) { +- case ARM64_RELOC_UNSIGNED: ++ case ARM64_RELOC_UNSIGNED: { ++ switch (ri->r_length) { ++ case 0: return signExtend(*(uint8_t*)p, 8 << ri->r_length); ++ case 1: return signExtend(*(uint16_t*)p, 8 << ri->r_length); ++ case 2: return signExtend(*(uint32_t*)p, 8 << ri->r_length); ++ case 3: return signExtend(*(uint64_t*)p, 8 << ri->r_length); ++ default: ++ barf("Unsupported r_length (%d) for UNSIGNED relocation", ++ ri->r_length); ++ } ++ } + case ARM64_RELOC_SUBTRACTOR: { + switch (ri->r_length) { +- case 0: return signExtend(*(uint8_t*)p, 8 * (1 << ri->r_length)); +- case 1: return signExtend(*(uint16_t*)p, 8 * (1 << ri->r_length)); +- case 2: return signExtend(*(uint32_t*)p, 8 * (1 << ri->r_length)); +- case 3: return signExtend(*(uint64_t*)p, 8 * (1 << ri->r_length)); ++ case 0: return signExtend(*(uint8_t*)p, 8 << ri->r_length); ++ case 1: return signExtend(*(uint16_t*)p, 8 << ri->r_length); ++ case 2: return signExtend(*(uint32_t*)p, 8 << ri->r_length); ++ case 3: return signExtend(*(uint64_t*)p, 8 << ri->r_length); + default: + barf("Unsupported r_length (%d) for SUBTRACTOR relocation", + ri->r_length); +@@ -303,7 +313,7 @@ decodeAddend(ObjectCode * oc, Section * section, MachORelocationInfo * ri) { + } + case ARM64_RELOC_BRANCH26: + /* take the lower 26 bits and shift them by 2. The last two are +- * implicilty 0 (as the instructions must be aligned!) and sign ++ * implicitly 0 (as the instructions must be aligned!) and sign + * extend to 64 bits. + */ + return signExtend( (*p & 0x03FFFFFF) << 2, 28 ); +@@ -356,10 +366,23 @@ encodeAddend(ObjectCode * oc, Section * section, + checkProddableBlock(oc, (void*)p, 1 << ri->r_length); + + switch (ri->r_type) { +- case ARM64_RELOC_UNSIGNED: ++ case ARM64_RELOC_UNSIGNED: { ++ if(!fitsBits(8 << ri->r_length, addend)) ++ barf("Relocation out of range for UNSIGNED"); ++ switch (ri->r_length) { ++ case 0: *(uint8_t*)p = (uint8_t)addend; break; ++ case 1: *(uint16_t*)p = (uint16_t)addend; break; ++ case 2: *(uint32_t*)p = (uint32_t)addend; break; ++ case 3: *(uint64_t*)p = (uint64_t)addend; break; ++ default: ++ barf("Unsupported r_length (%d) for UNSIGNED relocation", ++ ri->r_length); ++ } ++ return; ++ } + case ARM64_RELOC_SUBTRACTOR: { + if(!fitsBits(8 << ri->r_length, addend)) +- barf("Relocation out of range for UNSIGNED/SUBTRACTOR"); ++ barf("Relocation out of range for SUBTRACTOR"); + switch (ri->r_length) { + case 0: *(uint8_t*)p = (uint8_t)addend; break; + case 1: *(uint16_t*)p = (uint16_t)addend; break; +@@ -463,11 +486,33 @@ makeGot(ObjectCode * oc) { + + void + freeGot(ObjectCode * oc) { +- munmap(oc->info->got_start, oc->info->got_size); ++ /* sanity check */ ++ if(NULL != oc->info->got_start && oc->info->got_size > 0) { ++ munmapForLinker(oc->info->got_start, oc->info->got_size, "freeGot"); ++ } + oc->info->got_start = NULL; + oc->info->got_size = 0; + } + ++// Retrieve symbol value ++static uint64_t symbol_value(ObjectCode* oc, MachOSymbol* symbol) { ++ uint64_t value = 0; ++ if(symbol->nlist->n_type & N_EXT) { ++ /* external symbols should be able to be ++ * looked up via the lookupDependentSymbol function. ++ * Either through the global symbol hashmap ++ * or asking the system, if not found ++ * in the symbol hashmap ++ */ ++ value = (uint64_t)lookupDependentSymbol((char*)symbol->name, oc, NULL); ++ if(!value) ++ barf("Could not lookup symbol: %s!", symbol->name); ++ } else { ++ value = (uint64_t)symbol->addr; // address of the symbol. ++ } ++ return value; ++} ++ + static int + relocateSectionAarch64(ObjectCode * oc, Section * section) + { +@@ -477,7 +522,7 @@ relocateSectionAarch64(ObjectCode * oc, Section * section) + * + * - loaded the sections (potentially into non-contiguous memory), + * (in ocGetNames_MachO) +- * - registered exported sybmols ++ * - registered exported symbols + * (in ocGetNames_MachO) + * - and fixed the nlist[i].n_value for common storage symbols (N_UNDF, + * N_EXT and n_value != 0) so that they point into the common storage. +@@ -495,43 +540,45 @@ relocateSectionAarch64(ObjectCode * oc, Section * section) + case ARM64_RELOC_UNSIGNED: { + MachOSymbol* symbol = &oc->info->macho_symbols[ri->r_symbolnum]; + int64_t addend = decodeAddend(oc, section, ri); +- uint64_t value = 0; +- if(symbol->nlist->n_type & N_EXT) { +- /* external symbols should be able to be +- * looked up via the lookupDependentSymbol function. +- * Either through the global symbol hashmap +- * or asking the system, if not found +- * in the symbol hashmap +- */ +- value = (uint64_t)lookupDependentSymbol((char*)symbol->name, oc); +- if(!value) +- barf("Could not lookup symbol: %s!", symbol->name); +- } else { +- value = (uint64_t)symbol->addr; // address of the symbol. +- } ++ uint64_t value = symbol_value(oc, symbol); + encodeAddend(oc, section, ri, value + addend); + break; + } + case ARM64_RELOC_SUBTRACTOR: + { +- MachOSymbol* symbol = &oc->info->macho_symbols[ri->r_symbolnum]; + // subtractor and unsigned are called in tandem: + // first pc <- pc - symbol address (SUBTRACTOR) + // second pc <- pc + symbol address (UNSIGNED) + // to achieve pc <- pc + target - base. +- // +- // the current implementation uses absolute addresses, +- // which is simpler than trying to do this section +- // relative, but could more easily lead to overflow. +- // ++ ++ // check that the following relocation exists and has the ++ // expected ARM64_RELOC_UNSIGNED type + if(!(i+1 < nreloc) + || !(section->info->relocation_info[i+1].r_type + == ARM64_RELOC_UNSIGNED)) + barf("SUBTRACTOR relocation *must* be followed by UNSIGNED relocation."); + ++ // we *know* that the next relocation is ARM64_RELOC_UNSIGNED ++ // (see above). So let's process both relocations and write the ++ // combined result in the target location. This prevents ++ // overflow. (Compared to trying to store the intermediate ++ // result which may not fit in the target bits). ++ ++ // sub part (ARM64_RELOC_SUBTRACTOR) ++ MachOSymbol* symbol1 = &oc->info->macho_symbols[ri->r_symbolnum]; ++ uint64_t sub_value = symbol_value(oc, symbol1); ++ ++ // add part (ARM64_RELOC_UNSIGNED) ++ MachORelocationInfo * ri2 = §ion->info->relocation_info[i+1]; ++ MachOSymbol* symbol2 = &oc->info->macho_symbols[ri2->r_symbolnum]; ++ uint64_t add_value = symbol_value(oc, symbol2); ++ ++ // combine with addend and store + int64_t addend = decodeAddend(oc, section, ri); +- int64_t value = (uint64_t)symbol->addr; +- encodeAddend(oc, section, ri, addend - value); ++ encodeAddend(oc, section, ri, addend - sub_value + add_value); ++ ++ // skip next relocation: we've already handled it ++ i += 1; + break; + } + case ARM64_RELOC_BRANCH26: { +@@ -543,7 +590,7 @@ relocateSectionAarch64(ObjectCode * oc, Section * section) + uint64_t pc = (uint64_t)section->start + ri->r_address; + uint64_t value = 0; + if(symbol->nlist->n_type & N_EXT) { +- value = (uint64_t)lookupDependentSymbol((char*)symbol->name, oc); ++ value = (uint64_t)lookupDependentSymbol((char*)symbol->name, oc, NULL); + if(!value) + barf("Could not lookup symbol: %s!", symbol->name); + } else { +@@ -621,6 +668,14 @@ static int + relocateSection(ObjectCode* oc, int curSection) + { + Section * sect = &oc->sections[curSection]; ++ ++ IF_DEBUG(linker, debugBelch("relocateSection %d, info: %p\n", curSection, (void*)sect->info)); ++ ++ // empty sections (without segments), won't have their info filled. ++ // there is no relocation to be done for them. ++ if(sect->info == NULL) ++ return 1; ++ + MachOSection * msect = sect->info->macho_section; // for access convenience + MachORelocationInfo * relocs = sect->info->relocation_info; + MachOSymbol * symbols = oc->info->macho_symbols; +@@ -653,14 +708,14 @@ relocateSection(ObjectCode* oc, int curSection) + int relocLenBytes; + int nextInstrAdj = 0; + +- IF_DEBUG(linker, debugBelch("relocateSection: relocation %d\n", i)); +- IF_DEBUG(linker, debugBelch(" : type = %d\n", reloc->r_type)); +- IF_DEBUG(linker, debugBelch(" : address = %d\n", reloc->r_address)); +- IF_DEBUG(linker, debugBelch(" : symbolnum = %u\n", reloc->r_symbolnum)); +- IF_DEBUG(linker, debugBelch(" : pcrel = %d\n", reloc->r_pcrel)); +- IF_DEBUG(linker, debugBelch(" : length = %d\n", reloc->r_length)); +- IF_DEBUG(linker, debugBelch(" : extern = %d\n", reloc->r_extern)); +- IF_DEBUG(linker, debugBelch(" : type = %d\n", reloc->r_type)); ++ IF_DEBUG(linker_verbose, debugBelch("relocateSection: relocation %d\n", i)); ++ IF_DEBUG(linker_verbose, debugBelch(" : type = %d\n", reloc->r_type)); ++ IF_DEBUG(linker_verbose, debugBelch(" : address = %d\n", reloc->r_address)); ++ IF_DEBUG(linker_verbose, debugBelch(" : symbolnum = %u\n", reloc->r_symbolnum)); ++ IF_DEBUG(linker_verbose, debugBelch(" : pcrel = %d\n", reloc->r_pcrel)); ++ IF_DEBUG(linker_verbose, debugBelch(" : length = %d\n", reloc->r_length)); ++ IF_DEBUG(linker_verbose, debugBelch(" : extern = %d\n", reloc->r_extern)); ++ IF_DEBUG(linker_verbose, debugBelch(" : type = %d\n", reloc->r_type)); + + switch(reloc->r_length) + { +@@ -704,7 +759,7 @@ relocateSection(ObjectCode* oc, int curSection) + + + +- IF_DEBUG(linker, ++ IF_DEBUG(linker_verbose, + debugBelch("relocateSection: length = %d, thing = %" PRId64 ", baseValue = %p\n", + reloc->r_length, thing, (char *)baseValue)); + +@@ -715,7 +770,7 @@ relocateSection(ObjectCode* oc, int curSection) + SymbolName* nm = symbol->name; + SymbolAddr* addr = NULL; + +- IF_DEBUG(linker, debugBelch("relocateSection: making jump island for %s, extern = %d, X86_64_RELOC_GOT\n", ++ IF_DEBUG(linker_verbose, debugBelch("relocateSection: making jump island for %s, extern = %d, X86_64_RELOC_GOT\n", + nm, reloc->r_extern)); + + if (reloc->r_extern == 0) { +@@ -728,10 +783,11 @@ relocateSection(ObjectCode* oc, int curSection) + // symtab, or it is undefined, meaning dlsym must be used + // to resolve it. + +- addr = lookupDependentSymbol(nm, oc); +- IF_DEBUG(linker, debugBelch("relocateSection: looked up %s, " +- "external X86_64_RELOC_GOT or X86_64_RELOC_GOT_LOAD\n" +- " : addr = %p\n", nm, addr)); ++ addr = lookupDependentSymbol(nm, oc, NULL); ++ IF_DEBUG(linker_verbose, ++ debugBelch("relocateSection: looked up %s, " ++ "external X86_64_RELOC_GOT or X86_64_RELOC_GOT_LOAD\n" ++ " : addr = %p\n", nm, addr)); + + if (addr == NULL) { + errorBelch("\nlookupSymbol failed in relocateSection (RELOC_GOT)\n" +@@ -739,7 +795,7 @@ relocateSection(ObjectCode* oc, int curSection) + return 0; + } + } else { +- IF_DEBUG(linker, debugBelch("relocateSection: %s is not an exported symbol\n", nm)); ++ IF_DEBUG(linker_verbose, debugBelch("relocateSection: %s is not an exported symbol\n", nm)); + + // The symbol is not exported, or defined in another + // module, so it must be in the current object module, +@@ -754,9 +810,11 @@ relocateSection(ObjectCode* oc, int curSection) + + addr = symbol->addr; + +- IF_DEBUG(linker, debugBelch("relocateSection: calculated relocation of " +- "non-external X86_64_RELOC_GOT or X86_64_RELOC_GOT_LOAD\n")); +- IF_DEBUG(linker, debugBelch(" : addr = %p\n", addr)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("relocateSection: calculated relocation of " ++ "non-external X86_64_RELOC_GOT or X86_64_RELOC_GOT_LOAD\n")); ++ IF_DEBUG(linker_verbose, ++ debugBelch(" : addr = %p\n", addr)); + } else { + errorBelch("\nrelocateSection: %s is not exported," + " and should be defined in a section, but isn't!\n", nm); +@@ -776,20 +834,21 @@ relocateSection(ObjectCode* oc, int curSection) + SymbolName* nm = symbol->name; + SymbolAddr* addr = NULL; + +- IF_DEBUG(linker, debugBelch("relocateSection: looking up external symbol %s\n", nm)); +- IF_DEBUG(linker, debugBelch(" : type = %d\n", symbol->nlist->n_type)); +- IF_DEBUG(linker, debugBelch(" : sect = %d\n", symbol->nlist->n_sect)); +- IF_DEBUG(linker, debugBelch(" : desc = %d\n", symbol->nlist->n_desc)); +- IF_DEBUG(linker, debugBelch(" : value = %p\n", (void *)symbol->nlist->n_value)); ++ IF_DEBUG(linker_verbose, debugBelch("relocateSection: looking up external symbol %s\n", nm)); ++ IF_DEBUG(linker_verbose, debugBelch(" : type = %d\n", symbol->nlist->n_type)); ++ IF_DEBUG(linker_verbose, debugBelch(" : sect = %d\n", symbol->nlist->n_sect)); ++ IF_DEBUG(linker_verbose, debugBelch(" : desc = %d\n", symbol->nlist->n_desc)); ++ IF_DEBUG(linker_verbose, debugBelch(" : value = %p\n", (void *)symbol->nlist->n_value)); + + if ((symbol->nlist->n_type & N_TYPE) == N_SECT) { +- ASSERT(symbol->addr != NULL); ++ CHECK(symbol->addr != NULL); + value = (uint64_t) symbol->addr; +- IF_DEBUG(linker, debugBelch("relocateSection, defined external symbol %s, relocated address %p\n", +- nm, (void *)value)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("relocateSection, defined external symbol %s, relocated address %p\n", ++ nm, (void *)value)); + } + else { +- addr = lookupDependentSymbol(nm, oc); ++ addr = lookupDependentSymbol(nm, oc, NULL); + if (addr == NULL) + { + errorBelch("\nlookupSymbol failed in relocateSection (relocate external)\n" +@@ -798,7 +857,9 @@ relocateSection(ObjectCode* oc, int curSection) + } + + value = (uint64_t) addr; +- IF_DEBUG(linker, debugBelch("relocateSection: external symbol %s, address %p\n", nm, (void *)value)); ++ IF_DEBUG(linker_verbose, ++ debugBelch("relocateSection: external symbol %s, address %p\n", ++ nm, (void *)value)); + } + } + else +@@ -822,7 +883,7 @@ relocateSection(ObjectCode* oc, int curSection) + Section * targetSec = &oc->sections[targetSecNum]; + MachOSection * targetMacho = targetSec->info->macho_section; + +- IF_DEBUG(linker, ++ IF_DEBUG(linker_verbose, + debugBelch("relocateSection: internal relocation relative to section %d (%s, %s)\n", + targetSecNum, targetMacho->segname, targetMacho->sectname)); + +@@ -833,13 +894,15 @@ relocateSection(ObjectCode* oc, int curSection) + thing, (uint64_t) targetMacho->addr); + + uint64_t thingRelativeOffset = thing - targetMacho->addr; +- IF_DEBUG(linker, debugBelch(" " +- "unsigned displacement %" PRIx64 " with section relative offset %" PRIx64 "\n", ++ IF_DEBUG(linker_verbose, ++ debugBelch(" " ++ "unsigned displacement %" PRIx64 " with section relative offset %" PRIx64 "\n", + thing, thingRelativeOffset)); + + thing = (uint64_t) targetSec->start + thingRelativeOffset; +- IF_DEBUG(linker, debugBelch(" " +- "relocated address is %p\n", (void *) thing)); ++ IF_DEBUG(linker_verbose, ++ debugBelch(" " ++ "relocated address is %p\n", (void *) thing)); + + /* Compared to external relocation we don't need to adjust value + * any further since thing already has absolute address. +@@ -859,7 +922,7 @@ relocateSection(ObjectCode* oc, int curSection) + (void *) imThingLoc, (void *) targetMacho->addr); + + int64_t thingRelativeOffset = imThingLoc - targetMacho->addr; +- IF_DEBUG(linker, ++ IF_DEBUG(linker_verbose, + debugBelch(" " + "original displacement %" PRId64 " to %p with section relative offset %" PRIu64 "\n", + thing, (void *) imThingLoc, thingRelativeOffset)); +@@ -867,7 +930,7 @@ relocateSection(ObjectCode* oc, int curSection) + thing = (int64_t) ((uint64_t) targetSec->start + thingRelativeOffset) + - ((uint64_t) sect->start + baseValueOffset); + value = baseValue; // so that it further cancels out with baseValue +- IF_DEBUG(linker, ++ IF_DEBUG(linker_verbose, + debugBelch(" " + "relocated displacement %" PRId64 " to %p\n", + (int64_t) thing, (void *) (baseValue + thing))); +@@ -879,42 +942,42 @@ relocateSection(ObjectCode* oc, int curSection) + } + } + +- IF_DEBUG(linker, debugBelch("relocateSection: value = %p\n", (void *) value)); ++ IF_DEBUG(linker_verbose, debugBelch("relocateSection: value = %p\n", (void *) value)); + + if (type == X86_64_RELOC_BRANCH) + { + if((int32_t)(value - baseValue) != (int64_t)(value - baseValue)) + { +- ASSERT(reloc->r_extern); ++ CHECK(reloc->r_extern); + value = (uint64_t) &makeSymbolExtra(oc, reloc->r_symbolnum, value) + -> jumpIsland; + } +- ASSERT((int32_t)(value - baseValue) == (int64_t)(value - baseValue)); ++ CHECK((int32_t)(value - baseValue) == (int64_t)(value - baseValue)); + type = X86_64_RELOC_SIGNED; + } + + switch(type) + { + case X86_64_RELOC_UNSIGNED: +- ASSERT(!reloc->r_pcrel); ++ CHECK(!reloc->r_pcrel); + thing += value; + break; + case X86_64_RELOC_SIGNED: + case X86_64_RELOC_SIGNED_1: + case X86_64_RELOC_SIGNED_2: + case X86_64_RELOC_SIGNED_4: +- ASSERT(reloc->r_pcrel); ++ CHECK(reloc->r_pcrel); + thing += value - baseValue; + break; + case X86_64_RELOC_SUBTRACTOR: +- ASSERT(!reloc->r_pcrel); ++ CHECK(!reloc->r_pcrel); + thing -= value; + break; + default: + barf("unknown relocation"); + } + +- IF_DEBUG(linker, debugBelch("relocateSection: thing = %p\n", (void *) thing)); ++ IF_DEBUG(linker_verbose, debugBelch("relocateSection: thing = %p\n", (void *) thing)); + + /* Thing points to memory within one of the relocated sections. We can + * probe the first byte to sanity check internal relocations. +@@ -952,22 +1015,18 @@ relocateSection(ObjectCode* oc, int curSection) + SectionKind + getSectionKind_MachO(MachOSection *section) + { +- SectionKind kind; +- +- /* todo: Use section flags instead */ +- if (0==strcmp(section->sectname,"__text")) { +- kind = SECTIONKIND_CODE_OR_RODATA; +- } else if (0==strcmp(section->sectname,"__const") || +- 0==strcmp(section->sectname,"__data") || +- 0==strcmp(section->sectname,"__bss") || +- 0==strcmp(section->sectname,"__common") || +- 0==strcmp(section->sectname,"__mod_init_func")) { +- kind = SECTIONKIND_RWDATA; ++ uint8_t s_type = section->flags & SECTION_TYPE; ++ if (s_type == S_MOD_INIT_FUNC_POINTERS) { ++ return SECTIONKIND_INIT_ARRAY; ++ } else if (s_type == S_MOD_TERM_FUNC_POINTERS) { ++ return SECTIONKIND_FINI_ARRAY; ++ } else if (0==strcmp(section->segname,"__TEXT")) { ++ return SECTIONKIND_CODE_OR_RODATA; ++ } else if (0==strcmp(section->segname,"__DATA")) { ++ return SECTIONKIND_RWDATA; + } else { +- kind = SECTIONKIND_OTHER; ++ return SECTIONKIND_OTHER; + } +- +- return kind; + } + + /* Calculate the # of active segments and their sizes based on section +@@ -1136,7 +1195,7 @@ ocGetNames_MachO(ObjectCode* oc) + SymbolAddr* commonStorage = NULL; + unsigned long commonCounter; + +- IF_DEBUG(linker,debugBelch("ocGetNames_MachO: start\n")); ++ IF_DEBUG(linker,debugBelch("ocGetNames_MachO: %s start\n", OC_INFORMATIVE_FILENAME(oc))); + + Section *secArray; + secArray = (Section*)stgCallocBytes( +@@ -1200,7 +1259,7 @@ ocGetNames_MachO(ObjectCode* oc) + unsigned nstubs = numberOfStubsForSection(oc, sec_idx); + unsigned stub_space = STUB_SIZE * nstubs; + +- void * mem = mmapForLinker(section->size+stub_space, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); ++ void * mem = mmapForLinker(section->size+stub_space, MEM_READ_WRITE, MAP_ANON, -1, 0); + + if( mem == MAP_FAILED ) { + sysErrorBelch("failed to mmap allocated memory to load section %d. " +@@ -1316,42 +1375,45 @@ ocGetNames_MachO(ObjectCode* oc) + SymbolName* nm = oc->info->macho_symbols[i].name; + if (oc->info->nlist[i].n_type & N_STAB) + { +- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: Skip STAB: %s\n", nm)); ++ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: Skip STAB: %s\n", nm)); + } + else if ((oc->info->nlist[i].n_type & N_TYPE) == N_SECT) + { + if (oc->info->nlist[i].n_type & N_EXT) + { + if ( (oc->info->nlist[i].n_desc & N_WEAK_DEF) +- && lookupDependentSymbol(nm, oc)) { ++ && lookupDependentSymbol(nm, oc, NULL)) { + // weak definition, and we already have a definition +- IF_DEBUG(linker, debugBelch(" weak: %s\n", nm)); ++ IF_DEBUG(linker_verbose, debugBelch(" weak: %s\n", nm)); + } + else + { +- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting %s\n", nm)); ++ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: inserting %s\n", nm)); + SymbolAddr* addr = oc->info->macho_symbols[i].addr; +- ++ // TODO: Make figure out how to determine this from the object file ++ SymType sym_type = SYM_TYPE_CODE; + ghciInsertSymbolTable( oc->fileName + , symhash + , nm + , addr +- , HS_BOOL_FALSE | (HS_BOOL_FALSE << 1) ++ , HS_BOOL_FALSE ++ , sym_type + , oc); + + oc->symbols[curSymbol].name = nm; + oc->symbols[curSymbol].addr = addr; ++ oc->symbols[curSymbol].type = sym_type; + curSymbol++; + } + } + else + { +- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: \t...not external, skipping %s\n", nm)); ++ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: \t...not external, skipping %s\n", nm)); + } + } + else + { +- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: \t...not defined in this section, skipping %s\n", nm)); ++ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: \t...not defined in this section, skipping %s\n", nm)); + } + } + } +@@ -1373,10 +1435,12 @@ ocGetNames_MachO(ObjectCode* oc) + + /* also set the final address to the macho_symbol */ + oc->info->macho_symbols[i].addr = (void*)commonCounter; ++ /* TODO: Figure out how to determine this from object */ ++ SymType sym_type = SYM_TYPE_CODE; + +- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting common symbol: %s\n", nm)); ++ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: inserting common symbol: %s\n", nm)); + ghciInsertSymbolTable(oc->fileName, symhash, nm, +- (void*)commonCounter, HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), oc); ++ (void*)commonCounter, HS_BOOL_FALSE, sym_type, oc); + oc->symbols[curSymbol].name = nm; + oc->symbols[curSymbol].addr = oc->info->macho_symbols[i].addr; + curSymbol++; +@@ -1418,7 +1482,7 @@ ocMprotect_MachO( ObjectCode *oc ) + if(segment->size == 0) continue; + + if(segment->prot == SEGMENT_PROT_RX) { +- mmapForLinkerMarkExecutable(segment->start, segment->size); ++ mprotectForLinker(segment->start, segment->size, MEM_READ_EXECUTE); + } + } + +@@ -1433,7 +1497,7 @@ ocMprotect_MachO( ObjectCode *oc ) + if(section->alloc == SECTION_M32) continue; + switch (section->kind) { + case SECTIONKIND_CODE_OR_RODATA: { +- mmapForLinkerMarkExecutable(section->mapped_start, section->mapped_size); ++ mprotectForLinker(section->mapped_start, section->mapped_size, MEM_READ_EXECUTE); + break; + } + default: +@@ -1447,7 +1511,7 @@ ocMprotect_MachO( ObjectCode *oc ) + int + ocResolve_MachO(ObjectCode* oc) + { +- IF_DEBUG(linker, debugBelch("ocResolve_MachO: start\n")); ++ IF_DEBUG(linker, debugBelch("ocResolve_MachO: %s start\n", OC_INFORMATIVE_FILENAME(oc))); + + if(NULL != oc->info->dsymCmd) + { +@@ -1458,6 +1522,9 @@ ocResolve_MachO(ObjectCode* oc) + for (int i = 0; i < oc->n_sections; i++) + { + const char * sectionName = oc->info->macho_sections[i].sectname; ++ ++ IF_DEBUG(linker, debugBelch("ocResolve_MachO: section %d/%d: %s\n", i, oc->n_sections, sectionName)); ++ + if( !strcmp(sectionName,"__la_symbol_ptr") + || !strcmp(sectionName,"__la_sym_ptr2") + || !strcmp(sectionName,"__la_sym_ptr3")) +@@ -1481,7 +1548,7 @@ ocResolve_MachO(ObjectCode* oc) + } + else + { +- IF_DEBUG(linker, debugBelch("ocResolve_MachO: unknown section\n")); ++ IF_DEBUG(linker, debugBelch("ocResolve_MachO: unknown section %d/%d\n", i, oc->n_sections)); + } + } + } +@@ -1495,7 +1562,7 @@ ocResolve_MachO(ObjectCode* oc) + * have the address. + */ + if(NULL == symbol->addr) { +- symbol->addr = lookupDependentSymbol((char*)symbol->name, oc); ++ symbol->addr = lookupDependentSymbol((char*)symbol->name, oc, NULL); + if(NULL == symbol->addr) { + errorBelch("Failed to lookup symbol: %s", symbol->name); + return 0; +@@ -1522,7 +1589,7 @@ ocResolve_MachO(ObjectCode* oc) + + for(int i = 0; i < oc->n_sections; i++) + { +- IF_DEBUG(linker, debugBelch("ocResolve_MachO: relocating section %d\n", i)); ++ IF_DEBUG(linker, debugBelch("ocResolve_MachO: relocating section %d/%d\n", i, oc->n_sections)); + + #if defined(aarch64_HOST_ARCH) + if (!relocateSectionAarch64(oc, &oc->sections[i])) +@@ -1554,12 +1621,7 @@ ocRunInit_MachO ( ObjectCode *oc ) + for (int i = 0; i < oc->n_sections; i++) { + IF_DEBUG(linker, debugBelch("ocRunInit_MachO: checking section %d\n", i)); + +- // ToDo: replace this with a proper check for the S_MOD_INIT_FUNC_POINTERS +- // flag. We should do this elsewhere in the Mach-O linker code +- // too. Note that the system linker will *refuse* to honor +- // sections which don't have this flag, so this could cause +- // weird behavior divergence (albeit reproducible). +- if (0 == strcmp(oc->info->macho_sections[i].sectname, "__mod_init_func")) { ++ if (oc->sections[i].kind == SECTIONKIND_INIT_ARRAY) { + IF_DEBUG(linker, debugBelch("ocRunInit_MachO: running mod init functions\n")); + + void *init_startC = oc->sections[i].start; +@@ -1579,6 +1641,35 @@ ocRunInit_MachO ( ObjectCode *oc ) + return 1; + } + ++int ++ocRunFini_MachO ( ObjectCode *oc ) ++{ ++ if (NULL == oc->info->segCmd) { ++ barf("ocRunInit_MachO: no segment load command"); ++ } ++ ++ for (int i = 0; i < oc->n_sections; i++) { ++ IF_DEBUG(linker, debugBelch("ocRunFini_MachO: checking section %d\n", i)); ++ ++ if (oc->sections[i].kind == SECTIONKIND_FINI_ARRAY) { ++ IF_DEBUG(linker, debugBelch("ocRunFini_MachO: running mod fini functions\n")); ++ ++ void *fini_startC = oc->sections[i].start; ++ fini_t *fini = (fini_t*)fini_startC; ++ fini_t *fini_end = (fini_t*)((uint8_t*)fini_startC ++ + oc->sections[i].info->macho_section->size); ++ ++ for (int pn = 0; fini < fini_end; fini++, pn++) { ++ IF_DEBUG(linker, debugBelch("ocRunFini_MachO: function pointer %d at %p to %p\n", ++ pn, (void *) fini, (void *) *fini)); ++ (*fini)(); ++ } ++ } ++ } ++ ++ return 1; ++} ++ + /* + * Figure out by how much to shift the entire Mach-O file in memory + * when loading so that its single segment ends up 16-byte-aligned +diff --git a/rts/linker/MachO.h b/rts/linker/MachO.h +index 518c2ce..4af3532 100644 +--- a/rts/linker/MachO.h ++++ b/rts/linker/MachO.h +@@ -1,11 +1,10 @@ + #pragma once + + #include "Rts.h" ++#include "MachOTypes.h" + + #include "BeginPrivate.h" + +-#include "MachOTypes.h" +- + void ocInit_MachO ( ObjectCode* oc ); + void ocDeinit_MachO ( ObjectCode* oc ); + int ocVerifyImage_MachO ( ObjectCode* oc ); +@@ -13,6 +12,7 @@ int ocBuildSegments_MachO ( ObjectCode* oc ); + int ocGetNames_MachO ( ObjectCode* oc ); + int ocResolve_MachO ( ObjectCode* oc ); + int ocRunInit_MachO ( ObjectCode* oc ); ++int ocRunFini_MachO ( ObjectCode* oc ); + int machoGetMisalignment ( FILE * ); + int ocAllocateExtras_MachO ( ObjectCode* oc ); + +diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c +index f4fc98d..531ed4d 100644 +--- a/rts/linker/PEi386.c ++++ b/rts/linker/PEi386.c +@@ -55,11 +55,61 @@ + COFF_IMPORT_LIB and commonly has the file extension .lib + + * GNU BFD import format - The import library format defined and used by GNU +- tools. See note below. ++ tools and commonly has the file extension .dll.a . See note below. ++ ++ Note [The need for import libraries] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ In its original incarnation, PE had no native support for dynamic linking. ++ Let's examine how dynamic linking is now implemented. Consider a simple ++ program with a reference to function and data symbols provided by a DLL: ++ ++ // myprogram.c ++ #include ++ int do_something() { ++ libfoo_function(); ++ return libfoo_data; ++ } ++ ++ The header file shipped with libfoo will look like the following: ++ ++ // libfoo.h ++ __declspec(dllimport) int libfoo_function(); ++ __declspec(dllimport) int libfoo_data; ++ ++ When the C compiler is compiling myprogram.c, it will see these dllimport ++ declarations and use them to produce a module definition (.def) file which ++ summarizes the symbols that we expect the DLL to export. This will look like: ++ ++ EXPORTS ++ libfoo_function ++ libfoo_data DATA ++ ++ The C compiler will pass this file to the `dlltool` utility, which will ++ generate an *import library*. The import library will contain ++ placeholder symbols (with names starting with `__imp_`), along with ++ instructions for the dynamic linker to fix-up these references to point to ++ the "real" symbol definition. ++ ++ For historical reasons involving lack of documentation, NDAs, and (probably) ++ Steve Balmer, there are two flavours of import flavours: ++ ++ * Native Windows-style import libraries. These typically bear the .lib file ++ extension and encode their relocation information in the `.idata` section. ++ Documentation for this format is not available ++ [here](https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#import-library-format). ++ These are handled in `checkAndLoadImportLibrary()` ++ ++ * GNU BFD-style import libraries. These typically have the .dll.a ++ extension and encode the relocation information in a set of sections ++ named `.idata$` where `` is an integer which encodes the section's ++ meaning. Somewhat ironically, despite being devised in response to the ++ native Windows format having no public documentation, there is no official ++ documentation for this format but Note [BFD import library] attempts to ++ summarize what we know. These are handled in `ocGetNames_PEi386()`. ++ + + Note [BFD import library] + ~~~~~~~~~~~~~~~~~~~~~~~~~ +- + On Windows, compilers don't link directly to dynamic libraries. + The reason for this is that the exports are not always by symbol, the + Import Address Table (IAT) also allows exports by ordinal number +@@ -78,7 +128,7 @@ + + Anyway, the Windows PE format specifies a simple and efficient format for + this: It's essentially a list, saying these X symbols can be found in DLL y. +- Commonly, y is a versioned name. e.g. liby_43.dll. This is an artifact of ++ Commonly, y is a versioned name. e.g. `liby_43.dll`. This is an artifact of + the days when Windows did not support side-by-side assemblies. So the + solution was to version the DLLs by renaming them to include explicit + version numbers, and to then use the import libraries to point to the right +@@ -89,35 +139,62 @@ + have created their own format. This format is either named using the suffix + .dll.a or .a depending on the tool that makes them. This format is + undocumented. However the source of dlltool.c in binutils is pretty handy to +- understant it. ++ understand it (see binutils/dlltool.c; grep for ".idata section description"). + + To understand the implementation in GHC, this is what is important: + +- the .idata section group is used to hold this information. An import library ++ The import library is generally an archive containing one object file for ++ each imported symbol. In addition, there is a "head" object, which contains ++ the name of the DLL which the symbols are imported from, among other things. ++ ++ The `.idata$` section group is used to hold this information. An import library + object file will always have these section groups, but the specific + configuration depends on what the purpose of the file is. They will also + never have a CODE or DATA section, though depending on the tool that creates + them they may have the section headers, which will mostly be empty. + +- You have to different possible configuration: ++ The import data sections consist of the following: ++ ++ * `.idata$2` contains the Import Directory Table (IDT), which contains an entry ++ for each imported DLL. Each entry contains: a reference to the DLL's name ++ (in `.idata$7`) and references to its entries in the ILT and IAT sections. ++ This is contained in the head object. ++ ++ * `.idata$6` contains the Hint Name Table (HNT). This is a table of ++ of (symbol ordinal, symbol name) pairs, which are referred to be the ILT ++ and IAT as described below. ++ ++ * `.idata$5` contains the Import Address Table (IAT). This consists of an ++ array of pointers (one array for each imported DLL) which the loader will ++ update to point to the target symbol identified by the hint referenced by ++ the corresponding ILT entry. Moreover, the IAT pointers' initial values ++ also point to the corresponding HNT entry. ++ ++ * `.idata$4` contains the Import Lookup Table (ILT). This contains an array ++ of references to HNT entries for each imported DLL. + +- 1) Those that define a redirection. In this case the .idata$7 section will ++ * `.idata$7` contains the names of the imported DLLs. This is contained ++ in the head object. ++ ++ You have two different possible configurations: ++ ++ 1) Those that define a redirection. In this case the `.idata$7` section will + contain the name of the actual dll to load. This will be the only content + of the section. In the symbol table, the last symbol will be the name + used to refer to the dll in the relocation tables. This name will always +- be in the format "symbol_name_iname", however when refered to, the format +- "_head_symbol_name" is used. ++ be in the format `symbol_name_iname`, however when referred to, the format ++ `_head_symbol_name` is used. + +- We record this symbol early on during GetNames and load the dll and use ++ We record this symbol early on during `ocGetNames` and load the dll and use + the module handle as the symbol address. + +- 2) Symbol definitions. In this case .idata$6 will contain the symbol to load. +- This is stored in the fixed format of 2-byte ordinals followed by a null +- terminated string with the symbol name. The ordinal is to be used when +- the dll does not export symbols by name. (NOTE: We don't currently +- support this in the runtime linker, but it's easy to add should it be +- needed). The last symbol in the symbol table of the section will contain +- the name symbol which contains the dll name to use to resolve the ++ 2) Symbol definitions. In this case the HNT (`.idata$6`) will contain the ++ symbol to load. This is stored in the fixed format of 2-byte ordinals ++ followed by (null-terminated) symbol name. The ordinal is ++ to be used when the DLL does not export symbols by name. (note: We don't ++ currently support this in the runtime linker, but it's easy to add should ++ it be needed). The last symbol in the symbol table of the section will ++ contain the name symbol which contains the dll name to use to resolve the + reference. + + As a technicality, this also means that the GCC format will allow us to use +@@ -126,50 +203,145 @@ + required for dynamic linking support for GHC. So the runtime linker now + supports this too. + +- Note [Memory allocation] +- ~~~~~~~~~~~~~~~~~~~~~~~~ + +- Previously on Windows we would use VirtualAlloc to allocate enough space for +- loading the entire object file into memory and keep it there for the duration +- until the entire object file has been unloaded. +- +- This has a couple of problems, first of, VirtualAlloc and the other Virtual +- functions interact directly with the memory manager. Requesting memory from +- VirtualAlloc will always return whole pages (32k), aligned on a 4k boundary. +- +- This means for an object file of size N kbytes, we're always wasting 32-N +- kbytes of memory. Nothing else can access this memory. +- +- Because of this we're now using HeapAlloc and other heap function to create +- a private heap. Another solution would have been to write our own memory +- manager to keep track of where we have free memory, but the private heap +- solution is simpler. +- +- The private heap is created with full rights just as the pages we used to get +- from VirtualAlloc (e.g. READ/WRITE/EXECUTE). In the end we end up using +- memory much more efficiently than before. The downside is that heap memory +- is always Allocated AND Committed, thus when the heap resizes the new size is +- committed. It becomes harder to see how much we're actually using. This makes +- it seem like for small programs that we're using more memory than before. +- Certainly a clean GHCi startup will have a slightly higher commit count. +- +- The second major change in how we allocate memory is that we no longer need +- the entire object file. We now allocate the object file using normal malloc +- and instead read bits from it. All tables are stored in the Object file info +- table and are discarded as soon as they are no longer needed, e.g. after +- relocation is finished. Only section data is kept around, but this data is +- copied into the private heap. +- +- The major knock on effect of this is that we have more memory to use in the +- sub 2GB range, which means that Template Haskell should fail a lot less as we +- will violate the small memory model much less than before. +- +- Note [Section alignment] ++ Example: Dynamic code references ++ -------------------------------- ++ To see what such an import library looks like, let's first start with the case ++ of a function (e.g. `libfoo_function` above) with bind-now semantics (lazy-loading ++ will look much different). The import library will contain the following: ++ ++ .section .text ++ # This stub (which Windows calls a thunk) is what calls to ++ # libfoo_function will hit if the symbol isn't declared with ++ # __declspec(dllimport) ++ libfoo_function: ++ jmp *0x0(%rip) ++ .quad __imp_libfoo_function ++ ++ .section .idata$5 # IAT ++ # This is the location which the loader will ++ # update to point to the definition ++ # of libfoo_function ++ __imp_libfoo_function: ++ .quad hint1 - __image_base__ ++ ++ .section .idata$4 # ILT ++ # This (and hint1 below) is what tells the ++ # loader where __imp_libfoo_function should point ++ ilt1: ++ .quad hint1 - __image_base__ ++ ++ .section .idata$6 # HNT ++ hint1: ++ .short ORDINAL_OF_libfoo_function ++ .asciiz "libfoo_function" ++ ++ To handle a reference to an IAT entry like `__imp_libfoo_function`, the GHC ++ linker will (in `lookupSymbolInDLLs`) first strip off the `__imp_` prefix to ++ find the name of the referenced dynamic symbol. It then resolves the ++ symbol's address and allocates an `IndirectAddr` where it can place the ++ address, which it will return as the resolution of the `___libfoo_function`. ++ ++ Example: Dynamic data references ++ -------------------------------- ++ Let's now consider the import library for a data symbol. This is essentially ++ equivalent to the code case, but without the need to emit a thunk: ++ ++ .section .idata$5 # IAT ++ __imp_libfoo_data: ++ .quad hint2 - __image_base__ ++ ++ .section .idata$4 # ILT ++ ilt2: ++ .quad hint2 - __image_base__ ++ ++ .section .idata$6 # ILT ++ hint2: ++ .short ORDINAL_OF_libfoo_data ++ .asciiz "libfoo_data" ++ ++ ++ Note [GHC Linking model and import libraries] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ The above describes how import libraries work for static linking. ++ Fundamentally this does not apply to dynamic linking as we do in GHC. ++ The issue is two-folds: ++ ++ 1. In the linking model above it is expected that the .idata sections be ++ materialized into PLTs during linking. However in GHC we never create ++ PLTs, but have out own mechanism for this which is the jump island ++ machinery. This is required for efficiency. For one materializing the ++ .idata sections would result in wasting pages. We'd use one page for ++ every ~100 bytes. This is extremely wasteful and also fragments the ++ memory. Secondly the dynamic linker is lazy. We only perform the final ++ loading if the symbol is used, however with an import library we can ++ discard the actual OC immediately after reading it. This prevents us from ++ keeping ~1k in memory per symbol for no reason. ++ ++ 2. GHC itself does not observe symbol visibility correctly during NGC. This ++ in itself isn't an academic exercise. The issue stems from GHC using one ++ mechanism for providing two incompatible linking modes: ++ a) The first mode is generating Haskell shared libraries which are ++ intended to be used by other Haskell code. This requires us to ++ export the info, data and closures. For this GHC just re-exports ++ all symbols. But it doesn't correcly mark data/code. Symbol ++ visibility is overwritten by telling the linker to export all ++ symbols. ++ b) The second code is producing code that's supposed to be call-able ++ through a C insterface. This in reality does not require the ++ export of closures and info tables. But also does not require the ++ inclusion of the RTS inside the DLL. Hover this is done today ++ because we don't properly have the RTS as a dynamic library. ++ i.e. GHC does not only export symbols denoted by foreign export. ++ Also GHC should depend on an RTS library, but at the moment it ++ cannot because of TNTC is incompatible with dynamic linking. ++ ++ These two issues mean that for GHC we need to take a different approach ++ to handling import libraries. For normal C libraries we have proper ++ differentiation between CODE and DATA. For GHC produced import libraries ++ we do not. As such the SYM_TYPE_DUP_DISCARD tells the linker that if a ++ duplicate symbol is found, and we were going to discard it anyway, just do ++ so quitely. This works because the RTS symbols themselves are provided by ++ the currently loaded RTS as built-in symbols. ++ ++ Secondly we cannot rely on a text symbol being available. As such we ++ should only depend on the symbols as defined in the .idata sections, ++ otherwise we would not be able to correctly link against GHC produced ++ import libraries. ++ ++ Note [Memory allocation] + ~~~~~~~~~~~~~~~~~~~~~~~~ ++ The loading of an object begins in `preloadObjectFile`, which allocates a buffer, ++ `oc->image`, into which the object file is read. It then calls `ocVerifyImage`, ++ where we traverse the object file's header and populate `ObjectCode.sections`. ++ Specifically, we create a Section for each of the object's sections such ++ that: ++ ++ * the `.start` field points to its data in the mapped image ++ * the `.size` field reflects its intended size ++ * the .`info` field contains a `SectionFormatField` with other information ++ from its section header entry (namely `VirtualSize`, `VirtualAddress`, and ++ `Characteristics`) ++ ++ We then proceed to `ocGetNames`, where we again walk the section table header ++ and determine which sections need to be mapped and how (e.g. as readable-writable or ++ readable-executable). We then allocate memory for each section using the ++ appropriate m32 allocator and, where necessary, copy the data from ++ `section.start` (which points to the section in `oc->image`) ++ into the new allocation. Finally, `addSection()` updates the `section.start` field ++ to reflect the section's new home. In addition, we also allocate space for ++ the global BSS section. ++ ++ At this point we have no further need for the preloaded image buffer, ++ `oc->image` and therefore free it. ++ ++ Having populated the sections, we can proceed to add the object's symbols to ++ the symbol table. This is a matter of walking the object file's symbol table, ++ computing the symbol's address, and calling `ghciInsertSymbolTable`. ++ ++ Finally, we enter `ocResolve`, where we resolve relocations and and allocate ++ jump islands (using the m32 allocator for backing storage) as necessary. + +- The Windows linker aligns memory to it's section alignment requirement by +- aligning it during the copying to the private heap. We also ensure that the +- trampoline "region" we reserve is 8 bytes aligned. + */ + + #include "Rts.h" +@@ -184,12 +356,11 @@ + + #include "RtsUtils.h" + #include "RtsSymbolInfo.h" +-#include "GetEnv.h" + #include "CheckUnload.h" ++#include "LinkerInternals.h" + #include "linker/PEi386.h" + #include "linker/PEi386Types.h" + #include "linker/SymbolExtras.h" +-#include "LinkerInternals.h" + + #include + #include /* SHGetFolderPathW */ +@@ -208,7 +379,8 @@ static size_t makeSymbolExtra_PEi386( + ObjectCode* oc, + uint64_t index, + size_t s, +- SymbolName* symbol); ++ SymbolName* symbol, ++ SymType sym_type); + #endif + + static void addDLLHandle( +@@ -226,34 +398,14 @@ static bool checkIfDllLoaded( + static uint32_t getSectionAlignment( + Section section); + +-static uint8_t* getAlignedMemory( +- uint8_t* value, +- Section section); +- + static size_t getAlignedValue( + size_t value, + Section section); + +-static void addCopySection( +- ObjectCode *oc, +- Section *s, +- SectionKind kind, +- SectionAlloc alloc, +- void* start, +- StgWord size); +- + static void releaseOcInfo( + ObjectCode* oc); + +-/* Add ld symbol for PE image base. */ +-#if defined(__GNUC__) +-#define __ImageBase __MINGW_LSYMBOL(_image_base__) +-#endif +- +-/* Get the base of the module. */ +-/* This symbol is defined by ld. */ +-extern IMAGE_DOS_HEADER __ImageBase; +-#define __image_base (void*)((HINSTANCE)&__ImageBase) ++static SymbolAddr *lookupSymbolInDLLs ( const SymbolName* lbl, ObjectCode *dependent ); + + const Alignments pe_alignments[] = { + { IMAGE_SCN_ALIGN_1BYTES , 1 }, +@@ -274,8 +426,6 @@ const Alignments pe_alignments[] = { + + const int pe_alignments_cnt = sizeof (pe_alignments) / sizeof (Alignments); + const int default_alignment = 8; +-const int initHeapSizeMB = 15; +-static HANDLE code_heap = NULL; + + /* See Note [_iob_func symbol] + In order to emulate __iob_func the memory location needs to point the +@@ -283,72 +433,32 @@ static HANDLE code_heap = NULL; + the pointer as a redirect. Essentially it's a DATA DLL reference. */ + const void* __rts_iob_func = (void*)&__acrt_iob_func; + +-/* Low Fragmentation Heap, try to prevent heap from increasing in size when +- space can simply be reclaimed. These are enums missing from mingw-w64's +- headers. */ +-#define HEAP_LFH 2 +-#define HeapOptimizeResources 3 +- +-void initLinker_PEi386() ++void initLinker_PEi386(void) + { + if (!ghciInsertSymbolTable(WSTR("(GHCi/Ld special symbols)"), +- symhash, "__image_base__", __image_base, HS_BOOL_TRUE | (HS_BOOL_FALSE << 1), NULL)) { ++ symhash, "__image_base__", ++ GetModuleHandleW (NULL), HS_BOOL_TRUE, ++ SYM_TYPE_CODE, NULL)) { + barf("ghciInsertSymbolTable failed"); + } + + #if defined(mingw32_HOST_OS) + addDLLHandle(WSTR("*.exe"), GetModuleHandle(NULL)); +- /* +- * Most of these are included by base, but GCC always includes them +- * So lets make sure we always have them too. +- * +- * In most cases they would have been loaded by the +- * addDLLHandle above. +- */ +- addDLL(WSTR("msvcrt")); +- addDLL(WSTR("kernel32")); +- addDLL(WSTR("advapi32")); +- addDLL(WSTR("shell32")); +- addDLL(WSTR("user32")); + #endif + +- /* See Note [Memory allocation]. */ +- /* Create a private heap which we will use to store all code and data. */ +- SYSTEM_INFO sSysInfo; +- GetSystemInfo(&sSysInfo); +- code_heap = HeapCreate (HEAP_CREATE_ENABLE_EXECUTE, +- initHeapSizeMB * sSysInfo.dwPageSize , 0); +- if (!code_heap) +- barf ("Could not create private heap during initialization. Aborting."); +- +- /* Set some flags for the new code heap. */ +- HeapSetInformation(code_heap, HeapEnableTerminationOnCorruption, NULL, 0); +- unsigned long HeapInformation = HEAP_LFH; +- HeapSetInformation(code_heap, HeapEnableTerminationOnCorruption, +- &HeapInformation, sizeof(HeapInformation)); +- HeapSetInformation(code_heap, HeapOptimizeResources, NULL, 0); +- + /* Register the cleanup routine as an exit handler, this gives other exit handlers + a chance to run which may need linker information. Exit handlers are ran in + reverse registration order so this needs to be before the linker loads anything. */ + atexit (exitLinker_PEi386); + } + +-void exitLinker_PEi386() ++void exitLinker_PEi386(void) + { +- /* See Note [Memory allocation]. */ +- if (code_heap) { +- HeapDestroy (code_heap); +- code_heap = NULL; +- } + } + + /* A list thereof. */ + static OpenedDLL* opened_dlls = NULL; + +-/* A list thereof. */ +-static IndirectAddr* indirects = NULL; +- + /* Adds a DLL instance to the list of DLLs in which to search for symbols. */ + static void addDLLHandle(pathchar* dll_name, HINSTANCE instance) { + +@@ -431,33 +541,34 @@ void freePreloadObjectFile_PEi386(ObjectCode *oc) + } + + if (oc->info) { +- if (oc->info->image) { +- HeapFree(code_heap, 0, oc->info->image); +- oc->info->image = NULL; ++ /* Release the unwinder information. ++ See Note [Exception Unwinding]. */ ++ if (oc->info->pdata) { ++ if (!RtlDeleteFunctionTable (oc->info->pdata->start)) ++ debugBelch ("Unable to remove Exception handlers for %" PATH_FMT "\n", ++ oc->fileName); ++ oc->info->xdata = NULL; ++ oc->info->pdata = NULL; + } +- if (oc->info->ch_info) ++ ++ if (oc->info->ch_info) { + stgFree (oc->info->ch_info); ++ } + stgFree (oc->info); + oc->info = NULL; + } +- +- IndirectAddr *ia, *ia_next; +- ia = indirects; +- while (ia != NULL) { +- ia_next = ia->next; +- stgFree(ia); +- ia = ia_next; +- } +- indirects = NULL; + } + ++// Free oc->info and oc->sections[i]->info. + static void releaseOcInfo(ObjectCode* oc) { + if (!oc) return; + + if (oc->info) { ++ freeInitFiniList(oc->info->init); ++ freeInitFiniList(oc->info->fini); + stgFree (oc->info->ch_info); +- stgFree (oc->info->str_tab); + stgFree (oc->info->symbols); ++ stgFree (oc->info->str_tab); + stgFree (oc->info); + oc->info = NULL; + } +@@ -533,7 +644,7 @@ COFF_OBJ_TYPE getObjectType ( char* image, pathchar* fileName ) + *************/ + COFF_HEADER_INFO* getHeaderInfo ( ObjectCode* oc ) + { +- COFF_OBJ_TYPE coff_type = getObjectType (oc->image, oc->fileName); ++ COFF_OBJ_TYPE coff_type = getObjectType (oc->image, OC_INFORMATIVE_FILENAME(oc)); + + COFF_HEADER_INFO* info + = stgMallocBytes (sizeof(COFF_HEADER_INFO), "getHeaderInfo"); +@@ -589,8 +700,16 @@ size_t getSymbolSize ( COFF_HEADER_INFO *info ) + } + } + ++// Constants which may be returned by getSymSectionNumber. ++// See https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-number-values ++#define PE_SECTION_UNDEFINED ((uint32_t) 0) ++#define PE_SECTION_ABSOLUTE ((uint32_t) -1) ++#define PE_SECTION_DEBUG ((uint32_t) -2) ++ ++// Returns either PE_SECTION_{UNDEFINED,ABSOLUTE,DEBUG} or the (one-based) ++// section number of the given symbol. + __attribute__ ((always_inline)) inline +-int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) ++uint32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) + { + ASSERT(info); + ASSERT(sym); +@@ -599,7 +718,16 @@ int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) + case COFF_ANON_BIG_OBJ: + return sym->ex.SectionNumber; + default: +- return sym->og.SectionNumber; ++ // Take care to catch reserved values; see #22941. ++ switch (sym->og.SectionNumber) { ++ case IMAGE_SYM_UNDEFINED: return PE_SECTION_UNDEFINED; ++ case IMAGE_SYM_ABSOLUTE : return PE_SECTION_ABSOLUTE; ++ case IMAGE_SYM_DEBUG: return PE_SECTION_DEBUG; ++ default: ++ // Ensure that we catch if SectionNumber is made wider in the future ++ ASSERT(sizeof(sym->og.SectionNumber) == 2); ++ return (uint16_t) sym->og.SectionNumber; ++ } + } + } + +@@ -744,7 +872,7 @@ addDLL_PEi386( pathchar *dll_name, HINSTANCE *loaded ) + error: + stgFree(buf); + +- char* errormsg = malloc(sizeof(char) * 80); ++ char* errormsg = stgMallocBytes(sizeof(char) * 80, "addDLL_PEi386"); + snprintf(errormsg, 80, "addDLL: %" PATH_FMT " or dependencies not loaded. (Win32 error %lu)", dll_name, GetLastError()); + /* LoadLibrary failed; return a ptr to the error msg. */ + return errormsg; +@@ -754,7 +882,7 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) + { + const unsigned int init_buf_size = 1024; + unsigned int bufsize = init_buf_size; +- wchar_t* result = malloc(sizeof(wchar_t) * bufsize); ++ wchar_t* result = stgMallocBytes(sizeof(wchar_t) * bufsize, "findSystemLibrary_PEi386"); + DWORD wResult = SearchPathW(NULL, dll_name, NULL, bufsize, result, NULL); + + if (wResult > bufsize) { +@@ -764,7 +892,7 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) + + + if (!wResult) { +- free(result); ++ stgFree(result); + return NULL; + } + +@@ -773,68 +901,18 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) + + HsPtr addLibrarySearchPath_PEi386(pathchar* dll_path) + { +- HINSTANCE hDLL = LoadLibraryW(L"Kernel32.DLL"); +- LPAddDLLDirectory AddDllDirectory = (LPAddDLLDirectory)(void*)GetProcAddress((HMODULE)hDLL, "AddDllDirectory"); +- +- HsPtr result = NULL; +- +- const unsigned int init_buf_size = 4096; +- int bufsize = init_buf_size; +- +- // Make sure the path is an absolute path +- WCHAR* abs_path = malloc(sizeof(WCHAR) * init_buf_size); +- DWORD wResult = GetFullPathNameW(dll_path, bufsize, abs_path, NULL); +- if (!wResult){ +- IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError())); +- } +- else if (wResult > init_buf_size) { +- abs_path = realloc(abs_path, sizeof(WCHAR) * wResult); +- if (!GetFullPathNameW(dll_path, bufsize, abs_path, NULL)) { +- IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError())); +- } +- } +- +- if (AddDllDirectory) { +- result = AddDllDirectory(abs_path); +- } +- else +- { +- warnMissingKBLibraryPaths(); +- WCHAR* str = malloc(sizeof(WCHAR) * init_buf_size); +- wResult = GetEnvironmentVariableW(L"PATH", str, bufsize); +- +- if (wResult > init_buf_size) { +- str = realloc(str, sizeof(WCHAR) * wResult); +- bufsize = wResult; +- wResult = GetEnvironmentVariableW(L"PATH", str, bufsize); +- if (!wResult) { +- sysErrorBelch("addLibrarySearchPath[GetEnvironmentVariableW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError()); +- } +- } +- +- bufsize = wResult + 2 + pathlen(abs_path); +- wchar_t* newPath = malloc(sizeof(wchar_t) * bufsize); +- +- wcscpy(newPath, abs_path); +- wcscat(newPath, L";"); +- wcscat(newPath, str); +- if (!SetEnvironmentVariableW(L"PATH", (LPCWSTR)newPath)) { +- sysErrorBelch("addLibrarySearchPath[SetEnvironmentVariableW]: %" PATH_FMT " (Win32 error %lu)", abs_path, GetLastError()); +- } +- +- free(newPath); +- free(abs_path); +- +- return str; +- } ++ // Make sure the path is an absolute path in UNC-style to ensure that we ++ // aren't subject to the MAX_PATH restriction. See #21059. ++ wchar_t *abs_path = __rts_create_device_name(dll_path); + ++ HsPtr result = AddDllDirectory(abs_path); + if (!result) { + sysErrorBelch("addLibrarySearchPath: %" PATH_FMT " (Win32 error %lu)", abs_path, GetLastError()); +- free(abs_path); ++ stgFree(abs_path); + return NULL; + } + +- free(abs_path); ++ stgFree(abs_path); + return result; + } + +@@ -843,19 +921,8 @@ bool removeLibrarySearchPath_PEi386(HsPtr dll_path_index) + bool result = false; + + if (dll_path_index != NULL) { +- HINSTANCE hDLL = LoadLibraryW(L"Kernel32.DLL"); +- LPRemoveDLLDirectory RemoveDllDirectory = (LPRemoveDLLDirectory)(void*)GetProcAddress((HMODULE)hDLL, "RemoveDllDirectory"); +- +- if (RemoveDllDirectory) { +- result = RemoveDllDirectory(dll_path_index); +- // dll_path_index is now invalid, do not use it after this point. +- } +- else +- { +- warnMissingKBLibraryPaths(); +- result = SetEnvironmentVariableW(L"PATH", (LPCWSTR)dll_path_index); +- free(dll_path_index); +- } ++ result = RemoveDllDirectory(dll_path_index); ++ // dll_path_index is now invalid, do not use it after this point. + + if (!result) { + sysErrorBelch("removeLibrarySearchPath: (Win32 error %lu)", GetLastError()); +@@ -883,16 +950,6 @@ static uint32_t getSectionAlignment( + return default_alignment; + } + +-/* ---------------------- +- * return a memory location aligned to the section requirements +- */ +-static uint8_t* getAlignedMemory( +- uint8_t* value, Section section) { +- uint32_t alignment = getSectionAlignment(section); +- uintptr_t mask = (uintptr_t)alignment - 1; +- return (uint8_t*)(((uintptr_t)value + mask) & ~mask); +-} +- + /* ---------------------- + * return a value aligned to the section requirements + */ +@@ -1084,7 +1141,7 @@ zapTrailingAtSign ( SymbolName* sym ) + #endif + + SymbolAddr* +-lookupSymbolInDLLs ( const SymbolName* lbl ) ++lookupSymbolInDLLs ( const SymbolName* lbl, ObjectCode *dependent ) + { + OpenedDLL* o_dll; + SymbolAddr* sym; +@@ -1092,17 +1149,13 @@ lookupSymbolInDLLs ( const SymbolName* lbl ) + for (o_dll = opened_dlls; o_dll != NULL; o_dll = o_dll->next) { + /* debugBelch("look in %ls for %s\n", o_dll->name, lbl); */ + +- if (wcsncmp(o_dll->name,WSTR("ucrtbase.dll"),wcslen(WSTR("ucrtbase.dll"))) == 0) { +- IF_DEBUG(linker, debugBelch("warning: ignoring " PATH_FMT "\n", o_dll->name)); +- continue; +- } +- + sym = GetProcAddress(o_dll->instance, lbl+STRIP_LEADING_UNDERSCORE); + if (sym != NULL) { + /*debugBelch("found %s in %s\n", lbl+1,o_dll->name);*/ + return sym; + } + ++ // TODO: Drop this + /* Ticket #2283. + Long description: http://support.microsoft.com/kb/132044 + tl;dr: +@@ -1114,15 +1167,15 @@ lookupSymbolInDLLs ( const SymbolName* lbl ) + sym = GetProcAddress(o_dll->instance, + lbl + 6 + STRIP_LEADING_UNDERSCORE); + if (sym != NULL) { +- IndirectAddr* ret; +- ret = stgMallocBytes( sizeof(IndirectAddr), "lookupSymbolInDLLs" ); +- ret->addr = sym; +- ret->next = indirects; +- indirects = ret; ++ SymbolAddr** indirect = m32_alloc(dependent->rw_m32, sizeof(SymbolAddr*), 8); ++ if (indirect == NULL) { ++ barf("lookupSymbolInDLLs: Failed to allocation indirection"); ++ } ++ *indirect = sym; + IF_DEBUG(linker, + debugBelch("warning: %s from %S is linked instead of %s\n", + lbl+6+STRIP_LEADING_UNDERSCORE, o_dll->name, lbl)); +- return (void*) & ret->addr; ++ return (void*) indirect; + } + } + +@@ -1213,10 +1266,8 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) + oc->n_sections = info->numberOfSections + 1; + oc->info = stgCallocBytes (sizeof(struct ObjectCodeFormatInfo), 1, + "ocVerifyImage_PEi386(info)"); +- oc->info->secBytesTotal = 0; +- oc->info->secBytesUsed = 0; + oc->info->init = NULL; +- oc->info->finit = NULL; ++ oc->info->fini = NULL; + oc->info->ch_info = info; + + /* Copy the tables over from object-file. Copying these allows us to +@@ -1285,31 +1336,14 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) + memcpy (section->info->relocs, reltab + relocs_offset, + noRelocs * sizeof (COFF_reloc)); + } +- +- oc->info->secBytesTotal += getAlignedValue (section->size, *section); + } + + /* Initialize the last section's info field which contains the .bss +- section, it doesn't need an info so set it to NULL. */ ++ section, the .info of which will be initialized by ocGetNames. Discard the ++ .info that we computed above. */ ++ stgFree(sections[info->numberOfSections].info); + sections[info->numberOfSections].info = NULL; + +- /* Calculate space for trampolines nearby. +- We get back 8-byte aligned memory (is that guaranteed?), but +- the offsets to the sections within the file are all 4 mod 8 +- (is that guaranteed?). We therefore need to offset the image +- by 4, so that all the pointers are 8-byte aligned, so that +- pointer tagging works. */ +- /* For 32-bit case we don't need this, hence we use macro +- PEi386_IMAGE_OFFSET, which equals to 4 for 64-bit case and 0 for +- 32-bit case. */ +- /* We allocate trampolines area for all symbols right behind +- image data, aligned on 8. */ +- oc->info->trampoline +- = (PEi386_IMAGE_OFFSET + 2 * default_alignment +- + oc->info->secBytesTotal) & ~0x7; +- oc->info->secBytesTotal +- = oc->info->trampoline + info->numberOfSymbols * sizeof(SymbolExtra); +- + /* No further verification after this point; only debug printing. */ + i = 0; + IF_DEBUG(linker, i=1); +@@ -1363,6 +1397,10 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) + return false; + } + ++ i = 0; ++ IF_DEBUG(linker_verbose, i=1); ++ if (i == 0) return true; ++ + /* Print the section table. */ + debugBelch("\n" ); + for (i = 0; i < info->numberOfSections; i++) { +@@ -1457,113 +1495,109 @@ bool + ocGetNames_PEi386 ( ObjectCode* oc ) + { + bool has_code_section = false; +- +- SymbolName* sname = NULL; +- SymbolAddr* addr = NULL; +- unsigned int i; +- + COFF_HEADER_INFO *info = oc->info->ch_info; + + /* Copy section information into the ObjectCode. */ + +- for (i = 0; i < info->numberOfSections; i++) { +- uint8_t* start; +- uint8_t* end; +- uint32_t sz; +- ++ for (unsigned int i = 0; i < info->numberOfSections; i++) { + /* By default consider all section as CODE or DATA, + which means we want to load them. */ + SectionKind kind = SECTIONKIND_CODE_OR_RODATA; +- Section section = oc->sections[i]; ++ Section *section = &oc->sections[i]; ++ uint32_t alignment = getSectionAlignment(*section); + +- IF_DEBUG(linker, debugBelch("section name = %s\n", section.info->name )); ++ // These will be computed below and determine how we will handle the ++ // section ++ size_t sz = section->size; ++ bool do_copy = true; ++ bool do_zero = false; ++ ++ IF_DEBUG(linker, debugBelch("section name = %s (%x)\n", section->info->name, section->info->props )); + + /* The PE file section flag indicates whether the section + contains code or data. */ +- if (section.info->props & IMAGE_SCN_CNT_CODE) { +- has_code_section = has_code_section || section.size > 0; ++ if (section->info->props & IMAGE_SCN_CNT_CODE) { ++ has_code_section = has_code_section || section->size > 0; + kind = SECTIONKIND_CODE_OR_RODATA; + } + +- if (section.info->props & IMAGE_SCN_CNT_INITIALIZED_DATA) +- kind = SECTIONKIND_CODE_OR_RODATA; ++ if (section->info->props & IMAGE_SCN_MEM_WRITE) { ++ kind = SECTIONKIND_RWDATA; ++ } + + /* Check next if it contains any uninitialized data */ +- if (section.info->props & IMAGE_SCN_CNT_UNINITIALIZED_DATA) ++ if (section->info->props & IMAGE_SCN_CNT_UNINITIALIZED_DATA) { + kind = SECTIONKIND_RWDATA; ++ do_copy = false; ++ } + + /* Finally check if it can be discarded. + This will also ignore .debug sections */ +- if ( section.info->props & IMAGE_SCN_MEM_DISCARDABLE +- || section.info->props & IMAGE_SCN_LNK_REMOVE) ++ if ( section->info->props & IMAGE_SCN_MEM_DISCARDABLE ++ || section->info->props & IMAGE_SCN_LNK_REMOVE) { + kind = SECTIONKIND_OTHER; ++ } + +- if (0==strncmp(".ctors", section.info->name, 6)) { ++ if (0==strncmp(".ctors", section->info->name, 6)) { ++ /* N.B. a compilation unit may have more than one .ctor section; we ++ * must run them all. See #21618 for a case where this happened */ ++ uint32_t prio; ++ if (sscanf(section->info->name, ".ctors.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ // .ctors/.dtors are executed in reverse order: higher numbers are ++ // executed first ++ prio = 0xffff - prio; ++ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_CTORS, prio); + kind = SECTIONKIND_INIT_ARRAY; +- oc->info->init = &oc->sections[i]; + } + +- if (0==strncmp(".dtors", section.info->name, 6)) { +- kind = SECTIONKIND_FINIT_ARRAY; +- oc->info->finit = &oc->sections[i]; ++ if (0==strncmp(".dtors", section->info->name, 6)) { ++ uint32_t prio; ++ if (sscanf(section->info->name, ".dtors.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ // .ctors/.dtors are executed in reverse order: higher numbers are ++ // executed first ++ prio = 0xffff - prio; ++ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_DTORS, prio); ++ kind = SECTIONKIND_FINI_ARRAY; + } + +- if ( 0 == strncmp(".stab" , section.info->name, 5 ) +- || 0 == strncmp(".stabstr" , section.info->name, 8 ) +- || 0 == strncmp(".pdata" , section.info->name, 6 ) +- || 0 == strncmp(".xdata" , section.info->name, 6 ) +- || 0 == strncmp(".debug" , section.info->name, 6 ) +- || 0 == strncmp(".rdata$zzz", section.info->name, 10)) ++ if ( 0 == strncmp(".stab" , section->info->name, 5 ) ++ || 0 == strncmp(".stabstr" , section->info->name, 8 ) ++ || 0 == strncmp(".debug" , section->info->name, 6 ) ++ || 0 == strncmp(".rdata$zzz", section->info->name, 10)) + kind = SECTIONKIND_DEBUG; + +- if (0==strncmp(".idata", section.info->name, 6)) +- kind = SECTIONKIND_IMPORT; ++ /* Exception Unwind information. See Note [Exception Unwinding]. */ ++ if (0 == strncmp(".xdata" , section->info->name, 6 )) { ++ kind = SECTIONKIND_EXCEPTION_UNWIND; ++ } + +- /* See Note [BFD import library]. */ +- if (0==strncmp(".idata$7", section.info->name, 8)) +- kind = SECTIONKIND_IMPORT_LIBRARY; ++ /* Exception handler tables, See Note [Exception Unwinding]. */ ++ if (0 == strncmp(".pdata" , section->info->name, 6 )) { ++ kind = SECTIONKIND_EXCEPTION_TABLE; ++ } + +- if (0==strncmp(".idata$6", section.info->name, 8)) { +- /* The first two bytes contain the ordinal of the function +- in the format of lowpart highpart. The two bytes combined +- for the total range of 16 bits which is the function export limit +- of DLLs. */ +- sname = (SymbolName*)section.start+2; +- COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; +- addr = get_sym_name( getSymShortName (info, sym), oc); ++ if (0==strncmp(".idata", section->info->name, 6)) { ++ kind = SECTIONKIND_IMPORT; ++ } + +- IF_DEBUG(linker, +- debugBelch("addImportSymbol `%s' => `%s'\n", +- sname, (char*)addr)); +- /* We're going to free the any data associated with the import +- library without copying the sections. So we have to duplicate +- the symbol name and values before the pointers become invalid. */ +- sname = strdup (sname); +- addr = strdup (addr); +- if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, +- addr, HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), oc)) { +- releaseOcInfo (oc); +- stgFree (oc->image); +- oc->image = NULL; +- return false; +- } +- setImportSymbol (oc, sname); + +- /* Don't process this oc any futher. Just exit. */ +- oc->n_symbols = 0; +- oc->symbols = NULL; +- stgFree (oc->image); +- oc->image = NULL; +- releaseOcInfo (oc); +- oc->status = OBJECT_DONT_RESOLVE; +- return true; ++ /* See Note [BFD import library]. */ ++ if (0==strncmp(".idata$7", section->info->name, 8)) { ++ kind = SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD; + } + +- /* Allocate space for any (local, anonymous) .bss sections. */ +- if (0==strncmp(".bss", section.info->name, 4)) { +- uint32_t bss_sz; +- uint8_t* zspace; ++ if (0==strncmp(".idata$6", section->info->name, 8)) { ++ kind = SECTIONKIND_BFD_IMPORT_LIBRARY; ++ } + ++ /* Allocate space for any (local, anonymous) .bss sections. */ ++ if (0==strncmp(".bss", section->info->name, 4)) { + /* sof 10/05: the PE spec text isn't too clear regarding what + * the SizeOfRawData field is supposed to hold for object + * file sections containing just uninitialized data -- for executables, +@@ -1583,42 +1617,49 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + * + * TODO: check if this comment is still relevant. + */ +- if (section.info->virtualSize == 0 && section.size == 0) continue; ++ if (section->info->virtualSize == 0 && section->size == 0) { ++ IF_DEBUG(linker_verbose, debugBelch("skipping empty .bss section\n")); ++ continue; ++ } ++ + /* This is a non-empty .bss section. + Allocate zeroed space for it */ +- bss_sz = section.info->virtualSize; +- if (bss_sz < section.size) { bss_sz = section.size; } +- zspace = stgCallocBytes(1, bss_sz, "ocGetNames_PEi386(anonymous bss)"); +- oc->sections[i].start = zspace; +- oc->sections[i].size = bss_sz; +- section = oc->sections[i]; +- /* debugBelch("BSS anon section at 0x%x\n", zspace); */ ++ kind = SECTIONKIND_RWDATA; ++ do_zero = true; ++ do_copy = false; ++ IF_DEBUG(linker_verbose, debugBelch("BSS anon section\n")); + } + +- /* Allocate space for the sections since we have a real oc. +- We initially mark it the region as non-accessible. But will adjust +- as we go along. */ +- if (!oc->info->image) { +- /* See Note [Memory allocation]. */ +- ASSERT(code_heap); +- oc->info->image +- = HeapAlloc (code_heap, HEAP_ZERO_MEMORY, oc->info->secBytesTotal); +- if (!oc->info->image) +- barf ("Could not allocate any heap memory from private heap."); ++ CHECK(section->size == 0 || section->info->virtualSize == 0); ++ if (sz < section->info->virtualSize) { ++ sz = section->info->virtualSize; + } + +- ASSERT(section.size == 0 || section.info->virtualSize == 0); +- sz = section.size; +- if (sz < section.info->virtualSize) sz = section.info->virtualSize; ++ // Ignore these section types ++ if (kind == SECTIONKIND_OTHER || sz == 0) { ++ continue; ++ } + +- start = section.start; +- end = start + sz; ++ // Allocate memory for the section. ++ uint8_t *start; ++ if (section->info->props & IMAGE_SCN_MEM_WRITE) { ++ start = m32_alloc(oc->rw_m32, sz, alignment); ++ } else { ++ start = m32_alloc(oc->rx_m32, sz, alignment); ++ } ++ if (!start) { ++ barf("Could not allocate any heap memory from private heap (requested %" FMT_SizeT " bytes).", ++ sz); ++ } + +- if (kind != SECTIONKIND_OTHER && end > start) { +- /* See Note [Section alignment]. */ +- addCopySection(oc, &oc->sections[i], kind, SECTION_NOMEM, start, sz); +- addProddableBlock(oc, oc->sections[i].start, sz); ++ if (do_copy) { ++ memcpy(start, section->start, sz); ++ } else if (do_zero) { ++ memset(start, 0, sz); + } ++ ++ addSection(section, kind, SECTION_NOMEM, start, sz, 0, 0, 0); ++ addProddableBlock(oc, oc->sections[i].start, sz); + } + + /* Copy exported symbols into the ObjectCode. */ +@@ -1629,9 +1670,9 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + + /* Work out the size of the global BSS section */ + StgWord globalBssSize = 0; +- for (i=0; i < info->numberOfSymbols; i++) { ++ for (unsigned int i=0; i < info->numberOfSymbols; i++) { + COFF_symbol* sym = &oc->info->symbols[i]; +- if (getSymSectionNumber (info, sym) == IMAGE_SYM_UNDEFINED ++ if (getSymSectionNumber (info, sym) == PE_SECTION_UNDEFINED + && getSymValue (info, sym) > 0 + && getSymStorageClass (info, sym) != IMAGE_SYM_CLASS_SECTION) { + globalBssSize += getSymValue (info, sym); +@@ -1642,12 +1683,14 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + /* Allocate BSS space */ + SymbolAddr* bss = NULL; + if (globalBssSize > 0) { +- bss = stgCallocBytes(1, globalBssSize, +- "ocGetNames_PEi386(non-anonymous bss)"); ++ bss = m32_alloc(oc->rw_m32, globalBssSize, 16); ++ if (bss == NULL) { ++ barf("ocGetNames_PEi386: Failed to allocate global bss section"); ++ } + addSection(&oc->sections[oc->n_sections-1], + SECTIONKIND_RWDATA, SECTION_MALLOC, + bss, globalBssSize, 0, 0, 0); +- IF_DEBUG(linker, debugBelch("bss @ %p %" FMT_Word "\n", bss, globalBssSize)); ++ IF_DEBUG(linker_verbose, debugBelch("bss @ %p %" FMT_Word "\n", bss, globalBssSize)); + addProddableBlock(oc, bss, globalBssSize); + } else { + addSection(&oc->sections[oc->n_sections-1], +@@ -1659,22 +1702,52 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + stgFree (oc->image); + oc->image = NULL; + +- for (i = 0; i < (uint32_t)oc->n_symbols; i++) { ++ for (unsigned int i = 0; i < (uint32_t)oc->n_symbols; i++) { + COFF_symbol* sym = &oc->info->symbols[i]; + +- int32_t secNumber = getSymSectionNumber (info, sym); + uint32_t symValue = getSymValue (info, sym); + uint8_t symStorageClass = getSymStorageClass (info, sym); +- +- addr = NULL; ++ SymbolAddr *addr = NULL; + bool isWeak = false; +- sname = get_sym_name (getSymShortName (info, sym), oc); +- Section *section = secNumber > 0 ? &oc->sections[secNumber-1] : NULL; ++ SymbolName *sname = get_sym_name (getSymShortName (info, sym), oc); ++ ++ uint32_t secNumber = getSymSectionNumber (info, sym); ++ Section *section; ++ switch (secNumber) { ++ case PE_SECTION_UNDEFINED: ++ // N.B. This may be a weak symbol ++ section = NULL; ++ break; ++ case PE_SECTION_ABSOLUTE: ++ IF_DEBUG(linker, debugBelch("symbol %s is ABSOLUTE, skipping...\n", sname)); ++ i += getSymNumberOfAuxSymbols (info, sym); ++ continue; ++ case PE_SECTION_DEBUG: ++ IF_DEBUG(linker, debugBelch("symbol %s is DEBUG, skipping...\n", sname)); ++ i += getSymNumberOfAuxSymbols (info, sym); ++ continue; ++ default: ++ CHECK(secNumber < (uint32_t) oc->n_sections); ++ section = &oc->sections[secNumber-1]; ++ } ++ ++ SymType type; ++ switch (getSymType(oc->info->ch_info, sym)) { ++ case 0x00: type = SYM_TYPE_DATA; break; ++ case 0x20: type = SYM_TYPE_CODE; break; ++ default: ++ debugBelch("Symbol %s has invalid type 0x%x\n", ++ sname, getSymType(oc->info->ch_info, sym)); ++ return 1; ++ } + + if ( secNumber != IMAGE_SYM_UNDEFINED + && secNumber > 0 + && section +- && section->kind != SECTIONKIND_IMPORT_LIBRARY) { ++ /* Skip all BFD import sections. */ ++ && section->kind != SECTIONKIND_IMPORT ++ && section->kind != SECTIONKIND_BFD_IMPORT_LIBRARY ++ && section->kind != SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD) { + /* This symbol is global and defined, viz, exported */ + /* for IMAGE_SYMCLASS_EXTERNAL + && !IMAGE_SYM_UNDEFINED, +@@ -1691,18 +1764,85 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + } + else if (symStorageClass == IMAGE_SYM_CLASS_WEAK_EXTERNAL) { + isWeak = true; ++ CHECK(getSymNumberOfAuxSymbols (info, sym) == 1); ++ CHECK(symValue == 0); ++ COFF_symbol_aux_weak_external *aux = (COFF_symbol_aux_weak_external *) (sym+1); ++ COFF_symbol* targetSym = &oc->info->symbols[aux->TagIndex]; ++ ++ uint32_t targetSecNumber = getSymSectionNumber (info, targetSym); ++ Section *targetSection; ++ switch (targetSecNumber) { ++ case PE_SECTION_UNDEFINED: ++ case PE_SECTION_ABSOLUTE: ++ case PE_SECTION_DEBUG: ++ targetSection = NULL; ++ break; ++ default: ++ // targetSecNumber is a uint32_t, and the 0 case should be caught by PE_SECTION_UNDEFINED. ++ // The compiler should be smart enough to eliminate the guard, we'll keep it in as fail ++ // safe nontheless. ++ targetSection = targetSecNumber > 0 ? &oc->sections[targetSecNumber-1] : NULL; ++ } ++ if(NULL != targetSection) ++ addr = (SymbolAddr*) ((size_t) targetSection->start + getSymValue(info, targetSym)); + } + else if ( secNumber == IMAGE_SYM_UNDEFINED && symValue > 0) { + /* This symbol isn't in any section at all, ie, global bss. + Allocate zeroed space for it from the BSS section */ + addr = bss; + bss = (SymbolAddr*)((StgWord)bss + (StgWord)symValue); +- IF_DEBUG(linker, debugBelch("bss symbol @ %p %u\n", addr, symValue)); ++ IF_DEBUG(linker_verbose, debugBelch("bss symbol @ %p %u\n", addr, symValue)); ++ } ++ else if (section && section->kind == SECTIONKIND_BFD_IMPORT_LIBRARY) { ++ /* Disassembly of section .idata$5: ++ ++ 0000000000000000 <__imp_Insert>: ++ ... ++ 0: IMAGE_REL_AMD64_ADDR32NB .idata$6 ++ ++ The first two bytes contain the ordinal of the function ++ in the format of lowpart highpart. The two bytes combined ++ for the total range of 16 bits which is the function export limit ++ of DLLs. See note [GHC Linking model and import libraries]. */ ++ sname = (SymbolName*)section->start+2; ++ // load the symbol that specifies the dll we need to load to resolve this. ++ COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; ++ addr = get_sym_name( getSymShortName (info, sym), oc); ++ ++ IF_DEBUG(linker, ++ debugBelch("addImportSymbol `%s' => `%s'\n", ++ sname, (char*)addr)); ++ /* We're going to free the any data associated with the import ++ library without copying the sections. So we have to duplicate ++ the symbol name and values before the pointers become invalid. */ ++ sname = strdup (sname); ++ addr = strdup (addr); ++ type = has_code_section ? SYM_TYPE_CODE : SYM_TYPE_DATA; ++ type |= SYM_TYPE_DUP_DISCARD; ++ if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, ++ addr, false, type, oc)) { ++ releaseOcInfo (oc); ++ stgFree (oc->image); ++ oc->image = NULL; ++ return false; ++ } ++ setImportSymbol (oc, sname); ++ ++ /* Don't process this oc any further. Just exit. */ ++ oc->n_symbols = 0; ++ oc->symbols = NULL; ++ stgFree (oc->image); ++ oc->image = NULL; ++ releaseOcInfo (oc); ++ // There is nothing that we need to resolve in this object since we ++ // will never call the import stubs in its text section ++ oc->status = OBJECT_DONT_RESOLVE; ++ return true; + } + else if (secNumber > 0 + && section +- && section->kind == SECTIONKIND_IMPORT_LIBRARY) { +- /* This is an import section. We should load the dll and lookup ++ && section->kind == SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD) { ++ /* This is an Gnu BFD import section. We should load the dll and lookup + the symbols. + See Note [BFD import library]. */ + char* dllName = section->start; +@@ -1716,7 +1856,7 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + sym = &oc->info->symbols[oc->n_symbols-1]; + sname = get_sym_name (getSymShortName (info, sym), oc); + +- IF_DEBUG(linker, ++ IF_DEBUG(linker_verbose, + debugBelch("loading symbol `%s' from dll: '%ls' => `%s'\n", + sname, oc->fileName, dllName)); + +@@ -1758,29 +1898,36 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + sname[size-start]='\0'; + stgFree(tmp); + sname = strdup (sname); ++ if(secNumber == IMAGE_SYM_UNDEFINED) ++ type |= SYM_TYPE_HIDDEN; ++ + if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, +- addr, +- HS_BOOL_FALSE | ((secNumber == IMAGE_SYM_UNDEFINED) << 1), +- oc)) ++ addr, false, type, oc)) + return false; + + break; ++ } else if (secNumber == PE_SECTION_UNDEFINED) { ++ IF_DEBUG(linker, debugBelch("symbol %s is UNDEFINED, skipping...\n", sname)); ++ i += getSymNumberOfAuxSymbols (info, sym); + } + + if ((addr != NULL || isWeak) + && (!section || (section && section->kind != SECTIONKIND_IMPORT))) { + /* debugBelch("addSymbol %p `%s' Weak:%lld \n", addr, sname, isWeak); */ + sname = strdup (sname); +- IF_DEBUG(linker, debugBelch("addSymbol %p `%s'\n", addr, sname)); ++ if(secNumber == IMAGE_SYM_UNDEFINED) ++ type |= SYM_TYPE_HIDDEN; ++ IF_DEBUG(linker_verbose, debugBelch("addSymbol %p `%s'\n", addr, sname)); + ASSERT(i < (uint32_t)oc->n_symbols); + oc->symbols[i].name = sname; + oc->symbols[i].addr = addr; ++ oc->symbols[i].type = type; + if (isWeak) { + setWeakSymbol(oc, sname); + } ++ + if (! ghciInsertSymbolTable(oc->fileName, symhash, sname, addr, +- isWeak | ((secNumber == IMAGE_SYM_UNDEFINED) << 1), +- oc)) ++ isWeak, type, oc)) + return false; + } else { + /* We're skipping the symbol, but if we ever load this +@@ -1797,50 +1944,37 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + + #if defined(x86_64_HOST_ARCH) + +-/* We've already reserved a room for symbol extras in loadObj, +- * so simply set correct pointer here. +- */ +-bool +-ocAllocateExtras_PEi386 ( ObjectCode* oc ) +-{ +- /* If the ObjectCode was unloaded we don't need a trampoline, it's likely +- an import library so we're discarding it earlier. */ +- if (!oc->info) +- return false; +- +- const int mask = default_alignment - 1; +- size_t origin = oc->info->trampoline; +- oc->symbol_extras +- = (SymbolExtra*)((uintptr_t)(oc->info->image + origin + mask) & ~mask); +- oc->first_symbol_extra = 0; +- COFF_HEADER_INFO *info = oc->info->ch_info; +- oc->n_symbol_extras = info->numberOfSymbols; +- +- return true; +-} +- + static size_t +-makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index, size_t s, char* symbol ) ++makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index STG_UNUSED, size_t s, char* symbol STG_UNUSED, SymType type ) + { +- unsigned int curr_thunk; + SymbolExtra *extra; +- curr_thunk = oc->first_symbol_extra + index; +- if (index >= oc->n_symbol_extras) { +- IF_DEBUG(linker, debugBelch("makeSymbolExtra first:%d, num:%lu, member:%s, index:%llu\n", curr_thunk, oc->n_symbol_extras, oc->archiveMemberName, index)); +- barf("Can't allocate thunk for `%s' in `%" PATH_FMT "' with member `%s'", symbol, oc->fileName, oc->archiveMemberName); +- } +- +- extra = oc->symbol_extras + curr_thunk; +- +- if (!extra->addr) +- { +- // jmp *-14(%rip) +- static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; +- extra->addr = (uint64_t)s; +- memcpy(extra->jumpIsland, jmp, 6); ++ switch(type & ~(SYM_TYPE_DUP_DISCARD | SYM_TYPE_HIDDEN)) { ++ case SYM_TYPE_CODE: { ++ // jmp *-14(%rip) ++ extra = m32_alloc(oc->rx_m32, sizeof(SymbolExtra), 8); ++ CHECK(extra); ++ extra->addr = (uint64_t)s; ++ static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; ++ memcpy(extra->jumpIsland, jmp, 6); ++ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(code): %s -> %p\n", symbol, &extra->jumpIsland)); ++ return (size_t)&extra->jumpIsland; ++ } ++ case SYM_TYPE_INDIRECT_DATA: { ++ extra = m32_alloc(oc->rw_m32, sizeof(SymbolExtra), 8); ++ CHECK(extra); ++ void *v = *(void**) s; ++ extra->addr = (uint64_t)v; ++ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(data): %s -> %p\n", symbol, &extra->addr)); ++ return (size_t)&extra->addr; ++ } ++ default: { ++ extra = m32_alloc(oc->rw_m32, sizeof(SymbolExtra), 8); ++ CHECK(extra); ++ extra->addr = (uint64_t)s; ++ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(indirect-data): %s -> %p\n", symbol, &extra->addr)); ++ return (size_t)&extra->addr; ++ } + } +- +- return (size_t)extra->jumpIsland; + } + + void ocProtectExtras(ObjectCode* oc STG_UNUSED) { } +@@ -1860,7 +1994,7 @@ ocResolve_PEi386 ( ObjectCode* oc ) + /* ToDo: should be variable-sized? But is at least safe in the + sense of buffer-overrun-proof. */ + uint8_t symbol[1000]; +- /* debugBelch("resolving for %s\n", oc->fileName); */ ++ /* debugBelch("resolving for %"PATH_FMT "\n", oc->fileName); */ + + /* Such libraries have been partially freed and can't be resolved. */ + if (oc->status == OBJECT_DONT_RESOLVE) +@@ -1874,7 +2008,7 @@ ocResolve_PEi386 ( ObjectCode* oc ) + + /* Ignore sections called which contain stabs debugging information. */ + if (section.kind == SECTIONKIND_DEBUG) +- continue; ++ continue; + + noRelocs = section.info->noRelocs; + for (j = 0; j < noRelocs; j++) { +@@ -1893,30 +2027,46 @@ ocResolve_PEi386 ( ObjectCode* oc ) + uint64_t symIndex = reloc->SymbolTableIndex; + sym = &oc->info->symbols[symIndex]; + +- IF_DEBUG(linker, ++ SymType sym_type; ++ ++ IF_DEBUG(linker_verbose, + debugBelch( +- "reloc sec %2d num %3d: type 0x%-4x " ++ "reloc sec %2d num %3d: P=%p, type 0x%-4x " + "vaddr 0x%-8lx name `", +- i, j, ++ i, j, pP, + reloc->Type, + reloc->VirtualAddress ); + printName (getSymShortName (info, sym), oc); +- debugBelch("'\n" )); ++ debugBelch("'\n" )); + + if (getSymStorageClass (info, sym) == IMAGE_SYM_CLASS_STATIC) { +- Section section = oc->sections[getSymSectionNumber (info, sym)-1]; ++ uint32_t sect_n = getSymSectionNumber (info, sym); ++ switch (sect_n) { ++ case PE_SECTION_UNDEFINED: ++ case PE_SECTION_ABSOLUTE: ++ case PE_SECTION_DEBUG: ++ errorBelch(" | %" PATH_FMT ": symbol `%s' has invalid section number %02x", ++ oc->fileName, symbol, sect_n); ++ return false; ++ default: ++ break; ++ } ++ CHECK(sect_n < (uint32_t) oc->n_sections); ++ Section section = oc->sections[sect_n - 1]; + S = ((size_t)(section.start)) + + ((size_t)(getSymValue (info, sym))); + } else { + copyName ( getSymShortName (info, sym), oc, symbol, + sizeof(symbol)-1 ); +- S = (size_t) lookupDependentSymbol( (char*)symbol, oc ); ++ S = (size_t) lookupDependentSymbol( (char*)symbol, oc, &sym_type ); + if ((void*)S == NULL) { + errorBelch(" | %" PATH_FMT ": unknown symbol `%s'", oc->fileName, symbol); + releaseOcInfo (oc); + return false; + } + } ++ IF_DEBUG(linker_verbose, debugBelch("S=%zx\n", S)); ++ + /* All supported relocations write at least 4 bytes */ + checkProddableBlock(oc, pP, 4); + switch (reloc->Type) { +@@ -1963,27 +2113,46 @@ ocResolve_PEi386 ( ObjectCode* oc ) + break; + } + case 2: /* R_X86_64_32 (ELF constant 10) - IMAGE_REL_AMD64_ADDR32 (PE constant 2) */ +- case 3: /* R_X86_64_32S (ELF constant 11) - IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */ ++ case 3: /* IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */ + case 17: /* R_X86_64_32S ELF constant, no PE mapping. See note [ELF constant in PE file] */ + { + uint64_t v; + v = S + A; ++ ++ /* If IMAGE_REL_AMD64_ADDR32NB then subtract the image base. */ ++ if (reloc->Type == 3) ++ v -= (uint64_t) GetModuleHandleW(NULL); ++ + // N.B. in the case of the sign-extended relocations we must ensure that v + // fits in a signed 32-bit value. See #15808. + if (((int64_t) v > (int64_t) INT32_MAX) || ((int64_t) v < (int64_t) INT32_MIN)) { + copyName (getSymShortName (info, sym), oc, + symbol, sizeof(symbol)-1); +- S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); ++ S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol, sym_type); + /* And retry */ + v = S + A; ++ ++ /* If IMAGE_REL_AMD64_ADDR32NB then subtract the image base. */ ++ if (reloc->Type == 3) ++ v -= (uint64_t) GetModuleHandleW(NULL); ++ + if (((int64_t) v > (int64_t) INT32_MAX) || ((int64_t) v < (int64_t) INT32_MIN)) { +- barf("IMAGE_REL_AMD64_ADDR32[NB]: High bits are set in %zx for %s", ++ barf("IMAGE_REL_AMD64_ADDR32[NB]: High bits are set in 0x%zx for %s", + v, (char *)symbol); + } + } + *(uint32_t *)pP = (uint32_t)v; + break; + } ++ case 14: /* R_X86_64_PC64 (ELF constant 24) - IMAGE_REL_AMD64_SREL32 (PE constant 14) */ ++ { ++ /* mingw will emit this for a pc-rel 64 relocation */ ++ uint64_t A; ++ checkProddableBlock(oc, pP, 8); ++ A = *(uint64_t*)pP; ++ *(uint64_t *)pP = S + A - (intptr_t)pP; ++ break; ++ } + case 4: /* R_X86_64_PC32 (ELF constant 2) - IMAGE_REL_AMD64_REL32 (PE constant 4) */ + { + intptr_t v; +@@ -1992,11 +2161,11 @@ ocResolve_PEi386 ( ObjectCode* oc ) + /* Make the trampoline then */ + copyName (getSymShortName (info, sym), + oc, symbol, sizeof(symbol)-1); +- S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); ++ S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol, sym_type); + /* And retry */ + v = S + (int32_t)A - ((intptr_t)pP) - 4; + if ((v > (int64_t) INT32_MAX) || (v < (int64_t) INT32_MIN)) { +- barf("IMAGE_REL_AMD64_REL32: High bits are set in %zx for %s", ++ barf("IMAGE_REL_AMD64_REL32: High bits are set in 0x%zx for %s", + v, (char *)symbol); + } + } +@@ -2012,15 +2181,45 @@ ocResolve_PEi386 ( ObjectCode* oc ) + } + + } ++ ++ /* Register the exceptions inside this OC. ++ See Note [Exception Unwinding]. */ ++ if (section.kind == SECTIONKIND_EXCEPTION_TABLE) { ++ oc->info->pdata = &oc->sections[i]; ++#if defined(x86_64_HOST_ARCH) ++ unsigned numEntries = section.size / sizeof(RUNTIME_FUNCTION); ++ if (numEntries == 0) ++ continue; ++ ++ /* Now register the exception handler for the range and point it ++ to the unwind data. */ ++ if (!RtlAddFunctionTable (section.start, numEntries, (uintptr_t) GetModuleHandleW(NULL))) { ++ sysErrorBelch("Unable to register Exception handler for %p for " ++ "section %s in %" PATH_FMT " (Win32 error %lu)", ++ section.start, section.info->name, oc->fileName, ++ GetLastError()); ++ releaseOcInfo (oc); ++ return false; ++ } ++#endif /* x86_64_HOST_ARCH. */ ++ } else if (section.kind == SECTIONKIND_EXCEPTION_UNWIND) { ++ oc->info->xdata = &oc->sections[i]; ++ } + } + ++ // We now have no more need of info->ch_info and info->symbols. ++ stgFree(oc->info->ch_info); ++ oc->info->ch_info = NULL; ++ stgFree(oc->info->symbols); ++ oc->info->symbols = NULL; ++ + IF_DEBUG(linker, debugBelch("completed %" PATH_FMT "\n", oc->fileName)); + return true; + } + + /* + Note [ELF constant in PE file] +- ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + For some reason, the PE files produced by GHC contain a linux + relocation constant 17 (0x11) in the object files. As far as I (Phyx-) can tell + this constant doesn't seem like it's coming from GHC, or at least I could not find +@@ -2033,36 +2232,95 @@ ocResolve_PEi386 ( ObjectCode* oc ) + See #9907 + */ + ++/* ++ Note [Exception Unwinding] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++ Exception Unwinding on Windows is handled using two named sections. ++ ++ .pdata: Exception registration tables. ++ ++ The .pdata section contains an array of function table entries (of type ++ RUNTIME_FUNCTION) that are used for exception handling. The entries must be ++ sorted according to the function addresses (the first field in each ++ structure) before being emitted into the final image. It is pointed to by ++ the exception table entry in the image data directory. For x64 each entry ++ contains: ++ ++ Offset Size Field Description ++ 0 4 Begin Address The RVA of the corresponding function. ++ 4 4 End Address The RVA of the end of the function. ++ 8 4 Unwind Information The RVA of the unwind information. ++ ++ Note that these are RVAs even after being resolved by the linker, they are ++ however ImageBase relative rather than PC relative. These are typically ++ filled in by an ADDR32NB relocation. On disk the section looks like: ++ ++ Function Table #6 (4) ++ ++ Begin End Info ++ ++ 00000000 00000000 000001A1 00000000 ++ 0000000C 000001A1 000001BF 00000034 ++ 00000018 000001BF 00000201 00000040 ++ 00000024 00000201 0000021F 0000004C ++ ++ RELOCATIONS #6 ++ Symbol Symbol ++ Offset Type Applied To Index Name ++ -------- ---------------- ----------------- -------- ------ ++ 00000000 ADDR32NB 00000000 E .text ++ 00000004 ADDR32NB 000001A1 E .text ++ 00000008 ADDR32NB 00000000 16 .xdata ++ 0000000C ADDR32NB 000001A1 E .text ++ 00000010 ADDR32NB 000001BF E .text ++ 00000014 ADDR32NB 00000034 16 .xdata ++ 00000018 ADDR32NB 000001BF E .text ++ 0000001C ADDR32NB 00000201 E .text ++ 00000020 ADDR32NB 00000040 16 .xdata ++ 00000024 ADDR32NB 00000201 E .text ++ 00000028 ADDR32NB 0000021F E .text ++ 0000002C ADDR32NB 0000004C 16 .xdata ++ ++ This means that if we leave it up to the relocation processing to ++ do the work we don't need to do anything special here. Note that ++ every single function will have an entry in this table regardless ++ whether they have an unwind code or not. The reason for this is ++ that unwind handlers can be chained, and such another function ++ may have registered an overlapping region. ++ ++ .xdata: Exception unwind codes. ++ ++ This section contains an array of entries telling the unwinder how ++ to do unwinding. They are pointed to by the .pdata table enteries ++ from the Info field. Each entry is very complicated but for now ++ what is important is that the addresses are resolved by the relocs ++ for us. ++ ++ Once we have resolved .pdata and .xdata we can simply pass the ++ content of .pdata on to RtlAddFunctionTable and the OS will do ++ the rest. When we're unloading the object we have to unregister ++ them using RtlDeleteFunctionTable. ++*/ ++ + bool + ocRunInit_PEi386 ( ObjectCode *oc ) + { +- if (!oc || !oc->info || !oc->info->init) { ++ if (oc && oc->info && oc->info->init) { ++ return runInit(&oc->info->init); ++ } + return true; +- } +- +- int argc, envc; +- char **argv, **envv; +- +- getProgArgv(&argc, &argv); +- getProgEnvv(&envc, &envv); +- +- Section section = *oc->info->init; +- ASSERT(SECTIONKIND_INIT_ARRAY == section.kind); +- +- uint8_t *init_startC = section.start; +- init_t *init_start = (init_t*)init_startC; +- init_t *init_end = (init_t*)(init_startC + section.size); +- +- // ctors are run *backwards*! +- for (init_t *init = init_end - 1; init >= init_start; init--) +- (*init)(argc, argv, envv); ++} + +- freeProgEnvv(envc, envv); +- releaseOcInfo (oc); +- return true; ++bool ocRunFini_PEi386( ObjectCode *oc ) ++{ ++ if (oc && oc->info && oc->info->fini) { ++ return runFini(&oc->info->fini); ++ } ++ return true; + } + +-SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) ++SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl, ObjectCode *dependent, SymType *type) + { + RtsSymbolInfo *pinfo; + +@@ -2075,24 +2333,21 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) + #if !defined(x86_64_HOST_ARCH) + zapTrailingAtSign ( lbl ); + #endif +- sym = lookupSymbolInDLLs(lbl); ++ if (type) { ++ // Unfortunately we can only assume that this is the case. Ideally ++ // the user would have given us an import library, which would allow ++ // us to determine the symbol type precisely. ++ *type = SYM_TYPE_CODE; ++ } ++ sym = lookupSymbolInDLLs(lbl, dependent); + return sym; // might be NULL if not found + } else { +-#if defined(mingw32_HOST_OS) +- // If Windows, perform initialization of uninitialized +- // Symbols from the C runtime which was loaded above. +- // We do this on lookup to prevent the hit when +- // The symbol isn't being used. +- if (pinfo->value == (void*)0xBAADF00D) +- { +- char symBuffer[50]; +- sprintf(symBuffer, "_%s", lbl); +- static HMODULE msvcrt = NULL; +- if (!msvcrt) msvcrt = GetModuleHandle("msvcrt"); +- pinfo->value = GetProcAddress(msvcrt, symBuffer); +- } +- else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) ++ if (type) *type = pinfo->type; ++ ++ if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) + { ++ /* See Note [BFD import library]. */ ++ + // we only want to _update_ the type, if the dependent symbol is _not_ a dllInstance. + SymType depType = 0; + HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, &depType); +@@ -2100,7 +2355,6 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) + *type = depType; + return pinfo->value; + } +- + if (!dllInstance) + { + errorBelch("Unable to load import dll symbol `%s'. " +@@ -2113,42 +2367,34 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) + pinfo->value = GetProcAddress((HMODULE)dllInstance, lbl); + clearImportSymbol (pinfo->owner, lbl); + return pinfo->value; ++ } else { ++ if (dependent) { ++ // Add dependent as symbol's owner's dependency ++ ObjectCode *owner = pinfo->owner; ++ if (owner) { ++ // TODO: what does it mean for a symbol to not have an owner? ++ insertHashSet(dependent->dependencies, (W_)owner); ++ } ++ } ++ return loadSymbol(lbl, pinfo); + } +-#endif +- return loadSymbol(lbl, pinfo); + } + } + + /* ----------------------------------------------------------------------------- +- * Section management. ++ * Debugging operations. + */ + +- /* See Note [Section alignment]. */ +-static void +-addCopySection (ObjectCode *oc, Section *s, SectionKind kind, +- SectionAlloc alloc, void* start, StgWord size) { +- char* pos = oc->info->image + oc->info->secBytesUsed; +- char* newStart = (char*)getAlignedMemory ((uint8_t*)pos, *s); +- memcpy (newStart, start, size); +- uintptr_t offset = (uintptr_t)newStart - (uintptr_t)oc->info->image; +- oc->info->secBytesUsed = (size_t)offset + size; +- start = newStart; +- +- /* Initially I wanted to apply the right memory protection to the region and +- which would leaved the gaps in between the regions as inaccessible memory +- to prevent exploits. +- The problem is protection is always on page granularity, so we can use +- less memory and be insecure or use more memory and be secure. +- For now, I've chosen lower memory over secure as the first pass, this +- doesn't regress security over the current implementation. After this +- patch I will change to different implementation that will fix the mem +- protection and keep the memory size small. */ +- addSection (s, kind, alloc, start, size, 0, 0, 0); +-} ++typedef struct _SymX { SymbolName* name; uintptr_t loc; } SymX; + +-/* ----------------------------------------------------------------------------- +- * Debugging operations. +- */ ++static int comp (const void * elem1, const void * elem2) ++{ ++ SymX f = *((SymX*)elem1); ++ SymX s = *((SymX*)elem2); ++ if (f.loc > s.loc) return 1; ++ if (f.loc < s.loc) return -1; ++ return 0; ++} + + pathchar* + resolveSymbolAddr_PEi386 (pathchar* buffer, int size, +@@ -2198,9 +2444,7 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, + wcscat (buffer, WSTR(" ")); + if (oc->archiveMemberName) + { +- pathchar* name = mkPath (oc->archiveMemberName); +- wcscat (buffer, name); +- stgFree (name); ++ wcscat (buffer, oc->archiveMemberName); + } + else + { +@@ -2277,7 +2521,6 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, + else if (obj) + { + /* Try to calculate from information inside the rts. */ +- typedef struct _SymX { SymbolName* name; uintptr_t loc; } SymX; + SymX* locs = stgCallocBytes (sizeof(SymX), obj->n_symbols, + "resolveSymbolAddr"); + int blanks = 0; +@@ -2297,14 +2540,6 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, + locs[i] = sx; + } + } +- int comp (const void * elem1, const void * elem2) +- { +- SymX f = *((SymX*)elem1); +- SymX s = *((SymX*)elem2); +- if (f.loc > s.loc) return 1; +- if (f.loc < s.loc) return -1; +- return 0; +- } + qsort (locs, obj->n_symbols, sizeof (SymX), comp); + uintptr_t key = (uintptr_t)symbol; + SymX* res = NULL; +diff --git a/rts/linker/PEi386.c.orig b/rts/linker/PEi386.c.orig +index da3946b..8622166 100644 +--- a/rts/linker/PEi386.c.orig ++++ b/rts/linker/PEi386.c.orig +@@ -55,11 +55,61 @@ + COFF_IMPORT_LIB and commonly has the file extension .lib + + * GNU BFD import format - The import library format defined and used by GNU +- tools. See note below. ++ tools and commonly has the file extension .dll.a . See note below. ++ ++ Note [The need for import libraries] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ In its original incarnation, PE had no native support for dynamic linking. ++ Let's examine how dynamic linking is now implemented. Consider a simple ++ program with a reference to function and data symbols provided by a DLL: ++ ++ // myprogram.c ++ #include ++ int do_something() { ++ libfoo_function(); ++ return libfoo_data; ++ } ++ ++ The header file shipped with libfoo will look like the following: ++ ++ // libfoo.h ++ __declspec(dllimport) int libfoo_function(); ++ __declspec(dllimport) int libfoo_data; ++ ++ When the C compiler is compiling myprogram.c, it will see these dllimport ++ declarations and use them to produce a module definition (.def) file which ++ summarizes the symbols that we expect the DLL to export. This will look like: ++ ++ EXPORTS ++ libfoo_function ++ libfoo_data DATA ++ ++ The C compiler will pass this file to the `dlltool` utility, which will ++ generate an *import library*. The import library will contain ++ placeholder symbols (with names starting with `__imp_`), along with ++ instructions for the dynamic linker to fix-up these references to point to ++ the "real" symbol definition. ++ ++ For historical reasons involving lack of documentation, NDAs, and (probably) ++ Steve Balmer, there are two flavours of import flavours: ++ ++ * Native Windows-style import libraries. These typically bear the .lib file ++ extension and encode their relocation information in the `.idata` section. ++ Documentation for this format is not available ++ [here](https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#import-library-format). ++ These are handled in `checkAndLoadImportLibrary()` ++ ++ * GNU BFD-style import libraries. These typically have the .dll.a ++ extension and encode the relocation information in a set of sections ++ named `.idata$` where `` is an integer which encodes the section's ++ meaning. Somewhat ironically, despite being devised in response to the ++ native Windows format having no public documentation, there is no official ++ documentation for this format but Note [BFD import library] attempts to ++ summarize what we know. These are handled in `ocGetNames_PEi386()`. ++ + + Note [BFD import library] + ~~~~~~~~~~~~~~~~~~~~~~~~~ +- + On Windows, compilers don't link directly to dynamic libraries. + The reason for this is that the exports are not always by symbol, the + Import Address Table (IAT) also allows exports by ordinal number +@@ -78,7 +128,7 @@ + + Anyway, the Windows PE format specifies a simple and efficient format for + this: It's essentially a list, saying these X symbols can be found in DLL y. +- Commonly, y is a versioned name. e.g. liby_43.dll. This is an artifact of ++ Commonly, y is a versioned name. e.g. `liby_43.dll`. This is an artifact of + the days when Windows did not support side-by-side assemblies. So the + solution was to version the DLLs by renaming them to include explicit + version numbers, and to then use the import libraries to point to the right +@@ -89,35 +139,62 @@ + have created their own format. This format is either named using the suffix + .dll.a or .a depending on the tool that makes them. This format is + undocumented. However the source of dlltool.c in binutils is pretty handy to +- understant it. ++ understand it (see binutils/dlltool.c; grep for ".idata section description"). + + To understand the implementation in GHC, this is what is important: + +- the .idata section group is used to hold this information. An import library ++ The import library is generally an archive containing one object file for ++ each imported symbol. In addition, there is a "head" object, which contains ++ the name of the DLL which the symbols are imported from, among other things. ++ ++ The `.idata$` section group is used to hold this information. An import library + object file will always have these section groups, but the specific + configuration depends on what the purpose of the file is. They will also + never have a CODE or DATA section, though depending on the tool that creates + them they may have the section headers, which will mostly be empty. + +- You have to different possible configuration: ++ The import data sections consist of the following: ++ ++ * `.idata$2` contains the Import Directory Table (IDT), which contains an entry ++ for each imported DLL. Each entry contains: a reference to the DLL's name ++ (in `.idata$7`) and references to its entries in the ILT and IAT sections. ++ This is contained in the head object. ++ ++ * `.idata$6` contains the Hint Name Table (HNT). This is a table of ++ of (symbol ordinal, symbol name) pairs, which are referred to be the ILT ++ and IAT as described below. ++ ++ * `.idata$5` contains the Import Address Table (IAT). This consists of an ++ array of pointers (one array for each imported DLL) which the loader will ++ update to point to the target symbol identified by the hint referenced by ++ the corresponding ILT entry. Moreover, the IAT pointers' initial values ++ also point to the corresponding HNT entry. ++ ++ * `.idata$4` contains the Import Lookup Table (ILT). This contains an array ++ of references to HNT entries for each imported DLL. + +- 1) Those that define a redirection. In this case the .idata$7 section will ++ * `.idata$7` contains the names of the imported DLLs. This is contained ++ in the head object. ++ ++ You have two different possible configurations: ++ ++ 1) Those that define a redirection. In this case the `.idata$7` section will + contain the name of the actual dll to load. This will be the only content + of the section. In the symbol table, the last symbol will be the name + used to refer to the dll in the relocation tables. This name will always +- be in the format "symbol_name_iname", however when refered to, the format +- "_head_symbol_name" is used. ++ be in the format `symbol_name_iname`, however when referred to, the format ++ `_head_symbol_name` is used. + +- We record this symbol early on during GetNames and load the dll and use ++ We record this symbol early on during `ocGetNames` and load the dll and use + the module handle as the symbol address. + +- 2) Symbol definitions. In this case .idata$6 will contain the symbol to load. +- This is stored in the fixed format of 2-byte ordinals followed by a null +- terminated string with the symbol name. The ordinal is to be used when +- the dll does not export symbols by name. (NOTE: We don't currently +- support this in the runtime linker, but it's easy to add should it be +- needed). The last symbol in the symbol table of the section will contain +- the name symbol which contains the dll name to use to resolve the ++ 2) Symbol definitions. In this case the HNT (`.idata$6`) will contain the ++ symbol to load. This is stored in the fixed format of 2-byte ordinals ++ followed by (null-terminated) symbol name. The ordinal is ++ to be used when the DLL does not export symbols by name. (note: We don't ++ currently support this in the runtime linker, but it's easy to add should ++ it be needed). The last symbol in the symbol table of the section will ++ contain the name symbol which contains the dll name to use to resolve the + reference. + + As a technicality, this also means that the GCC format will allow us to use +@@ -126,50 +203,145 @@ + required for dynamic linking support for GHC. So the runtime linker now + supports this too. + +- Note [Memory allocation] +- ~~~~~~~~~~~~~~~~~~~~~~~~ + +- Previously on Windows we would use VirtualAlloc to allocate enough space for +- loading the entire object file into memory and keep it there for the duration +- until the entire object file has been unloaded. +- +- This has a couple of problems, first of, VirtualAlloc and the other Virtual +- functions interact directly with the memory manager. Requesting memory from +- VirtualAlloc will always return whole pages (32k), aligned on a 4k boundary. +- +- This means for an object file of size N kbytes, we're always wasting 32-N +- kbytes of memory. Nothing else can access this memory. +- +- Because of this we're now using HeapAlloc and other heap function to create +- a private heap. Another solution would have been to write our own memory +- manager to keep track of where we have free memory, but the private heap +- solution is simpler. +- +- The private heap is created with full rights just as the pages we used to get +- from VirtualAlloc (e.g. READ/WRITE/EXECUTE). In the end we end up using +- memory much more efficiently than before. The downside is that heap memory +- is always Allocated AND Committed, thus when the heap resizes the new size is +- committed. It becomes harder to see how much we're actually using. This makes +- it seem like for small programs that we're using more memory than before. +- Certainly a clean GHCi startup will have a slightly higher commit count. +- +- The second major change in how we allocate memory is that we no longer need +- the entire object file. We now allocate the object file using normal malloc +- and instead read bits from it. All tables are stored in the Object file info +- table and are discarded as soon as they are no longer needed, e.g. after +- relocation is finished. Only section data is kept around, but this data is +- copied into the private heap. +- +- The major knock on effect of this is that we have more memory to use in the +- sub 2GB range, which means that Template Haskell should fail a lot less as we +- will violate the small memory model much less than before. +- +- Note [Section alignment] ++ Example: Dynamic code references ++ -------------------------------- ++ To see what such an import library looks like, let's first start with the case ++ of a function (e.g. `libfoo_function` above) with bind-now semantics (lazy-loading ++ will look much different). The import library will contain the following: ++ ++ .section .text ++ # This stub (which Windows calls a thunk) is what calls to ++ # libfoo_function will hit if the symbol isn't declared with ++ # __declspec(dllimport) ++ libfoo_function: ++ jmp *0x0(%rip) ++ .quad __imp_libfoo_function ++ ++ .section .idata$5 # IAT ++ # This is the location which the loader will ++ # update to point to the definition ++ # of libfoo_function ++ __imp_libfoo_function: ++ .quad hint1 - __image_base__ ++ ++ .section .idata$4 # ILT ++ # This (and hint1 below) is what tells the ++ # loader where __imp_libfoo_function should point ++ ilt1: ++ .quad hint1 - __image_base__ ++ ++ .section .idata$6 # HNT ++ hint1: ++ .short ORDINAL_OF_libfoo_function ++ .asciiz "libfoo_function" ++ ++ To handle a reference to an IAT entry like `__imp_libfoo_function`, the GHC ++ linker will (in `lookupSymbolInDLLs`) first strip off the `__imp_` prefix to ++ find the name of the referenced dynamic symbol. It then resolves the ++ symbol's address and allocates an `IndirectAddr` where it can place the ++ address, which it will return as the resolution of the `___libfoo_function`. ++ ++ Example: Dynamic data references ++ -------------------------------- ++ Let's now consider the import library for a data symbol. This is essentially ++ equivalent to the code case, but without the need to emit a thunk: ++ ++ .section .idata$5 # IAT ++ __imp_libfoo_data: ++ .quad hint2 - __image_base__ ++ ++ .section .idata$4 # ILT ++ ilt2: ++ .quad hint2 - __image_base__ ++ ++ .section .idata$6 # ILT ++ hint2: ++ .short ORDINAL_OF_libfoo_data ++ .asciiz "libfoo_data" ++ ++ ++ Note [GHC Linking model and import libraries] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ The above describes how import libraries work for static linking. ++ Fundamentally this does not apply to dynamic linking as we do in GHC. ++ The issue is two-folds: ++ ++ 1. In the linking model above it is expected that the .idata sections be ++ materialized into PLTs during linking. However in GHC we never create ++ PLTs, but have out own mechanism for this which is the jump island ++ machinery. This is required for efficiency. For one materializing the ++ .idata sections would result in wasting pages. We'd use one page for ++ every ~100 bytes. This is extremely wasteful and also fragments the ++ memory. Secondly the dynamic linker is lazy. We only perform the final ++ loading if the symbol is used, however with an import library we can ++ discard the actual OC immediately after reading it. This prevents us from ++ keeping ~1k in memory per symbol for no reason. ++ ++ 2. GHC itself does not observe symbol visibility correctly during NGC. This ++ in itself isn't an academic exercise. The issue stems from GHC using one ++ mechanism for providing two incompatible linking modes: ++ a) The first mode is generating Haskell shared libraries which are ++ intended to be used by other Haskell code. This requires us to ++ export the info, data and closures. For this GHC just re-exports ++ all symbols. But it doesn't correcly mark data/code. Symbol ++ visibility is overwritten by telling the linker to export all ++ symbols. ++ b) The second code is producing code that's supposed to be call-able ++ through a C insterface. This in reality does not require the ++ export of closures and info tables. But also does not require the ++ inclusion of the RTS inside the DLL. Hover this is done today ++ because we don't properly have the RTS as a dynamic library. ++ i.e. GHC does not only export symbols denoted by foreign export. ++ Also GHC should depend on an RTS library, but at the moment it ++ cannot because of TNTC is incompatible with dynamic linking. ++ ++ These two issues mean that for GHC we need to take a different approach ++ to handling import libraries. For normal C libraries we have proper ++ differentiation between CODE and DATA. For GHC produced import libraries ++ we do not. As such the SYM_TYPE_DUP_DISCARD tells the linker that if a ++ duplicate symbol is found, and we were going to discard it anyway, just do ++ so quitely. This works because the RTS symbols themselves are provided by ++ the currently loaded RTS as built-in symbols. ++ ++ Secondly we cannot rely on a text symbol being available. As such we ++ should only depend on the symbols as defined in the .idata sections, ++ otherwise we would not be able to correctly link against GHC produced ++ import libraries. ++ ++ Note [Memory allocation] + ~~~~~~~~~~~~~~~~~~~~~~~~ ++ The loading of an object begins in `preloadObjectFile`, which allocates a buffer, ++ `oc->image`, into which the object file is read. It then calls `ocVerifyImage`, ++ where we traverse the object file's header and populate `ObjectCode.sections`. ++ Specifically, we create a Section for each of the object's sections such ++ that: ++ ++ * the `.start` field points to its data in the mapped image ++ * the `.size` field reflects its intended size ++ * the .`info` field contains a `SectionFormatField` with other information ++ from its section header entry (namely `VirtualSize`, `VirtualAddress`, and ++ `Characteristics`) ++ ++ We then proceed to `ocGetNames`, where we again walk the section table header ++ and determine which sections need to be mapped and how (e.g. as readable-writable or ++ readable-executable). We then allocate memory for each section using the ++ appropriate m32 allocator and, where necessary, copy the data from ++ `section.start` (which points to the section in `oc->image`) ++ into the new allocation. Finally, `addSection()` updates the `section.start` field ++ to reflect the section's new home. In addition, we also allocate space for ++ the global BSS section. ++ ++ At this point we have no further need for the preloaded image buffer, ++ `oc->image` and therefore free it. ++ ++ Having populated the sections, we can proceed to add the object's symbols to ++ the symbol table. This is a matter of walking the object file's symbol table, ++ computing the symbol's address, and calling `ghciInsertSymbolTable`. ++ ++ Finally, we enter `ocResolve`, where we resolve relocations and and allocate ++ jump islands (using the m32 allocator for backing storage) as necessary. + +- The Windows linker aligns memory to it's section alignment requirement by +- aligning it during the copying to the private heap. We also ensure that the +- trampoline "region" we reserve is 8 bytes aligned. + */ + + #include "Rts.h" +@@ -184,12 +356,11 @@ + + #include "RtsUtils.h" + #include "RtsSymbolInfo.h" +-#include "GetEnv.h" + #include "CheckUnload.h" ++#include "LinkerInternals.h" + #include "linker/PEi386.h" + #include "linker/PEi386Types.h" + #include "linker/SymbolExtras.h" +-#include "LinkerInternals.h" + + #include + #include /* SHGetFolderPathW */ +@@ -208,7 +379,8 @@ static size_t makeSymbolExtra_PEi386( + ObjectCode* oc, + uint64_t index, + size_t s, +- SymbolName* symbol); ++ SymbolName* symbol, ++ SymType sym_type); + #endif + + static void addDLLHandle( +@@ -226,34 +398,14 @@ static bool checkIfDllLoaded( + static uint32_t getSectionAlignment( + Section section); + +-static uint8_t* getAlignedMemory( +- uint8_t* value, +- Section section); +- + static size_t getAlignedValue( + size_t value, + Section section); + +-static void addCopySection( +- ObjectCode *oc, +- Section *s, +- SectionKind kind, +- SectionAlloc alloc, +- void* start, +- StgWord size); +- + static void releaseOcInfo( + ObjectCode* oc); + +-/* Add ld symbol for PE image base. */ +-#if defined(__GNUC__) +-#define __ImageBase __MINGW_LSYMBOL(_image_base__) +-#endif +- +-/* Get the base of the module. */ +-/* This symbol is defined by ld. */ +-extern IMAGE_DOS_HEADER __ImageBase; +-#define __image_base (void*)((HINSTANCE)&__ImageBase) ++static SymbolAddr *lookupSymbolInDLLs ( const SymbolName* lbl, ObjectCode *dependent ); + + const Alignments pe_alignments[] = { + { IMAGE_SCN_ALIGN_1BYTES , 1 }, +@@ -274,8 +426,6 @@ const Alignments pe_alignments[] = { + + const int pe_alignments_cnt = sizeof (pe_alignments) / sizeof (Alignments); + const int default_alignment = 8; +-const int initHeapSizeMB = 15; +-static HANDLE code_heap = NULL; + + /* See Note [_iob_func symbol] + In order to emulate __iob_func the memory location needs to point the +@@ -283,72 +433,32 @@ static HANDLE code_heap = NULL; + the pointer as a redirect. Essentially it's a DATA DLL reference. */ + const void* __rts_iob_func = (void*)&__acrt_iob_func; + +-/* Low Fragmentation Heap, try to prevent heap from increasing in size when +- space can simply be reclaimed. These are enums missing from mingw-w64's +- headers. */ +-#define HEAP_LFH 2 +-#define HeapOptimizeResources 3 +- +-void initLinker_PEi386() ++void initLinker_PEi386(void) + { + if (!ghciInsertSymbolTable(WSTR("(GHCi/Ld special symbols)"), +- symhash, "__image_base__", __image_base, HS_BOOL_TRUE | (HS_BOOL_FALSE << 1), NULL)) { ++ symhash, "__image_base__", ++ GetModuleHandleW (NULL), HS_BOOL_TRUE, ++ SYM_TYPE_CODE, NULL)) { + barf("ghciInsertSymbolTable failed"); + } + + #if defined(mingw32_HOST_OS) + addDLLHandle(WSTR("*.exe"), GetModuleHandle(NULL)); +- /* +- * Most of these are included by base, but GCC always includes them +- * So lets make sure we always have them too. +- * +- * In most cases they would have been loaded by the +- * addDLLHandle above. +- */ +- addDLL(WSTR("msvcrt")); +- addDLL(WSTR("kernel32")); +- addDLL(WSTR("advapi32")); +- addDLL(WSTR("shell32")); +- addDLL(WSTR("user32")); + #endif + +- /* See Note [Memory allocation]. */ +- /* Create a private heap which we will use to store all code and data. */ +- SYSTEM_INFO sSysInfo; +- GetSystemInfo(&sSysInfo); +- code_heap = HeapCreate (HEAP_CREATE_ENABLE_EXECUTE, +- initHeapSizeMB * sSysInfo.dwPageSize , 0); +- if (!code_heap) +- barf ("Could not create private heap during initialization. Aborting."); +- +- /* Set some flags for the new code heap. */ +- HeapSetInformation(code_heap, HeapEnableTerminationOnCorruption, NULL, 0); +- unsigned long HeapInformation = HEAP_LFH; +- HeapSetInformation(code_heap, HeapEnableTerminationOnCorruption, +- &HeapInformation, sizeof(HeapInformation)); +- HeapSetInformation(code_heap, HeapOptimizeResources, NULL, 0); +- + /* Register the cleanup routine as an exit handler, this gives other exit handlers + a chance to run which may need linker information. Exit handlers are ran in + reverse registration order so this needs to be before the linker loads anything. */ + atexit (exitLinker_PEi386); + } + +-void exitLinker_PEi386() ++void exitLinker_PEi386(void) + { +- /* See Note [Memory allocation]. */ +- if (code_heap) { +- HeapDestroy (code_heap); +- code_heap = NULL; +- } + } + + /* A list thereof. */ + static OpenedDLL* opened_dlls = NULL; + +-/* A list thereof. */ +-static IndirectAddr* indirects = NULL; +- + /* Adds a DLL instance to the list of DLLs in which to search for symbols. */ + static void addDLLHandle(pathchar* dll_name, HINSTANCE instance) { + +@@ -431,33 +541,34 @@ void freePreloadObjectFile_PEi386(ObjectCode *oc) + } + + if (oc->info) { +- if (oc->info->image) { +- HeapFree(code_heap, 0, oc->info->image); +- oc->info->image = NULL; ++ /* Release the unwinder information. ++ See Note [Exception Unwinding]. */ ++ if (oc->info->pdata) { ++ if (!RtlDeleteFunctionTable (oc->info->pdata->start)) ++ debugBelch ("Unable to remove Exception handlers for %" PATH_FMT "\n", ++ oc->fileName); ++ oc->info->xdata = NULL; ++ oc->info->pdata = NULL; + } +- if (oc->info->ch_info) ++ ++ if (oc->info->ch_info) { + stgFree (oc->info->ch_info); ++ } + stgFree (oc->info); + oc->info = NULL; + } +- +- IndirectAddr *ia, *ia_next; +- ia = indirects; +- while (ia != NULL) { +- ia_next = ia->next; +- stgFree(ia); +- ia = ia_next; +- } +- indirects = NULL; + } + ++// Free oc->info and oc->sections[i]->info. + static void releaseOcInfo(ObjectCode* oc) { + if (!oc) return; + + if (oc->info) { ++ freeInitFiniList(oc->info->init); ++ freeInitFiniList(oc->info->fini); + stgFree (oc->info->ch_info); +- stgFree (oc->info->str_tab); + stgFree (oc->info->symbols); ++ stgFree (oc->info->str_tab); + stgFree (oc->info); + oc->info = NULL; + } +@@ -533,7 +644,7 @@ COFF_OBJ_TYPE getObjectType ( char* image, pathchar* fileName ) + *************/ + COFF_HEADER_INFO* getHeaderInfo ( ObjectCode* oc ) + { +- COFF_OBJ_TYPE coff_type = getObjectType (oc->image, oc->fileName); ++ COFF_OBJ_TYPE coff_type = getObjectType (oc->image, OC_INFORMATIVE_FILENAME(oc)); + + COFF_HEADER_INFO* info + = stgMallocBytes (sizeof(COFF_HEADER_INFO), "getHeaderInfo"); +@@ -589,8 +700,16 @@ size_t getSymbolSize ( COFF_HEADER_INFO *info ) + } + } + ++// Constants which may be returned by getSymSectionNumber. ++// See https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-number-values ++#define PE_SECTION_UNDEFINED ((uint32_t) 0) ++#define PE_SECTION_ABSOLUTE ((uint32_t) -1) ++#define PE_SECTION_DEBUG ((uint32_t) -2) ++ ++// Returns either PE_SECTION_{UNDEFINED,ABSOLUTE,DEBUG} or the (one-based) ++// section number of the given symbol. + __attribute__ ((always_inline)) inline +-int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) ++uint32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) + { + ASSERT(info); + ASSERT(sym); +@@ -599,7 +718,16 @@ int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) + case COFF_ANON_BIG_OBJ: + return sym->ex.SectionNumber; + default: +- return sym->og.SectionNumber; ++ // Take care to catch reserved values; see #22941. ++ switch (sym->og.SectionNumber) { ++ case IMAGE_SYM_UNDEFINED: return PE_SECTION_UNDEFINED; ++ case IMAGE_SYM_ABSOLUTE : return PE_SECTION_ABSOLUTE; ++ case IMAGE_SYM_DEBUG: return PE_SECTION_DEBUG; ++ default: ++ // Ensure that we catch if SectionNumber is made wider in the future ++ ASSERT(sizeof(sym->og.SectionNumber) == 2); ++ return (uint16_t) sym->og.SectionNumber; ++ } + } + } + +@@ -744,7 +872,7 @@ addDLL_PEi386( pathchar *dll_name, HINSTANCE *loaded ) + error: + stgFree(buf); + +- char* errormsg = malloc(sizeof(char) * 80); ++ char* errormsg = stgMallocBytes(sizeof(char) * 80, "addDLL_PEi386"); + snprintf(errormsg, 80, "addDLL: %" PATH_FMT " or dependencies not loaded. (Win32 error %lu)", dll_name, GetLastError()); + /* LoadLibrary failed; return a ptr to the error msg. */ + return errormsg; +@@ -754,7 +882,7 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) + { + const unsigned int init_buf_size = 1024; + unsigned int bufsize = init_buf_size; +- wchar_t* result = malloc(sizeof(wchar_t) * bufsize); ++ wchar_t* result = stgMallocBytes(sizeof(wchar_t) * bufsize, "findSystemLibrary_PEi386"); + DWORD wResult = SearchPathW(NULL, dll_name, NULL, bufsize, result, NULL); + + if (wResult > bufsize) { +@@ -764,7 +892,7 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) + + + if (!wResult) { +- free(result); ++ stgFree(result); + return NULL; + } + +@@ -773,68 +901,18 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) + + HsPtr addLibrarySearchPath_PEi386(pathchar* dll_path) + { +- HINSTANCE hDLL = LoadLibraryW(L"Kernel32.DLL"); +- LPAddDLLDirectory AddDllDirectory = (LPAddDLLDirectory)(void*)GetProcAddress((HMODULE)hDLL, "AddDllDirectory"); +- +- HsPtr result = NULL; +- +- const unsigned int init_buf_size = 4096; +- int bufsize = init_buf_size; +- +- // Make sure the path is an absolute path +- WCHAR* abs_path = malloc(sizeof(WCHAR) * init_buf_size); +- DWORD wResult = GetFullPathNameW(dll_path, bufsize, abs_path, NULL); +- if (!wResult){ +- IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError())); +- } +- else if (wResult > init_buf_size) { +- abs_path = realloc(abs_path, sizeof(WCHAR) * wResult); +- if (!GetFullPathNameW(dll_path, bufsize, abs_path, NULL)) { +- IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError())); +- } +- } +- +- if (AddDllDirectory) { +- result = AddDllDirectory(abs_path); +- } +- else +- { +- warnMissingKBLibraryPaths(); +- WCHAR* str = malloc(sizeof(WCHAR) * init_buf_size); +- wResult = GetEnvironmentVariableW(L"PATH", str, bufsize); +- +- if (wResult > init_buf_size) { +- str = realloc(str, sizeof(WCHAR) * wResult); +- bufsize = wResult; +- wResult = GetEnvironmentVariableW(L"PATH", str, bufsize); +- if (!wResult) { +- sysErrorBelch("addLibrarySearchPath[GetEnvironmentVariableW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError()); +- } +- } +- +- bufsize = wResult + 2 + pathlen(abs_path); +- wchar_t* newPath = malloc(sizeof(wchar_t) * bufsize); +- +- wcscpy(newPath, abs_path); +- wcscat(newPath, L";"); +- wcscat(newPath, str); +- if (!SetEnvironmentVariableW(L"PATH", (LPCWSTR)newPath)) { +- sysErrorBelch("addLibrarySearchPath[SetEnvironmentVariableW]: %" PATH_FMT " (Win32 error %lu)", abs_path, GetLastError()); +- } +- +- free(newPath); +- free(abs_path); +- +- return str; +- } ++ // Make sure the path is an absolute path in UNC-style to ensure that we ++ // aren't subject to the MAX_PATH restriction. See #21059. ++ wchar_t *abs_path = __rts_create_device_name(dll_path); + ++ HsPtr result = AddDllDirectory(abs_path); + if (!result) { + sysErrorBelch("addLibrarySearchPath: %" PATH_FMT " (Win32 error %lu)", abs_path, GetLastError()); +- free(abs_path); ++ stgFree(abs_path); + return NULL; + } + +- free(abs_path); ++ stgFree(abs_path); + return result; + } + +@@ -843,19 +921,8 @@ bool removeLibrarySearchPath_PEi386(HsPtr dll_path_index) + bool result = false; + + if (dll_path_index != NULL) { +- HINSTANCE hDLL = LoadLibraryW(L"Kernel32.DLL"); +- LPRemoveDLLDirectory RemoveDllDirectory = (LPRemoveDLLDirectory)(void*)GetProcAddress((HMODULE)hDLL, "RemoveDllDirectory"); +- +- if (RemoveDllDirectory) { +- result = RemoveDllDirectory(dll_path_index); +- // dll_path_index is now invalid, do not use it after this point. +- } +- else +- { +- warnMissingKBLibraryPaths(); +- result = SetEnvironmentVariableW(L"PATH", (LPCWSTR)dll_path_index); +- free(dll_path_index); +- } ++ result = RemoveDllDirectory(dll_path_index); ++ // dll_path_index is now invalid, do not use it after this point. + + if (!result) { + sysErrorBelch("removeLibrarySearchPath: (Win32 error %lu)", GetLastError()); +@@ -883,16 +950,6 @@ static uint32_t getSectionAlignment( + return default_alignment; + } + +-/* ---------------------- +- * return a memory location aligned to the section requirements +- */ +-static uint8_t* getAlignedMemory( +- uint8_t* value, Section section) { +- uint32_t alignment = getSectionAlignment(section); +- uintptr_t mask = (uintptr_t)alignment - 1; +- return (uint8_t*)(((uintptr_t)value + mask) & ~mask); +-} +- + /* ---------------------- + * return a value aligned to the section requirements + */ +@@ -1084,7 +1141,7 @@ zapTrailingAtSign ( SymbolName* sym ) + #endif + + SymbolAddr* +-lookupSymbolInDLLs ( const SymbolName* lbl ) ++lookupSymbolInDLLs ( const SymbolName* lbl, ObjectCode *dependent ) + { + OpenedDLL* o_dll; + SymbolAddr* sym; +@@ -1092,17 +1149,13 @@ lookupSymbolInDLLs ( const SymbolName* lbl ) + for (o_dll = opened_dlls; o_dll != NULL; o_dll = o_dll->next) { + /* debugBelch("look in %ls for %s\n", o_dll->name, lbl); */ + +- if (wcsncmp(o_dll->name,WSTR("ucrtbase.dll"),wcslen(WSTR("ucrtbase.dll"))) == 0) { +- IF_DEBUG(linker, debugBelch("warning: ignoring " PATH_FMT "\n", o_dll->name)); +- continue; +- } +- + sym = GetProcAddress(o_dll->instance, lbl+STRIP_LEADING_UNDERSCORE); + if (sym != NULL) { + /*debugBelch("found %s in %s\n", lbl+1,o_dll->name);*/ + return sym; + } + ++ // TODO: Drop this + /* Ticket #2283. + Long description: http://support.microsoft.com/kb/132044 + tl;dr: +@@ -1114,15 +1167,15 @@ lookupSymbolInDLLs ( const SymbolName* lbl ) + sym = GetProcAddress(o_dll->instance, + lbl + 6 + STRIP_LEADING_UNDERSCORE); + if (sym != NULL) { +- IndirectAddr* ret; +- ret = stgMallocBytes( sizeof(IndirectAddr), "lookupSymbolInDLLs" ); +- ret->addr = sym; +- ret->next = indirects; +- indirects = ret; ++ SymbolAddr** indirect = m32_alloc(dependent->rw_m32, sizeof(SymbolAddr*), 8); ++ if (indirect == NULL) { ++ barf("lookupSymbolInDLLs: Failed to allocation indirection"); ++ } ++ *indirect = sym; + IF_DEBUG(linker, + debugBelch("warning: %s from %S is linked instead of %s\n", + lbl+6+STRIP_LEADING_UNDERSCORE, o_dll->name, lbl)); +- return (void*) & ret->addr; ++ return (void*) indirect; + } + } + +@@ -1213,10 +1266,8 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) + oc->n_sections = info->numberOfSections + 1; + oc->info = stgCallocBytes (sizeof(struct ObjectCodeFormatInfo), 1, + "ocVerifyImage_PEi386(info)"); +- oc->info->secBytesTotal = 0; +- oc->info->secBytesUsed = 0; + oc->info->init = NULL; +- oc->info->finit = NULL; ++ oc->info->fini = NULL; + oc->info->ch_info = info; + + /* Copy the tables over from object-file. Copying these allows us to +@@ -1285,31 +1336,14 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) + memcpy (section->info->relocs, reltab + relocs_offset, + noRelocs * sizeof (COFF_reloc)); + } +- +- oc->info->secBytesTotal += getAlignedValue (section->size, *section); + } + + /* Initialize the last section's info field which contains the .bss +- section, it doesn't need an info so set it to NULL. */ ++ section, the .info of which will be initialized by ocGetNames. Discard the ++ .info that we computed above. */ ++ stgFree(sections[info->numberOfSections].info); + sections[info->numberOfSections].info = NULL; + +- /* Calculate space for trampolines nearby. +- We get back 8-byte aligned memory (is that guaranteed?), but +- the offsets to the sections within the file are all 4 mod 8 +- (is that guaranteed?). We therefore need to offset the image +- by 4, so that all the pointers are 8-byte aligned, so that +- pointer tagging works. */ +- /* For 32-bit case we don't need this, hence we use macro +- PEi386_IMAGE_OFFSET, which equals to 4 for 64-bit case and 0 for +- 32-bit case. */ +- /* We allocate trampolines area for all symbols right behind +- image data, aligned on 8. */ +- oc->info->trampoline +- = (PEi386_IMAGE_OFFSET + 2 * default_alignment +- + oc->info->secBytesTotal) & ~0x7; +- oc->info->secBytesTotal +- = oc->info->trampoline + info->numberOfSymbols * sizeof(SymbolExtra); +- + /* No further verification after this point; only debug printing. */ + i = 0; + IF_DEBUG(linker, i=1); +@@ -1363,6 +1397,10 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) + return false; + } + ++ i = 0; ++ IF_DEBUG(linker_verbose, i=1); ++ if (i == 0) return true; ++ + /* Print the section table. */ + debugBelch("\n" ); + for (i = 0; i < info->numberOfSections; i++) { +@@ -1457,113 +1495,109 @@ bool + ocGetNames_PEi386 ( ObjectCode* oc ) + { + bool has_code_section = false; +- +- SymbolName* sname = NULL; +- SymbolAddr* addr = NULL; +- unsigned int i; +- + COFF_HEADER_INFO *info = oc->info->ch_info; + + /* Copy section information into the ObjectCode. */ + +- for (i = 0; i < info->numberOfSections; i++) { +- uint8_t* start; +- uint8_t* end; +- uint32_t sz; +- ++ for (unsigned int i = 0; i < info->numberOfSections; i++) { + /* By default consider all section as CODE or DATA, + which means we want to load them. */ + SectionKind kind = SECTIONKIND_CODE_OR_RODATA; +- Section section = oc->sections[i]; ++ Section *section = &oc->sections[i]; ++ uint32_t alignment = getSectionAlignment(*section); + +- IF_DEBUG(linker, debugBelch("section name = %s\n", section.info->name )); ++ // These will be computed below and determine how we will handle the ++ // section ++ size_t sz = section->size; ++ bool do_copy = true; ++ bool do_zero = false; ++ ++ IF_DEBUG(linker, debugBelch("section name = %s (%x)\n", section->info->name, section->info->props )); + + /* The PE file section flag indicates whether the section + contains code or data. */ +- if (section.info->props & IMAGE_SCN_CNT_CODE) { +- has_code_section = has_code_section || section.size > 0; ++ if (section->info->props & IMAGE_SCN_CNT_CODE) { ++ has_code_section = has_code_section || section->size > 0; + kind = SECTIONKIND_CODE_OR_RODATA; + } + +- if (section.info->props & IMAGE_SCN_CNT_INITIALIZED_DATA) +- kind = SECTIONKIND_CODE_OR_RODATA; ++ if (section->info->props & IMAGE_SCN_MEM_WRITE) { ++ kind = SECTIONKIND_RWDATA; ++ } + + /* Check next if it contains any uninitialized data */ +- if (section.info->props & IMAGE_SCN_CNT_UNINITIALIZED_DATA) ++ if (section->info->props & IMAGE_SCN_CNT_UNINITIALIZED_DATA) { + kind = SECTIONKIND_RWDATA; ++ do_copy = false; ++ } + + /* Finally check if it can be discarded. + This will also ignore .debug sections */ +- if ( section.info->props & IMAGE_SCN_MEM_DISCARDABLE +- || section.info->props & IMAGE_SCN_LNK_REMOVE) ++ if ( section->info->props & IMAGE_SCN_MEM_DISCARDABLE ++ || section->info->props & IMAGE_SCN_LNK_REMOVE) { + kind = SECTIONKIND_OTHER; ++ } + +- if (0==strncmp(".ctors", section.info->name, 6)) { ++ if (0==strncmp(".ctors", section->info->name, 6)) { ++ /* N.B. a compilation unit may have more than one .ctor section; we ++ * must run them all. See #21618 for a case where this happened */ ++ uint32_t prio; ++ if (sscanf(section->info->name, ".ctors.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ // .ctors/.dtors are executed in reverse order: higher numbers are ++ // executed first ++ prio = 0xffff - prio; ++ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_CTORS, prio); + kind = SECTIONKIND_INIT_ARRAY; +- oc->info->init = &oc->sections[i]; + } + +- if (0==strncmp(".dtors", section.info->name, 6)) { +- kind = SECTIONKIND_FINIT_ARRAY; +- oc->info->finit = &oc->sections[i]; ++ if (0==strncmp(".dtors", section->info->name, 6)) { ++ uint32_t prio; ++ if (sscanf(section->info->name, ".dtors.%d", &prio) != 1) { ++ // Sections without an explicit priority are run last ++ prio = 0; ++ } ++ // .ctors/.dtors are executed in reverse order: higher numbers are ++ // executed first ++ prio = 0xffff - prio; ++ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_DTORS, prio); ++ kind = SECTIONKIND_FINI_ARRAY; + } + +- if ( 0 == strncmp(".stab" , section.info->name, 5 ) +- || 0 == strncmp(".stabstr" , section.info->name, 8 ) +- || 0 == strncmp(".pdata" , section.info->name, 6 ) +- || 0 == strncmp(".xdata" , section.info->name, 6 ) +- || 0 == strncmp(".debug" , section.info->name, 6 ) +- || 0 == strncmp(".rdata$zzz", section.info->name, 10)) ++ if ( 0 == strncmp(".stab" , section->info->name, 5 ) ++ || 0 == strncmp(".stabstr" , section->info->name, 8 ) ++ || 0 == strncmp(".debug" , section->info->name, 6 ) ++ || 0 == strncmp(".rdata$zzz", section->info->name, 10)) + kind = SECTIONKIND_DEBUG; + +- if (0==strncmp(".idata", section.info->name, 6)) +- kind = SECTIONKIND_IMPORT; ++ /* Exception Unwind information. See Note [Exception Unwinding]. */ ++ if (0 == strncmp(".xdata" , section->info->name, 6 )) { ++ kind = SECTIONKIND_EXCEPTION_UNWIND; ++ } + +- /* See Note [BFD import library]. */ +- if (0==strncmp(".idata$7", section.info->name, 8)) +- kind = SECTIONKIND_IMPORT_LIBRARY; ++ /* Exception handler tables, See Note [Exception Unwinding]. */ ++ if (0 == strncmp(".pdata" , section->info->name, 6 )) { ++ kind = SECTIONKIND_EXCEPTION_TABLE; ++ } + +- if (0==strncmp(".idata$6", section.info->name, 8)) { +- /* The first two bytes contain the ordinal of the function +- in the format of lowpart highpart. The two bytes combined +- for the total range of 16 bits which is the function export limit +- of DLLs. */ +- sname = (SymbolName*)section.start+2; +- COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; +- addr = get_sym_name( getSymShortName (info, sym), oc); ++ if (0==strncmp(".idata", section->info->name, 6)) { ++ kind = SECTIONKIND_IMPORT; ++ } + +- IF_DEBUG(linker, +- debugBelch("addImportSymbol `%s' => `%s'\n", +- sname, (char*)addr)); +- /* We're going to free the any data associated with the import +- library without copying the sections. So we have to duplicate +- the symbol name and values before the pointers become invalid. */ +- sname = strdup (sname); +- addr = strdup (addr); +- if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, +- addr, HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), oc)) { +- releaseOcInfo (oc); +- stgFree (oc->image); +- oc->image = NULL; +- return false; +- } +- setImportSymbol (oc, sname); + +- /* Don't process this oc any futher. Just exit. */ +- oc->n_symbols = 0; +- oc->symbols = NULL; +- stgFree (oc->image); +- oc->image = NULL; +- releaseOcInfo (oc); +- oc->status = OBJECT_DONT_RESOLVE; +- return true; ++ /* See Note [BFD import library]. */ ++ if (0==strncmp(".idata$7", section->info->name, 8)) { ++ kind = SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD; + } + +- /* Allocate space for any (local, anonymous) .bss sections. */ +- if (0==strncmp(".bss", section.info->name, 4)) { +- uint32_t bss_sz; +- uint8_t* zspace; ++ if (0==strncmp(".idata$6", section->info->name, 8)) { ++ kind = SECTIONKIND_BFD_IMPORT_LIBRARY; ++ } + ++ /* Allocate space for any (local, anonymous) .bss sections. */ ++ if (0==strncmp(".bss", section->info->name, 4)) { + /* sof 10/05: the PE spec text isn't too clear regarding what + * the SizeOfRawData field is supposed to hold for object + * file sections containing just uninitialized data -- for executables, +@@ -1583,42 +1617,49 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + * + * TODO: check if this comment is still relevant. + */ +- if (section.info->virtualSize == 0 && section.size == 0) continue; ++ if (section->info->virtualSize == 0 && section->size == 0) { ++ IF_DEBUG(linker_verbose, debugBelch("skipping empty .bss section\n")); ++ continue; ++ } ++ + /* This is a non-empty .bss section. + Allocate zeroed space for it */ +- bss_sz = section.info->virtualSize; +- if (bss_sz < section.size) { bss_sz = section.size; } +- zspace = stgCallocBytes(1, bss_sz, "ocGetNames_PEi386(anonymous bss)"); +- oc->sections[i].start = zspace; +- oc->sections[i].size = bss_sz; +- section = oc->sections[i]; +- /* debugBelch("BSS anon section at 0x%x\n", zspace); */ ++ kind = SECTIONKIND_RWDATA; ++ do_zero = true; ++ do_copy = false; ++ IF_DEBUG(linker_verbose, debugBelch("BSS anon section\n")); + } + +- /* Allocate space for the sections since we have a real oc. +- We initially mark it the region as non-accessible. But will adjust +- as we go along. */ +- if (!oc->info->image) { +- /* See Note [Memory allocation]. */ +- ASSERT(code_heap); +- oc->info->image +- = HeapAlloc (code_heap, HEAP_ZERO_MEMORY, oc->info->secBytesTotal); +- if (!oc->info->image) +- barf ("Could not allocate any heap memory from private heap."); ++ CHECK(section->size == 0 || section->info->virtualSize == 0); ++ if (sz < section->info->virtualSize) { ++ sz = section->info->virtualSize; + } + +- ASSERT(section.size == 0 || section.info->virtualSize == 0); +- sz = section.size; +- if (sz < section.info->virtualSize) sz = section.info->virtualSize; ++ // Ignore these section types ++ if (kind == SECTIONKIND_OTHER || sz == 0) { ++ continue; ++ } + +- start = section.start; +- end = start + sz; ++ // Allocate memory for the section. ++ uint8_t *start; ++ if (section->info->props & IMAGE_SCN_MEM_WRITE) { ++ start = m32_alloc(oc->rw_m32, sz, alignment); ++ } else { ++ start = m32_alloc(oc->rx_m32, sz, alignment); ++ } ++ if (!start) { ++ barf("Could not allocate any heap memory from private heap (requested %" FMT_SizeT " bytes).", ++ sz); ++ } + +- if (kind != SECTIONKIND_OTHER && end > start) { +- /* See Note [Section alignment]. */ +- addCopySection(oc, &oc->sections[i], kind, SECTION_NOMEM, start, sz); +- addProddableBlock(oc, oc->sections[i].start, sz); ++ if (do_copy) { ++ memcpy(start, section->start, sz); ++ } else if (do_zero) { ++ memset(start, 0, sz); + } ++ ++ addSection(section, kind, SECTION_NOMEM, start, sz, 0, 0, 0); ++ addProddableBlock(oc, oc->sections[i].start, sz); + } + + /* Copy exported symbols into the ObjectCode. */ +@@ -1629,9 +1670,9 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + + /* Work out the size of the global BSS section */ + StgWord globalBssSize = 0; +- for (i=0; i < info->numberOfSymbols; i++) { ++ for (unsigned int i=0; i < info->numberOfSymbols; i++) { + COFF_symbol* sym = &oc->info->symbols[i]; +- if (getSymSectionNumber (info, sym) == IMAGE_SYM_UNDEFINED ++ if (getSymSectionNumber (info, sym) == PE_SECTION_UNDEFINED + && getSymValue (info, sym) > 0 + && getSymStorageClass (info, sym) != IMAGE_SYM_CLASS_SECTION) { + globalBssSize += getSymValue (info, sym); +@@ -1642,12 +1683,14 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + /* Allocate BSS space */ + SymbolAddr* bss = NULL; + if (globalBssSize > 0) { +- bss = stgCallocBytes(1, globalBssSize, +- "ocGetNames_PEi386(non-anonymous bss)"); ++ bss = m32_alloc(oc->rw_m32, globalBssSize, 16); ++ if (bss == NULL) { ++ barf("ocGetNames_PEi386: Failed to allocate global bss section"); ++ } + addSection(&oc->sections[oc->n_sections-1], + SECTIONKIND_RWDATA, SECTION_MALLOC, + bss, globalBssSize, 0, 0, 0); +- IF_DEBUG(linker, debugBelch("bss @ %p %" FMT_Word "\n", bss, globalBssSize)); ++ IF_DEBUG(linker_verbose, debugBelch("bss @ %p %" FMT_Word "\n", bss, globalBssSize)); + addProddableBlock(oc, bss, globalBssSize); + } else { + addSection(&oc->sections[oc->n_sections-1], +@@ -1659,22 +1702,52 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + stgFree (oc->image); + oc->image = NULL; + +- for (i = 0; i < (uint32_t)oc->n_symbols; i++) { ++ for (unsigned int i = 0; i < (uint32_t)oc->n_symbols; i++) { + COFF_symbol* sym = &oc->info->symbols[i]; + +- int32_t secNumber = getSymSectionNumber (info, sym); + uint32_t symValue = getSymValue (info, sym); + uint8_t symStorageClass = getSymStorageClass (info, sym); +- +- addr = NULL; ++ SymbolAddr *addr = NULL; + bool isWeak = false; +- sname = get_sym_name (getSymShortName (info, sym), oc); +- Section *section = secNumber > 0 ? &oc->sections[secNumber-1] : NULL; ++ SymbolName *sname = get_sym_name (getSymShortName (info, sym), oc); ++ ++ uint32_t secNumber = getSymSectionNumber (info, sym); ++ Section *section; ++ switch (secNumber) { ++ case PE_SECTION_UNDEFINED: ++ // N.B. This may be a weak symbol ++ section = NULL; ++ break; ++ case PE_SECTION_ABSOLUTE: ++ IF_DEBUG(linker, debugBelch("symbol %s is ABSOLUTE, skipping...\n", sname)); ++ i += getSymNumberOfAuxSymbols (info, sym); ++ continue; ++ case PE_SECTION_DEBUG: ++ IF_DEBUG(linker, debugBelch("symbol %s is DEBUG, skipping...\n", sname)); ++ i += getSymNumberOfAuxSymbols (info, sym); ++ continue; ++ default: ++ CHECK(secNumber < (uint32_t) oc->n_sections); ++ section = &oc->sections[secNumber-1]; ++ } ++ ++ SymType type; ++ switch (getSymType(oc->info->ch_info, sym)) { ++ case 0x00: type = SYM_TYPE_DATA; break; ++ case 0x20: type = SYM_TYPE_CODE; break; ++ default: ++ debugBelch("Symbol %s has invalid type 0x%x\n", ++ sname, getSymType(oc->info->ch_info, sym)); ++ return 1; ++ } + + if ( secNumber != IMAGE_SYM_UNDEFINED + && secNumber > 0 + && section +- && section->kind != SECTIONKIND_IMPORT_LIBRARY) { ++ /* Skip all BFD import sections. */ ++ && section->kind != SECTIONKIND_IMPORT ++ && section->kind != SECTIONKIND_BFD_IMPORT_LIBRARY ++ && section->kind != SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD) { + /* This symbol is global and defined, viz, exported */ + /* for IMAGE_SYMCLASS_EXTERNAL + && !IMAGE_SYM_UNDEFINED, +@@ -1691,18 +1764,84 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + } + else if (symStorageClass == IMAGE_SYM_CLASS_WEAK_EXTERNAL) { + isWeak = true; ++ CHECK(getSymNumberOfAuxSymbols (info, sym) == 1); ++ CHECK(symValue == 0); ++ COFF_symbol_aux_weak_external *aux = (COFF_symbol_aux_weak_external *) (sym+1); ++ COFF_symbol* targetSym = &oc->info->symbols[aux->TagIndex]; ++ ++ uint32_t targetSecNumber = getSymSectionNumber (info, targetSym); ++ Section *targetSection; ++ switch (targetSecNumber) { ++ case PE_SECTION_UNDEFINED: ++ case PE_SECTION_ABSOLUTE: ++ case PE_SECTION_DEBUG: ++ targetSection = NULL; ++ break; ++ default: ++ // targetSecNumber is a uint32_t, and the 0 case should be caught by PE_SECTION_UNDEFINED. ++ // The compiler should be smart enough to eliminate the guard, we'll keep it in as fail ++ // safe nontheless. ++ targetSection = targetSecNumber > 0 ? &oc->sections[targetSecNumber-1] : NULL; ++ } ++ if(NULL != targetSection) ++ addr = (SymbolAddr*) ((size_t) targetSection->start + getSymValue(info, targetSym)); + } + else if ( secNumber == IMAGE_SYM_UNDEFINED && symValue > 0) { + /* This symbol isn't in any section at all, ie, global bss. + Allocate zeroed space for it from the BSS section */ + addr = bss; + bss = (SymbolAddr*)((StgWord)bss + (StgWord)symValue); +- IF_DEBUG(linker, debugBelch("bss symbol @ %p %u\n", addr, symValue)); ++ IF_DEBUG(linker_verbose, debugBelch("bss symbol @ %p %u\n", addr, symValue)); ++ } ++ else if (section && section->kind == SECTIONKIND_BFD_IMPORT_LIBRARY) { ++ /* Disassembly of section .idata$5: ++ ++ 0000000000000000 <__imp_Insert>: ++ ... ++ 0: IMAGE_REL_AMD64_ADDR32NB .idata$6 ++ ++ The first two bytes contain the ordinal of the function ++ in the format of lowpart highpart. The two bytes combined ++ for the total range of 16 bits which is the function export limit ++ of DLLs. See note [GHC Linking model and import libraries]. */ ++ sname = (SymbolName*)section->start+2; ++ COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; ++ addr = get_sym_name( getSymShortName (info, sym), oc); ++ ++ IF_DEBUG(linker, ++ debugBelch("addImportSymbol `%s' => `%s'\n", ++ sname, (char*)addr)); ++ /* We're going to free the any data associated with the import ++ library without copying the sections. So we have to duplicate ++ the symbol name and values before the pointers become invalid. */ ++ sname = strdup (sname); ++ addr = strdup (addr); ++ type = has_code_section ? SYM_TYPE_CODE : SYM_TYPE_DATA; ++ type |= SYM_TYPE_DUP_DISCARD; ++ if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, ++ addr, false, type, oc)) { ++ releaseOcInfo (oc); ++ stgFree (oc->image); ++ oc->image = NULL; ++ return false; ++ } ++ setImportSymbol (oc, sname); ++ ++ /* Don't process this oc any further. Just exit. */ ++ oc->n_symbols = 0; ++ oc->symbols = NULL; ++ stgFree (oc->image); ++ oc->image = NULL; ++ releaseOcInfo (oc); ++ // There is nothing that we need to resolve in this object since we ++ // will never call the import stubs in its text section ++ oc->status = OBJECT_DONT_RESOLVE; ++ return true; + } + else if (secNumber > 0 + && section +- && section->kind == SECTIONKIND_IMPORT_LIBRARY) { +- /* This is an import section. We should load the dll and lookup ++ && section->kind == SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD) { ++ /* This is an Gnu BFD import section. We should load the dll and lookup + the symbols. + See Note [BFD import library]. */ + char* dllName = section->start; +@@ -1716,7 +1855,7 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + sym = &oc->info->symbols[oc->n_symbols-1]; + sname = get_sym_name (getSymShortName (info, sym), oc); + +- IF_DEBUG(linker, ++ IF_DEBUG(linker_verbose, + debugBelch("loading symbol `%s' from dll: '%ls' => `%s'\n", + sname, oc->fileName, dllName)); + +@@ -1758,29 +1897,36 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + sname[size-start]='\0'; + stgFree(tmp); + sname = strdup (sname); ++ if(secNumber == IMAGE_SYM_UNDEFINED) ++ type |= SYM_TYPE_HIDDEN; ++ + if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, +- addr, +- HS_BOOL_FALSE | ((secNumber == IMAGE_SYM_UNDEFINED) << 1), +- oc)) ++ addr, false, type, oc)) + return false; + + break; ++ } else if (secNumber == PE_SECTION_UNDEFINED) { ++ IF_DEBUG(linker, debugBelch("symbol %s is UNDEFINED, skipping...\n", sname)); ++ i += getSymNumberOfAuxSymbols (info, sym); + } + + if ((addr != NULL || isWeak) + && (!section || (section && section->kind != SECTIONKIND_IMPORT))) { + /* debugBelch("addSymbol %p `%s' Weak:%lld \n", addr, sname, isWeak); */ + sname = strdup (sname); +- IF_DEBUG(linker, debugBelch("addSymbol %p `%s'\n", addr, sname)); ++ if(secNumber == IMAGE_SYM_UNDEFINED) ++ type |= SYM_TYPE_HIDDEN; ++ IF_DEBUG(linker_verbose, debugBelch("addSymbol %p `%s'\n", addr, sname)); + ASSERT(i < (uint32_t)oc->n_symbols); + oc->symbols[i].name = sname; + oc->symbols[i].addr = addr; ++ oc->symbols[i].type = type; + if (isWeak) { + setWeakSymbol(oc, sname); + } ++ + if (! ghciInsertSymbolTable(oc->fileName, symhash, sname, addr, +- isWeak | ((secNumber == IMAGE_SYM_UNDEFINED) << 1), +- oc)) ++ isWeak, type, oc)) + return false; + } else { + /* We're skipping the symbol, but if we ever load this +@@ -1797,50 +1943,37 @@ ocGetNames_PEi386 ( ObjectCode* oc ) + + #if defined(x86_64_HOST_ARCH) + +-/* We've already reserved a room for symbol extras in loadObj, +- * so simply set correct pointer here. +- */ +-bool +-ocAllocateExtras_PEi386 ( ObjectCode* oc ) +-{ +- /* If the ObjectCode was unloaded we don't need a trampoline, it's likely +- an import library so we're discarding it earlier. */ +- if (!oc->info) +- return false; +- +- const int mask = default_alignment - 1; +- size_t origin = oc->info->trampoline; +- oc->symbol_extras +- = (SymbolExtra*)((uintptr_t)(oc->info->image + origin + mask) & ~mask); +- oc->first_symbol_extra = 0; +- COFF_HEADER_INFO *info = oc->info->ch_info; +- oc->n_symbol_extras = info->numberOfSymbols; +- +- return true; +-} +- + static size_t +-makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index, size_t s, char* symbol ) ++makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index STG_UNUSED, size_t s, char* symbol STG_UNUSED, SymType type ) + { +- unsigned int curr_thunk; + SymbolExtra *extra; +- curr_thunk = oc->first_symbol_extra + index; +- if (index >= oc->n_symbol_extras) { +- IF_DEBUG(linker, debugBelch("makeSymbolExtra first:%d, num:%lu, member:%s, index:%llu\n", curr_thunk, oc->n_symbol_extras, oc->archiveMemberName, index)); +- barf("Can't allocate thunk for `%s' in `%" PATH_FMT "' with member `%s'", symbol, oc->fileName, oc->archiveMemberName); +- } +- +- extra = oc->symbol_extras + curr_thunk; +- +- if (!extra->addr) +- { +- // jmp *-14(%rip) +- static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; +- extra->addr = (uint64_t)s; +- memcpy(extra->jumpIsland, jmp, 6); ++ switch(type & ~(SYM_TYPE_DUP_DISCARD | SYM_TYPE_HIDDEN)) { ++ case SYM_TYPE_CODE: { ++ // jmp *-14(%rip) ++ extra = m32_alloc(oc->rx_m32, sizeof(SymbolExtra), 8); ++ CHECK(extra); ++ extra->addr = (uint64_t)s; ++ static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; ++ memcpy(extra->jumpIsland, jmp, 6); ++ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(code): %s -> %p\n", symbol, &extra->jumpIsland)); ++ return (size_t)&extra->jumpIsland; ++ } ++ case SYM_TYPE_INDIRECT_DATA: { ++ extra = m32_alloc(oc->rw_m32, sizeof(SymbolExtra), 8); ++ CHECK(extra); ++ void *v = *(void**) s; ++ extra->addr = (uint64_t)v; ++ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(data): %s -> %p\n", symbol, &extra->addr)); ++ return (size_t)&extra->addr; ++ } ++ default: { ++ extra = m32_alloc(oc->rw_m32, sizeof(SymbolExtra), 8); ++ CHECK(extra); ++ extra->addr = (uint64_t)s; ++ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(indirect-data): %s -> %p\n", symbol, &extra->addr)); ++ return (size_t)&extra->addr; ++ } + } +- +- return (size_t)extra->jumpIsland; + } + + void ocProtectExtras(ObjectCode* oc STG_UNUSED) { } +@@ -1860,7 +1993,7 @@ ocResolve_PEi386 ( ObjectCode* oc ) + /* ToDo: should be variable-sized? But is at least safe in the + sense of buffer-overrun-proof. */ + uint8_t symbol[1000]; +- /* debugBelch("resolving for %s\n", oc->fileName); */ ++ /* debugBelch("resolving for %"PATH_FMT "\n", oc->fileName); */ + + /* Such libraries have been partially freed and can't be resolved. */ + if (oc->status == OBJECT_DONT_RESOLVE) +@@ -1874,7 +2007,7 @@ ocResolve_PEi386 ( ObjectCode* oc ) + + /* Ignore sections called which contain stabs debugging information. */ + if (section.kind == SECTIONKIND_DEBUG) +- continue; ++ continue; + + noRelocs = section.info->noRelocs; + for (j = 0; j < noRelocs; j++) { +@@ -1893,30 +2026,46 @@ ocResolve_PEi386 ( ObjectCode* oc ) + uint64_t symIndex = reloc->SymbolTableIndex; + sym = &oc->info->symbols[symIndex]; + +- IF_DEBUG(linker, ++ SymType sym_type; ++ ++ IF_DEBUG(linker_verbose, + debugBelch( +- "reloc sec %2d num %3d: type 0x%-4x " ++ "reloc sec %2d num %3d: P=%p, type 0x%-4x " + "vaddr 0x%-8lx name `", +- i, j, ++ i, j, pP, + reloc->Type, + reloc->VirtualAddress ); + printName (getSymShortName (info, sym), oc); +- debugBelch("'\n" )); ++ debugBelch("'\n" )); + + if (getSymStorageClass (info, sym) == IMAGE_SYM_CLASS_STATIC) { +- Section section = oc->sections[getSymSectionNumber (info, sym)-1]; ++ uint32_t sect_n = getSymSectionNumber (info, sym); ++ switch (sect_n) { ++ case PE_SECTION_UNDEFINED: ++ case PE_SECTION_ABSOLUTE: ++ case PE_SECTION_DEBUG: ++ errorBelch(" | %" PATH_FMT ": symbol `%s' has invalid section number %02x", ++ oc->fileName, symbol, sect_n); ++ return false; ++ default: ++ break; ++ } ++ CHECK(sect_n < (uint32_t) oc->n_sections); ++ Section section = oc->sections[sect_n - 1]; + S = ((size_t)(section.start)) + + ((size_t)(getSymValue (info, sym))); + } else { + copyName ( getSymShortName (info, sym), oc, symbol, + sizeof(symbol)-1 ); +- S = (size_t) lookupDependentSymbol( (char*)symbol, oc ); ++ S = (size_t) lookupDependentSymbol( (char*)symbol, oc, &sym_type ); + if ((void*)S == NULL) { + errorBelch(" | %" PATH_FMT ": unknown symbol `%s'", oc->fileName, symbol); + releaseOcInfo (oc); + return false; + } + } ++ IF_DEBUG(linker_verbose, debugBelch("S=%zx\n", S)); ++ + /* All supported relocations write at least 4 bytes */ + checkProddableBlock(oc, pP, 4); + switch (reloc->Type) { +@@ -1963,27 +2112,46 @@ ocResolve_PEi386 ( ObjectCode* oc ) + break; + } + case 2: /* R_X86_64_32 (ELF constant 10) - IMAGE_REL_AMD64_ADDR32 (PE constant 2) */ +- case 3: /* R_X86_64_32S (ELF constant 11) - IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */ ++ case 3: /* IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */ + case 17: /* R_X86_64_32S ELF constant, no PE mapping. See note [ELF constant in PE file] */ + { + uint64_t v; + v = S + A; ++ ++ /* If IMAGE_REL_AMD64_ADDR32NB then subtract the image base. */ ++ if (reloc->Type == 3) ++ v -= (uint64_t) GetModuleHandleW(NULL); ++ + // N.B. in the case of the sign-extended relocations we must ensure that v + // fits in a signed 32-bit value. See #15808. + if (((int64_t) v > (int64_t) INT32_MAX) || ((int64_t) v < (int64_t) INT32_MIN)) { + copyName (getSymShortName (info, sym), oc, + symbol, sizeof(symbol)-1); +- S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); ++ S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol, sym_type); + /* And retry */ + v = S + A; ++ ++ /* If IMAGE_REL_AMD64_ADDR32NB then subtract the image base. */ ++ if (reloc->Type == 3) ++ v -= (uint64_t) GetModuleHandleW(NULL); ++ + if (((int64_t) v > (int64_t) INT32_MAX) || ((int64_t) v < (int64_t) INT32_MIN)) { +- barf("IMAGE_REL_AMD64_ADDR32[NB]: High bits are set in %zx for %s", ++ barf("IMAGE_REL_AMD64_ADDR32[NB]: High bits are set in 0x%zx for %s", + v, (char *)symbol); + } + } + *(uint32_t *)pP = (uint32_t)v; + break; + } ++ case 14: /* R_X86_64_PC64 (ELF constant 24) - IMAGE_REL_AMD64_SREL32 (PE constant 14) */ ++ { ++ /* mingw will emit this for a pc-rel 64 relocation */ ++ uint64_t A; ++ checkProddableBlock(oc, pP, 8); ++ A = *(uint64_t*)pP; ++ *(uint64_t *)pP = S + A - (intptr_t)pP; ++ break; ++ } + case 4: /* R_X86_64_PC32 (ELF constant 2) - IMAGE_REL_AMD64_REL32 (PE constant 4) */ + { + intptr_t v; +@@ -1992,11 +2160,11 @@ ocResolve_PEi386 ( ObjectCode* oc ) + /* Make the trampoline then */ + copyName (getSymShortName (info, sym), + oc, symbol, sizeof(symbol)-1); +- S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); ++ S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol, sym_type); + /* And retry */ + v = S + (int32_t)A - ((intptr_t)pP) - 4; + if ((v > (int64_t) INT32_MAX) || (v < (int64_t) INT32_MIN)) { +- barf("IMAGE_REL_AMD64_REL32: High bits are set in %zx for %s", ++ barf("IMAGE_REL_AMD64_REL32: High bits are set in 0x%zx for %s", + v, (char *)symbol); + } + } +@@ -2012,15 +2180,45 @@ ocResolve_PEi386 ( ObjectCode* oc ) + } + + } ++ ++ /* Register the exceptions inside this OC. ++ See Note [Exception Unwinding]. */ ++ if (section.kind == SECTIONKIND_EXCEPTION_TABLE) { ++ oc->info->pdata = &oc->sections[i]; ++#if defined(x86_64_HOST_ARCH) ++ unsigned numEntries = section.size / sizeof(RUNTIME_FUNCTION); ++ if (numEntries == 0) ++ continue; ++ ++ /* Now register the exception handler for the range and point it ++ to the unwind data. */ ++ if (!RtlAddFunctionTable (section.start, numEntries, (uintptr_t) GetModuleHandleW(NULL))) { ++ sysErrorBelch("Unable to register Exception handler for %p for " ++ "section %s in %" PATH_FMT " (Win32 error %lu)", ++ section.start, section.info->name, oc->fileName, ++ GetLastError()); ++ releaseOcInfo (oc); ++ return false; ++ } ++#endif /* x86_64_HOST_ARCH. */ ++ } else if (section.kind == SECTIONKIND_EXCEPTION_UNWIND) { ++ oc->info->xdata = &oc->sections[i]; ++ } + } + ++ // We now have no more need of info->ch_info and info->symbols. ++ stgFree(oc->info->ch_info); ++ oc->info->ch_info = NULL; ++ stgFree(oc->info->symbols); ++ oc->info->symbols = NULL; ++ + IF_DEBUG(linker, debugBelch("completed %" PATH_FMT "\n", oc->fileName)); + return true; + } + + /* + Note [ELF constant in PE file] +- ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + For some reason, the PE files produced by GHC contain a linux + relocation constant 17 (0x11) in the object files. As far as I (Phyx-) can tell + this constant doesn't seem like it's coming from GHC, or at least I could not find +@@ -2033,36 +2231,95 @@ ocResolve_PEi386 ( ObjectCode* oc ) + See #9907 + */ + ++/* ++ Note [Exception Unwinding] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++ Exception Unwinding on Windows is handled using two named sections. ++ ++ .pdata: Exception registration tables. ++ ++ The .pdata section contains an array of function table entries (of type ++ RUNTIME_FUNCTION) that are used for exception handling. The entries must be ++ sorted according to the function addresses (the first field in each ++ structure) before being emitted into the final image. It is pointed to by ++ the exception table entry in the image data directory. For x64 each entry ++ contains: ++ ++ Offset Size Field Description ++ 0 4 Begin Address The RVA of the corresponding function. ++ 4 4 End Address The RVA of the end of the function. ++ 8 4 Unwind Information The RVA of the unwind information. ++ ++ Note that these are RVAs even after being resolved by the linker, they are ++ however ImageBase relative rather than PC relative. These are typically ++ filled in by an ADDR32NB relocation. On disk the section looks like: ++ ++ Function Table #6 (4) ++ ++ Begin End Info ++ ++ 00000000 00000000 000001A1 00000000 ++ 0000000C 000001A1 000001BF 00000034 ++ 00000018 000001BF 00000201 00000040 ++ 00000024 00000201 0000021F 0000004C ++ ++ RELOCATIONS #6 ++ Symbol Symbol ++ Offset Type Applied To Index Name ++ -------- ---------------- ----------------- -------- ------ ++ 00000000 ADDR32NB 00000000 E .text ++ 00000004 ADDR32NB 000001A1 E .text ++ 00000008 ADDR32NB 00000000 16 .xdata ++ 0000000C ADDR32NB 000001A1 E .text ++ 00000010 ADDR32NB 000001BF E .text ++ 00000014 ADDR32NB 00000034 16 .xdata ++ 00000018 ADDR32NB 000001BF E .text ++ 0000001C ADDR32NB 00000201 E .text ++ 00000020 ADDR32NB 00000040 16 .xdata ++ 00000024 ADDR32NB 00000201 E .text ++ 00000028 ADDR32NB 0000021F E .text ++ 0000002C ADDR32NB 0000004C 16 .xdata ++ ++ This means that if we leave it up to the relocation processing to ++ do the work we don't need to do anything special here. Note that ++ every single function will have an entry in this table regardless ++ whether they have an unwind code or not. The reason for this is ++ that unwind handlers can be chained, and such another function ++ may have registered an overlapping region. ++ ++ .xdata: Exception unwind codes. ++ ++ This section contains an array of entries telling the unwinder how ++ to do unwinding. They are pointed to by the .pdata table enteries ++ from the Info field. Each entry is very complicated but for now ++ what is important is that the addresses are resolved by the relocs ++ for us. ++ ++ Once we have resolved .pdata and .xdata we can simply pass the ++ content of .pdata on to RtlAddFunctionTable and the OS will do ++ the rest. When we're unloading the object we have to unregister ++ them using RtlDeleteFunctionTable. ++*/ ++ + bool + ocRunInit_PEi386 ( ObjectCode *oc ) + { +- if (!oc || !oc->info || !oc->info->init) { ++ if (oc && oc->info && oc->info->init) { ++ return runInit(&oc->info->init); ++ } + return true; +- } +- +- int argc, envc; +- char **argv, **envv; +- +- getProgArgv(&argc, &argv); +- getProgEnvv(&envc, &envv); +- +- Section section = *oc->info->init; +- ASSERT(SECTIONKIND_INIT_ARRAY == section.kind); +- +- uint8_t *init_startC = section.start; +- init_t *init_start = (init_t*)init_startC; +- init_t *init_end = (init_t*)(init_startC + section.size); +- +- // ctors are run *backwards*! +- for (init_t *init = init_end - 1; init >= init_start; init--) +- (*init)(argc, argv, envv); ++} + +- freeProgEnvv(envc, envv); +- releaseOcInfo (oc); +- return true; ++bool ocRunFini_PEi386( ObjectCode *oc ) ++{ ++ if (oc && oc->info && oc->info->fini) { ++ return runFini(&oc->info->fini); ++ } ++ return true; + } + +-SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) ++SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl, ObjectCode *dependent, SymType *type) + { + RtsSymbolInfo *pinfo; + +@@ -2075,26 +2332,21 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) + #if !defined(x86_64_HOST_ARCH) + zapTrailingAtSign ( lbl ); + #endif +- sym = lookupSymbolInDLLs(lbl); ++ if (type) { ++ // Unfortunately we can only assume that this is the case. Ideally ++ // the user would have given us an import library, which would allow ++ // us to determine the symbol type precisely. ++ *type = SYM_TYPE_CODE; ++ } ++ sym = lookupSymbolInDLLs(lbl, dependent); + return sym; // might be NULL if not found + } else { +-#if defined(mingw32_HOST_OS) +- // If Windows, perform initialization of uninitialized +- // Symbols from the C runtime which was loaded above. +- // We do this on lookup to prevent the hit when +- // The symbol isn't being used. +- if (pinfo->value == (void*)0xBAADF00D) +- { +- char symBuffer[50]; +- sprintf(symBuffer, "_%s", lbl); +- static HMODULE msvcrt = NULL; +- if (!msvcrt) msvcrt = GetModuleHandle("msvcrt"); +- pinfo->value = GetProcAddress(msvcrt, symBuffer); +- } +- else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) ++ if (type) *type = pinfo->type; ++ ++ if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) + { + /* See Note [BFD import library]. */ +- HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, NULL); ++ HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, type); + if (!dllInstance && pinfo->value) + return pinfo->value; + +@@ -2110,42 +2362,34 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) + pinfo->value = GetProcAddress((HMODULE)dllInstance, lbl); + clearImportSymbol (pinfo->owner, lbl); + return pinfo->value; ++ } else { ++ if (dependent) { ++ // Add dependent as symbol's owner's dependency ++ ObjectCode *owner = pinfo->owner; ++ if (owner) { ++ // TODO: what does it mean for a symbol to not have an owner? ++ insertHashSet(dependent->dependencies, (W_)owner); ++ } ++ } ++ return loadSymbol(lbl, pinfo); + } +-#endif +- return loadSymbol(lbl, pinfo); + } + } + + /* ----------------------------------------------------------------------------- +- * Section management. ++ * Debugging operations. + */ + +- /* See Note [Section alignment]. */ +-static void +-addCopySection (ObjectCode *oc, Section *s, SectionKind kind, +- SectionAlloc alloc, void* start, StgWord size) { +- char* pos = oc->info->image + oc->info->secBytesUsed; +- char* newStart = (char*)getAlignedMemory ((uint8_t*)pos, *s); +- memcpy (newStart, start, size); +- uintptr_t offset = (uintptr_t)newStart - (uintptr_t)oc->info->image; +- oc->info->secBytesUsed = (size_t)offset + size; +- start = newStart; +- +- /* Initially I wanted to apply the right memory protection to the region and +- which would leaved the gaps in between the regions as inaccessible memory +- to prevent exploits. +- The problem is protection is always on page granularity, so we can use +- less memory and be insecure or use more memory and be secure. +- For now, I've chosen lower memory over secure as the first pass, this +- doesn't regress security over the current implementation. After this +- patch I will change to different implementation that will fix the mem +- protection and keep the memory size small. */ +- addSection (s, kind, alloc, start, size, 0, 0, 0); +-} ++typedef struct _SymX { SymbolName* name; uintptr_t loc; } SymX; + +-/* ----------------------------------------------------------------------------- +- * Debugging operations. +- */ ++static int comp (const void * elem1, const void * elem2) ++{ ++ SymX f = *((SymX*)elem1); ++ SymX s = *((SymX*)elem2); ++ if (f.loc > s.loc) return 1; ++ if (f.loc < s.loc) return -1; ++ return 0; ++} + + pathchar* + resolveSymbolAddr_PEi386 (pathchar* buffer, int size, +@@ -2195,9 +2439,7 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, + wcscat (buffer, WSTR(" ")); + if (oc->archiveMemberName) + { +- pathchar* name = mkPath (oc->archiveMemberName); +- wcscat (buffer, name); +- stgFree (name); ++ wcscat (buffer, oc->archiveMemberName); + } + else + { +@@ -2274,7 +2516,6 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, + else if (obj) + { + /* Try to calculate from information inside the rts. */ +- typedef struct _SymX { SymbolName* name; uintptr_t loc; } SymX; + SymX* locs = stgCallocBytes (sizeof(SymX), obj->n_symbols, + "resolveSymbolAddr"); + int blanks = 0; +@@ -2294,14 +2535,6 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, + locs[i] = sx; + } + } +- int comp (const void * elem1, const void * elem2) +- { +- SymX f = *((SymX*)elem1); +- SymX s = *((SymX*)elem2); +- if (f.loc > s.loc) return 1; +- if (f.loc < s.loc) return -1; +- return 0; +- } + qsort (locs, obj->n_symbols, sizeof (SymX), comp); + uintptr_t key = (uintptr_t)symbol; + SymX* res = NULL; +diff --git a/rts/linker/PEi386.h b/rts/linker/PEi386.h +index 4c33dfd..a3b05e3 100644 +--- a/rts/linker/PEi386.h ++++ b/rts/linker/PEi386.h +@@ -4,7 +4,9 @@ + #include "LinkerInternals.h" + #include "PathUtils.h" + #include ++#include + #include ++#include + + #include "BeginPrivate.h" + +@@ -54,11 +56,11 @@ bool removeLibrarySearchPath_PEi386( HsPtr dll_path_index ); + + bool ocResolve_PEi386 ( ObjectCode* oc ); + bool ocRunInit_PEi386 ( ObjectCode *oc ); ++bool ocRunFini_PEi386 ( ObjectCode *oc ); + bool ocGetNames_PEi386 ( ObjectCode* oc ); + bool ocVerifyImage_PEi386 ( ObjectCode* oc ); +-SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl); +-bool ocAllocateExtras_PEi386 ( ObjectCode* oc ); +-SymbolAddr *lookupSymbolInDLLs ( const SymbolName* lbl ); ++SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl, ObjectCode *dependent, SymType *type); ++ + /* See Note [mingw-w64 name decoration scheme] */ + /* We use myindex to calculate array addresses, rather than + simply doing the normal subscript thing. That's because +@@ -116,6 +118,12 @@ union _COFF_symbol { + COFF_symbol_ex ex; + } COFF_symbol; + ++typedef ++struct { ++ uint32_t TagIndex; ++ uint32_t Characteristics; ++} COFF_symbol_aux_weak_external; ++ + /* A record for storing handles into DLLs. */ + typedef + struct _OpenedDLL { +@@ -124,13 +132,6 @@ struct _OpenedDLL { + HINSTANCE instance; + } OpenedDLL; + +-/* A record for storing indirectly linked functions from DLLs. */ +-typedef +-struct _IndirectAddr { +- SymbolAddr* addr; +- struct _IndirectAddr* next; +-} IndirectAddr; +- + /* Some alignment information. */ + typedef + struct _Alignments { +@@ -142,7 +143,7 @@ struct _Alignments { + COFF_OBJ_TYPE getObjectType ( char* image, pathchar* fileName ); + COFF_HEADER_INFO* getHeaderInfo ( ObjectCode* oc ); + size_t getSymbolSize ( COFF_HEADER_INFO *info ); +-int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ); ++uint32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ); + uint32_t getSymValue ( COFF_HEADER_INFO *info, COFF_symbol* sym ); + uint8_t getSymStorageClass ( COFF_HEADER_INFO *info, COFF_symbol* sym ); + uint8_t getSymNumberOfAuxSymbols ( COFF_HEADER_INFO *info, COFF_symbol* sym ); +@@ -158,7 +159,7 @@ uint8_t* getSymShortName ( COFF_HEADER_INFO *info, COFF_symbol* sym ); + + /* + Note [mingw-w64 name decoration scheme] +- ++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + What's going on with name decoration? Well, original code + have some crufty and ad-hocish paths related mostly to very old + mingw gcc/binutils/runtime combinations. Now mingw-w64 offers pretty +diff --git a/rts/linker/PEi386Types.h b/rts/linker/PEi386Types.h +index 67ea343..573467b 100644 +--- a/rts/linker/PEi386Types.h ++++ b/rts/linker/PEi386Types.h +@@ -4,13 +4,10 @@ + + #include "ghcplatform.h" + #include "PEi386.h" ++#include "linker/InitFini.h" + #include + #include + +-/* Some forward declares. */ +-struct Section; +- +- + struct SectionFormatInfo { + char* name; + size_t alignment; +@@ -20,16 +17,15 @@ struct SectionFormatInfo { + uint64_t virtualSize; + uint64_t virtualAddr; + }; ++ + struct ObjectCodeFormatInfo { +- size_t secBytesTotal; +- size_t secBytesUsed; +- char* image; +- size_t trampoline; +- Section* init; +- Section* finit; +- COFF_HEADER_INFO* ch_info; ++ struct InitFiniList* init; // Freed by ocRunInit_PEi386 ++ struct InitFiniList* fini; // Freed by ocRunFini_PEi386 ++ Section* pdata; ++ Section* xdata; ++ COFF_HEADER_INFO* ch_info; // Freed by ocResolve_PEi386 ++ COFF_symbol* symbols; // Freed by ocResolve_PEi386 + char* str_tab; +- COFF_symbol* symbols; + }; + + #endif /* OBJFORMAT_PEi386. */ +diff --git a/rts/linker/SymbolExtras.c b/rts/linker/SymbolExtras.c +index 9d4eb89..88192d4 100644 +--- a/rts/linker/SymbolExtras.c ++++ b/rts/linker/SymbolExtras.c +@@ -10,6 +10,7 @@ + */ + + #include "LinkerInternals.h" ++#include "linker/MMap.h" + + #if defined(NEED_SYMBOL_EXTRAS) + #if !defined(x86_64_HOST_ARCH) || !defined(mingw32_HOST_OS) +@@ -85,7 +86,7 @@ int ocAllocateExtras(ObjectCode* oc, int count, int first, int bssSize) + if (new) { + memcpy(new, oc->image, oc->fileSize); + if (oc->imageMapped) { +- munmap(oc->image, n); ++ munmapForLinker(oc->image, n, "ocAllocateExtras"); + } + oc->image = new; + oc->imageMapped = true; +@@ -142,7 +143,7 @@ void ocProtectExtras(ObjectCode* oc) + * non-executable. + */ + } else if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { +- mmapForLinkerMarkExecutable(oc->symbol_extras, sizeof(SymbolExtra) * oc->n_symbol_extras); ++ mprotectForLinker(oc->symbol_extras, sizeof(SymbolExtra) * oc->n_symbol_extras, MEM_READ_EXECUTE); + } else { + /* + * The symbol extras were allocated via m32. They will be protected when +@@ -152,7 +153,7 @@ void ocProtectExtras(ObjectCode* oc) + } + + +-#if !defined(arm_HOST_ARCH) ++#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) + SymbolExtra* makeSymbolExtra( ObjectCode const* oc, + unsigned long symbolNumber, + unsigned long target ) +@@ -182,13 +183,15 @@ SymbolExtra* makeSymbolExtra( ObjectCode const* oc, + #if defined(x86_64_HOST_ARCH) + // jmp *-14(%rip) + // 0xFF 25 is opcode + ModRM of near absolute indirect jump +- static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; ++ // Two bytes trailing padding, needed for TLSGD GOT entries ++ // See Note [TLSGD relocation] in elf_tlsgd.c ++ static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF, 0x00, 0x00 }; + extra->addr = target; +- memcpy(extra->jumpIsland, jmp, 6); ++ memcpy(extra->jumpIsland, jmp, 8); + #endif /* x86_64_HOST_ARCH */ + + return extra; + } +-#endif /* !arm_HOST_ARCH */ ++#endif /* powerpc_HOST_ARCH || x86_64_HOST_ARCH */ + #endif /* !x86_64_HOST_ARCH) || !mingw32_HOST_OS */ + #endif // NEED_SYMBOL_EXTRAS +diff --git a/rts/linker/SymbolExtras.h b/rts/linker/SymbolExtras.h +index 6c05020..9573856 100644 +--- a/rts/linker/SymbolExtras.h ++++ b/rts/linker/SymbolExtras.h +@@ -16,13 +16,12 @@ SymbolExtra* makeArmSymbolExtra( ObjectCode const* oc, + unsigned long target, + bool fromThumb, + bool toThumb ); +-#else ++#elif defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) + SymbolExtra* makeSymbolExtra( ObjectCode const* oc, + unsigned long symbolNumber, + unsigned long target ); + +-#endif /* arm_HOST_ARCH */ +- ++#endif /* powerpc_HOST_ARCH || x86_64_HOST_ARCH */ + #endif /* NEED_SYMBOL_EXTRAS */ + + #include "EndPrivate.h" +diff --git a/rts/linker/Wasm32Types.h b/rts/linker/Wasm32Types.h +new file mode 100644 +index 0000000..991cda3 +--- /dev/null ++++ b/rts/linker/Wasm32Types.h +@@ -0,0 +1,9 @@ ++#pragma once ++ ++#if defined(OBJFORMAT_WASM32) ++ ++struct SectionFormatInfo { }; ++ ++struct ObjectCodeFormatInfo { }; ++ ++#endif +diff --git a/rts/linker/elf_compat.h b/rts/linker/elf_compat.h +index 424d1d2..9f27802 100644 +--- a/rts/linker/elf_compat.h ++++ b/rts/linker/elf_compat.h +@@ -6,7 +6,7 @@ + // The files in ELFRelocs/ have been taken from + // the LLVM project. See ELFRelocs/LICENSE-LLVM.TXT + // for the University of Illinois Open Source License +-// under which it is distrubuted. ++// under which it is distributed. + // + + #pragma once +diff --git a/rts/linker/elf_got.c b/rts/linker/elf_got.c +index 25f5a91..4d0c978 100644 +--- a/rts/linker/elf_got.c ++++ b/rts/linker/elf_got.c +@@ -1,5 +1,6 @@ + #include "Rts.h" + #include "elf_got.h" ++#include "linker/MMap.h" + + #include + +@@ -16,7 +17,7 @@ needGotSlot(Elf_Sym * symbol) { + * STB_WEAK. + * + * Any more restrictive filter here would result +- * in a smaller GOT, which is preferrable. ++ * in a smaller GOT, which is preferable. + */ + return ELF_ST_BIND(symbol->st_info) == STB_GLOBAL + || ELF_ST_BIND(symbol->st_info) == STB_WEAK +@@ -86,12 +87,12 @@ fillGot(ObjectCode * oc) { + if(needGotSlot(symbol->elf_sym)) { + + /* no type are undefined symbols */ +- // Note STT_SECTION symbols should have their addres ++ // Note STT_SECTION symbols should have their address + // set prior to the fillGot call in ocResolve_ELF. + if( STT_NOTYPE == ELF_ST_TYPE(symbol->elf_sym->st_info) + || STB_WEAK == ELF_ST_BIND(symbol->elf_sym->st_info)) { + if(0x0 == symbol->addr) { +- symbol->addr = lookupDependentSymbol(symbol->name, oc); ++ symbol->addr = lookupDependentSymbol(symbol->name, oc, NULL); + if(0x0 == symbol->addr) { + if(0 == strncmp(symbol->name,"_GLOBAL_OFFSET_TABLE_",21)) { + symbol->addr = oc->info->got_start; +@@ -139,10 +140,10 @@ verifyGot(ObjectCode * oc) { + for(size_t i=0; i < symTab->n_symbols; i++) { + ElfSymbol * symbol = &symTab->symbols[i]; + if(symbol->got_addr) { +- ASSERT((void*)(*(void**)symbol->got_addr) +- == (void*)symbol->addr); ++ CHECK((void*)(*(void**)symbol->got_addr) ++ == (void*)symbol->addr); + } +- ASSERT(0 == ((uintptr_t)symbol->addr & 0xffff000000000000)); ++ CHECK(0 == ((uintptr_t)symbol->addr & 0xffff000000000000)); + } + } + return EXIT_SUCCESS; +@@ -150,7 +151,7 @@ verifyGot(ObjectCode * oc) { + + void + freeGot(ObjectCode * oc) { +-// munmap(oc->info->got_start, oc->info->got_size); ++// munmapForLinker(oc->info->got_start, oc->info->got_size, "freeGot); + oc->info->got_start = 0x0; + oc->info->got_size = 0; + } +diff --git a/rts/linker/elf_plt_arm.c b/rts/linker/elf_plt_arm.c +index bd21243..5b67bf8 100644 +--- a/rts/linker/elf_plt_arm.c ++++ b/rts/linker/elf_plt_arm.c +@@ -58,7 +58,6 @@ bool makeStubArmThm(Stub * s); + /* + Note [The ARM/Thumb Story] + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +- + Support for the ARM architecture is complicated by the fact that ARM has not + one but several instruction encodings. The two relevant ones here are the + original ARM encoding and Thumb, a more dense variant of ARM supporting only +diff --git a/rts/linker/elf_reloc_aarch64.c b/rts/linker/elf_reloc_aarch64.c +index 0e11585..4743e81 100644 +--- a/rts/linker/elf_reloc_aarch64.c ++++ b/rts/linker/elf_reloc_aarch64.c +@@ -6,7 +6,6 @@ + #include "elf_plt.h" + + #include +-#include + + + #if defined(aarch64_HOST_ARCH) +@@ -23,7 +22,7 @@ bool isAdrp(addr_t p); + bool isLoadStore(addr_t p); + bool isAddSub(addr_t p); + bool isVectorOp(addr_t p); +-int64_t decodeAddendAarch64(Section * section, Elf_Rel * rel) GNU_ATTRIBUTE(__noreturn__); ++int64_t decodeAddendAarch64(Section * section, Elf_Rel * rel) STG_NORETURN; + bool encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend); + + bool isBranch(addr_t p) { +@@ -52,8 +51,8 @@ bool isVectorOp(addr_t p) { + typedef uint32_t inst_t; + + int64_t +-decodeAddendAarch64(Section * section __attribute__((unused)), +- Elf_Rel * rel __attribute__((unused))) ++decodeAddendAarch64(Section * section STG_UNUSED, ++ Elf_Rel * rel STG_UNUSED) + { + abort(/* we don't support Rel locations yet. */); + } +@@ -71,15 +70,17 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { + *(uint64_t*)P = (uint64_t)addend; + break; + case COMPAT_R_AARCH64_ABS32: +- assert(isInt64(32, addend)); ++ CHECK(isInt64(32, addend)); ++ FALLTHROUGH; + case COMPAT_R_AARCH64_PREL32: +- assert(isInt64(32, addend)); ++ CHECK(isInt64(32, addend)); + *(uint32_t*)P = (uint32_t)addend; + break; + case COMPAT_R_AARCH64_ABS16: +- assert(isInt64(16, addend)); ++ CHECK(isInt64(16, addend)); ++ FALLTHROUGH; + case COMPAT_R_AARCH64_PREL16: +- assert(isInt64(16, addend)); ++ CHECK(isInt64(16, addend)); + *(uint16_t*)P = (uint16_t)addend; + break; + /* static aarch64 relocations */ +@@ -95,8 +96,8 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { + // imm64 = SignExtend(hi:lo:0x000,64) + // Range is 21 bits + the 12 page relative bits + // known to be 0. -2^32 <= X < 2^32 +- assert(isInt64(21+12, addend)); +- assert((addend & 0xfff) == 0); /* page relative */ ++ CHECK(isInt64(21+12, addend)); ++ CHECK((addend & 0xfff) == 0); /* page relative */ + + *(inst_t *)P = (*(inst_t *)P & 0x9f00001f) + | (inst_t) (((uint64_t) addend << 17) & 0x60000000) +@@ -106,7 +107,7 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { + /* - control flow relocations */ + case COMPAT_R_AARCH64_JUMP26: /* relocate b ... */ + case COMPAT_R_AARCH64_CALL26: { /* relocate bl ... */ +- assert(isInt64(26+2, addend)); /* X in range */ ++ CHECK(isInt64(26+2, addend)); /* X in range */ + *(inst_t *)P = (*(inst_t *)P & 0xfc000000) /* keep upper 6 (32-6) + * bits */ + | ((uint32_t)(addend >> 2) & 0x03ffffff); +@@ -114,8 +115,8 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { + } + case COMPAT_R_AARCH64_ADR_GOT_PAGE: { + /* range is -2^32 <= X < 2^32 */ +- assert(isInt64(21+12, addend)); /* X in range */ +- assert((addend & 0xfff) == 0); /* page relative */ ++ CHECK(isInt64(21+12, addend)); /* X in range */ ++ CHECK((addend & 0xfff) == 0); /* page relative */ + + *(inst_t *)P = (*(inst_t *)P & 0x9f00001f) + | (inst_t)(((uint64_t)addend << 17) & 0x60000000) // lo +@@ -149,10 +150,10 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { + FALLTHROUGH; + case COMPAT_R_AARCH64_LD64_GOT_LO12_NC: { + if(exp_shift == -1) { +- assert( (addend & 7) == 0 ); ++ CHECK( (addend & 7) == 0 ); + exp_shift = 3; + } +- assert((addend & 0xfff) == addend); ++ CHECK((addend & 0xfff) == addend); + int shift = 0; + if(isLoadStore(P)) { + /* bits 31, 30 encode the size. */ +@@ -161,7 +162,7 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { + shift = 4; + } + } +- assert(addend == 0 || exp_shift == shift); ++ CHECK(addend == 0 || exp_shift == shift); + *(inst_t *)P = (*(inst_t *)P & 0xffc003ff) + | ((inst_t)(addend >> shift << 10) & 0x003ffc00); + break; +@@ -182,18 +183,18 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { + * @return The new computed addend. + */ + static int64_t +-computeAddend(ObjectCode * oc, Section * section, Elf_Rel * rel, ++computeAddend(Section * section, Elf_Rel * rel, + ElfSymbol * symbol, int64_t addend) { + + /* Position where something is relocated */ + addr_t P = (addr_t)((uint8_t*)section->start + rel->r_offset); + +- assert(0x0 != P); +- assert((uint64_t)section->start <= P); +- assert(P <= (uint64_t)section->start + section->size); ++ CHECK(0x0 != P); ++ CHECK((uint64_t)section->start <= P); ++ CHECK(P <= (uint64_t)section->start + section->size); + /* Address of the symbol */ + addr_t S = (addr_t) symbol->addr; +- assert(0x0 != S); ++ CHECK(0x0 != S); + /* GOT slot for the symbol */ + addr_t GOT_S = (addr_t) symbol->got_addr; + +@@ -228,6 +229,7 @@ computeAddend(ObjectCode * oc, Section * section, Elf_Rel * rel, + /* note: we are encoding bits [27:2] */ + if(!isInt64(26+2, V)) { + // Note [PC bias aarch64] ++ // ~~~~~~~~~~~~~~~~~~~~~~ + // There is no PC bias to accommodate in the + // relocation of a place containing an instruction + // that formulates a PC-relative address. The program +@@ -243,16 +245,16 @@ computeAddend(ObjectCode * oc, Section * section, Elf_Rel * rel, + } + } + +- assert(0 == (0xffff000000000000 & S)); ++ CHECK(0 == (0xffff000000000000 & S)); + V = S + A - P; +- assert(isInt64(26+2, V)); /* X in range */ ++ CHECK(isInt64(26+2, V)); /* X in range */ + } + return V; + } +- case COMPAT_R_AARCH64_LDST128_ABS_LO12_NC: assert(0 == ((S+A) & 0x0f)); +- case COMPAT_R_AARCH64_LDST64_ABS_LO12_NC: assert(0 == ((S+A) & 0x07)); +- case COMPAT_R_AARCH64_LDST32_ABS_LO12_NC: assert(0 == ((S+A) & 0x03)); +- case COMPAT_R_AARCH64_LDST16_ABS_LO12_NC: assert(0 == ((S+A) & 0x01)); ++ case COMPAT_R_AARCH64_LDST128_ABS_LO12_NC: CHECK(0 == ((S+A) & 0x0f)); FALLTHROUGH; ++ case COMPAT_R_AARCH64_LDST64_ABS_LO12_NC: CHECK(0 == ((S+A) & 0x07)); FALLTHROUGH; ++ case COMPAT_R_AARCH64_LDST32_ABS_LO12_NC: CHECK(0 == ((S+A) & 0x03)); FALLTHROUGH; ++ case COMPAT_R_AARCH64_LDST16_ABS_LO12_NC: CHECK(0 == ((S+A) & 0x01)); FALLTHROUGH; + case COMPAT_R_AARCH64_LDST8_ABS_LO12_NC: + /* type: static, class: aarch64, op: S + A */ + return (S + A) & 0xfff; +@@ -266,18 +268,12 @@ computeAddend(ObjectCode * oc, Section * section, Elf_Rel * rel, + // TODO: fix this story proper, so that the transformation + // makes sense without resorting to: everyone else + // does it like this as well. +- if (0x0 == GOT_S) { +- barf("PAGE: No GOT address for %s in %s for section type: %d and size: %lu.\n", symbol->name, OC_INFORMATIVE_FILENAME(oc), section->kind, section->size); +- } +- assert(0x0 != GOT_S); ++ CHECK(0x0 != GOT_S); + return Page(GOT_S+A) - Page(P); + } + case COMPAT_R_AARCH64_LD64_GOT_LO12_NC: { + // G(GDAT(S+A)) +- if (0x0 == GOT_S) { +- barf("LO12_NC: No GOT address for %s in %s for section type: %d and size: %lu.\n", symbol->name, OC_INFORMATIVE_FILENAME(oc), section->kind, section->size); +- } +- assert(0x0 != GOT_S); ++ CHECK(0x0 != GOT_S); + return (GOT_S + A) & 0xfff; + } + default: +@@ -303,12 +299,12 @@ relocateObjectCodeAarch64(ObjectCode * oc) { + relTab->sectionHeader->sh_link, + ELF64_R_SYM((Elf64_Xword)rel->r_info)); + +- assert(0x0 != symbol); ++ CHECK(0x0 != symbol); + + /* decode implicit addend */ + int64_t addend = decodeAddendAarch64(targetSection, rel); + +- addend = computeAddend(oc, targetSection, rel, symbol, addend); ++ addend = computeAddend(targetSection, rel, symbol, addend); + encodeAddendAarch64(targetSection, rel, addend); + } + } +@@ -329,13 +325,13 @@ relocateObjectCodeAarch64(ObjectCode * oc) { + relaTab->sectionHeader->sh_link, + ELF64_R_SYM((Elf64_Xword)rel->r_info)); + +- assert(0x0 != symbol); +- assert(0x0 != symbol->addr); ++ CHECK(0x0 != symbol); ++ CHECK(0x0 != symbol->addr); + + /* take explicit addend */ + int64_t addend = rel->r_addend; + +- addend = computeAddend(oc, targetSection, (Elf_Rel*)rel, ++ addend = computeAddend(targetSection, (Elf_Rel*)rel, + symbol, addend); + encodeAddendAarch64(targetSection, (Elf_Rel*)rel, addend); + } +diff --git a/rts/linker/elf_tlsgd.c b/rts/linker/elf_tlsgd.c +new file mode 100644 +index 0000000..767d9e7 +--- /dev/null ++++ b/rts/linker/elf_tlsgd.c +@@ -0,0 +1,249 @@ ++#include "Rts.h" ++ ++#if defined(x86_64_HOST_ARCH) && defined(freebsd_HOST_OS) ++ ++/* ++ * Note [TLSGD relocation] ++ * ~~~~~~~~~~~~~~~~~~~~~~~ ++ * Quick background: FreeBSD's is poisoned with static inline code ++ * that gets compiled into every program that uses functions like isdigit(3). ++ * When compiled "-c -fpic" for inclusion in position-independent ".a" files ++ * that are used in GHCi and HLS to load dependent packages at runtime, code ++ * that uses in some FFI ends up with previously unsupported ++ * thread-specific variable (TLSGD) relocations. This module narrowly addresses ++ * the issue for FreeBSD, where one often ends up using thread-local storage ++ * without meaning to. ++ * ++ * In the "General Dynamic" Thread-Local-Storage (TLSGD) model, relocations need ++ * an offset into a block of thread-local data associated with a particular ++ * module in which the given thread-local variable is defined. Such blocks are ++ * not used directly, since after all, the variables are thread-specific. ++ * Rather, each module's initialized thread locals and uninitialised (zeroed) ++ * thread-locals are used to initialise a corresponding block of data in each ++ * thread, possibly on first use by a thread of a variable from a given module. ++ * ++ * A thread that needs the address of a particular TLS variable needs to pass ++ * the module id and offset to __tls_get_addr() (provided by the ELF runtime ++ * linker ld.so, a.k.a. the RTLD, which also manages the loading and unloading ++ * of modules, and dynamic creation of the backing storage for each thread's ++ * dynamic thread-local-storage vector (dtv). ++ * ++ * The data to pass to __tls_get_addr() is found as two consecutive 64-bit ++ * values in the global offset table (GOT) of the object being relocated. ++ * (There are therefore many GOT tables, what's global is the addresses they ++ * point to, which are often outside the current object, not the tables ++ * themselves). ++ * ++ * The module id and offset are not known at compile time, and require ++ * relocation with assistance from the RTLD, because only the RTLD knows the ++ * logical module number for each loaded object (the main executable, and any ++ * shared libraries, such as libc). Fortunately, modern RTLDs provide an ++ * iterator for the currently loaded modules of a program, which exposes ++ * the associated module id and ELF section headers of each loaded object. ++ * (For static executables, this is instead handled by the C library). ++ * ++ * The iterator in question is dl_iterate_phdr(3). It repeatedly invokes ++ * the provided callback for each loaded module until the callback returns ++ * a non-zero value indicating that it has found what it was looking for ++ * and does not need to be called with any further modules. ++ * ++ * The "dlpi_info" structure provided to the callback contains the module ++ * id and a reference to the ELF program header list. In the program header ++ * list the "dynamic" section contains a number of subsections, which include ++ * the symbol table, the string table and either or both the sysv or GNU-style ++ * symbol hash table. ++ * ++ * The size of the symbol table is not directly available, so linear search ++ * through the symbol table is not only inefficient, but in fact not really ++ * possible, since we don't reliably know where the table ends. However, the ++ * hash tables (sysv and/or GNU) do have clear bounds, and substantially speed ++ * up symbol lookup, so we need to have code to use these tables. For now, ++ * only the sysv table is supported, but it should be easy to also support the ++ * GNU table (which could be the only present). On FreeBSD it is rumoured (or ++ * least anecdotally observed) that the tool chains ensure that the sysv table ++ * is always present. ++ * ++ * Thus armed with the symbol, string and hash table for a module, we can use ++ * our wanted symbol's hash to quickly find the relevant hash bucket, and from ++ * there traverse the list of symbols that share that hash, checking that ++ * whether the name is in fact an exact match. ++ * ++ * Note that the name we want may also appear as an undefined entry in the ++ * symbol tables of other modules that also reference it as an external symbol. ++ * Thus the module we're looking for is the one where the symbol's st_value is ++ * non-zero (indicating that it is actually defined in that module). ++ * ++ * Since we're looking for a TLS variable, we just in case also check the type ++ * and avoid erroneous bindings to some other sort of symbol. ++ * ++ * Once the right module is found, we need to push two values into a new slot ++ * in the GOT. This is done via the makeSymbolExtra() function of the GHC RTS. ++ * Our GOT entries must therefore be wide enough to hold two 64-bit values, but ++ * previously their X86_64 incarnation was only 14 bytes wide. It has now been ++ * expanded to 16 bytes, by adding two padding bytes to the jumpIsland slot ++ * that follows the `addr` field field of the original GOT entry. We store the ++ * module id in the `addr` field and the symbol's offset in the expanded ++ * jumpIsland field. The address `S` of the start of the new GOT entry is ++ * then adjusted to form the relative address `S + A - P` which is stored at the ++ * relocation address `P`. ++ * ++ * The magic additional offsets `0x8000` and `0x800` for MIPS, ... and RISC-V, ++ * were suggested by Fangrui Song (a.k.a. @MaskRay) in a comment on the ticket ++ * discussing the motivating FreeBSD issue: ++ * . ++ * His blog at ++ * may shed more light on these. ++ * ++ * Finally, the bad news. This code only works when the target TLS variable is ++ * defined by a preloaded shared object (.SO) that is known to the RTLD, has a ++ * module id, and TLS data and bss segments from which the RTLD initialises ++ * (perhaps lazily just-in-time) the per-thread TLS segments. It is not ++ * presently possible to support TLS variables from runtime loaded ".o" files, ++ * These are not loaded via the RTLD, and don't get a new module id, and ++ * __tls_get_addr() cannot return an appropriate thread-specific address for ++ * these. ++ * ++ * The best solution is probably to deprecate runtime loading of ".o" files, ++ * all runtime loaded objects should be shared objects, loaded via dlopen(), ++ * in which case the RTLD will take of all the TLS relocation details! ++ * Otherwise, packages with FFI code that uses the _Thread_local storage class ++ * will not be runtime loadable in GHCi, Haskell-language-server, and similar ++ * programs that use the GHC RTS runtime linker. As the popularity of such ++ * variables increases, we'll need have a more comprehensive approach to dealing ++ * with them, not limited to just "external references" as supported here. ++ * ++ * A much more complex approach would be to filter calls to __tls_get_addr(), ++ * using GHC-specific code to allocate per-thread storage for TLS variables in ++ * code loaded via ".o" files, delegating just external TLS variables to the ++ * RTLD. It is far from clear how to do that, and likely unwise to even think ++ * about going there. ++ */ ++ ++#include "linker/Elf.h" ++#include "linker/SymbolExtras.h" ++#include ++#include ++ ++/* ++ * Though for now we only get here for X86_64, also handle some other CPUs. ++ */ ++#if defined(__mips__) || defined(__powerpc__) || defined(__powerpc64__) ++#define OFFSUB 0x8000 ++#elif defined(__riscv__) ++#define OFFSUB 0x800 ++#else ++#define OFFSUB 0x0 ++#endif ++ ++static unsigned long ++elfhash(const unsigned char *name) ++{ ++ unsigned long h = 0, g; ++ ++ while (*name) ++ { ++ h = (h << 4) + *name++; ++ if ((g = h & 0xf0000000) != 0) ++ h ^= g >> 24; ++ h &= ~g; ++ } ++ return h; ++} ++ ++typedef struct tls_sym { ++ ObjectCode *tls_sym_object; ++ const char *tls_sym_name; ++ unsigned long tls_sym_indx; ++ unsigned long tls_sym_hash; ++ StgInt64 tls_sym_reloc; ++} tls_sym; ++ ++typedef struct dl_phdr_info dlpi; ++ ++static int ++find_tls_sym(dlpi *info, size_t sz STG_UNUSED, void *data) ++{ ++ tls_sym *wanted = (tls_sym *)data; ++ const Elf_Addr base = info->dlpi_addr; ++ const Elf_Dyn *dyn = NULL; ++ const Elf_Sym *dynsym = NULL; ++ const Elf_Word *dynhash = 0; ++ const char *dynstr = NULL; ++ ++ for (size_t i = 0; i < info->dlpi_phnum; i++) { ++ const Elf_Phdr *phdr = &info->dlpi_phdr[i]; ++ ++ if (phdr->p_type == PT_DYNAMIC) { ++ dyn = (const Elf_Dyn *)(base + phdr->p_vaddr); ++ break; ++ } ++ } ++ if (dyn == NULL) ++ return 0; ++ ++ for (size_t i = 0; dyn[i].d_tag != DT_NULL; ++i) ++ switch (dyn[i].d_tag) { ++ case DT_SYMTAB: ++ dynsym = (const Elf_Sym *)(base + dyn[i].d_un.d_val); ++ break; ++ case DT_STRTAB: ++ dynstr = (const char *)(base + dyn[i].d_un.d_val); ++ break; ++ case DT_HASH: ++ dynhash = (const Elf_Word *)(base + dyn[i].d_un.d_val); ++ break; ++ default: ++ break; ++ } ++ ++ if (dynsym == NULL || dynstr == NULL || dynhash == NULL) ++ return 0; ++ ++ unsigned long nbucket = (unsigned long)dynhash[0]; ++ // unsigned long nchain = (unsigned long)dynhash[1]; ++ const Elf_Word *bucket = &dynhash[2]; ++ const Elf_Word *chain = &dynhash[2+nbucket]; ++ unsigned long h = wanted->tls_sym_hash % nbucket; ++ ++ for (unsigned long i = bucket[h]; i != STN_UNDEF; i = chain[i]) { ++ const Elf_Sym *sym = dynsym+i; ++ const char *symname = dynstr + sym->st_name; ++ ++ /* Ignore undefined or non-TLS symbols */ ++ if (sym->st_value == 0 || ELF_ST_TYPE(sym->st_info) != STT_TLS) ++ continue; ++ ++ if (strcmp(symname, wanted->tls_sym_name) == 0) { ++ unsigned long target = sym->st_value - OFFSUB; ++ /* Store the module id as GOT[0] in a new GOT entry */ ++ SymbolExtra *extra = ++ makeSymbolExtra(wanted->tls_sym_object, ++ wanted->tls_sym_indx, ++ info->dlpi_tls_modid); ++ /* Copy the target address to GOT[1] (a.k.a. jumpIsland) */ ++ memcpy(extra->jumpIsland, &target, sizeof(target)); ++ wanted->tls_sym_reloc = (StgInt64) extra; ++ /* Signal success, no more modules will be tried */ ++ return 1; ++ } ++ } ++ /* Try the next module if any */ ++ return 0; ++} ++ ++StgInt64 ++lookupTlsgdSymbol(const char *symbol, unsigned long symnum, ObjectCode *oc) ++{ ++ tls_sym t; ++ ++ t.tls_sym_object = oc; ++ t.tls_sym_name = symbol; ++ t.tls_sym_indx = symnum; ++ t.tls_sym_hash = elfhash((unsigned char *)symbol); ++ t.tls_sym_reloc = 0; ++ ++ dl_iterate_phdr(find_tls_sym, &t); ++ ++ return t.tls_sym_reloc; ++} ++#endif +diff --git a/rts/linker/macho/plt.c b/rts/linker/macho/plt.c +index 33563f6..ed005ba 100644 +--- a/rts/linker/macho/plt.c ++++ b/rts/linker/macho/plt.c +@@ -84,7 +84,7 @@ freeStubs(Section * section) { + while(last->next != NULL) { + Stub * t = last; + last = last->next; +- free(t); ++ stgFree(t); + } + section->info->stubs = NULL; + section->info->nstubs = 0; +-- +2.33.0 + diff --git a/overlays/patches/ghc/0002-Disable-ReportMemoryMap.patch b/overlays/patches/ghc/0002-Disable-ReportMemoryMap.patch new file mode 100644 index 0000000000..d989a3b399 --- /dev/null +++ b/overlays/patches/ghc/0002-Disable-ReportMemoryMap.patch @@ -0,0 +1,89 @@ +From bac56a912333e4c20fdccc6bfc40bf4f0c9f77fc Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 02:18:05 +0000 +Subject: [PATCH 02/12] Disable ReportMemoryMap + +--- + rts/Linker.c | 2 +- + rts/linker/M32Alloc.c | 6 +++--- + rts/linker/MMap.c | 6 +++--- + 3 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/rts/Linker.c b/rts/Linker.c +index 5b0f05a..540daa2 100644 +--- a/rts/Linker.c ++++ b/rts/Linker.c +@@ -34,7 +34,7 @@ + #include "linker/MMap.h" + #include "PathUtils.h" + #include "CheckUnload.h" // createOCSectionIndices +-#include "ReportMemoryMap.h" ++// #include "ReportMemoryMap.h" + + #if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H) + #include "posix/Signals.h" +diff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.c +index 17d3d12..1bed5d9 100644 +--- a/rts/linker/M32Alloc.c ++++ b/rts/linker/M32Alloc.c +@@ -11,7 +11,7 @@ + #include "RtsUtils.h" + #include "linker/M32Alloc.h" + #include "linker/MMap.h" +-#include "ReportMemoryMap.h" ++// #include "ReportMemoryMap.h" + + #include + #include +@@ -326,7 +326,7 @@ m32_alloc_page(void) + const size_t map_sz = pgsz * M32_MAP_PAGES; + uint8_t *chunk = mmapAnonForLinker(map_sz); + if (! is_okay_address(chunk + map_sz)) { +- reportMemoryMap(); ++ // reportMemoryMap(); + barf("m32_alloc_page: failed to allocate pages within 4GB of program text (got %p)", chunk); + } + IF_DEBUG(sanity, memset(chunk, 0xaa, map_sz)); +@@ -492,7 +492,7 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) + sysErrorBelch("m32_alloc: Failed to map pages for %zd bytes", size); + return NULL; + } else if (! is_okay_address(page)) { +- reportMemoryMap(); ++ // reportMemoryMap(); + barf("m32_alloc: warning: Allocation of %zd bytes resulted in pages above 4GB (%p)", + size, page); + } +diff --git a/rts/linker/MMap.c b/rts/linker/MMap.c +index 30abad1..843cf2c 100644 +--- a/rts/linker/MMap.c ++++ b/rts/linker/MMap.c +@@ -3,7 +3,7 @@ + #include "sm/OSMem.h" + #include "linker/MMap.h" + #include "Trace.h" +-#include "ReportMemoryMap.h" ++// #include "ReportMemoryMap.h" + + #if RTS_LINKER_USE_MMAP + #include +@@ -290,7 +290,7 @@ doMmap(void *map_addr, size_t bytes, int prot, uint32_t flags, int fd, int offse + void * result = mmap(map_addr, bytes, prot, flags, fd, offset); + if (result == MAP_FAILED) { + sysErrorBelch("mmap %zx bytes at %p", bytes, map_addr); +- reportMemoryMap(); ++ // reportMemoryMap(); + errorBelch("Try specifying an address with +RTS -xm -RTS"); + return NULL; + } +@@ -350,7 +350,7 @@ mmapInRegion ( + } else if (wrapped) { + // We failed to find a suitable mapping + munmap(result, bytes); +- reportMemoryMap(); ++ // reportMemoryMap(); + errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " + "asked for %zu bytes at %p. " + "Try specifying an address with +RTS -xm -RTS", +-- +2.33.0 + diff --git a/overlays/patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch b/overlays/patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch new file mode 100644 index 0000000000..482df463ea --- /dev/null +++ b/overlays/patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch @@ -0,0 +1,24 @@ +From 249cf8c13dbbab2a726e4665d8d5e6ddb3bbdd6f Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 02:37:21 +0000 +Subject: [PATCH 03/12] StrHashTable is really just HashTable :facepalm: + +--- + rts/Hash.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rts/Hash.h b/rts/Hash.h +index bb661bf..a015baa 100644 +--- a/rts/Hash.h ++++ b/rts/Hash.h +@@ -11,6 +11,7 @@ + #include "BeginPrivate.h" + + typedef struct hashtable HashTable; /* abstract */ ++typedef struct hashtable StrHashTable; + + /* Hash table access where the keys are StgWords. + * Values are passed into the hash table and stored as `const void *` values, +-- +2.33.0 + diff --git a/overlays/patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch b/overlays/patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch new file mode 100644 index 0000000000..1d4bd78eb1 --- /dev/null +++ b/overlays/patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch @@ -0,0 +1,53 @@ +From b163dcbeddf70a6952445e8c1fe4324f1052cdd9 Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 02:38:50 +0000 +Subject: [PATCH 04/12] Add includes/rts/Linker.h as well. + +--- + includes/rts/Linker.h | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h +index 06c9402..ae463bc 100644 +--- a/includes/rts/Linker.h ++++ b/includes/rts/Linker.h +@@ -41,7 +41,7 @@ void initLinker (void); + */ + void initLinker_ (int retain_cafs); + +-/* insert a symbol in the hash table */ ++/* insert a code symbol in the hash table */ + HsInt insertSymbol(pathchar* obj_name, char* key, void* data); + + /* lookup a symbol in the hash table */ +@@ -52,6 +52,7 @@ typedef enum { + OBJECT_LOADED, + OBJECT_NEEDED, + OBJECT_RESOLVED, ++ OBJECT_READY, + OBJECT_UNLOADED, + OBJECT_DONT_RESOLVE, + OBJECT_NOT_LOADED /* The object was either never loaded or has been +@@ -76,6 +77,19 @@ HsInt loadArchive( pathchar *path ); + /* resolve all the currently unlinked objects in memory */ + HsInt resolveObjs( void ); + ++/* Load an .so using the system linker. ++ Returns a handle that can be passed to dlsym() or NULL on error. ++ ++ In the case of error, stores the error message in errmsg. The caller ++ is responsible for freeing it. */ ++void *loadNativeObj( pathchar *path, char **errmsg ); ++ ++/* Mark the .so loaded with the system linker for unloading. ++ The RTS will unload it when all the references to the .so disappear from ++ the heap. ++ Takes the handle returned from loadNativeObj() as an argument. */ ++HsInt unloadNativeObj( void *handle ); ++ + /* load a dynamic library */ + const char *addDLL( pathchar* dll_name ); + +-- +2.33.0 + diff --git a/overlays/patches/ghc/0005-Also-need-RtsSymbols.h.patch b/overlays/patches/ghc/0005-Also-need-RtsSymbols.h.patch new file mode 100644 index 0000000000..b45c0f0d63 --- /dev/null +++ b/overlays/patches/ghc/0005-Also-need-RtsSymbols.h.patch @@ -0,0 +1,26 @@ +From cc35bd8fc67f5ced12fc8800b50210509d1358eb Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 02:41:58 +0000 +Subject: [PATCH 05/12] Also need RtsSymbols.h + +--- + rts/RtsSymbols.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/rts/RtsSymbols.h b/rts/RtsSymbols.h +index b17c56e..4476006 100644 +--- a/rts/RtsSymbols.h ++++ b/rts/RtsSymbols.h +@@ -21,7 +21,8 @@ + typedef struct _RtsSymbolVal { + const SymbolName* lbl; + SymbolAddr* addr; +- bool weak; ++ SymStrength strength; ++ SymType type; + } RtsSymbolVal; + + extern RtsSymbolVal rtsSyms[]; +-- +2.33.0 + diff --git a/overlays/patches/ghc/0006-Also-need-pathutils.patch b/overlays/patches/ghc/0006-Also-need-pathutils.patch new file mode 100644 index 0000000000..2fc9b25be4 --- /dev/null +++ b/overlays/patches/ghc/0006-Also-need-pathutils.patch @@ -0,0 +1,54 @@ +From 98c7edaad09568127ccc190a4cfd502349ee3ef0 Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 02:47:13 +0000 +Subject: [PATCH 06/12] Also need pathutils. + +--- + rts/PathUtils.h | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/rts/PathUtils.h b/rts/PathUtils.h +index 0b35b21..df4ab3f 100644 +--- a/rts/PathUtils.h ++++ b/rts/PathUtils.h +@@ -8,18 +8,20 @@ + + #pragma once + +-#include "BeginPrivate.h" +- + // Use wchar_t for pathnames on Windows (#5697) + #if defined(mingw32_HOST_OS) ++#include "fs_rts.h" ++ + #define pathcmp wcscmp + #define pathlen wcslen +-#define pathopen __rts_fwopen +-#define pathstat _wstat ++// N.B. Use the Win32-based file routines from utils/fs. ++#define pathopen FS(fwopen) ++#define pathstat FS(_wstat) + #define struct_stat struct _stat + #define open wopen + #define WSTR(s) L##s +-#define pathprintf swprintf ++#define pathprintf snwprintf ++#define pathcopy wcscpy + #define pathsize sizeof(wchar_t) + #else + #define pathcmp strcmp +@@ -30,8 +32,11 @@ + #define WSTR(s) s + #define pathprintf snprintf + #define pathsize sizeof(char) ++#define pathcopy strcpy + #endif + ++#include "BeginPrivate.h" ++ + pathchar* pathdup(pathchar *path); + pathchar* pathdir(pathchar *path); + pathchar* mkPath(char* path); +-- +2.33.0 + diff --git a/overlays/patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch b/overlays/patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch new file mode 100644 index 0000000000..69ff53f9f4 --- /dev/null +++ b/overlays/patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch @@ -0,0 +1,1161 @@ +From aa605b8627d6362ba79e97cc2668d6007766fe1f Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 02:47:41 +0000 +Subject: [PATCH 07/12] Can not have RtsSymbols.h without RtsSymbols.c + +--- + rts/RtsSymbols.c | 848 +++++++++++++++++++++++------------------------ + 1 file changed, 420 insertions(+), 428 deletions(-) + +diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c +index 7f3971c..4d12302 100644 +--- a/rts/RtsSymbols.c ++++ b/rts/RtsSymbols.c +@@ -7,17 +7,19 @@ + * ---------------------------------------------------------------------------*/ + + #include "ghcplatform.h" ++#include "Rts.h" + #include "RtsSymbols.h" + +-#include "Rts.h" + #include "TopHandler.h" + #include "HsFFI.h" ++#include "CloneStack.h" + + #include "sm/Storage.h" + #include "sm/NonMovingMark.h" ++#include "Arena.h" + #include + +-#if !defined(mingw32_HOST_OS) ++#if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H) + #include "posix/Signals.h" + #endif + +@@ -26,12 +28,25 @@ + #include + #include + #include /* SHGetFolderPathW */ ++#include "win32/AsyncWinIO.h" + #endif + + #if defined(openbsd_HOST_OS) + #include /* _DYNAMIC */ + #endif + ++#if defined(HAVE_UNISTD_H) ++#include /* environ */ ++#endif ++ ++#if !HAVE_DECL_ENVIRON ++/* We must provide a prototype for environ since depending upon the libc ++ * version it may or may not be provided by unistd.h. See #20577 and #20861. ++ */ ++extern char **environ; ++#endif ++ ++ + /* ----------------------------------------------------------------------------- + * Symbols to be inserted into the RTS symbol table. + */ +@@ -50,7 +65,7 @@ + SymE_HasProto(libdwPoolRelease) \ + SymE_HasProto(libdwPoolClear) + +-#if !defined(mingw32_HOST_OS) ++#if !defined(mingw32_HOST_OS) && !defined(wasm32_HOST_ARCH) + #define RTS_POSIX_ONLY_SYMBOLS \ + SymI_HasProto(__hscore_get_saved_termios) \ + SymI_HasProto(__hscore_set_saved_termios) \ +@@ -58,10 +73,13 @@ + SymI_HasProto(signal_handlers) \ + SymI_HasProto(stg_sig_install) \ + SymI_HasProto(rtsTimerSignal) \ +- SymI_HasProto(atexit) \ + SymI_NeedsDataProto(nocldstop) + #endif + ++#if defined(wasm32_HOST_ARCH) ++#define RTS_POSIX_ONLY_SYMBOLS ++#endif ++ + #if defined(mingw32_HOST_OS) + #define RTS_POSIX_ONLY_SYMBOLS /**/ + +@@ -77,10 +95,27 @@ + #define RTS_WIN64_ONLY(X) /**/ + #endif + ++/* ++ * Note [Strong symbols] ++ * ~~~~~~~~~~~~~~~~~~~~~ ++ * The notion of a *weak* symbol is fairly common in linking: a symbol is weak ++ * if it is declared but not defined, allowing it to be defined by an object ++ * which is loaded later. GHC generalizes this notion, allowing symbol ++ * definitions to be declared as *strong*. A strong symbol is one which will ++ * silently supersede definitions of the same name by later objects. ++ * ++ * This is currently only used in the case of atexit() to workaround an ++ * unfortunate interaction on musl systems (#20350). Specifically, ++ * we include atexit() in RtsSymbols to ensure that it can be used by foreign ++ * code loaded by the RTS linker (see #4456). However, this causes trouble on ++ * statically-linked musl systems since musl's libc.a defines atexit() as a ++ * non-weak symbol, causing it to conflict with the symbol table entry produced ++ * by the RtsSymbols entry. To avoid this we introduce a horrible special case ++ * in `ghciInsertSymbolTable`, ensure that `atexit` is never overridden. ++ */ + /* + * Note [Symbols for MinGW's printf] + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- * + * The printf offered by Microsoft's libc implementation, msvcrt, is quite + * incomplete, lacking support for even %ull. Consequently mingw-w64 offers its + * own implementation which we enable. However, to be thread-safe the +@@ -100,7 +135,6 @@ + */ + /* Note [_iob_func symbol] + * ~~~~~~~~~~~~~~~~~~~~~~~ +- * + * Microsoft in VS2013 to VS2015 transition made a backwards incompatible change + * to the stdio function __iob_func. + * +@@ -133,141 +167,34 @@ + SymI_HasProto(stg_asyncDoProczh) \ + SymI_HasProto(rts_InstallConsoleEvent) \ + SymI_HasProto(rts_ConsoleHandlerDone) \ +- SymI_HasProto(atexit) \ ++ SymI_NeedsProto(__mingw_module_is_dll) \ + RTS_WIN32_ONLY(SymI_NeedsProto(___chkstk_ms)) \ + RTS_WIN64_ONLY(SymI_NeedsProto(___chkstk_ms)) \ +- RTS_WIN32_ONLY(SymI_HasProto(_imp___environ)) \ +- RTS_WIN64_ONLY(SymI_HasProto(__imp__environ)) \ +- RTS_WIN32_ONLY(SymI_HasProto(_imp___iob)) \ +- RTS_WIN64_ONLY(SymI_HasProto(__iob_func)) \ +- RTS_WIN64_ONLY(SymI_HasProto(__acrt_iob_func)) \ ++ RTS_WIN32_ONLY(SymI_HasProto(__stdio_common_vswprintf_s)) \ ++ RTS_WIN32_ONLY(SymI_HasProto(__stdio_common_vswprintf)) \ ++ RTS_WIN64_ONLY(SymI_HasProto(_errno)) \ + /* see Note [Symbols for MinGW's printf] */ \ + SymI_HasProto(_lock_file) \ + SymI_HasProto(_unlock_file) \ + SymI_HasProto(__mingw_vsnwprintf) \ ++ /* ^^ Need to figure out why this is needed. */ \ + /* See Note [_iob_func symbol] */ \ + RTS_WIN64_ONLY(SymI_HasProto_redirect( \ +- __imp___acrt_iob_func, __rts_iob_func, true)) \ ++ __imp___acrt_iob_func, __rts_iob_func, STRENGTH_WEAK, SYM_TYPE_INDIRECT_DATA)) \ + RTS_WIN32_ONLY(SymI_HasProto_redirect( \ +- __imp____acrt_iob_func, __rts_iob_func, true)) \ ++ __imp____acrt_iob_func, __rts_iob_func, STRENGTH_WEAK, SYM_TYPE_INDIRECT_DATA)) \ ++ SymI_HasProto(__mingw_vsnwprintf) \ ++ /* ^^ Need to figure out why this is needed. */ \ ++ SymI_HasProto(__mingw_vfprintf) \ ++ /* ^^ Need to figure out why this is needed. */ \ ++ SymI_HasProto(closure_sizeW_) \ ++ /* ^^ This one needed for cardano-prelude m( */ \ + SymI_NeedsProto(_tzset) \ + /* ^^ This one needed for time, tzset deprecated */\ + SymI_NeedsProto(tzset) \ + /* ^^ This one needed for unix-time */ +- +-#define RTS_MINGW_COMPAT_SYMBOLS \ +- SymI_HasProto_deprecated(access) \ +- SymI_HasProto_deprecated(cabs) \ +- SymI_HasProto_deprecated(cgets) \ +- SymI_HasProto_deprecated(chdir) \ +- SymI_HasProto_deprecated(chmod) \ +- SymI_HasProto_deprecated(chsize) \ +- SymI_HasProto_deprecated(close) \ +- SymI_HasProto_deprecated(cprintf) \ +- SymI_HasProto_deprecated(cputs) \ +- SymI_HasProto_deprecated(creat) \ +- SymI_HasProto_deprecated(cscanf) \ +- SymI_HasProto_deprecated(cwait) \ +- SymI_HasProto_deprecated(dup) \ +- SymI_HasProto_deprecated(dup2) \ +- SymI_HasProto_deprecated(ecvt) \ +- SymI_HasProto_deprecated(eof) \ +- SymI_HasProto_deprecated(execl) \ +- SymI_HasProto_deprecated(execle) \ +- SymI_HasProto_deprecated(execlp) \ +- SymI_HasProto_deprecated(execlpe) \ +- SymI_HasProto_deprecated(execv) \ +- SymI_HasProto_deprecated(execve) \ +- SymI_HasProto_deprecated(execvp) \ +- SymI_HasProto_deprecated(execvpe) \ +- SymI_HasProto_deprecated(fcloseall) \ +- SymI_HasProto_deprecated(fcvt) \ +- SymI_HasProto_deprecated(fdopen) \ +- SymI_HasProto_deprecated(fgetchar) \ +- SymI_HasProto_deprecated(filelength) \ +- SymI_HasProto_deprecated(fileno) \ +- SymI_HasProto_deprecated(flushall) \ +- SymI_HasProto_deprecated(fputchar) \ +- SymI_HasProto_deprecated(gcvt) \ +- SymI_HasProto_deprecated(getch) \ +- SymI_HasProto_deprecated(getche) \ +- SymI_HasProto_deprecated(getcwd) \ +- SymI_HasProto_deprecated(getpid) \ +- SymI_HasProto_deprecated(getw) \ +- SymI_HasProto_deprecated(hypot) \ +- SymI_HasProto_deprecated(inp) \ +- SymI_HasProto_deprecated(inpw) \ +- SymI_HasProto_deprecated(isascii) \ +- SymI_HasProto_deprecated(isatty) \ +- SymI_HasProto_deprecated(iscsym) \ +- SymI_HasProto_deprecated(iscsymf) \ +- SymI_HasProto_deprecated(itoa) \ +- SymI_HasProto_deprecated(j0) \ +- SymI_HasProto_deprecated(j1) \ +- SymI_HasProto_deprecated(jn) \ +- SymI_HasProto_deprecated(kbhit) \ +- SymI_HasProto_deprecated(lfind) \ +- SymI_HasProto_deprecated(locking) \ +- SymI_HasProto_deprecated(lsearch) \ +- SymI_HasProto_deprecated(lseek) \ +- SymI_HasProto_deprecated(ltoa) \ +- SymI_HasProto_deprecated(memccpy) \ +- SymI_HasProto_deprecated(memicmp) \ +- SymI_HasProto_deprecated(mkdir) \ +- SymI_HasProto_deprecated(mktemp) \ +- SymI_HasProto_deprecated(open) \ +- SymI_HasProto_deprecated(outp) \ +- SymI_HasProto_deprecated(outpw) \ +- SymI_HasProto_deprecated(putch) \ +- SymI_HasProto_deprecated(putenv) \ +- SymI_HasProto_deprecated(putw) \ +- SymI_HasProto_deprecated(read) \ +- SymI_HasProto_deprecated(rmdir) \ +- SymI_HasProto_deprecated(rmtmp) \ +- SymI_HasProto_deprecated(setmode) \ +- SymI_HasProto_deprecated(sopen) \ +- SymI_HasProto_deprecated(spawnl) \ +- SymI_HasProto_deprecated(spawnle) \ +- SymI_HasProto_deprecated(spawnlp) \ +- SymI_HasProto_deprecated(spawnlpe) \ +- SymI_HasProto_deprecated(spawnv) \ +- SymI_HasProto_deprecated(spawnve) \ +- SymI_HasProto_deprecated(spawnvp) \ +- SymI_HasProto_deprecated(spawnvpe) \ +- SymI_HasProto_deprecated(strcmpi) \ +- SymI_HasProto_deprecated(strdup) \ +- SymI_HasProto_deprecated(stricmp) \ +- SymI_HasProto_deprecated(strlwr) \ +- SymI_HasProto_deprecated(strnicmp) \ +- SymI_HasProto_deprecated(strnset) \ +- SymI_HasProto_deprecated(strrev) \ +- SymI_HasProto_deprecated(strset) \ +- SymI_HasProto_deprecated(strupr) \ +- SymI_HasProto_deprecated(swab) \ +- SymI_HasProto_deprecated(tell) \ +- SymI_HasProto_deprecated(tempnam) \ +- SymI_HasProto_deprecated(toascii) \ +- SymI_HasProto_deprecated(tzset) \ +- SymI_HasProto_deprecated(ultoa) \ +- SymI_HasProto_deprecated(umask) \ +- SymI_HasProto_deprecated(ungetch) \ +- SymI_HasProto_deprecated(unlink) \ +- SymI_HasProto_deprecated(wcsdup) \ +- SymI_HasProto_deprecated(wcsicmp) \ +- SymI_HasProto_deprecated(wcsicoll) \ +- SymI_HasProto_deprecated(wcslwr) \ +- SymI_HasProto_deprecated(wcsnicmp) \ +- SymI_HasProto_deprecated(wcsnset) \ +- SymI_HasProto_deprecated(wcsrev) \ +- SymI_HasProto_deprecated(wcsset) \ +- SymI_HasProto_deprecated(wcsupr) \ +- SymI_HasProto_deprecated(write) \ +- SymI_HasProto_deprecated(y0) \ +- SymI_HasProto_deprecated(y1) \ +- SymI_HasProto_deprecated(yn) + #else + #define RTS_MINGW_ONLY_SYMBOLS /**/ +-#define RTS_MINGW_COMPAT_SYMBOLS /**/ + #endif + + +@@ -340,15 +267,18 @@ + SymI_HasProto(setIOManagerControlFd) \ + SymI_HasProto(setTimerManagerControlFd) \ + SymI_HasProto(setIOManagerWakeupFd) \ +- SymI_HasProto(ioManagerWakeup) \ + SymI_HasProto(blockUserSignals) \ + SymI_HasProto(unblockUserSignals) + #else +-#define RTS_USER_SIGNALS_SYMBOLS \ +- SymI_HasProto(ioManagerWakeup) \ +- SymI_HasProto(sendIOManagerEvent) \ +- SymI_HasProto(readIOManagerEvent) \ +- SymI_HasProto(getIOManagerEvent) \ ++#define RTS_USER_SIGNALS_SYMBOLS \ ++ SymI_HasProto(registerIOCPHandle) \ ++ SymI_HasProto(getOverlappedEntries) \ ++ SymI_HasProto(completeSynchronousRequest) \ ++ SymI_HasProto(registerAlertableWait) \ ++ SymI_HasProto(sendIOManagerEvent) \ ++ SymI_HasProto(readIOManagerEvent) \ ++ SymI_HasProto(getIOManagerEvent) \ ++ SymI_HasProto(ioManagerFinished) \ + SymI_HasProto(console_handler) + #endif + +@@ -394,7 +324,7 @@ + #endif + + /* Modules compiled with -ticky may mention ticky counters */ +-/* This list should marry up with the one in $(TOP)/includes/stg/Ticky.h */ ++/* This list should marry up with the one in $(TOP)/rts/include/stg/Ticky.h */ + #define RTS_TICKY_SYMBOLS \ + SymI_NeedsDataProto(ticky_entry_ctrs) \ + SymI_NeedsDataProto(top_ct) \ +@@ -412,6 +342,7 @@ + SymI_HasProto(ENT_DYN_IND_ctr) \ + SymI_HasProto(ENT_PERM_IND_ctr) \ + SymI_HasProto(ENT_PAP_ctr) \ ++ SymI_HasProto(ENT_CONTINUATION_ctr) \ + SymI_HasProto(ENT_AP_ctr) \ + SymI_HasProto(ENT_AP_STACK_ctr) \ + SymI_HasProto(ENT_BH_ctr) \ +@@ -503,13 +434,19 @@ + SymI_HasProto(ALLOC_PAP_gds) \ + SymI_HasProto(ALLOC_PAP_slp) \ + SymI_HasProto(ALLOC_TSO_ctr) \ +- SymI_HasProto(ALLOC_TSO_adm) \ +- SymI_HasProto(ALLOC_TSO_gds) \ +- SymI_HasProto(ALLOC_TSO_slp) \ ++ SymI_HasProto(ALLOC_TSO_tot) \ ++ SymI_HasProto(ALLOC_STACK_ctr) \ ++ SymI_HasProto(ALLOC_STACK_tot) \ + SymI_HasProto(RET_NEW_ctr) \ + SymI_HasProto(RET_OLD_ctr) \ + SymI_HasProto(RET_UNBOXED_TUP_ctr) \ + SymI_HasProto(RET_SEMI_loads_avoided) \ ++ \ ++ SymI_HasProto(TAG_UNTAGGED_pred) \ ++ SymI_HasProto(TAG_UNTAGGED_miss) \ ++ SymI_HasProto(TAG_TAGGED_pred) \ ++ SymI_HasProto(TAG_TAGGED_miss) \ ++ \ + SymI_HasProto(RET_NEW_hst) \ + SymI_HasProto(RET_OLD_hst) \ + SymI_HasProto(RET_UNBOXED_TUP_hst) +@@ -539,57 +476,49 @@ + SymI_HasProto(mkCostCentre) \ + SymI_HasProto(registerCcList) \ + SymI_HasProto(registerCcsList) \ +- SymI_HasProto(era) ++ SymI_HasProto(era) \ ++ SymI_HasProto(user_era) + #else + #define RTS_PROF_SYMBOLS /* empty */ + #endif + +-#if RTS_LINKER_USE_MMAP +-#define RTS_LINKER_USE_MMAP_SYMBOLS \ +- SymI_HasProto(allocateWrite) \ +- SymI_HasProto(freeWrite) \ +- SymI_HasProto(markExec) +-#else +-#define RTS_LINKER_USE_MMAP_SYMBOLS /* empty */ +-#endif +- + #define RTS_SYMBOLS \ + Maybe_Stable_Names \ + RTS_TICKY_SYMBOLS \ + RTS_PROF_SYMBOLS \ + RTS_LIBDW_SYMBOLS \ +- RTS_LINKER_USE_MMAP_SYMBOLS \ + SymI_HasProto(StgReturn) \ +- SymI_HasProto(stg_gc_noregs) \ +- SymI_HasProto(stg_ret_v_info) \ +- SymI_HasProto(stg_ret_p_info) \ +- SymI_HasProto(stg_ret_n_info) \ +- SymI_HasProto(stg_ret_f_info) \ +- SymI_HasProto(stg_ret_d_info) \ +- SymI_HasProto(stg_ret_l_info) \ +- SymI_HasProto(stg_ret_t_info) \ +- SymI_HasProto(stg_ctoi_t) \ +- SymI_HasProto(stg_gc_prim_p) \ +- SymI_HasProto(stg_gc_prim_pp) \ +- SymI_HasProto(stg_gc_prim_n) \ +- SymI_HasProto(stg_enter_info) \ +- SymI_HasProto(__stg_gc_enter_1) \ +- SymI_HasProto(stg_gc_unpt_r1) \ +- SymI_HasProto(stg_gc_unbx_r1) \ +- SymI_HasProto(stg_gc_f1) \ +- SymI_HasProto(stg_gc_d1) \ +- SymI_HasProto(stg_gc_l1) \ +- SymI_HasProto(stg_gc_pp) \ +- SymI_HasProto(stg_gc_ppp) \ +- SymI_HasProto(stg_gc_pppp) \ +- SymI_HasProto(__stg_gc_fun) \ +- SymI_HasProto(stg_gc_fun_info) \ +- SymI_HasProto(stg_yield_noregs) \ +- SymI_HasProto(stg_yield_to_interpreter) \ +- SymI_HasProto(stg_block_noregs) \ +- SymI_HasProto(stg_block_takemvar) \ +- SymI_HasProto(stg_block_readmvar) \ +- SymI_HasProto(stg_block_putmvar) \ ++ SymI_HasDataProto(stg_gc_noregs) \ ++ SymI_HasDataProto(stg_ret_v_info) \ ++ SymI_HasDataProto(stg_ret_p_info) \ ++ SymI_HasDataProto(stg_ret_n_info) \ ++ SymI_HasDataProto(stg_ret_f_info) \ ++ SymI_HasDataProto(stg_ret_d_info) \ ++ SymI_HasDataProto(stg_ret_l_info) \ ++ SymI_HasDataProto(stg_ret_t_info) \ ++ SymI_HasDataProto(stg_ctoi_t) \ ++ SymI_HasDataProto(stg_primcall_info) \ ++ SymI_HasDataProto(stg_gc_prim_p) \ ++ SymI_HasDataProto(stg_gc_prim_pp) \ ++ SymI_HasDataProto(stg_gc_prim_n) \ ++ SymI_HasDataProto(stg_enter_info) \ ++ SymI_HasDataProto(__stg_gc_enter_1) \ ++ SymI_HasDataProto(stg_gc_unpt_r1) \ ++ SymI_HasDataProto(stg_gc_unbx_r1) \ ++ SymI_HasDataProto(stg_gc_f1) \ ++ SymI_HasDataProto(stg_gc_d1) \ ++ SymI_HasDataProto(stg_gc_l1) \ ++ SymI_HasDataProto(stg_gc_pp) \ ++ SymI_HasDataProto(stg_gc_ppp) \ ++ SymI_HasDataProto(stg_gc_pppp) \ ++ SymI_HasDataProto(__stg_gc_fun) \ ++ SymI_HasDataProto(stg_gc_fun_info) \ ++ SymI_HasDataProto(stg_yield_noregs) \ ++ SymI_HasDataProto(stg_yield_to_interpreter) \ ++ SymI_HasDataProto(stg_block_noregs) \ ++ SymI_HasDataProto(stg_block_takemvar) \ ++ SymI_HasDataProto(stg_block_readmvar) \ ++ SymI_HasDataProto(stg_block_putmvar) \ + MAIN_CAP_SYM \ + SymI_HasProto(addDLL) \ + SymI_HasProto(addLibrarySearchPath) \ +@@ -599,39 +528,41 @@ + SymI_HasProto(__word_encodeDouble) \ + SymI_HasProto(__int_encodeFloat) \ + SymI_HasProto(__word_encodeFloat) \ +- SymI_HasProto(stg_atomicallyzh) \ ++ SymI_HasDataProto(stg_atomicallyzh) \ + SymI_HasProto(barf) \ ++ SymI_HasProto(flushEventLog) \ + SymI_HasProto(deRefStablePtr) \ + SymI_HasProto(debugBelch) \ + SymI_HasProto(errorBelch) \ + SymI_HasProto(sysErrorBelch) \ +- SymI_HasProto(stg_getMaskingStatezh) \ +- SymI_HasProto(stg_maskAsyncExceptionszh) \ +- SymI_HasProto(stg_maskUninterruptiblezh) \ +- SymI_HasProto(stg_catchzh) \ +- SymI_HasProto(stg_catchRetryzh) \ +- SymI_HasProto(stg_catchSTMzh) \ +- SymI_HasProto(stg_clearCCSzh) \ +- SymI_HasProto(stg_compactAddWithSharingzh) \ +- SymI_HasProto(stg_compactAddzh) \ +- SymI_HasProto(stg_compactNewzh) \ +- SymI_HasProto(stg_compactResizzezh) \ +- SymI_HasProto(stg_compactContainszh) \ +- SymI_HasProto(stg_compactContainsAnyzh) \ +- SymI_HasProto(stg_compactGetFirstBlockzh) \ +- SymI_HasProto(stg_compactGetNextBlockzh) \ +- SymI_HasProto(stg_compactAllocateBlockzh) \ +- SymI_HasProto(stg_compactFixupPointerszh) \ +- SymI_HasProto(stg_compactSizzezh) \ ++ SymI_HasDataProto(stg_getMaskingStatezh) \ ++ SymI_HasDataProto(stg_maskAsyncExceptionszh) \ ++ SymI_HasDataProto(stg_maskUninterruptiblezh) \ ++ SymI_HasDataProto(stg_catchzh) \ ++ SymI_HasDataProto(stg_catchRetryzh) \ ++ SymI_HasDataProto(stg_catchSTMzh) \ ++ SymI_HasDataProto(stg_clearCCSzh) \ ++ SymI_HasDataProto(stg_compactAddWithSharingzh) \ ++ SymI_HasDataProto(stg_compactAddzh) \ ++ SymI_HasDataProto(stg_compactNewzh) \ ++ SymI_HasDataProto(stg_compactResizzezh) \ ++ SymI_HasDataProto(stg_compactContainszh) \ ++ SymI_HasDataProto(stg_compactContainsAnyzh) \ ++ SymI_HasDataProto(stg_compactGetFirstBlockzh) \ ++ SymI_HasDataProto(stg_compactGetNextBlockzh) \ ++ SymI_HasDataProto(stg_compactAllocateBlockzh) \ ++ SymI_HasDataProto(stg_compactFixupPointerszh) \ ++ SymI_HasDataProto(stg_compactSizzezh) \ + SymI_HasProto(closure_flags) \ ++ SymI_HasProto(eq_thread) \ + SymI_HasProto(cmp_thread) \ + SymI_HasProto(createAdjustor) \ +- SymI_HasProto(stg_decodeDoublezu2Intzh) \ +- SymI_HasProto(stg_decodeDoublezuInt64zh) \ +- SymI_HasProto(stg_decodeFloatzuIntzh) \ +- SymI_HasProto(stg_delayzh) \ +- SymI_HasProto(stg_deRefWeakzh) \ +- SymI_HasProto(stg_deRefStablePtrzh) \ ++ SymI_HasDataProto(stg_decodeDoublezu2Intzh) \ ++ SymI_HasDataProto(stg_decodeDoublezuInt64zh) \ ++ SymI_HasDataProto(stg_decodeFloatzuIntzh) \ ++ SymI_HasDataProto(stg_delayzh) \ ++ SymI_HasDataProto(stg_deRefWeakzh) \ ++ SymI_HasDataProto(stg_deRefStablePtrzh) \ + SymI_HasProto(dirty_MUT_VAR) \ + SymI_HasProto(dirty_TVAR) \ + SymI_HasProto(stg_forkzh) \ +@@ -650,11 +581,11 @@ + SymI_HasProto(getOrSetLibHSghcFastStringTable) \ + SymI_HasProto(getRTSStats) \ + SymI_HasProto(getRTSStatsEnabled) \ +- SymI_HasProto(getOrSetLibHSghcPersistentLinkerState) \ +- SymI_HasProto(getOrSetLibHSghcInitLinkerDone) \ +- SymI_HasProto(getOrSetLibHSghcGlobalDynFlags) \ +- SymI_HasProto(GenSymCounter) \ +- SymI_HasProto(GenSymInc) \ ++ SymI_HasProto(getOrSetLibHSghcGlobalHasPprDebug) \ ++ SymI_HasProto(getOrSetLibHSghcGlobalHasNoDebugOutput) \ ++ SymI_HasProto(getOrSetLibHSghcGlobalHasNoStateHack) \ ++ SymI_HasProto(ghc_unique_counter64) \ ++ SymI_HasProto(ghc_unique_inc) \ + SymI_HasProto(genericRaise) \ + SymI_HasProto(getProgArgv) \ + SymI_HasProto(getFullProgArgv) \ +@@ -684,78 +615,92 @@ + SymI_HasProto(defaultRtsConfig) \ + SymI_HasProto(initLinker) \ + SymI_HasProto(initLinker_) \ +- SymI_HasProto(stg_unpackClosurezh) \ +- SymI_HasProto(stg_closureSizzezh) \ +- SymI_HasProto(stg_getApStackValzh) \ +- SymI_HasProto(stg_getSparkzh) \ +- SymI_HasProto(stg_numSparkszh) \ +- SymI_HasProto(stg_isCurrentThreadBoundzh) \ +- SymI_HasProto(stg_isEmptyMVarzh) \ +- SymI_HasProto(stg_killThreadzh) \ ++ SymI_HasDataProto(stg_unpackClosurezh) \ ++ SymI_HasDataProto(stg_closureSizzezh) \ ++ SymI_HasDataProto(stg_whereFromzh) \ ++ SymI_HasDataProto(stg_getApStackValzh) \ ++ SymI_HasDataProto(stg_getSparkzh) \ ++ SymI_HasDataProto(stg_numSparkszh) \ ++ SymI_HasDataProto(stg_isCurrentThreadBoundzh) \ ++ SymI_HasDataProto(stg_isEmptyMVarzh) \ ++ SymI_HasDataProto(stg_killThreadzh) \ ++ SymI_HasDataProto(stg_listThreadszh) \ ++ SymI_HasDataProto(stg_threadLabelzh) \ + SymI_HasProto(loadArchive) \ + SymI_HasProto(loadObj) \ + SymI_HasProto(purgeObj) \ + SymI_HasProto(insertSymbol) \ + SymI_HasProto(lookupSymbol) \ +- SymI_HasProto(stg_makeStablePtrzh) \ +- SymI_HasProto(stg_mkApUpd0zh) \ +- SymI_HasProto(stg_labelThreadzh) \ +- SymI_HasProto(stg_newArrayzh) \ +- SymI_HasProto(stg_copyArrayzh) \ +- SymI_HasProto(stg_copyMutableArrayzh) \ +- SymI_HasProto(stg_copyArrayArrayzh) \ +- SymI_HasProto(stg_copyMutableArrayArrayzh) \ +- SymI_HasProto(stg_cloneArrayzh) \ +- SymI_HasProto(stg_cloneMutableArrayzh) \ +- SymI_HasProto(stg_freezzeArrayzh) \ +- SymI_HasProto(stg_thawArrayzh) \ +- SymI_HasProto(stg_newArrayArrayzh) \ +- SymI_HasProto(stg_casArrayzh) \ +- SymI_HasProto(stg_newSmallArrayzh) \ +- SymI_HasProto(stg_unsafeThawSmallArrayzh) \ +- SymI_HasProto(stg_cloneSmallArrayzh) \ +- SymI_HasProto(stg_cloneSmallMutableArrayzh) \ +- SymI_HasProto(stg_freezzeSmallArrayzh) \ +- SymI_HasProto(stg_thawSmallArrayzh) \ +- SymI_HasProto(stg_copySmallArrayzh) \ +- SymI_HasProto(stg_copySmallMutableArrayzh) \ +- SymI_HasProto(stg_casSmallArrayzh) \ +- SymI_HasProto(stg_copyArray_barrier) \ +- SymI_HasProto(stg_newBCOzh) \ +- SymI_HasProto(stg_newByteArrayzh) \ +- SymI_HasProto(stg_casIntArrayzh) \ +- SymI_HasProto(stg_newMVarzh) \ +- SymI_HasProto(stg_newMutVarzh) \ +- SymI_HasProto(stg_newTVarzh) \ +- SymI_HasProto(stg_noDuplicatezh) \ +- SymI_HasProto(stg_atomicModifyMutVar2zh) \ +- SymI_HasProto(stg_atomicModifyMutVarzuzh) \ +- SymI_HasProto(stg_casMutVarzh) \ +- SymI_HasProto(stg_newPinnedByteArrayzh) \ +- SymI_HasProto(stg_newAlignedPinnedByteArrayzh) \ +- SymI_HasProto(stg_isByteArrayPinnedzh) \ +- SymI_HasProto(stg_isMutableByteArrayPinnedzh) \ +- SymI_HasProto(stg_shrinkMutableByteArrayzh) \ +- SymI_HasProto(stg_resizzeMutableByteArrayzh) \ +- SymI_HasProto(stg_shrinkSmallMutableArrayzh) \ ++ SymI_HasDataProto(stg_makeStablePtrzh) \ ++ SymI_HasDataProto(stg_mkApUpd0zh) \ ++ SymI_HasDataProto(stg_labelThreadzh) \ ++ SymI_HasDataProto(stg_newArrayzh) \ ++ SymI_HasDataProto(stg_copyArrayzh) \ ++ SymI_HasDataProto(stg_copyMutableArrayzh) \ ++ SymI_HasDataProto(stg_cloneArrayzh) \ ++ SymI_HasDataProto(stg_cloneMutableArrayzh) \ ++ SymI_HasDataProto(stg_freezzeArrayzh) \ ++ SymI_HasDataProto(stg_thawArrayzh) \ ++ SymI_HasDataProto(stg_casArrayzh) \ ++ SymI_HasDataProto(stg_newSmallArrayzh) \ ++ SymI_HasDataProto(stg_unsafeThawSmallArrayzh) \ ++ SymI_HasDataProto(stg_cloneSmallArrayzh) \ ++ SymI_HasDataProto(stg_cloneSmallMutableArrayzh) \ ++ SymI_HasDataProto(stg_freezzeSmallArrayzh) \ ++ SymI_HasDataProto(stg_thawSmallArrayzh) \ ++ SymI_HasDataProto(stg_copySmallArrayzh) \ ++ SymI_HasDataProto(stg_copySmallMutableArrayzh) \ ++ SymI_HasDataProto(stg_casSmallArrayzh) \ ++ SymI_HasDataProto(stg_copyArray_barrier) \ ++ SymI_HasDataProto(stg_newBCOzh) \ ++ SymI_HasDataProto(stg_newByteArrayzh) \ ++ SymI_HasDataProto(stg_casIntArrayzh) \ ++ SymI_HasDataProto(stg_casInt8Arrayzh) \ ++ SymI_HasDataProto(stg_casInt16Arrayzh) \ ++ SymI_HasDataProto(stg_casInt32Arrayzh) \ ++ SymI_HasDataProto(stg_casInt64Arrayzh) \ ++ SymI_HasDataProto(stg_newMVarzh) \ ++ SymI_HasDataProto(stg_newMutVarzh) \ ++ SymI_HasDataProto(stg_newTVarzh) \ ++ SymI_HasDataProto(stg_readIOPortzh) \ ++ SymI_HasDataProto(stg_writeIOPortzh) \ ++ SymI_HasDataProto(stg_newIOPortzh) \ ++ SymI_HasDataProto(stg_noDuplicatezh) \ ++ SymI_HasDataProto(stg_atomicModifyMutVar2zh) \ ++ SymI_HasDataProto(stg_atomicModifyMutVarzuzh) \ ++ SymI_HasDataProto(stg_casMutVarzh) \ ++ SymI_HasDataProto(stg_newPinnedByteArrayzh) \ ++ SymI_HasDataProto(stg_newAlignedPinnedByteArrayzh) \ ++ SymI_HasDataProto(stg_isByteArrayPinnedzh) \ ++ SymI_HasDataProto(stg_isMutableByteArrayPinnedzh) \ ++ SymI_HasDataProto(stg_shrinkMutableByteArrayzh) \ ++ SymI_HasDataProto(stg_resizzeMutableByteArrayzh) \ ++ SymI_HasDataProto(stg_shrinkSmallMutableArrayzh) \ + SymI_HasProto(newSpark) \ + SymI_HasProto(updateRemembSetPushThunk) \ + SymI_HasProto(updateRemembSetPushThunk_) \ + SymI_HasProto(updateRemembSetPushClosure_) \ + SymI_HasProto(performGC) \ + SymI_HasProto(performMajorGC) \ ++ SymI_HasProto(performBlockingMajorGC) \ + SymI_HasProto(prog_argc) \ + SymI_HasProto(prog_argv) \ +- SymI_HasProto(stg_putMVarzh) \ +- SymI_HasProto(stg_raisezh) \ +- SymI_HasProto(stg_raiseIOzh) \ +- SymI_HasProto(stg_readTVarzh) \ +- SymI_HasProto(stg_readTVarIOzh) \ ++ SymI_HasDataProto(stg_putMVarzh) \ ++ SymI_HasDataProto(stg_raisezh) \ ++ SymI_HasDataProto(stg_raiseDivZZerozh) \ ++ SymI_HasDataProto(stg_raiseUnderflowzh) \ ++ SymI_HasDataProto(stg_raiseOverflowzh) \ ++ SymI_HasDataProto(stg_raiseIOzh) \ ++ SymI_HasDataProto(stg_keepAlivezh) \ ++ SymI_HasDataProto(stg_paniczh) \ ++ SymI_HasDataProto(stg_absentErrorzh) \ ++ SymI_HasDataProto(stg_readTVarzh) \ ++ SymI_HasDataProto(stg_readTVarIOzh) \ + SymI_HasProto(resumeThread) \ + SymI_HasProto(setNumCapabilities) \ + SymI_HasProto(getNumberOfProcessors) \ + SymI_HasProto(resolveObjs) \ +- SymI_HasProto(stg_retryzh) \ ++ SymI_HasDataProto(stg_retryzh) \ + SymI_HasProto(rts_apply) \ + SymI_HasProto(rts_checkSchedStatus) \ + SymI_HasProto(rts_eval) \ +@@ -764,6 +709,7 @@ + SymI_HasProto(rts_evalStableIOMain) \ + SymI_HasProto(rts_evalStableIO) \ + SymI_HasProto(rts_eval_) \ ++ SymI_HasProto(rts_inCall) \ + SymI_HasProto(rts_getBool) \ + SymI_HasProto(rts_getChar) \ + SymI_HasProto(rts_getDouble) \ +@@ -806,6 +752,9 @@ + SymI_HasProto(rtsSupportsBoundThreads) \ + SymI_HasProto(rts_isProfiled) \ + SymI_HasProto(rts_isDynamic) \ ++ SymI_HasProto(rts_isThreaded) \ ++ SymI_HasProto(rts_isDebugged) \ ++ SymI_HasProto(rts_isTracing) \ + SymI_HasProto(rts_setInCallCapability) \ + SymI_HasProto(rts_enableThreadAllocationLimit) \ + SymI_HasProto(rts_disableThreadAllocationLimit) \ +@@ -818,134 +767,137 @@ + SymI_HasProto(stable_ptr_table) \ + SymI_HasProto(reportStackOverflow) \ + SymI_HasProto(reportHeapOverflow) \ +- SymI_HasProto(stg_CAF_BLACKHOLE_info) \ +- SymI_HasProto(stg_BLACKHOLE_info) \ +- SymI_HasProto(__stg_EAGER_BLACKHOLE_info) \ +- SymI_HasProto(stg_BLOCKING_QUEUE_CLEAN_info) \ +- SymI_HasProto(stg_BLOCKING_QUEUE_DIRTY_info) \ ++ SymI_HasDataProto(stg_CAF_BLACKHOLE_info) \ ++ SymI_HasDataProto(stg_BLACKHOLE_info) \ ++ SymI_HasDataProto(__stg_EAGER_BLACKHOLE_info) \ ++ SymI_HasDataProto(stg_BLOCKING_QUEUE_CLEAN_info) \ ++ SymI_HasDataProto(stg_BLOCKING_QUEUE_DIRTY_info) \ + SymI_HasProto(startTimer) \ +- SymI_HasProto(stg_MVAR_CLEAN_info) \ +- SymI_HasProto(stg_MVAR_DIRTY_info) \ +- SymI_HasProto(stg_TVAR_CLEAN_info) \ +- SymI_HasProto(stg_TVAR_DIRTY_info) \ +- SymI_HasProto(stg_IND_STATIC_info) \ +- SymI_HasProto(stg_ARR_WORDS_info) \ +- SymI_HasProto(stg_MUT_ARR_PTRS_DIRTY_info) \ +- SymI_HasProto(stg_MUT_ARR_PTRS_FROZEN_CLEAN_info) \ +- SymI_HasProto(stg_MUT_ARR_PTRS_FROZEN_DIRTY_info) \ +- SymI_HasProto(stg_SMALL_MUT_ARR_PTRS_DIRTY_info) \ +- SymI_HasProto(stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN_info) \ +- SymI_HasProto(stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY_info) \ +- SymI_HasProto(stg_MUT_VAR_CLEAN_info) \ +- SymI_HasProto(stg_MUT_VAR_DIRTY_info) \ +- SymI_HasProto(stg_WEAK_info) \ +- SymI_HasProto(stg_SRT_1_info) \ +- SymI_HasProto(stg_SRT_2_info) \ +- SymI_HasProto(stg_SRT_3_info) \ +- SymI_HasProto(stg_SRT_4_info) \ +- SymI_HasProto(stg_SRT_5_info) \ +- SymI_HasProto(stg_SRT_6_info) \ +- SymI_HasProto(stg_SRT_7_info) \ +- SymI_HasProto(stg_SRT_8_info) \ +- SymI_HasProto(stg_SRT_9_info) \ +- SymI_HasProto(stg_SRT_10_info) \ +- SymI_HasProto(stg_SRT_11_info) \ +- SymI_HasProto(stg_SRT_12_info) \ +- SymI_HasProto(stg_SRT_13_info) \ +- SymI_HasProto(stg_SRT_14_info) \ +- SymI_HasProto(stg_SRT_15_info) \ +- SymI_HasProto(stg_SRT_16_info) \ +- SymI_HasProto(stg_ap_v_info) \ +- SymI_HasProto(stg_ap_f_info) \ +- SymI_HasProto(stg_ap_d_info) \ +- SymI_HasProto(stg_ap_l_info) \ +- SymI_HasProto(stg_ap_v16_info) \ +- SymI_HasProto(stg_ap_v32_info) \ +- SymI_HasProto(stg_ap_v64_info) \ +- SymI_HasProto(stg_ap_n_info) \ +- SymI_HasProto(stg_ap_p_info) \ +- SymI_HasProto(stg_ap_pv_info) \ +- SymI_HasProto(stg_ap_pp_info) \ +- SymI_HasProto(stg_ap_ppv_info) \ +- SymI_HasProto(stg_ap_ppp_info) \ +- SymI_HasProto(stg_ap_pppv_info) \ +- SymI_HasProto(stg_ap_pppp_info) \ +- SymI_HasProto(stg_ap_ppppp_info) \ +- SymI_HasProto(stg_ap_pppppp_info) \ +- SymI_HasProto(stg_ap_0_fast) \ +- SymI_HasProto(stg_ap_v_fast) \ +- SymI_HasProto(stg_ap_f_fast) \ +- SymI_HasProto(stg_ap_d_fast) \ +- SymI_HasProto(stg_ap_l_fast) \ +- SymI_HasProto(stg_ap_v16_fast) \ +- SymI_HasProto(stg_ap_v32_fast) \ +- SymI_HasProto(stg_ap_v64_fast) \ +- SymI_HasProto(stg_ap_n_fast) \ +- SymI_HasProto(stg_ap_p_fast) \ +- SymI_HasProto(stg_ap_pv_fast) \ +- SymI_HasProto(stg_ap_pp_fast) \ +- SymI_HasProto(stg_ap_ppv_fast) \ +- SymI_HasProto(stg_ap_ppp_fast) \ +- SymI_HasProto(stg_ap_pppv_fast) \ +- SymI_HasProto(stg_ap_pppp_fast) \ +- SymI_HasProto(stg_ap_ppppp_fast) \ +- SymI_HasProto(stg_ap_pppppp_fast) \ +- SymI_HasProto(stg_ap_1_upd_info) \ +- SymI_HasProto(stg_ap_2_upd_info) \ +- SymI_HasProto(stg_ap_3_upd_info) \ +- SymI_HasProto(stg_ap_4_upd_info) \ +- SymI_HasProto(stg_ap_5_upd_info) \ +- SymI_HasProto(stg_ap_6_upd_info) \ +- SymI_HasProto(stg_ap_7_upd_info) \ +- SymI_HasProto(stg_exit) \ +- SymI_HasProto(stg_sel_0_upd_info) \ +- SymI_HasProto(stg_sel_1_upd_info) \ +- SymI_HasProto(stg_sel_2_upd_info) \ +- SymI_HasProto(stg_sel_3_upd_info) \ +- SymI_HasProto(stg_sel_4_upd_info) \ +- SymI_HasProto(stg_sel_5_upd_info) \ +- SymI_HasProto(stg_sel_6_upd_info) \ +- SymI_HasProto(stg_sel_7_upd_info) \ +- SymI_HasProto(stg_sel_8_upd_info) \ +- SymI_HasProto(stg_sel_9_upd_info) \ +- SymI_HasProto(stg_sel_10_upd_info) \ +- SymI_HasProto(stg_sel_11_upd_info) \ +- SymI_HasProto(stg_sel_12_upd_info) \ +- SymI_HasProto(stg_sel_13_upd_info) \ +- SymI_HasProto(stg_sel_14_upd_info) \ +- SymI_HasProto(stg_sel_15_upd_info) \ +- SymI_HasProto(stg_sel_0_noupd_info) \ +- SymI_HasProto(stg_sel_1_noupd_info) \ +- SymI_HasProto(stg_sel_2_noupd_info) \ +- SymI_HasProto(stg_sel_3_noupd_info) \ +- SymI_HasProto(stg_sel_4_noupd_info) \ +- SymI_HasProto(stg_sel_5_noupd_info) \ +- SymI_HasProto(stg_sel_6_noupd_info) \ +- SymI_HasProto(stg_sel_7_noupd_info) \ +- SymI_HasProto(stg_sel_8_noupd_info) \ +- SymI_HasProto(stg_sel_9_noupd_info) \ +- SymI_HasProto(stg_sel_10_noupd_info) \ +- SymI_HasProto(stg_sel_11_noupd_info) \ +- SymI_HasProto(stg_sel_12_noupd_info) \ +- SymI_HasProto(stg_sel_13_noupd_info) \ +- SymI_HasProto(stg_sel_14_noupd_info) \ +- SymI_HasProto(stg_sel_15_noupd_info) \ +- SymI_HasProto(stg_upd_frame_info) \ +- SymI_HasProto(stg_bh_upd_frame_info) \ +- SymI_HasProto(suspendThread) \ +- SymI_HasProto(stg_takeMVarzh) \ +- SymI_HasProto(stg_readMVarzh) \ +- SymI_HasProto(stg_threadStatuszh) \ +- SymI_HasProto(stg_tryPutMVarzh) \ +- SymI_HasProto(stg_tryTakeMVarzh) \ +- SymI_HasProto(stg_tryReadMVarzh) \ +- SymI_HasProto(stg_unmaskAsyncExceptionszh) \ +- SymI_HasProto(unloadObj) \ +- SymI_HasProto(stg_unsafeThawArrayzh) \ +- SymI_HasProto(stg_waitReadzh) \ +- SymI_HasProto(stg_waitWritezh) \ +- SymI_HasProto(stg_writeTVarzh) \ +- SymI_HasProto(stg_yieldzh) \ ++ SymI_HasDataProto(stg_MVAR_CLEAN_info) \ ++ SymI_HasDataProto(stg_MVAR_DIRTY_info) \ ++ SymI_HasDataProto(stg_TVAR_CLEAN_info) \ ++ SymI_HasDataProto(stg_TVAR_DIRTY_info) \ ++ SymI_HasDataProto(stg_IND_STATIC_info) \ ++ SymI_HasDataProto(stg_ARR_WORDS_info) \ ++ SymI_HasDataProto(stg_MUT_ARR_PTRS_DIRTY_info) \ ++ SymI_HasDataProto(stg_MUT_ARR_PTRS_FROZEN_CLEAN_info) \ ++ SymI_HasDataProto(stg_MUT_ARR_PTRS_FROZEN_DIRTY_info) \ ++ SymI_HasDataProto(stg_SMALL_MUT_ARR_PTRS_DIRTY_info) \ ++ SymI_HasDataProto(stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN_info) \ ++ SymI_HasDataProto(stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY_info) \ ++ SymI_HasDataProto(stg_MUT_VAR_CLEAN_info) \ ++ SymI_HasDataProto(stg_MUT_VAR_DIRTY_info) \ ++ SymI_HasDataProto(stg_WEAK_info) \ ++ SymI_HasDataProto(stg_SRT_1_info) \ ++ SymI_HasDataProto(stg_SRT_2_info) \ ++ SymI_HasDataProto(stg_SRT_3_info) \ ++ SymI_HasDataProto(stg_SRT_4_info) \ ++ SymI_HasDataProto(stg_SRT_5_info) \ ++ SymI_HasDataProto(stg_SRT_6_info) \ ++ SymI_HasDataProto(stg_SRT_7_info) \ ++ SymI_HasDataProto(stg_SRT_8_info) \ ++ SymI_HasDataProto(stg_SRT_9_info) \ ++ SymI_HasDataProto(stg_SRT_10_info) \ ++ SymI_HasDataProto(stg_SRT_11_info) \ ++ SymI_HasDataProto(stg_SRT_12_info) \ ++ SymI_HasDataProto(stg_SRT_13_info) \ ++ SymI_HasDataProto(stg_SRT_14_info) \ ++ SymI_HasDataProto(stg_SRT_15_info) \ ++ SymI_HasDataProto(stg_SRT_16_info) \ ++ SymI_HasDataProto(stg_ap_v_info) \ ++ SymI_HasDataProto(stg_ap_f_info) \ ++ SymI_HasDataProto(stg_ap_d_info) \ ++ SymI_HasDataProto(stg_ap_l_info) \ ++ SymI_HasDataProto(stg_ap_v16_info) \ ++ SymI_HasDataProto(stg_ap_v32_info) \ ++ SymI_HasDataProto(stg_ap_v64_info) \ ++ SymI_HasDataProto(stg_ap_n_info) \ ++ SymI_HasDataProto(stg_ap_p_info) \ ++ SymI_HasDataProto(stg_ap_pv_info) \ ++ SymI_HasDataProto(stg_ap_pp_info) \ ++ SymI_HasDataProto(stg_ap_ppv_info) \ ++ SymI_HasDataProto(stg_ap_ppp_info) \ ++ SymI_HasDataProto(stg_ap_pppv_info) \ ++ SymI_HasDataProto(stg_ap_pppp_info) \ ++ SymI_HasDataProto(stg_ap_ppppp_info) \ ++ SymI_HasDataProto(stg_ap_pppppp_info) \ ++ SymI_HasDataProto(stg_ap_0_fast) \ ++ SymI_HasDataProto(stg_ap_v_fast) \ ++ SymI_HasDataProto(stg_ap_f_fast) \ ++ SymI_HasDataProto(stg_ap_d_fast) \ ++ SymI_HasDataProto(stg_ap_l_fast) \ ++ SymI_HasDataProto(stg_ap_v16_fast) \ ++ SymI_HasDataProto(stg_ap_v32_fast) \ ++ SymI_HasDataProto(stg_ap_v64_fast) \ ++ SymI_HasDataProto(stg_ap_n_fast) \ ++ SymI_HasDataProto(stg_ap_p_fast) \ ++ SymI_HasDataProto(stg_ap_pv_fast) \ ++ SymI_HasDataProto(stg_ap_pp_fast) \ ++ SymI_HasDataProto(stg_ap_ppv_fast) \ ++ SymI_HasDataProto(stg_ap_ppp_fast) \ ++ SymI_HasDataProto(stg_ap_pppv_fast) \ ++ SymI_HasDataProto(stg_ap_pppp_fast) \ ++ SymI_HasDataProto(stg_ap_ppppp_fast) \ ++ SymI_HasDataProto(stg_ap_pppppp_fast) \ ++ SymI_HasDataProto(stg_ap_1_upd_info) \ ++ SymI_HasDataProto(stg_ap_2_upd_info) \ ++ SymI_HasDataProto(stg_ap_3_upd_info) \ ++ SymI_HasDataProto(stg_ap_4_upd_info) \ ++ SymI_HasDataProto(stg_ap_5_upd_info) \ ++ SymI_HasDataProto(stg_ap_6_upd_info) \ ++ SymI_HasDataProto(stg_ap_7_upd_info) \ ++ SymI_HasDataProto(stg_exit) \ ++ SymI_HasDataProto(stg_sel_0_upd_info) \ ++ SymI_HasDataProto(stg_sel_1_upd_info) \ ++ SymI_HasDataProto(stg_sel_2_upd_info) \ ++ SymI_HasDataProto(stg_sel_3_upd_info) \ ++ SymI_HasDataProto(stg_sel_4_upd_info) \ ++ SymI_HasDataProto(stg_sel_5_upd_info) \ ++ SymI_HasDataProto(stg_sel_6_upd_info) \ ++ SymI_HasDataProto(stg_sel_7_upd_info) \ ++ SymI_HasDataProto(stg_sel_8_upd_info) \ ++ SymI_HasDataProto(stg_sel_9_upd_info) \ ++ SymI_HasDataProto(stg_sel_10_upd_info) \ ++ SymI_HasDataProto(stg_sel_11_upd_info) \ ++ SymI_HasDataProto(stg_sel_12_upd_info) \ ++ SymI_HasDataProto(stg_sel_13_upd_info) \ ++ SymI_HasDataProto(stg_sel_14_upd_info) \ ++ SymI_HasDataProto(stg_sel_15_upd_info) \ ++ SymI_HasDataProto(stg_sel_0_noupd_info) \ ++ SymI_HasDataProto(stg_sel_1_noupd_info) \ ++ SymI_HasDataProto(stg_sel_2_noupd_info) \ ++ SymI_HasDataProto(stg_sel_3_noupd_info) \ ++ SymI_HasDataProto(stg_sel_4_noupd_info) \ ++ SymI_HasDataProto(stg_sel_5_noupd_info) \ ++ SymI_HasDataProto(stg_sel_6_noupd_info) \ ++ SymI_HasDataProto(stg_sel_7_noupd_info) \ ++ SymI_HasDataProto(stg_sel_8_noupd_info) \ ++ SymI_HasDataProto(stg_sel_9_noupd_info) \ ++ SymI_HasDataProto(stg_sel_10_noupd_info) \ ++ SymI_HasDataProto(stg_sel_11_noupd_info) \ ++ SymI_HasDataProto(stg_sel_12_noupd_info) \ ++ SymI_HasDataProto(stg_sel_13_noupd_info) \ ++ SymI_HasDataProto(stg_sel_14_noupd_info) \ ++ SymI_HasDataProto(stg_sel_15_noupd_info) \ ++ SymI_HasDataProto(stg_unpack_cstring_info) \ ++ SymI_HasDataProto(stg_unpack_cstring_utf8_info) \ ++ SymI_HasDataProto(stg_upd_frame_info) \ ++ SymI_HasDataProto(stg_bh_upd_frame_info) \ ++ SymI_HasDataProto(stg_orig_thunk_info_frame_info) \ ++ SymI_HasProto(suspendThread) \ ++ SymI_HasDataProto(stg_takeMVarzh) \ ++ SymI_HasDataProto(stg_readMVarzh) \ ++ SymI_HasDataProto(stg_threadStatuszh) \ ++ SymI_HasDataProto(stg_tryPutMVarzh) \ ++ SymI_HasDataProto(stg_tryTakeMVarzh) \ ++ SymI_HasDataProto(stg_tryReadMVarzh) \ ++ SymI_HasDataProto(stg_unmaskAsyncExceptionszh) \ ++ SymI_HasProto(unloadObj) \ ++ SymI_HasDataProto(stg_unsafeThawArrayzh) \ ++ SymI_HasDataProto(stg_waitReadzh) \ ++ SymI_HasDataProto(stg_waitWritezh) \ ++ SymI_HasDataProto(stg_writeTVarzh) \ ++ SymI_HasDataProto(stg_yieldzh) \ + SymI_NeedsProto(stg_badAlignment_entry) \ + SymI_NeedsProto(stg_interp_constr1_entry) \ + SymI_NeedsProto(stg_interp_constr2_entry) \ +@@ -954,13 +906,13 @@ + SymI_NeedsProto(stg_interp_constr5_entry) \ + SymI_NeedsProto(stg_interp_constr6_entry) \ + SymI_NeedsProto(stg_interp_constr7_entry) \ +- SymI_HasProto(stg_arg_bitmaps) \ ++ SymI_HasDataProto(stg_arg_bitmaps) \ + SymI_HasProto(large_alloc_lim) \ + SymI_HasProto(g0) \ + SymI_HasProto(allocate) \ +- SymI_HasProto(allocateExec) \ +- SymI_HasProto(flushExec) \ +- SymI_HasProto(freeExec) \ ++ SymI_HasProto(allocateExecPage) \ ++ SymI_HasProto(freezeExecPage) \ ++ SymI_HasProto(freeExecPage) \ + SymI_HasProto(getAllocations) \ + SymI_HasProto(revertCAFs) \ + SymI_HasProto(RtsFlags) \ +@@ -970,17 +922,22 @@ + SymI_HasProto(stopTimer) \ + SymI_HasProto(n_capabilities) \ + SymI_HasProto(enabled_capabilities) \ +- SymI_HasProto(stg_traceCcszh) \ +- SymI_HasProto(stg_traceEventzh) \ +- SymI_HasProto(stg_traceMarkerzh) \ +- SymI_HasProto(stg_traceBinaryEventzh) \ +- SymI_HasProto(stg_getThreadAllocationCounterzh) \ +- SymI_HasProto(stg_setThreadAllocationCounterzh) \ ++ SymI_HasDataProto(stg_traceEventzh) \ ++ SymI_HasDataProto(stg_traceMarkerzh) \ ++ SymI_HasDataProto(stg_traceBinaryEventzh) \ ++ SymI_HasDataProto(stg_getThreadAllocationCounterzh) \ ++ SymI_HasDataProto(stg_setThreadAllocationCounterzh) \ + SymI_HasProto(getMonotonicNSec) \ + SymI_HasProto(lockFile) \ + SymI_HasProto(unlockFile) \ + SymI_HasProto(startProfTimer) \ + SymI_HasProto(stopProfTimer) \ ++ SymI_HasProto(startHeapProfTimer) \ ++ SymI_HasProto(stopHeapProfTimer) \ ++ SymI_HasProto(setUserEra) \ ++ SymI_HasProto(incrementUserEra) \ ++ SymI_HasProto(getUserEra) \ ++ SymI_HasProto(requestHeapCensus) \ + SymI_HasProto(atomic_inc) \ + SymI_HasProto(atomic_dec) \ + SymI_HasProto(hs_spt_lookup) \ +@@ -989,16 +946,32 @@ + SymI_HasProto(hs_spt_remove) \ + SymI_HasProto(hs_spt_keys) \ + SymI_HasProto(hs_spt_key_count) \ +- SymI_HasProto(write_barrier) \ +- SymI_HasProto(store_load_barrier) \ +- SymI_HasProto(load_load_barrier) \ + SymI_HasProto(cas) \ + SymI_HasProto(_assertFail) \ + SymI_HasProto(keepCAFs) \ ++ SymI_HasProto(registerInfoProvList) \ ++ SymI_HasProto(lookupIPE) \ ++ SymI_HasProto(sendCloneStackMessage) \ ++ SymI_HasProto(cloneStack) \ ++ SymI_HasProto(decodeClonedStack) \ ++ SymI_HasProto(stg_newPromptTagzh) \ ++ SymI_HasProto(stg_promptzh) \ ++ SymI_HasProto(stg_control0zh) \ ++ SymI_HasProto(newArena) \ ++ SymI_HasProto(arenaAlloc) \ ++ SymI_HasProto(arenaFree) \ ++ SymI_HasProto(rts_clearMemory) \ ++ SymI_HasProto(setKeepCAFs) \ ++ SymI_HasProto(rtsBadAlignmentBarf) \ ++ SymI_HasProto(rtsOutOfBoundsAccess) \ ++ SymI_HasProto(rtsMemcpyRangeOverlap) \ ++ SymI_HasDataProto(stg_castWord64ToDoublezh) \ ++ SymI_HasDataProto(stg_castDoubleToWord64zh) \ ++ SymI_HasDataProto(stg_castWord32ToFloatzh) \ ++ SymI_HasDataProto(stg_castFloatToWord32zh) \ + RTS_USER_SIGNALS_SYMBOLS \ + RTS_INTCHAR_SYMBOLS + +- + // 64-bit support functions in libgcc.a + #if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32) + #define RTS_LIBGCC_SYMBOLS \ +@@ -1019,6 +992,29 @@ + #define RTS_LIBGCC_SYMBOLS + #endif + ++// Symbols defined by libgcc/compiler-rt for AArch64's outline atomics. ++#if defined(HAVE_ARM_OUTLINE_ATOMICS) ++#include "ARMOutlineAtomicsSymbols.h" ++#else ++#define RTS_ARM_OUTLINE_ATOMIC_SYMBOLS ++#endif ++ ++// Symbols defined by libc ++#define RTS_LIBC_SYMBOLS \ ++ SymI_HasProto_redirect(atexit, atexit, STRENGTH_STRONG, SYM_TYPE_CODE) /* See Note [Strong symbols] */ \ ++ SymI_HasProto(environ) ++ ++#if !defined(DYNAMIC) && defined(linux_HOST_OS) ++// we need these for static musl builds. However when ++// linking shared objects (DLLs) this will fail, hence ++// we do not include them when building with -DDYNAMIC ++#define RTS_FINI_ARRAY_SYMBOLS \ ++ SymI_NeedsProto(__fini_array_start) \ ++ SymI_NeedsProto(__fini_array_end) ++#else ++#define RTS_FINI_ARRAY_SYMBOLS ++#endif ++ + /* entirely bogus claims about types of these symbols */ + #define SymI_NeedsProto(vvv) extern void vvv(void); + #define SymI_NeedsDataProto(vvv) extern StgWord vvv[]; +@@ -1034,37 +1030,42 @@ + #else + #define SymE_NeedsProto(vvv) SymI_NeedsProto(vvv); + #define SymE_NeedsDataProto(vvv) SymI_NeedsDataProto(vvv); +-#define SymE_HasProto(vvv) SymI_HasProto(vvv) ++#define SymE_HasProto(vvv) SymI_HasProto(vvv); + #endif + #define SymI_HasProto(vvv) /**/ +-#define SymI_HasProto_redirect(vvv,xxx,weak) /**/ +-#define SymI_HasProto_deprecated(vvv) /**/ ++#define SymI_HasDataProto(vvv) /**/ ++#define SymI_HasProto_redirect(vvv,xxx,strength,ty) /**/ ++ + RTS_SYMBOLS + RTS_RET_SYMBOLS + RTS_POSIX_ONLY_SYMBOLS + RTS_MINGW_ONLY_SYMBOLS + RTS_DARWIN_ONLY_SYMBOLS + RTS_OPENBSD_ONLY_SYMBOLS ++RTS_LIBC_SYMBOLS + RTS_LIBGCC_SYMBOLS ++RTS_FINI_ARRAY_SYMBOLS + RTS_LIBFFI_SYMBOLS ++RTS_ARM_OUTLINE_ATOMIC_SYMBOLS ++ + #undef SymI_NeedsProto + #undef SymI_NeedsDataProto + #undef SymI_HasProto ++#undef SymI_HasDataProto + #undef SymI_HasProto_redirect +-#undef SymI_HasProto_deprecated + #undef SymE_HasProto + #undef SymE_HasDataProto + #undef SymE_NeedsProto + #undef SymE_NeedsDataProto + + #define SymI_HasProto(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ +- (void*)(&(vvv)), false }, +-#define SymI_HasDataProto(vvv) \ +- SymI_HasProto(vvv) ++ (void*)(&(vvv)), STRENGTH_NORMAL, SYM_TYPE_CODE }, ++#define SymI_HasDataProto(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ ++ (void*)(&(vvv)), STRENGTH_NORMAL, SYM_TYPE_DATA }, + #define SymE_HasProto(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ +- (void*)DLL_IMPORT_DATA_REF(vvv), false }, +-#define SymE_HasDataProto(vvv) \ +- SymE_HasProto(vvv) ++ (void*)DLL_IMPORT_DATA_REF(vvv), STRENGTH_NORMAL, SYM_TYPE_CODE }, ++#define SymE_HasDataProto(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ ++ (void*)DLL_IMPORT_DATA_REF(vvv), STRENGTH_NORMAL, SYM_TYPE_DATA }, + + #define SymI_NeedsProto(vvv) SymI_HasProto(vvv) + #define SymI_NeedsDataProto(vvv) SymI_HasDataProto(vvv) +@@ -1073,36 +1074,27 @@ RTS_LIBFFI_SYMBOLS + + // SymI_HasProto_redirect allows us to redirect references to one symbol to + // another symbol. See newCAF/newRetainedCAF/newGCdCAF for an example. +-#define SymI_HasProto_redirect(vvv,xxx,weak) \ ++#define SymI_HasProto_redirect(vvv,xxx,strength,ty) \ + { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ +- (void*)(&(xxx)), weak }, +- +-// SymI_HasProto_deprecated allows us to redirect references from their deprecated +-// names to the undeprecated ones. e.g. access -> _access. +-// We use the hexspeak for unallocated memory 0xBAADF00D to signal the RTS +-// that this needs to be loaded from somewhere else. +-// These are inserted as weak symbols to prevent us overriding packages that do +-// define them, since on Windows these functions shouldn't be in the top level +-// namespace, but we have them for POSIX compatibility. +-#define SymI_HasProto_deprecated(vvv) \ +- { #vvv, (void*)0xBAADF00D, true }, ++ (void*)(&(xxx)), strength, ty }, + + RtsSymbolVal rtsSyms[] = { + RTS_SYMBOLS + RTS_RET_SYMBOLS + RTS_POSIX_ONLY_SYMBOLS + RTS_MINGW_ONLY_SYMBOLS +- RTS_MINGW_COMPAT_SYMBOLS + RTS_DARWIN_ONLY_SYMBOLS + RTS_OPENBSD_ONLY_SYMBOLS + RTS_LIBGCC_SYMBOLS ++ RTS_FINI_ARRAY_SYMBOLS + RTS_LIBFFI_SYMBOLS ++ RTS_ARM_OUTLINE_ATOMIC_SYMBOLS + SymI_HasDataProto(nonmoving_write_barrier_enabled) + #if defined(darwin_HOST_OS) && defined(i386_HOST_ARCH) + // dyld stub code contains references to this, + // but it should never be called because we treat + // lazy pointers as nonlazy. +- { "dyld_stub_binding_helper", (void*)0xDEADBEEF, false }, ++ { "dyld_stub_binding_helper", (void*)0xDEADBEEF, STRENGTH_NORMAL }, + #endif +- { 0, 0, false } /* sentinel */ ++ { 0, 0, STRENGTH_NORMAL, SYM_TYPE_CODE } /* sentinel */ + }; +-- +2.33.0 + diff --git a/overlays/patches/ghc/0008-Needs-linker_verbose-flag.patch b/overlays/patches/ghc/0008-Needs-linker_verbose-flag.patch new file mode 100644 index 0000000000..4c27bf5ee3 --- /dev/null +++ b/overlays/patches/ghc/0008-Needs-linker_verbose-flag.patch @@ -0,0 +1,48 @@ +From ed243586aa6884119dbfd00ac86ea87bed65e3b6 Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 02:57:55 +0000 +Subject: [PATCH 08/12] Needs linker_verbose flag + +--- + includes/rts/Flags.h | 1 + + rts/RtsFlags.c | 5 +++++ + 2 files changed, 6 insertions(+) + +diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h +index 76a3c51..d389dfa 100644 +--- a/includes/rts/Flags.h ++++ b/includes/rts/Flags.h +@@ -104,6 +104,7 @@ typedef struct _DEBUG_FLAGS { + bool stable; /* 't' */ + bool prof; /* 'p' */ + bool linker; /* 'l' the object linker */ ++ bool linker_verbose; /* 'L' the object linker, output which scales with O(# symbols) */ + bool apply; /* 'a' */ + bool stm; /* 'm' */ + bool squeeze; /* 'z' stack squeezing & lazy blackholing */ +diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c +index e56640f..e7be439 100644 +--- a/rts/RtsFlags.c ++++ b/rts/RtsFlags.c +@@ -190,6 +190,7 @@ void initRtsFlagsDefaults(void) + RtsFlags.DebugFlags.prof = false; + RtsFlags.DebugFlags.apply = false; + RtsFlags.DebugFlags.linker = false; ++ RtsFlags.DebugFlags.linker_verbose = false; + RtsFlags.DebugFlags.squeeze = false; + RtsFlags.DebugFlags.hpc = false; + RtsFlags.DebugFlags.sparks = false; +@@ -1962,6 +1963,10 @@ static void read_debug_flags(const char* arg) + case 'l': + RtsFlags.DebugFlags.linker = true; + break; ++ case 'L': ++ RtsFlags.DebugFlags.linker_verbose = true; ++ RtsFlags.DebugFlags.linker = true; ++ break; + case 'a': + RtsFlags.DebugFlags.apply = true; + break; +-- +2.33.0 + diff --git a/overlays/patches/ghc/0009-Drop-non-existing-RtsSymbols.patch b/overlays/patches/ghc/0009-Drop-non-existing-RtsSymbols.patch new file mode 100644 index 0000000000..586fde4908 --- /dev/null +++ b/overlays/patches/ghc/0009-Drop-non-existing-RtsSymbols.patch @@ -0,0 +1,253 @@ +From 9b023f61b0afe40c412c9de42ff6d57c96381c2d Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 03:12:12 +0000 +Subject: [PATCH 09/12] Drop non-existing RtsSymbols + +--- + rts/RtsSymbols.c | 76 +----------------------------------------------- + 1 file changed, 1 insertion(+), 75 deletions(-) + +diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c +index 4d12302..8b0208c 100644 +--- a/rts/RtsSymbols.c ++++ b/rts/RtsSymbols.c +@@ -12,7 +12,6 @@ + + #include "TopHandler.h" + #include "HsFFI.h" +-#include "CloneStack.h" + + #include "sm/Storage.h" + #include "sm/NonMovingMark.h" +@@ -28,7 +27,6 @@ + #include + #include + #include /* SHGetFolderPathW */ +-#include "win32/AsyncWinIO.h" + #endif + + #if defined(openbsd_HOST_OS) +@@ -271,14 +269,9 @@ extern char **environ; + SymI_HasProto(unblockUserSignals) + #else + #define RTS_USER_SIGNALS_SYMBOLS \ +- SymI_HasProto(registerIOCPHandle) \ +- SymI_HasProto(getOverlappedEntries) \ +- SymI_HasProto(completeSynchronousRequest) \ +- SymI_HasProto(registerAlertableWait) \ + SymI_HasProto(sendIOManagerEvent) \ + SymI_HasProto(readIOManagerEvent) \ + SymI_HasProto(getIOManagerEvent) \ +- SymI_HasProto(ioManagerFinished) \ + SymI_HasProto(console_handler) + #endif + +@@ -342,7 +335,6 @@ extern char **environ; + SymI_HasProto(ENT_DYN_IND_ctr) \ + SymI_HasProto(ENT_PERM_IND_ctr) \ + SymI_HasProto(ENT_PAP_ctr) \ +- SymI_HasProto(ENT_CONTINUATION_ctr) \ + SymI_HasProto(ENT_AP_ctr) \ + SymI_HasProto(ENT_AP_STACK_ctr) \ + SymI_HasProto(ENT_BH_ctr) \ +@@ -434,19 +426,11 @@ extern char **environ; + SymI_HasProto(ALLOC_PAP_gds) \ + SymI_HasProto(ALLOC_PAP_slp) \ + SymI_HasProto(ALLOC_TSO_ctr) \ +- SymI_HasProto(ALLOC_TSO_tot) \ +- SymI_HasProto(ALLOC_STACK_ctr) \ +- SymI_HasProto(ALLOC_STACK_tot) \ + SymI_HasProto(RET_NEW_ctr) \ + SymI_HasProto(RET_OLD_ctr) \ + SymI_HasProto(RET_UNBOXED_TUP_ctr) \ + SymI_HasProto(RET_SEMI_loads_avoided) \ + \ +- SymI_HasProto(TAG_UNTAGGED_pred) \ +- SymI_HasProto(TAG_UNTAGGED_miss) \ +- SymI_HasProto(TAG_TAGGED_pred) \ +- SymI_HasProto(TAG_TAGGED_miss) \ +- \ + SymI_HasProto(RET_NEW_hst) \ + SymI_HasProto(RET_OLD_hst) \ + SymI_HasProto(RET_UNBOXED_TUP_hst) +@@ -476,8 +460,7 @@ extern char **environ; + SymI_HasProto(mkCostCentre) \ + SymI_HasProto(registerCcList) \ + SymI_HasProto(registerCcsList) \ +- SymI_HasProto(era) \ +- SymI_HasProto(user_era) ++ SymI_HasProto(era) + #else + #define RTS_PROF_SYMBOLS /* empty */ + #endif +@@ -497,7 +480,6 @@ extern char **environ; + SymI_HasDataProto(stg_ret_l_info) \ + SymI_HasDataProto(stg_ret_t_info) \ + SymI_HasDataProto(stg_ctoi_t) \ +- SymI_HasDataProto(stg_primcall_info) \ + SymI_HasDataProto(stg_gc_prim_p) \ + SymI_HasDataProto(stg_gc_prim_pp) \ + SymI_HasDataProto(stg_gc_prim_n) \ +@@ -530,7 +512,6 @@ extern char **environ; + SymI_HasProto(__word_encodeFloat) \ + SymI_HasDataProto(stg_atomicallyzh) \ + SymI_HasProto(barf) \ +- SymI_HasProto(flushEventLog) \ + SymI_HasProto(deRefStablePtr) \ + SymI_HasProto(debugBelch) \ + SymI_HasProto(errorBelch) \ +@@ -554,7 +535,6 @@ extern char **environ; + SymI_HasDataProto(stg_compactFixupPointerszh) \ + SymI_HasDataProto(stg_compactSizzezh) \ + SymI_HasProto(closure_flags) \ +- SymI_HasProto(eq_thread) \ + SymI_HasProto(cmp_thread) \ + SymI_HasProto(createAdjustor) \ + SymI_HasDataProto(stg_decodeDoublezu2Intzh) \ +@@ -581,11 +561,6 @@ extern char **environ; + SymI_HasProto(getOrSetLibHSghcFastStringTable) \ + SymI_HasProto(getRTSStats) \ + SymI_HasProto(getRTSStatsEnabled) \ +- SymI_HasProto(getOrSetLibHSghcGlobalHasPprDebug) \ +- SymI_HasProto(getOrSetLibHSghcGlobalHasNoDebugOutput) \ +- SymI_HasProto(getOrSetLibHSghcGlobalHasNoStateHack) \ +- SymI_HasProto(ghc_unique_counter64) \ +- SymI_HasProto(ghc_unique_inc) \ + SymI_HasProto(genericRaise) \ + SymI_HasProto(getProgArgv) \ + SymI_HasProto(getFullProgArgv) \ +@@ -617,15 +592,12 @@ extern char **environ; + SymI_HasProto(initLinker_) \ + SymI_HasDataProto(stg_unpackClosurezh) \ + SymI_HasDataProto(stg_closureSizzezh) \ +- SymI_HasDataProto(stg_whereFromzh) \ + SymI_HasDataProto(stg_getApStackValzh) \ + SymI_HasDataProto(stg_getSparkzh) \ + SymI_HasDataProto(stg_numSparkszh) \ + SymI_HasDataProto(stg_isCurrentThreadBoundzh) \ + SymI_HasDataProto(stg_isEmptyMVarzh) \ + SymI_HasDataProto(stg_killThreadzh) \ +- SymI_HasDataProto(stg_listThreadszh) \ +- SymI_HasDataProto(stg_threadLabelzh) \ + SymI_HasProto(loadArchive) \ + SymI_HasProto(loadObj) \ + SymI_HasProto(purgeObj) \ +@@ -655,16 +627,9 @@ extern char **environ; + SymI_HasDataProto(stg_newBCOzh) \ + SymI_HasDataProto(stg_newByteArrayzh) \ + SymI_HasDataProto(stg_casIntArrayzh) \ +- SymI_HasDataProto(stg_casInt8Arrayzh) \ +- SymI_HasDataProto(stg_casInt16Arrayzh) \ +- SymI_HasDataProto(stg_casInt32Arrayzh) \ +- SymI_HasDataProto(stg_casInt64Arrayzh) \ + SymI_HasDataProto(stg_newMVarzh) \ + SymI_HasDataProto(stg_newMutVarzh) \ + SymI_HasDataProto(stg_newTVarzh) \ +- SymI_HasDataProto(stg_readIOPortzh) \ +- SymI_HasDataProto(stg_writeIOPortzh) \ +- SymI_HasDataProto(stg_newIOPortzh) \ + SymI_HasDataProto(stg_noDuplicatezh) \ + SymI_HasDataProto(stg_atomicModifyMutVar2zh) \ + SymI_HasDataProto(stg_atomicModifyMutVarzuzh) \ +@@ -682,18 +647,11 @@ extern char **environ; + SymI_HasProto(updateRemembSetPushClosure_) \ + SymI_HasProto(performGC) \ + SymI_HasProto(performMajorGC) \ +- SymI_HasProto(performBlockingMajorGC) \ + SymI_HasProto(prog_argc) \ + SymI_HasProto(prog_argv) \ + SymI_HasDataProto(stg_putMVarzh) \ + SymI_HasDataProto(stg_raisezh) \ +- SymI_HasDataProto(stg_raiseDivZZerozh) \ +- SymI_HasDataProto(stg_raiseUnderflowzh) \ +- SymI_HasDataProto(stg_raiseOverflowzh) \ + SymI_HasDataProto(stg_raiseIOzh) \ +- SymI_HasDataProto(stg_keepAlivezh) \ +- SymI_HasDataProto(stg_paniczh) \ +- SymI_HasDataProto(stg_absentErrorzh) \ + SymI_HasDataProto(stg_readTVarzh) \ + SymI_HasDataProto(stg_readTVarIOzh) \ + SymI_HasProto(resumeThread) \ +@@ -709,7 +667,6 @@ extern char **environ; + SymI_HasProto(rts_evalStableIOMain) \ + SymI_HasProto(rts_evalStableIO) \ + SymI_HasProto(rts_eval_) \ +- SymI_HasProto(rts_inCall) \ + SymI_HasProto(rts_getBool) \ + SymI_HasProto(rts_getChar) \ + SymI_HasProto(rts_getDouble) \ +@@ -752,9 +709,6 @@ extern char **environ; + SymI_HasProto(rtsSupportsBoundThreads) \ + SymI_HasProto(rts_isProfiled) \ + SymI_HasProto(rts_isDynamic) \ +- SymI_HasProto(rts_isThreaded) \ +- SymI_HasProto(rts_isDebugged) \ +- SymI_HasProto(rts_isTracing) \ + SymI_HasProto(rts_setInCallCapability) \ + SymI_HasProto(rts_enableThreadAllocationLimit) \ + SymI_HasProto(rts_disableThreadAllocationLimit) \ +@@ -879,11 +833,8 @@ extern char **environ; + SymI_HasDataProto(stg_sel_13_noupd_info) \ + SymI_HasDataProto(stg_sel_14_noupd_info) \ + SymI_HasDataProto(stg_sel_15_noupd_info) \ +- SymI_HasDataProto(stg_unpack_cstring_info) \ +- SymI_HasDataProto(stg_unpack_cstring_utf8_info) \ + SymI_HasDataProto(stg_upd_frame_info) \ + SymI_HasDataProto(stg_bh_upd_frame_info) \ +- SymI_HasDataProto(stg_orig_thunk_info_frame_info) \ + SymI_HasProto(suspendThread) \ + SymI_HasDataProto(stg_takeMVarzh) \ + SymI_HasDataProto(stg_readMVarzh) \ +@@ -910,9 +861,6 @@ extern char **environ; + SymI_HasProto(large_alloc_lim) \ + SymI_HasProto(g0) \ + SymI_HasProto(allocate) \ +- SymI_HasProto(allocateExecPage) \ +- SymI_HasProto(freezeExecPage) \ +- SymI_HasProto(freeExecPage) \ + SymI_HasProto(getAllocations) \ + SymI_HasProto(revertCAFs) \ + SymI_HasProto(RtsFlags) \ +@@ -932,12 +880,6 @@ extern char **environ; + SymI_HasProto(unlockFile) \ + SymI_HasProto(startProfTimer) \ + SymI_HasProto(stopProfTimer) \ +- SymI_HasProto(startHeapProfTimer) \ +- SymI_HasProto(stopHeapProfTimer) \ +- SymI_HasProto(setUserEra) \ +- SymI_HasProto(incrementUserEra) \ +- SymI_HasProto(getUserEra) \ +- SymI_HasProto(requestHeapCensus) \ + SymI_HasProto(atomic_inc) \ + SymI_HasProto(atomic_dec) \ + SymI_HasProto(hs_spt_lookup) \ +@@ -949,26 +891,10 @@ extern char **environ; + SymI_HasProto(cas) \ + SymI_HasProto(_assertFail) \ + SymI_HasProto(keepCAFs) \ +- SymI_HasProto(registerInfoProvList) \ +- SymI_HasProto(lookupIPE) \ +- SymI_HasProto(sendCloneStackMessage) \ +- SymI_HasProto(cloneStack) \ +- SymI_HasProto(decodeClonedStack) \ +- SymI_HasProto(stg_newPromptTagzh) \ +- SymI_HasProto(stg_promptzh) \ +- SymI_HasProto(stg_control0zh) \ + SymI_HasProto(newArena) \ + SymI_HasProto(arenaAlloc) \ + SymI_HasProto(arenaFree) \ +- SymI_HasProto(rts_clearMemory) \ + SymI_HasProto(setKeepCAFs) \ +- SymI_HasProto(rtsBadAlignmentBarf) \ +- SymI_HasProto(rtsOutOfBoundsAccess) \ +- SymI_HasProto(rtsMemcpyRangeOverlap) \ +- SymI_HasDataProto(stg_castWord64ToDoublezh) \ +- SymI_HasDataProto(stg_castDoubleToWord64zh) \ +- SymI_HasDataProto(stg_castWord32ToFloatzh) \ +- SymI_HasDataProto(stg_castFloatToWord32zh) \ + RTS_USER_SIGNALS_SYMBOLS \ + RTS_INTCHAR_SYMBOLS + +-- +2.33.0 + diff --git a/overlays/patches/ghc/0010-One-more-debug-flag-L.patch b/overlays/patches/ghc/0010-One-more-debug-flag-L.patch new file mode 100644 index 0000000000..3b968ff82a --- /dev/null +++ b/overlays/patches/ghc/0010-One-more-debug-flag-L.patch @@ -0,0 +1,25 @@ +From c1b689f73e1085ced75e95593605e31d4d5a0ce4 Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 03:12:32 +0000 +Subject: [PATCH 10/12] One more debug flag (-L) + +--- + includes/dist-derivedconstants/header/DerivedConstants.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/includes/dist-derivedconstants/header/DerivedConstants.h b/includes/dist-derivedconstants/header/DerivedConstants.h +index 7df96e6..8e8ce99 100644 +--- a/includes/dist-derivedconstants/header/DerivedConstants.h ++++ b/includes/dist-derivedconstants/header/DerivedConstants.h +@@ -494,7 +494,7 @@ + #define OFFSET_RtsFlags_ProfFlags_showCCSOnException 285 + #define REP_RtsFlags_ProfFlags_showCCSOnException b8 + #define RtsFlags_ProfFlags_showCCSOnException(__ptr__) REP_RtsFlags_ProfFlags_showCCSOnException[__ptr__+OFFSET_RtsFlags_ProfFlags_showCCSOnException] +-#define OFFSET_RtsFlags_DebugFlags_apply 228 ++#define OFFSET_RtsFlags_DebugFlags_apply 229 + #define REP_RtsFlags_DebugFlags_apply b8 + #define RtsFlags_DebugFlags_apply(__ptr__) REP_RtsFlags_DebugFlags_apply[__ptr__+OFFSET_RtsFlags_DebugFlags_apply] + #define OFFSET_RtsFlags_DebugFlags_sanity 223 +-- +2.33.0 + diff --git a/overlays/patches/ghc/0011-Add-ENVIRON-check.patch b/overlays/patches/ghc/0011-Add-ENVIRON-check.patch new file mode 100644 index 0000000000..6f82748fb8 --- /dev/null +++ b/overlays/patches/ghc/0011-Add-ENVIRON-check.patch @@ -0,0 +1,54 @@ +From b88586d77f1774f1c5da37b8eea09c4a9d6de062 Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 03:23:55 +0000 +Subject: [PATCH 11/12] Add ENVIRON check + +--- + aclocal.m4 | 18 ++++++++++++++++++ + configure.ac | 3 +++ + 2 files changed, 21 insertions(+) + +diff --git a/aclocal.m4 b/aclocal.m4 +index 14adbfa..7ff7e8d 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -2713,4 +2713,22 @@ AC_DEFUN([FIND_PYTHON],[ + AC_SUBST([PythonCmd]) + ]) + ++# FP_CHECK_ENVIRON ++# ----------------- ++AC_DEFUN([FP_CHECK_ENVIRON], ++[ ++ dnl-------------------------------------------------------------------- ++ dnl * Check whether the libc headers provide a declaration for the ++ dnl environ symbol. If not then we will provide one in RtsSymbols.c. ++ dnl See #20512, #20577, #20861. ++ dnl ++ dnl N.B. Windows declares environ in ; most others declare it ++ dnl in . ++ dnl-------------------------------------------------------------------- ++ AC_CHECK_DECLS([environ], [], [], [ ++ #include ++ #include ++ ]) ++]) ++ + # LocalWords: fi +diff --git a/configure.ac b/configure.ac +index 6eac557..ead69d0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -931,6 +931,9 @@ AC_CHECK_HEADERS([sys/cpuset.h], [], [], + #endif + ]]) + ++dnl ** check whether a declaration for `environ` is provided by libc. ++FP_CHECK_ENVIRO ++ + dnl ** check if it is safe to include both and + AC_HEADER_TIME + +-- +2.33.0 + diff --git a/overlays/patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch b/overlays/patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch new file mode 100644 index 0000000000..9bcb2948e8 --- /dev/null +++ b/overlays/patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch @@ -0,0 +1,28 @@ +From 18e6f2630baebd71ef869e06efbf9d8d24291399 Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 03:28:52 +0000 +Subject: [PATCH 12/12] fixup HAVE_DECL_ENVIRON + +--- + libraries/base/include/HsBase.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h +index d588447..243d969 100644 +--- a/libraries/base/include/HsBase.h ++++ b/libraries/base/include/HsBase.h +@@ -552,9 +552,9 @@ INLINE int __hscore_open(char *file, int how, mode_t mode) { + #include + INLINE char **__hscore_environ(void) { return *(_NSGetEnviron()); } + #else +-/* ToDo: write a feature test that doesn't assume 'environ' to +- * be in scope at link-time. */ ++#if !HAVE_DECL_ENVIRON + extern char** environ; ++#endif + INLINE char **__hscore_environ(void) { return environ; } + #endif + +-- +2.33.0 + diff --git a/overlays/patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch b/overlays/patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch new file mode 100644 index 0000000000..fb18bca74f --- /dev/null +++ b/overlays/patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch @@ -0,0 +1,25 @@ +From e0673a4e134c58044316a07d7d4a21b058eddc7f Mon Sep 17 00:00:00 2001 +From: Moritz Angermann +Date: Thu, 20 Jun 2024 05:22:15 +0000 +Subject: [PATCH] add STG_NORETURN to Stg.h + +--- + includes/Stg.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/includes/Stg.h b/includes/Stg.h +index 46f71c0..bc5cc75 100644 +--- a/includes/Stg.h ++++ b/includes/Stg.h +@@ -215,6 +215,8 @@ + + #define STG_UNUSED GNUC3_ATTRIBUTE(__unused__) + ++#define STG_NORETURN GNU_ATTRIBUTE(__noreturn__) ++ + /* Prevent functions from being optimized. + See Note [Windows Stack allocations] */ + #if defined(__clang__) +-- +2.33.0 + diff --git a/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch b/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch new file mode 100644 index 0000000000..94787b4bed --- /dev/null +++ b/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch @@ -0,0 +1,21 @@ +diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c +index 8622166..531ed4d 100644 +--- a/rts/linker/PEi386.c ++++ b/rts/linker/PEi386.c +@@ -2076,10 +2076,13 @@ + } + else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) + { +- /* See Note [BFD import library]. */ +- HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, NULL); +- if (!dllInstance && pinfo->value) ++ // we only want to _update_ the type, if the dependent symbol is _not_ a dllInstance. ++ SymType depType = 0; ++ HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, &depType); ++ if (!dllInstance && pinfo->value) { ++ *type = depType; + return pinfo->value; ++ } + + if (!dllInstance) + { From 9d01ee10c7c295ed38c149b3a256c7bc34a2cd43 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Jul 2024 13:06:40 +1200 Subject: [PATCH 155/170] ifdLevel 0 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index a1c02d581e..c09da6c4ed 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 0; compiler = "ghc928"; config = import ./config.nix; From e3b308496f947c63614fa0fe503eda7e0a12f18e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Jul 2024 13:09:55 +1200 Subject: [PATCH 156/170] Disable darwin for now --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index c09da6c4ed..7b188bca22 100644 --- a/flake.nix +++ b/flake.nix @@ -108,9 +108,9 @@ # systems supported by haskell.nix systems = [ "x86_64-linux" - "x86_64-darwin" + # "x86_64-darwin" "aarch64-linux" - "aarch64-darwin" + # "aarch64-darwin" ]; nixpkgsArgs = { From 2234e7ecd6258a175a9a17aa9213885d3f6cd4d7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Jul 2024 13:16:51 +1200 Subject: [PATCH 157/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 7b188bca22..f88c87ac1b 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From 845139853f5b7bb625df7453ff64e92eddb49095 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Jul 2024 13:20:40 +1200 Subject: [PATCH 158/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index f88c87ac1b..4017ff6bcb 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From b283764951791fa1e88342d5a477193a7fd4b2db Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Jul 2024 13:35:22 +1200 Subject: [PATCH 159/170] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 4017ff6bcb..2eb4a2c45c 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; compiler = "ghc928"; config = import ./config.nix; From 8ee876b923fd9d54a5e62e638b7c5769dc66e3cb Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 9 Jul 2024 14:02:41 +1200 Subject: [PATCH 160/170] Disable darwin for now --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 2eb4a2c45c..07397aa920 100644 --- a/flake.nix +++ b/flake.nix @@ -284,12 +284,12 @@ hydraJobs.nix-tools = pkgs.releaseTools.aggregate { name = "nix-tools"; constituents = [ - "aarch64-darwin.nix-tools.static.zipped.nix-tools-static" - "x86_64-darwin.nix-tools.static.zipped.nix-tools-static" + # "aarch64-darwin.nix-tools.static.zipped.nix-tools-static" + # "x86_64-darwin.nix-tools.static.zipped.nix-tools-static" "x86_64-linux.nix-tools.static.zipped.nix-tools-static" "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64" - "aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" - "x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" + # "aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" + # "x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" "x86_64-linux.nix-tools.static.zipped.nix-tools-static-no-ifd" "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64-no-ifd" (writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000")) From a191d758bb30a64b50d096184859958f3b1d387f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Jul 2024 12:42:04 +1200 Subject: [PATCH 161/170] Revert "Add 9.6 linker to 8.10 windows" This reverts commit 3ec62f3146fa65a28b4a1777aa8e620f727dad0c. --- overlays/bootstrap.nix | 16 +- .../ghc/0001-Graft-9.10.1-linker-in.patch | 12100 ---------------- .../ghc/0002-Disable-ReportMemoryMap.patch | 89 - ...le-is-really-just-HashTable-facepalm.patch | 24 - ...04-Add-includes-rts-Linker.h-as-well.patch | 53 - .../ghc/0005-Also-need-RtsSymbols.h.patch | 26 - .../ghc/0006-Also-need-pathutils.patch | 54 - ...ve-RtsSymbols.h-without-RtsSymbols.c.patch | 1161 -- .../ghc/0008-Needs-linker_verbose-flag.patch | 48 - .../0009-Drop-non-existing-RtsSymbols.patch | 253 - .../ghc/0010-One-more-debug-flag-L.patch | 25 - .../patches/ghc/0011-Add-ENVIRON-check.patch | 54 - .../ghc/0012-fixup-HAVE_DECL_ENVIRON.patch | 28 - .../ghc/0013-add-STG_NORETURN-to-Stg.h.patch | 25 - ...indows-dll-dependent-symbol-type-fix.patch | 21 - 15 files changed, 1 insertion(+), 13976 deletions(-) delete mode 100644 overlays/patches/ghc/0001-Graft-9.10.1-linker-in.patch delete mode 100644 overlays/patches/ghc/0002-Disable-ReportMemoryMap.patch delete mode 100644 overlays/patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch delete mode 100644 overlays/patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch delete mode 100644 overlays/patches/ghc/0005-Also-need-RtsSymbols.h.patch delete mode 100644 overlays/patches/ghc/0006-Also-need-pathutils.patch delete mode 100644 overlays/patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch delete mode 100644 overlays/patches/ghc/0008-Needs-linker_verbose-flag.patch delete mode 100644 overlays/patches/ghc/0009-Drop-non-existing-RtsSymbols.patch delete mode 100644 overlays/patches/ghc/0010-One-more-debug-flag-L.patch delete mode 100644 overlays/patches/ghc/0011-Add-ENVIRON-check.patch delete mode 100644 overlays/patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch delete mode 100644 overlays/patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch delete mode 100644 overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index b07469fe5a..09063c142b 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -70,7 +70,7 @@ in { from = start: final.lib.optional (versionAtLeast start); until = end: final.lib.optional (versionLessThan end); always = final.lib.optional true; - onDarwin = final.lib.optionals final.stdenv.targetPlatform.isDarwin; + onDarwin = final.lib.optionals final.stdenv.targetPlatform.isDarwin; onMusl = final.lib.optionals final.stdenv.targetPlatform.isMusl; onWindows = final.lib.optionals final.stdenv.targetPlatform.isWindows; onWindowsOrMusl = final.lib.optionals (final.stdenv.targetPlatform.isWindows || final.stdenv.targetPlatform.isMusl); @@ -260,20 +260,6 @@ in { # Fix issue loading windows dll using `.dll.a` file ++ onWindows (fromUntil "9.4" "9.12" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0001-Graft-9.10.1-linker-in.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0002-Disable-ReportMemoryMap.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0005-Also-need-RtsSymbols.h.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0006-Also-need-pathutils.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0008-Needs-linker_verbose-flag.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0009-Drop-non-existing-RtsSymbols.patch) - # ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0010-One-more-debug-flag-L.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0011-Add-ENVIRON-check.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch) - ++ onWindows (fromUntil "8.10" "8.12" ./patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch) ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { diff --git a/overlays/patches/ghc/0001-Graft-9.10.1-linker-in.patch b/overlays/patches/ghc/0001-Graft-9.10.1-linker-in.patch deleted file mode 100644 index fb36cd7f3c..0000000000 --- a/overlays/patches/ghc/0001-Graft-9.10.1-linker-in.patch +++ /dev/null @@ -1,12100 +0,0 @@ -From cbad89b70016a2f50516ae20bb306872a7f191fe Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 02:17:28 +0000 -Subject: [PATCH 01/12] Graft 9.10.1 linker in. - ---- - rts/Linker.c | 868 ++++++------ - rts/LinkerInternals.h | 295 +++-- - rts/linker/Elf.c | 731 ++++++---- - rts/linker/Elf.c.orig | 2274 ++++++++++++++++++++++++++++++++ - rts/linker/Elf.h | 6 +- - rts/linker/ElfTypes.h | 5 +- - rts/linker/InitFini.c | 201 +++ - rts/linker/InitFini.h | 23 + - rts/linker/LoadArchive.c | 44 +- - rts/linker/M32Alloc.c | 195 ++- - rts/linker/M32Alloc.h | 4 +- - rts/linker/MMap.c | 466 +++++++ - rts/linker/MMap.h | 82 ++ - rts/linker/MachO.c | 323 +++-- - rts/linker/MachO.h | 4 +- - rts/linker/PEi386.c | 1267 ++++++++++-------- - rts/linker/PEi386.c.orig | 1265 ++++++++++-------- - rts/linker/PEi386.h | 25 +- - rts/linker/PEi386Types.h | 20 +- - rts/linker/SymbolExtras.c | 15 +- - rts/linker/SymbolExtras.h | 5 +- - rts/linker/Wasm32Types.h | 9 + - rts/linker/elf_compat.h | 2 +- - rts/linker/elf_got.c | 15 +- - rts/linker/elf_plt_arm.c | 1 - - rts/linker/elf_reloc_aarch64.c | 76 +- - rts/linker/elf_tlsgd.c | 249 ++++ - rts/linker/macho/plt.c | 2 +- - 28 files changed, 6456 insertions(+), 2016 deletions(-) - create mode 100644 rts/linker/Elf.c.orig - create mode 100644 rts/linker/InitFini.c - create mode 100644 rts/linker/InitFini.h - create mode 100644 rts/linker/MMap.c - create mode 100644 rts/linker/MMap.h - create mode 100644 rts/linker/Wasm32Types.h - create mode 100644 rts/linker/elf_tlsgd.c - -diff --git a/rts/Linker.c b/rts/Linker.c -index 7a6e3b6..5b0f05a 100644 ---- a/rts/Linker.c -+++ b/rts/Linker.c -@@ -7,7 +7,7 @@ - * ---------------------------------------------------------------------------*/ - - #if 0 --#include "PosixSource.h" -+#include "rts/PosixSource.h" - #endif - - #include "Rts.h" -@@ -31,10 +31,12 @@ - #include "linker/M32Alloc.h" - #include "linker/CacheFlush.h" - #include "linker/SymbolExtras.h" -+#include "linker/MMap.h" - #include "PathUtils.h" - #include "CheckUnload.h" // createOCSectionIndices -+#include "ReportMemoryMap.h" - --#if !defined(mingw32_HOST_OS) -+#if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H) - #include "posix/Signals.h" - #endif - -@@ -51,7 +53,6 @@ - #include - #include - #include --#include - #include - - #if defined(HAVE_SYS_STAT_H) -@@ -79,9 +80,36 @@ - #if defined(dragonfly_HOST_OS) - #include - #endif -+ -+/* -+ * Note [iconv and FreeBSD] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~ -+ * -+ * On FreeBSD libc.so provides an implementation of the iconv_* family of -+ * functions. However, due to their implementation, these symbols cannot be -+ * resolved via dlsym(); rather, they can only be resolved using the -+ * explicitly-versioned dlvsym(). -+ * -+ * This is problematic for the RTS linker since we may be asked to load -+ * an object that depends upon iconv. To handle this we include a set of -+ * fallback cases for these functions, allowing us to resolve them to the -+ * symbols provided by the libc against which the RTS is linked. -+ * -+ * See #20354. -+ */ -+ -+#if defined(freebsd_HOST_OS) -+extern void iconvctl(); -+extern void iconv_open_into(); -+extern void iconv_open(); -+extern void iconv_close(); -+extern void iconv_canonicalize(); -+extern void iconv(); -+#endif -+ - /* - Note [runtime-linker-support] -- ----------------------------- -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - When adding support for a new platform to the runtime linker please - update `$TOP/configure.ac` under heading `Does target have runtime - linker support?`. -@@ -95,19 +123,19 @@ - addresses of unloaded symbols. - - Note [runtime-linker-phases] -- -------------------------------------- -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Broadly the behavior of the runtime linker can be -- split into the following four phases: -+ split into the following five phases: - - - Indexing (e.g. ocVerifyImage and ocGetNames) -- - Initialization (e.g. ocResolve and ocRunInit) -- - Resolve (e.g. resolveObjs()) -+ - Initialization (e.g. ocResolve) -+ - RunInit (e.g. ocRunInit) - - Lookup (e.g. lookupSymbol) - - This is to enable lazy loading of symbols. Eager loading is problematic - as it means that all symbols must be available, even those which we will - never use. This is especially painful on Windows, where the number of -- libraries required to link things like mingwex grows to be quite high. -+ libraries required to link things like QT or WxWidgets grows to be quite high. - - We proceed through these stages as follows, - -@@ -131,14 +159,22 @@ - - * During resolve we attempt to resolve all the symbols needed for the - initial link. This essentially means, that for any ObjectCode given -- directly to the command-line we perform lookupSymbols on the required -- symbols. lookupSymbols may trigger the loading of additional ObjectCode -- if required. -+ directly to the command-line we perform lookupSymbol on the required -+ symbols. lookupSymbol may trigger the loading of additional ObjectCode -+ if required. After resolving an object we mark its text as executable and -+ not writable. - - This phase will produce ObjectCode with status `OBJECT_RESOLVED` if - the previous status was `OBJECT_NEEDED`. - -- * lookupSymbols is used to lookup any symbols required, both during initial -+ * During RunInit we run the initializers ("constructors") of the objects -+ that are in `OBJECT_RESOLVED` state and move them to `OBJECT_READY` state. -+ This must be in a separate phase since we must ensure that all needed -+ objects have been fully resolved before we can run their initializers. -+ This is particularly tricky in the presence of cyclic dependencies (see -+ #21253). -+ -+ * lookupSymbol is used to lookup any symbols required, both during initial - link and during statement and expression compilations in the REPL. - Declaration of e.g. a foreign import, will eventually call lookupSymbol - which will either fail (symbol unknown) or succeed (and possibly trigger a -@@ -157,79 +193,25 @@ - - 1) Dependency chains, if A.o required a .o in libB but A.o isn't required to link - then we don't need to load libB. This means the dependency chain for libraries -- such as mingw32 and mingwex can be broken down. -+ such as ucrt can be broken down. - - 2) The number of duplicate symbols, since now only symbols that are - true duplicates will display the error. - */ --/*Str*/HashTable *symhash; -+StrHashTable *symhash; - - #if defined(THREADED_RTS) - /* This protects all the Linker's global state */ - Mutex linker_mutex; - #endif - --/* Generic wrapper function to try and Resolve and RunInit oc files */ --int ocTryLoad( ObjectCode* oc ); -- --/* Link objects into the lower 2Gb on x86_64 and AArch64. GHC assumes the -- * small memory model on this architecture (see gcc docs, -- * -mcmodel=small). -- * -- * MAP_32BIT not available on OpenBSD/amd64 -- */ --#if defined(MAP_32BIT) && (defined(x86_64_HOST_ARCH) || (defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH))) --#define MAP_LOW_MEM --#define TRY_MAP_32BIT MAP_32BIT --#else --#define TRY_MAP_32BIT 0 --#endif -+/* Generic wrapper function to try and resolve oc files */ -+static int ocTryLoad( ObjectCode* oc ); -+/* Run initializers */ -+static int ocRunInit( ObjectCode* oc ); -+static int runPendingInitializers (void); - --#if defined(aarch64_HOST_ARCH) --// On AArch64 MAP_32BIT is not available but we are still bound by the small --// memory model. Consequently we still try using the MAP_LOW_MEM allocation --// strategy. --#define MAP_LOW_MEM --#endif -- --/* -- * Note [MAP_LOW_MEM] -- * ~~~~~~~~~~~~~~~~~~ -- * Due to the small memory model (see above), on x86_64 and AArch64 we have to -- * map all our non-PIC object files into the low 2Gb of the address space (why -- * 2Gb and not 4Gb? Because all addresses must be reachable using a 32-bit -- * signed PC-relative offset). On x86_64 Linux we can do this using the -- * MAP_32BIT flag to mmap(), however on other OSs (e.g. *BSD, see #2063, and -- * also on Linux inside Xen, see #2512), we can't do this. So on these -- * systems, we have to pick a base address in the low 2Gb of the address space -- * and try to allocate memory from there. -- * -- * The same holds for aarch64, where the default, even with PIC, model -- * is 4GB. The linker is free to emit AARCH64_ADR_PREL_PG_HI21 -- * relocations. -- * -- * We pick a default address based on the OS, but also make this -- * configurable via an RTS flag (+RTS -xm) -- */ -- --#if (defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH)) --// Try to use stg_upd_frame_info as the base. We need to be within +-4GB of that --// address, otherwise we violate the aarch64 memory model. Any object we load --// can potentially reference any of the ones we bake into the binary (and list) --// in RtsSymbols. Thus we'll need to be within +-4GB of those, --// stg_upd_frame_info is a good candidate as it's referenced often. --#define MMAP_32BIT_BASE_DEFAULT (void*)&stg_upd_frame_info; --#elif defined(MAP_32BIT) || DEFAULT_LINKER_ALWAYS_PIC --// Try to use MAP_32BIT --#define MMAP_32BIT_BASE_DEFAULT 0 --#else --// A guess: 1Gb. --#define MMAP_32BIT_BASE_DEFAULT 0x40000000 --#endif -- --static void *mmap_32bit_base = (void *)MMAP_32BIT_BASE_DEFAULT; -- --static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key, -+static void ghciRemoveSymbolTable(StrHashTable *table, const SymbolName* key, - ObjectCode *owner) - { - RtsSymbolInfo *pinfo = lookupStrHashTable(table, key); -@@ -241,6 +223,17 @@ static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key, - stgFree(pinfo); - } - -+static const char * -+symbolTypeString (SymType type) -+{ -+ switch (type & ~(SYM_TYPE_DUP_DISCARD | SYM_TYPE_HIDDEN)) { -+ case SYM_TYPE_CODE: return "code"; -+ case SYM_TYPE_DATA: return "data"; -+ case SYM_TYPE_INDIRECT_DATA: return "indirect-data"; -+ default: barf("symbolTypeString: unknown symbol type (%d)", type); -+ } -+} -+ - /* ----------------------------------------------------------------------------- - * Insert symbols into hash tables, checking for duplicates. - * -@@ -248,7 +241,7 @@ static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key, - */ - /* - Note [weak-symbols-support] -- ------------------------------------- -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - While ghciInsertSymbolTable does implement extensive - logic for weak symbol support, weak symbols are not currently - fully supported by the RTS. This code is mostly here for COMDAT -@@ -264,34 +257,64 @@ static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key, - */ - int ghciInsertSymbolTable( - pathchar* obj_name, -- HashTable *table, -+ StrHashTable *table, - const SymbolName* key, - SymbolAddr* data, -- int flags, -+ SymStrength strength, -+ SymType type, - ObjectCode *owner) - { -- HsBool weak = flags & 1; -- HsBool hidden = flags & 2; -- - RtsSymbolInfo *pinfo = lookupStrHashTable(table, key); - if (!pinfo) /* new entry */ - { - pinfo = stgMallocBytes(sizeof (*pinfo), "ghciInsertToSymbolTable"); - pinfo->value = data; - pinfo->owner = owner; -- pinfo->weak = weak; -- pinfo->hidden = hidden; -+ pinfo->strength = strength; -+ pinfo->type = type; - insertStrHashTable(table, key, pinfo); - return 1; - } -- else if (weak && data && pinfo->weak && !pinfo->value) -+ else if (pinfo->type ^ type) -+ { -+ if(pinfo->type & SYM_TYPE_HIDDEN) -+ { -+ /* The existing symbol is hidden, let's replace it */ -+ pinfo->value = data; -+ pinfo->owner = owner; -+ pinfo->strength = strength; -+ pinfo->type = type; -+ return 1; -+ } -+ /* We were asked to discard the symbol on duplicates, do so quietly. */ -+ if (!(type & (SYM_TYPE_DUP_DISCARD | SYM_TYPE_HIDDEN))) -+ { -+ debugBelch("Symbol type mismatch (existing %d, new %d).\n", pinfo->type, type); -+ debugBelch("Symbol %s was defined by %" PATH_FMT " to be a %s symbol.\n", -+ key, obj_name, symbolTypeString(type)); -+ debugBelch(" yet was defined by %" PATH_FMT " to be a %s symbol.\n", -+ pinfo->owner ? pinfo->owner->fileName : WSTR(""), -+ symbolTypeString(pinfo->type)); -+ } -+ return 1; -+ } -+ else if (pinfo->strength == STRENGTH_STRONG) -+ { -+ /* The existing symbol is strong meaning we must never override it */ -+ IF_DEBUG(linker, debugBelch("%s is already defined as a strong symbol; ignoring redefinition...", key)); -+ return 1; -+ } -+ else if (strength == STRENGTH_WEAK && -+ data && -+ pinfo->strength == STRENGTH_WEAK && -+ !pinfo->value) - { - /* The existing symbol is weak with a zero value; replace it with the new symbol. */ - pinfo->value = data; - pinfo->owner = owner; - return 1; - } -- else if (weak) -+ else if (strength == STRENGTH_WEAK) - { - return 1; /* weak symbol, because the symbol is weak, data = 0 and we - already know of another copy throw this one away. -@@ -301,15 +324,16 @@ int ghciInsertSymbolTable( - This also preserves the semantics of linking against - the first symbol we find. */ - } -- else if (pinfo->weak && !weak) /* weak symbol is in the table */ -+ else if (pinfo->strength == STRENGTH_WEAK && strength != STRENGTH_WEAK) /* weak symbol is in the table */ - { - /* override the weak definition with the non-weak one */ - pinfo->value = data; - pinfo->owner = owner; -- pinfo->weak = HS_BOOL_FALSE; -+ pinfo->strength = strength; - return 1; - } - else if ( pinfo->owner -+ && pinfo->owner->status != OBJECT_READY - && pinfo->owner->status != OBJECT_RESOLVED - && pinfo->owner->status != OBJECT_NEEDED) - { -@@ -324,10 +348,12 @@ int ghciInsertSymbolTable( - This is essentially emulating the behavior of a linker wherein it will always - link in object files that are .o file arguments, but only take object files - from archives as needed. */ -- if (owner && (owner->status == OBJECT_NEEDED || owner->status == OBJECT_RESOLVED)) { -+ if (owner && (owner->status == OBJECT_NEEDED -+ || owner->status == OBJECT_RESOLVED -+ || owner->status == OBJECT_READY)) { - pinfo->value = data; - pinfo->owner = owner; -- pinfo->weak = weak; -+ pinfo->strength = strength; - } - - return 1; -@@ -344,22 +370,10 @@ int ghciInsertSymbolTable( - call this function again to trigger the duplicate error. */ - return 1; - } -- else if(pinfo->hidden && !hidden) -- { -- /* The existing symbol is hidden, let's replace it */ -- pinfo->value = data; -- pinfo->owner = owner; -- pinfo->weak = weak; - -- pinfo->hidden = hidden; -- return 1; -- } -- pathchar* archiveName = NULL; - debugBelch( - "GHC runtime linker: fatal error: I found a duplicate definition for symbol\n" - " %s\n" -- " new symbol is hidden: %d\n" -- " old symbol is hidden: %d\n" - "whilst processing object file\n" - " %" PATH_FMT "\n" - "The symbol was previously defined in\n" -@@ -370,19 +384,12 @@ int ghciInsertSymbolTable( - " * An incorrect `package.conf' entry, causing some object to be\n" - " loaded twice.\n", - (char*)key, -- hidden ? 1 : 0, -- pinfo->hidden ? 1 : 0, - obj_name, - pinfo->owner == NULL ? WSTR("(GHCi built-in symbols)") : -- pinfo->owner->archiveMemberName ? archiveName = mkPath(pinfo->owner->archiveMemberName) -+ pinfo->owner->archiveMemberName ? pinfo->owner->archiveMemberName - : pinfo->owner->fileName - ); - -- if (archiveName) -- { -- stgFree(archiveName); -- archiveName = NULL; -- } - return 0; - } - -@@ -392,7 +399,7 @@ int ghciInsertSymbolTable( - * Returns: 0 on failure and result is not set, - * nonzero on success and result set to nonzero pointer - */ --HsBool ghciLookupSymbolInfo(HashTable *table, -+HsBool ghciLookupSymbolInfo(StrHashTable *table, - const SymbolName* key, RtsSymbolInfo **result) - { - RtsSymbolInfo *pinfo = lookupStrHashTable(table, key); -@@ -400,10 +407,11 @@ HsBool ghciLookupSymbolInfo(HashTable *table, - *result = NULL; - return HS_BOOL_FALSE; - } -- if (pinfo->weak) -+ if (pinfo->strength == STRENGTH_WEAK) { - IF_DEBUG(linker, debugBelch("lookupSymbolInfo: promoting %s\n", key)); -- /* Once it's looked up, it can no longer be overridden */ -- pinfo->weak = HS_BOOL_FALSE; -+ /* Once it's looked up, it can no longer be overridden */ -+ pinfo->strength = STRENGTH_NORMAL; -+ } - - *result = pinfo; - return HS_BOOL_TRUE; -@@ -421,7 +429,7 @@ static void *dl_prog_handle; - static regex_t re_invalid; - static regex_t re_realso; - #if defined(THREADED_RTS) --static Mutex dl_mutex; // mutex to protect dlopen/dlerror critical section -+Mutex dl_mutex; // mutex to protect dlopen/dlerror critical section - #endif - #endif - -@@ -436,7 +444,6 @@ void initLinker (void) - void - initLinker_ (int retain_cafs) - { -- RtsSymbolVal *sym; - #if defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO) - int compileResult; - #endif -@@ -465,30 +472,20 @@ initLinker_ (int retain_cafs) - symhash = allocStrHashTable(); - - /* populate the symbol table with stuff from the RTS */ -- for (sym = rtsSyms; sym->lbl != NULL; sym++) { -+ for (const RtsSymbolVal *sym = rtsSyms; sym->lbl != NULL; sym++) { - if (! ghciInsertSymbolTable(WSTR("(GHCi built-in symbols)"), - symhash, sym->lbl, sym->addr, -- sym->weak | (HS_BOOL_FALSE << 1), NULL)) { -+ sym->strength, sym->type, NULL)) { - barf("ghciInsertSymbolTable failed"); - } - IF_DEBUG(linker, debugBelch("initLinker: inserting rts symbol %s, %p\n", sym->lbl, sym->addr)); - } - -- /* GCC defines a special symbol __dso_handle which is resolved to NULL if -- referenced from a statically linked module. We need to mimic this, but -- we cannot use NULL because we use it to mean nonexistent symbols. So we -- use an arbitrary (hopefully unique) address here. -- */ -- if (! ghciInsertSymbolTable(WSTR("(GHCi special symbols)"), -- symhash, "__dso_handle", (void *)0x12345687, HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), NULL)) { -- barf("ghciInsertSymbolTable failed"); -- } -- - // Redirect newCAF to newRetainedCAF if retain_cafs is true. - if (! ghciInsertSymbolTable(WSTR("(GHCi built-in symbols)"), symhash, - MAYBE_LEADING_UNDERSCORE_STR("newCAF"), - retain_cafs ? newRetainedCAF : newGCdCAF, -- HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), NULL)) { -+ HS_BOOL_FALSE, SYM_TYPE_CODE, NULL)) { - barf("ghciInsertSymbolTable failed"); - } - -@@ -538,7 +535,7 @@ exitLinker( void ) { - } - #endif - if (linker_init_done == 1) { -- freeHashTable(symhash, free); -+ freeStrHashTable(symhash, free); - exitUnloadCheck(); - } - #if defined(THREADED_RTS) -@@ -610,8 +607,27 @@ internal_dlopen(const char *dll_name) - // (see POSIX also) - - ACQUIRE_LOCK(&dl_mutex); -+ -+ // When dlopen() loads a profiled dynamic library, it calls the -+ // ctors which will call registerCcsList() to append the defined -+ // CostCentreStacks to CCS_LIST. This execution path starting from -+ // addDLL() was only protected by dl_mutex previously. However, -+ // another thread may be doing other things with the RTS linker -+ // that transitively calls refreshProfilingCCSs() which also -+ // accesses CCS_LIST, and those execution paths are protected by -+ // linker_mutex. So there's a risk of data race that may lead to -+ // segfaults (#24423), and we need to ensure the ctors are also -+ // protected by ccs_mutex. -+#if defined(PROFILING) -+ ACQUIRE_LOCK(&ccs_mutex); -+#endif -+ - hdl = dlopen(dll_name, RTLD_LAZY|RTLD_LOCAL); /* see Note [RTLD_LOCAL] */ - -+#if defined(PROFILING) -+ RELEASE_LOCK(&ccs_mutex); -+#endif -+ - errmsg = NULL; - if (hdl == NULL) { - /* dlopen failed; return a ptr to the error msg. */ -@@ -635,7 +651,7 @@ internal_dlopen(const char *dll_name) - - /* - Note [RTLD_LOCAL] -- -+ ~~~~~~~~~~~~~~~~~ - In GHCi we want to be able to override previous .so's with newly - loaded .so's when we recompile something. This further implies that - when we look up a symbol in internal_dlsym() we have to iterate -@@ -680,6 +696,10 @@ internal_dlsym(const char *symbol) { - } - RELEASE_LOCK(&dl_mutex); - -+ IF_DEBUG(linker, debugBelch("internal_dlsym: looking for symbol '%s' in special cases\n", symbol)); -+# define SPECIAL_SYMBOL(sym) \ -+ if (strcmp(symbol, #sym) == 0) return (void*)&sym; -+ - # if defined(HAVE_SYS_STAT_H) && defined(linux_HOST_OS) && defined(__GLIBC__) - // HACK: GLIBC implements these functions with a great deal of trickery where - // they are either inlined at compile time to their corresponding -@@ -689,18 +709,28 @@ internal_dlsym(const char *symbol) { - // We borrow the approach that the LLVM JIT uses to resolve these - // symbols. See http://llvm.org/PR274 and #7072 for more info. - -- IF_DEBUG(linker, debugBelch("internal_dlsym: looking for symbol '%s' in GLIBC special cases\n", symbol)); -+ SPECIAL_SYMBOL(stat); -+ SPECIAL_SYMBOL(fstat); -+ SPECIAL_SYMBOL(lstat); -+ SPECIAL_SYMBOL(stat64); -+ SPECIAL_SYMBOL(fstat64); -+ SPECIAL_SYMBOL(lstat64); -+ SPECIAL_SYMBOL(atexit); -+ SPECIAL_SYMBOL(mknod); -+# endif - -- if (strcmp(symbol, "stat") == 0) return (void*)&stat; -- if (strcmp(symbol, "fstat") == 0) return (void*)&fstat; -- if (strcmp(symbol, "lstat") == 0) return (void*)&lstat; -- if (strcmp(symbol, "stat64") == 0) return (void*)&stat64; -- if (strcmp(symbol, "fstat64") == 0) return (void*)&fstat64; -- if (strcmp(symbol, "lstat64") == 0) return (void*)&lstat64; -- if (strcmp(symbol, "atexit") == 0) return (void*)&atexit; -- if (strcmp(symbol, "mknod") == 0) return (void*)&mknod; -+ // See Note [iconv and FreeBSD] -+# if defined(freebsd_HOST_OS) -+ SPECIAL_SYMBOL(iconvctl); -+ SPECIAL_SYMBOL(iconv_open_into); -+ SPECIAL_SYMBOL(iconv_open); -+ SPECIAL_SYMBOL(iconv_close); -+ SPECIAL_SYMBOL(iconv_canonicalize); -+ SPECIAL_SYMBOL(iconv); - # endif - -+#undef SPECIAL_SYMBOL -+ - // we failed to find the symbol - return NULL; - } -@@ -752,7 +782,7 @@ addDLL( pathchar *dll_name ) - MAXLINE-1); - strncpy(line, (errmsg+(match[1].rm_so)),match_length); - line[match_length] = '\0'; // make sure string is null-terminated -- IF_DEBUG(linker, debugBelch ("file name = '%s'\n", line)); -+ IF_DEBUG(linker, debugBelch("file name = '%s'\n", line)); - if ((fp = __rts_fopen(line, "r")) == NULL) { - return errmsg; // return original error if open fails - } -@@ -855,14 +885,14 @@ HsBool removeLibrarySearchPath(HsPtr dll_path_index) - } - - /* ----------------------------------------------------------------------------- -- * insert a symbol in the hash table -+ * insert a code symbol in the hash table - * -- * Returns: 0 on failure, nozero on success -+ * Returns: 0 on failure, nonzero on success - */ - HsInt insertSymbol(pathchar* obj_name, SymbolName* key, SymbolAddr* data) - { -- return ghciInsertSymbolTable(obj_name, symhash, key, data, -- HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), NULL); -+ return ghciInsertSymbolTable(obj_name, symhash, key, data, HS_BOOL_FALSE, -+ SYM_TYPE_CODE, NULL); - } - - /* ----------------------------------------------------------------------------- -@@ -872,28 +902,64 @@ HsInt insertSymbol(pathchar* obj_name, SymbolName* key, SymbolAddr* data) - * symbol. - */ - #if defined(OBJFORMAT_PEi386) --SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent) -+SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymType *type) - { -- (void)dependent; // TODO - ASSERT_LOCK_HELD(&linker_mutex); -- return lookupSymbol_PEi386(lbl); -+ return lookupSymbol_PEi386(lbl, dependent, type); - } - - #else - --SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent) -+SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymType *type) - { - ASSERT_LOCK_HELD(&linker_mutex); -- IF_DEBUG(linker, debugBelch("lookupSymbol: looking up '%s'\n", lbl)); -+ IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: looking up '%s'\n", lbl)); - - ASSERT(symhash != NULL); - RtsSymbolInfo *pinfo; - -+ /* See Note [Resolving __dso_handle] */ -+ if (strcmp(lbl, MAYBE_LEADING_UNDERSCORE_STR("__dso_handle")) == 0) { -+ if (dependent) { -+ return dependent->image; -+ } else { -+ // In the case that we don't know which object the reference lives -+ // in we return a random symbol from the executable image. -+ return &lookupDependentSymbol; -+ } -+ } -+ if (strcmp(lbl, MAYBE_LEADING_UNDERSCORE_STR("__cxa_atexit")) == 0 && dependent) { -+ dependent->cxa_finalize = (cxa_finalize_fn) lookupDependentSymbol( -+ MAYBE_LEADING_UNDERSCORE_STR("__cxa_finalize"), -+ dependent, -+ NULL); -+ } -+ - if (!ghciLookupSymbolInfo(symhash, lbl, &pinfo)) { -- IF_DEBUG(linker, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl)); -+ IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl)); - - # if defined(OBJFORMAT_ELF) -- return internal_dlsym(lbl); -+ SymbolAddr *ret = internal_dlsym(lbl); -+ if (type) { -+ // We assume that the symbol is code since this is usually the case -+ // and dlsym doesn't tell us. -+ *type = SYM_TYPE_CODE; -+ } -+ -+ // Generally the dynamic linker would define _DYNAMIC, which is -+ // supposed to point to various bits of dynamic linker state (see -+ // [1]). However, if dynamic linking isn't supported (e.g. in the case -+ // of musl) then we can safely declare that it is NULL. -+ // -+ // [1] https://wiki.gentoo.org/wiki/Hardened/Introduction_to_Position_Independent_Code -+ if (ret == NULL && strcmp(lbl, "_DYNAMIC") == 0) { -+ static void *RTS_DYNAMIC = NULL; -+ ret = (SymbolAddr *) &RTS_DYNAMIC; -+ if (type) { -+ *type = SYM_TYPE_DATA; -+ } -+ } -+ return ret; - # elif defined(OBJFORMAT_MACHO) - - /* HACK: On OS X, all symbols are prefixed with an underscore. -@@ -904,14 +970,28 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent) - */ - IF_DEBUG(linker, debugBelch("lookupSymbol: looking up %s with dlsym\n", - lbl)); -- ASSERT(lbl[0] == '_'); -+ CHECK(lbl[0] == '_'); -+ if (type) { -+ // We assume that the symbol is code since this is usually the case -+ // and dlsym doesn't tell us. -+ *type = SYM_TYPE_CODE; -+ } - return internal_dlsym(lbl + 1); - --# else -- ASSERT(false); -+# elif defined(OBJFORMAT_WASM32) - return NULL; -+# else -+# error No OBJFORMAT_* macro set - # endif - } else { -+ static void *RTS_NO_FINI = NULL; -+ if (strcmp(lbl, "__fini_array_end") == 0) { return (SymbolAddr *) &RTS_NO_FINI; } -+ if (strcmp(lbl, "__fini_array_start") == 0) { return (SymbolAddr *) &RTS_NO_FINI; } -+ if (type) { -+ // This is an assumption -+ *type = pinfo->type; -+ } -+ - if (dependent) { - // Add dependent as symbol's owner's dependency - ObjectCode *owner = pinfo->owner; -@@ -925,13 +1005,37 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent) - } - #endif /* OBJFORMAT_PEi386 */ - -+/* Note [Resolving __dso_handle] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * This symbol, which is defined by the C++ ABI, would typically be defined by -+ * the system's dynamic linker to act as a "handle", identifying a particular -+ * loaded dynamic object to the C++ standard library for the purpose of running -+ * destructors on unload. Here we behave the same way that the dynamic linker -+ * would, using some address (here the start address) of the loaded object as -+ * its handle. -+ * -+ * Note that references to __dso_handle may be relocated using -+ * relocations of bounded displacement and therefore __dso_handle must not be -+ * too far from the loaded object's code (hence using its start address). -+ * -+ * Finally, when we see a reference to __cxa_atexit in an object we take care -+ * to lookup and record the address of __cxa_finalize (largely to ensure that -+ * the symbol dependency is recorded) and call it with the appropriate handle -+ * when the object is unloaded. -+ * -+ * See #20493. -+ * See section 3.3.5 of the Itanium C++ ABI, version 1.83. -+ */ -+ - /* - * Load and relocate the object code for a symbol as necessary. - * Symbol name only used for diagnostics output. - */ - SymbolAddr* loadSymbol(SymbolName *lbl, RtsSymbolInfo *pinfo) { -- IF_DEBUG(linker, debugBelch("lookupSymbol: value of %s is %p\n", lbl, -- pinfo->value)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("lookupSymbol: value of %s is %p, owned by %" PATH_FMT "\n", lbl, -+ pinfo->value, -+ pinfo->owner ? OC_INFORMATIVE_FILENAME(pinfo->owner) : WSTR("No owner, probably built-in."))); - ObjectCode* oc = pinfo->owner; - - /* Symbol can be found during linking, but hasn't been relocated. Do so now. -@@ -944,26 +1048,48 @@ SymbolAddr* loadSymbol(SymbolName *lbl, RtsSymbolInfo *pinfo) { - if (!r) { - return NULL; - } -- --#if defined(PROFILING) -- // collect any new cost centres & CCSs -- // that were defined during runInit -- refreshProfilingCCSs(); --#endif - } - - return pinfo->value; - } - -+void -+printLoadedObjects(void) { -+ ObjectCode* oc; -+ for (oc = objects; oc; oc = oc->next) { -+ if (oc->sections != NULL) { -+ int i; -+ printf("%" PATH_FMT "\n", OC_INFORMATIVE_FILENAME(oc)); -+ for (i=0; i < oc->n_sections; i++) { -+ if(oc->sections[i].mapped_start != NULL || oc->sections[i].start != NULL) { -+ printf("\tsec %2d[alloc: %d; kind: %d]: %p - %p; mmaped: %p - %p\n", -+ i, oc->sections[i].alloc, oc->sections[i].kind, -+ oc->sections[i].start, -+ (void*)((uintptr_t)(oc->sections[i].start) + oc->sections[i].size), -+ oc->sections[i].mapped_start, -+ (void*)((uintptr_t)(oc->sections[i].mapped_start) + oc->sections[i].mapped_size)); -+ } -+ } -+ } -+ } -+} -+ - SymbolAddr* lookupSymbol( SymbolName* lbl ) - { - ACQUIRE_LOCK(&linker_mutex); -- SymbolAddr* r = lookupDependentSymbol(lbl, NULL); -+ // NULL for "don't add dependent". When adding a dependency we call -+ // lookupDependentSymbol directly. -+ SymbolAddr* r = lookupDependentSymbol(lbl, NULL, NULL); - if (!r) { - errorBelch("^^ Could not load '%s', dependency unresolved. " - "See top entry above.\n", lbl); -+ IF_DEBUG(linker, printLoadedObjects()); - fflush(stderr); - } -+ -+ if (!runPendingInitializers()) { -+ errorBelch("lookupSymbol: Failed to run initializers."); -+ } - RELEASE_LOCK(&linker_mutex); - return r; - } -@@ -1020,173 +1146,6 @@ resolveSymbolAddr (pathchar* buffer, int size, - #endif /* OBJFORMAT_PEi386 */ - } - --#if RTS_LINKER_USE_MMAP --// --// Returns NULL on failure. --// --void * --mmapForLinker (size_t bytes, uint32_t prot, uint32_t flags, int fd, int offset) --{ -- void *map_addr = NULL; -- void *result; -- size_t size; -- uint32_t tryMap32Bit = RtsFlags.MiscFlags.linkerAlwaysPic -- ? 0 -- : TRY_MAP_32BIT; -- static uint32_t fixed = 0; -- -- IF_DEBUG(linker, debugBelch("mmapForLinker: start\n")); -- size = roundUpToPage(bytes); -- --#if defined(MAP_LOW_MEM) --mmap_again: --#endif -- -- if (mmap_32bit_base != 0) { -- map_addr = mmap_32bit_base; -- } -- -- IF_DEBUG(linker, -- debugBelch("mmapForLinker: \tprotection %#0x\n", prot)); -- IF_DEBUG(linker, -- debugBelch("mmapForLinker: \tflags %#0x\n", -- MAP_PRIVATE | tryMap32Bit | fixed | flags)); -- -- result = mmap(map_addr, size, prot, -- MAP_PRIVATE|tryMap32Bit|fixed|flags, fd, offset); -- -- if (result == MAP_FAILED) { -- sysErrorBelch("mmap %" FMT_Word " bytes at %p",(W_)size,map_addr); -- errorBelch("Try specifying an address with +RTS -xm -RTS"); -- return NULL; -- } -- --#if defined(MAP_LOW_MEM) -- if (RtsFlags.MiscFlags.linkerAlwaysPic) { -- } else if (mmap_32bit_base != 0) { -- if (result == map_addr) { -- mmap_32bit_base = (StgWord8*)map_addr + size; -- } else { -- if ((W_)result > 0x80000000) { -- // oops, we were given memory over 2Gb -- munmap(result,size); --#if defined(freebsd_HOST_OS) || \ -- defined(kfreebsdgnu_HOST_OS) || \ -- defined(dragonfly_HOST_OS) -- // Some platforms require MAP_FIXED. This is normally -- // a bad idea, because MAP_FIXED will overwrite -- // existing mappings. -- fixed = MAP_FIXED; -- goto mmap_again; --#else -- errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " -- "asked for %lu bytes at %p. " -- "Try specifying an address with +RTS -xm -RTS", -- size, map_addr); -- return NULL; --#endif -- } else { -- // hmm, we were given memory somewhere else, but it's -- // still under 2Gb so we can use it. Next time, ask -- // for memory right after the place we just got some -- mmap_32bit_base = (StgWord8*)result + size; -- } -- } -- } else { -- if ((W_)result > 0x80000000) { -- // oops, we were given memory over 2Gb -- // ... try allocating memory somewhere else?; -- debugTrace(DEBUG_linker, -- "MAP_32BIT didn't work; gave us %lu bytes at 0x%p", -- bytes, result); -- munmap(result, size); -- -- // Set a base address and try again... (guess: 1Gb) -- mmap_32bit_base = (void*)0x40000000; -- goto mmap_again; -- } -- } --#elif (defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH)) -- // for aarch64 we need to make sure we stay within 4GB of the -- // mmap_32bit_base, and we also do not want to update it. --// if (mmap_32bit_base != (void*)&stg_upd_frame_info) { -- if (result == map_addr) { -- mmap_32bit_base = (void*)((uintptr_t)map_addr + size); -- } else { -- // upper limit 4GB - size of the object file - 1mb wiggle room. -- if(llabs((uintptr_t)result - (uintptr_t)&stg_upd_frame_info) > (2<<32) - size - (2<<20)) { -- // not within range :( -- debugTrace(DEBUG_linker, -- "MAP_32BIT didn't work; gave us %lu bytes at 0x%p", -- bytes, result); -- munmap(result, size); -- // TODO: some abort/mmap_32bit_base recomputation based on -- // if mmap_32bit_base is changed, or still at stg_upd_frame_info -- goto mmap_again; -- } else { -- mmap_32bit_base = (void*)((uintptr_t)result + size); -- } -- } --// } --#endif -- -- IF_DEBUG(linker, -- debugBelch("mmapForLinker: mapped %" FMT_Word -- " bytes starting at %p\n", (W_)size, result)); -- IF_DEBUG(linker, -- debugBelch("mmapForLinker: done\n")); -- -- return result; --} -- --/* -- * Map read/write pages in low memory. Returns NULL on failure. -- */ --void * --mmapAnonForLinker (size_t bytes) --{ -- return mmapForLinker (bytes, PROT_READ|PROT_WRITE, MAP_ANONYMOUS, -1, 0); --} -- -- --/* Note [Memory protection in the linker] -- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- * For many years the linker would simply map all of its memory -- * with PROT_READ|PROT_WRITE|PROT_EXEC. However operating systems have been -- * becoming increasingly reluctant to accept this practice (e.g. #17353, -- * #12657) and for good reason: writable code is ripe for exploitation. -- * -- * Consequently mmapForLinker now maps its memory with PROT_READ|PROT_WRITE. -- * After the linker has finished filling/relocating the mapping it must then -- * call mmapForLinkerMarkExecutable on the sections of the mapping which -- * contain executable code. -- * -- * Note that the m32 allocator handles protection of its allocations. For this -- * reason the caller to m32_alloc() must tell the allocator whether the -- * allocation needs to be executable. The caller must then ensure that they -- * call m32_flush() after they are finished filling the region, which will -- * cause the allocator to change the protection bits to PROT_READ|PROT_EXEC. -- * -- */ -- --/* -- * Mark an portion of a mapping previously reserved by mmapForLinker -- * as executable (but not writable). -- */ --void mmapForLinkerMarkExecutable(void *start, size_t len) --{ -- IF_DEBUG(linker, -- debugBelch("mmapForLinkerMarkExecutable: protecting %" FMT_Word -- " bytes starting at %p\n", (W_)len, start)); -- if (len == 0) { -- return; -- } -- if (mprotect(start, len, PROT_READ|PROT_EXEC) == -1) { -- barf("mmapForLinkerMarkExecutable: mprotect: %s\n", strerror(errno)); -- } --} --#endif -- - /* - * Remove symbols from the symbol table, and free oc->symbols. - * This operation is idempotent. -@@ -1237,7 +1196,7 @@ freePreloadObjectFile (ObjectCode *oc) - #else - - if (RTS_LINKER_USE_MMAP && oc->imageMapped) { -- munmap(oc->image, oc->fileSize); -+ munmapForLinker(oc->image, oc->fileSize, "freePreloadObjectFile"); - } - else { - stgFree(oc->image); -@@ -1256,6 +1215,37 @@ freePreloadObjectFile (ObjectCode *oc) - */ - void freeObjectCode (ObjectCode *oc) - { -+ IF_DEBUG(linker, ocDebugBelch(oc, "start\n")); -+ -+ // Run finalizers -+ if (oc->type == STATIC_OBJECT && -+ (oc->status == OBJECT_READY || oc->status == OBJECT_UNLOADED)) { -+ // Only run finalizers if the initializers have also been run, which -+ // happens when we resolve the object. -+#if defined(OBJFORMAT_ELF) -+ ocRunFini_ELF(oc); -+#elif defined(OBJFORMAT_PEi386) -+ ocRunFini_PEi386(oc); -+#elif defined(OBJFORMAT_MACHO) -+ ocRunFini_MachO(oc); -+#endif -+ } -+ -+ // See Note [Resolving __dso_handle] -+ if (oc->cxa_finalize) { -+ oc->cxa_finalize(oc->image); -+ } -+ -+ if (oc->type == DYNAMIC_OBJECT) { -+#if defined(OBJFORMAT_ELF) -+ ACQUIRE_LOCK(&dl_mutex); -+ freeNativeCode_ELF(oc); -+ RELEASE_LOCK(&dl_mutex); -+#else -+ barf("freeObjectCode: This shouldn't happen"); -+#endif -+ } -+ - freePreloadObjectFile(oc); - - if (oc->symbols != NULL) { -@@ -1264,7 +1254,7 @@ void freeObjectCode (ObjectCode *oc) - } - - if (oc->extraInfos != NULL) { -- freeHashTable(oc->extraInfos, NULL); -+ freeStrHashTable(oc->extraInfos, NULL); - oc->extraInfos = NULL; - } - -@@ -1275,14 +1265,13 @@ void freeObjectCode (ObjectCode *oc) - switch(oc->sections[i].alloc){ - #if RTS_LINKER_USE_MMAP - case SECTION_MMAP: -- munmap(oc->sections[i].mapped_start, -- oc->sections[i].mapped_size); -+ munmapForLinker( -+ oc->sections[i].mapped_start, -+ oc->sections[i].mapped_size, -+ "freeObjectCode"); - break; - #endif - case SECTION_M32: -- IF_DEBUG(zero_on_gc, -- memset(oc->sections[i].start, -- 0x00, oc->sections[i].size)); - // Freed by m32_allocator_free - break; - case SECTION_MALLOC: -@@ -1341,14 +1330,16 @@ void freeObjectCode (ObjectCode *oc) - } - - ObjectCode* --mkOc( pathchar *path, char *image, int imageSize, -- bool mapped, char *archiveMemberName, int misalignment ) { -+mkOc( ObjectType type, pathchar *path, char *image, int imageSize, -+ bool mapped, pathchar *archiveMemberName, int misalignment ) { - ObjectCode* oc; - -- IF_DEBUG(linker, debugBelch("mkOc: start\n")); -+ -+ IF_DEBUG(linker, debugBelch("mkOc: %" PATH_FMT "\n", path)); - oc = stgMallocBytes(sizeof(ObjectCode), "mkOc(oc)"); - - oc->info = NULL; -+ oc->type = type; - - # if defined(OBJFORMAT_ELF) - oc->formatName = "ELF"; -@@ -1365,9 +1356,9 @@ mkOc( pathchar *path, char *image, int imageSize, - oc->fileName = pathdup(path); - - if (archiveMemberName) { -- oc->archiveMemberName = stgMallocBytes( strlen(archiveMemberName)+1, -+ oc->archiveMemberName = stgMallocBytes( (pathlen(archiveMemberName)+1) * pathsize, - "loadObj" ); -- strcpy(oc->archiveMemberName, archiveMemberName); -+ pathcopy(oc->archiveMemberName, archiveMemberName); - } else { - oc->archiveMemberName = NULL; - } -@@ -1379,6 +1370,7 @@ mkOc( pathchar *path, char *image, int imageSize, - } - - oc->fileSize = imageSize; -+ oc->n_symbols = 0; - oc->symbols = NULL; - oc->n_sections = 0; - oc->sections = NULL; -@@ -1394,6 +1386,7 @@ mkOc( pathchar *path, char *image, int imageSize, - oc->imageMapped = mapped; - - oc->misalignment = misalignment; -+ oc->cxa_finalize = NULL; - oc->extraInfos = NULL; - - /* chain it onto the list of objects */ -@@ -1401,6 +1394,8 @@ mkOc( pathchar *path, char *image, int imageSize, - oc->prev = NULL; - oc->next_loaded_object = NULL; - oc->mark = object_code_mark_bit; -+ /* this will get cleared by the caller if object is not safely unloadable */ -+ oc->unloadable = true; - oc->dependencies = allocHashSet(); - - #if defined(NEED_M32) -@@ -1408,7 +1403,13 @@ mkOc( pathchar *path, char *image, int imageSize, - oc->rx_m32 = m32_allocator_new(true); - #endif - -- IF_DEBUG(linker, debugBelch("mkOc: done\n")); -+#if defined(OBJFORMAT_ELF) && defined(SHN_XINDEX) -+ oc->shndx_table = SHNDX_TABLE_UNINIT; -+#endif -+ -+ oc->nc_ranges = NULL; -+ oc->dlopen_handle = NULL; -+ - return oc; - } - -@@ -1477,11 +1478,10 @@ preloadObjectFile (pathchar *path) - * - * See also the misalignment logic for darwin below. - */ --#if defined(darwin_HOST_OS) -- image = mmapForLinker(fileSize, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); -+#if defined(darwin_HOST_OS) || defined(openbsd_HOST_OS) -+ image = mmapForLinker(fileSize, MEM_READ_WRITE, MAP_PRIVATE, fd, 0); - #else -- image = mmapForLinker(fileSize, PROT_READ|PROT_WRITE|PROT_EXEC, -- MAP_PRIVATE, fd, 0); -+ image = mmapForLinker(fileSize, MEM_READ_WRITE_EXECUTE, MAP_PRIVATE, fd, 0); - #endif - - if (image == MAP_FAILED) { -@@ -1520,7 +1520,7 @@ preloadObjectFile (pathchar *path) - - image = stgMallocBytes(fileSize, "loadObj(image)"); - --#endif -+#endif /* !defined(darwin_HOST_OS) */ - - int n; - n = fread ( image, 1, fileSize, f ); -@@ -1536,7 +1536,7 @@ preloadObjectFile (pathchar *path) - IF_DEBUG(linker, debugBelch("loadObj: preloaded image at %p\n", (void *) image)); - - /* FIXME (AP): =mapped= parameter unconditionally set to true */ -- oc = mkOc(path, image, fileSize, true, NULL, misalignment); -+ oc = mkOc(STATIC_OBJECT, path, image, fileSize, true, NULL, misalignment); - - #if defined(OBJFORMAT_MACHO) - if (ocVerifyImage_MachO( oc )) -@@ -1565,6 +1565,17 @@ static HsInt loadObj_ (pathchar *path) - return 1; // success - } - -+ // Things that look like object files (e.g. end in `.o`) may nevertheless be -+ // archives, as noted in Note [Object merging] in GHC.Driver.Pipeline.Execute. -+ if (isArchive(path)) { -+ if (loadArchive_(path)) { -+ return 1; // success -+ } else { -+ IF_DEBUG(linker, -+ debugBelch("tried and failed to load %" PATH_FMT " as an archive\n", path)); -+ } -+ } -+ - ObjectCode *oc = preloadObjectFile(path); - if (oc == NULL) return 0; - -@@ -1595,7 +1606,7 @@ HsInt loadOc (ObjectCode* oc) - { - int r; - -- IF_DEBUG(linker, debugBelch("loadOc: start\n")); -+ IF_DEBUG(linker, ocDebugBelch(oc, "start\n")); - - /* verify the in-memory image */ - # if defined(OBJFORMAT_ELF) -@@ -1608,11 +1619,12 @@ HsInt loadOc (ObjectCode* oc) - barf("loadObj: no verify method"); - # endif - if (!r) { -- IF_DEBUG(linker, debugBelch("loadOc: ocVerifyImage_* failed\n")); -+ IF_DEBUG(linker, ocDebugBelch(oc, "ocVerifyImage_* failed\n")); - return r; - } - - /* Note [loadOc orderings] -+ ~~~~~~~~~~~~~~~~~~~~~~~ - The order of `ocAllocateExtras` and `ocGetNames` matters. For MachO - and ELF, `ocInit` and `ocGetNames` initialize a bunch of pointers based - on the offset to `oc->image`, but `ocAllocateExtras` may relocate -@@ -1625,8 +1637,7 @@ HsInt loadOc (ObjectCode* oc) - symbol table. Allocating space for jump tables in ocAllocateExtras - would just be a waste then as we'll be stopping further processing of the - library in the next few steps. If necessary, the actual allocation -- happens in `ocGetNames_PEi386` and `ocAllocateExtras_PEi386` simply -- set the correct pointers. -+ happens in `ocGetNames_PEi386` simply set the correct pointers. - */ - - #if defined(NEED_SYMBOL_EXTRAS) -@@ -1634,14 +1645,14 @@ HsInt loadOc (ObjectCode* oc) - r = ocAllocateExtras_MachO ( oc ); - if (!r) { - IF_DEBUG(linker, -- debugBelch("loadOc: ocAllocateExtras_MachO failed\n")); -+ ocDebugBelch(oc, "ocAllocateExtras_MachO failed\n")); - return r; - } - # elif defined(OBJFORMAT_ELF) - r = ocAllocateExtras_ELF ( oc ); - if (!r) { - IF_DEBUG(linker, -- debugBelch("loadOc: ocAllocateExtras_ELF failed\n")); -+ ocDebugBelch(oc, "ocAllocateExtras_ELF failed\n")); - return r; - } - # endif -@@ -1658,16 +1669,10 @@ HsInt loadOc (ObjectCode* oc) - barf("loadObj: no getNames method"); - # endif - if (!r) { -- IF_DEBUG(linker, debugBelch("loadOc: ocGetNames_* failed\n")); -+ IF_DEBUG(linker, ocDebugBelch(oc, "ocGetNames_* failed\n")); - return r; - } - --#if defined(NEED_SYMBOL_EXTRAS) --# if defined(OBJFORMAT_PEi386) -- ocAllocateExtras_PEi386 ( oc ); --# endif --#endif -- - /* Loaded, but not resolved yet, ensure the OC is in a consistent state. - If a target has requested the ObjectCode not to be resolved then honor - this requests. Usually this means the ObjectCode has not been initialized -@@ -1679,7 +1684,7 @@ HsInt loadOc (ObjectCode* oc) - oc->status = OBJECT_LOADED; - } - } -- IF_DEBUG(linker, debugBelch("loadOc: done.\n")); -+ IF_DEBUG(linker, ocDebugBelch(oc, "done\n")); - - return 1; - } -@@ -1702,12 +1707,10 @@ int ocTryLoad (ObjectCode* oc) { - are to be loaded by this call. - - This call is intended to have no side-effects when a non-duplicate -- symbol is re-inserted. A symbol is only a duplicate if the object file -- it is defined in has had it's relocations resolved. A resolved object -- file means the symbols inside it are required. -+ symbol is re-inserted. - -- The symbol address is not used to distinguish symbols. Duplicate symbols -- are distinguished by name, oc and attributes (weak symbols etc). -+ We set the Address to NULL since that is not used to distinguish -+ symbols. Duplicate symbols are distinguished by name and oc. - */ - int x; - Symbol_t symbol; -@@ -1716,12 +1719,13 @@ int ocTryLoad (ObjectCode* oc) { - if ( symbol.name - && !ghciInsertSymbolTable(oc->fileName, symhash, symbol.name, - symbol.addr, -- isSymbolWeak(oc, symbol.name) | (HS_BOOL_FALSE << 1), -- oc)) { -+ isSymbolWeak(oc, symbol.name), -+ symbol.type, oc)) { - return 0; - } - } - -+ IF_DEBUG(linker, ocDebugBelch(oc, "resolving\n")); - # if defined(OBJFORMAT_ELF) - r = ocResolve_ELF ( oc ); - # elif defined(OBJFORMAT_PEi386) -@@ -1731,8 +1735,12 @@ int ocTryLoad (ObjectCode* oc) { - # else - barf("ocTryLoad: not implemented on this platform"); - # endif -- if (!r) { return r; } -+ if (!r) { -+ IF_DEBUG(linker, ocDebugBelch(oc, "resolution failed\n")); -+ return r; -+ } - -+ IF_DEBUG(linker, ocDebugBelch(oc, "protecting mappings\n")); - #if defined(NEED_SYMBOL_EXTRAS) - ocProtectExtras(oc); - #endif -@@ -1744,12 +1752,24 @@ int ocTryLoad (ObjectCode* oc) { - m32_allocator_flush(oc->rw_m32); - #endif - -- // run init/init_array/ctors/mod_init_func -+ IF_DEBUG(linker, ocDebugBelch(oc, "resolved\n")); -+ oc->status = OBJECT_RESOLVED; -+ -+ return 1; -+} -+ -+// run init/init_array/ctors/mod_init_func -+int ocRunInit(ObjectCode *oc) -+{ -+ if (oc->status != OBJECT_RESOLVED) { -+ return 1; -+ } - -- IF_DEBUG(linker, debugBelch("ocTryLoad: ocRunInit start\n")); -+ IF_DEBUG(linker, ocDebugBelch(oc, "running initializers\n")); - - // See Note [Tracking foreign exports] in ForeignExports.c - foreignExportsLoadingObject(oc); -+ int r; - #if defined(OBJFORMAT_ELF) - r = ocRunInit_ELF ( oc ); - #elif defined(OBJFORMAT_PEi386) -@@ -1762,8 +1782,27 @@ int ocTryLoad (ObjectCode* oc) { - foreignExportsFinishedLoadingObject(); - - if (!r) { return r; } -+ oc->status = OBJECT_READY; - -- oc->status = OBJECT_RESOLVED; -+ return 1; -+} -+ -+int runPendingInitializers (void) -+{ -+ for (ObjectCode *oc = objects; oc; oc = oc->next) { -+ int r = ocRunInit(oc); -+ if (!r) { -+ errorBelch("Could not run initializers of Object Code %" PATH_FMT ".\n", OC_INFORMATIVE_FILENAME(oc)); -+ IF_DEBUG(linker, printLoadedObjects()); -+ fflush(stderr); -+ return r; -+ } -+ } -+ -+#if defined(PROFILING) -+ // collect any new cost centres & CCSs that were defined during runInit -+ refreshProfilingCCSs(); -+#endif - - return 1; - } -@@ -1779,18 +1818,17 @@ static HsInt resolveObjs_ (void) - - for (ObjectCode *oc = objects; oc; oc = oc->next) { - int r = ocTryLoad(oc); -- if (!r) -- { -+ if (!r) { - errorBelch("Could not load Object Code %" PATH_FMT ".\n", OC_INFORMATIVE_FILENAME(oc)); -+ IF_DEBUG(linker, printLoadedObjects()); - fflush(stderr); - return r; - } - } - --#if defined(PROFILING) -- // collect any new cost centres & CCSs that were defined during runInit -- refreshProfilingCCSs(); --#endif -+ if (!runPendingInitializers()) { -+ return 0; -+ } - - IF_DEBUG(linker, debugBelch("resolveObjs: done\n")); - return 1; -@@ -1867,7 +1905,7 @@ HsInt purgeObj (pathchar *path) - return r; - } - --static OStatus getObjectLoadStatus_ (pathchar *path) -+OStatus getObjectLoadStatus_ (pathchar *path) - { - for (ObjectCode *o = objects; o; o = o->next) { - if (0 == pathcmp(o->fileName, path)) { -@@ -1957,6 +1995,64 @@ addSection (Section *s, SectionKind kind, SectionAlloc alloc, - size, kind )); - } - -+#define UNUSED(x) (void)(x) -+ -+#if defined(OBJFORMAT_ELF) -+void * loadNativeObj (pathchar *path, char **errmsg) -+{ -+ ACQUIRE_LOCK(&linker_mutex); -+ void *r = loadNativeObj_ELF(path, errmsg); -+ RELEASE_LOCK(&linker_mutex); -+ return r; -+} -+#else -+void * STG_NORETURN -+loadNativeObj (pathchar *path, char **errmsg) -+{ -+ UNUSED(path); -+ UNUSED(errmsg); -+ barf("loadNativeObj: not implemented on this platform"); -+} -+#endif -+ -+HsInt unloadNativeObj (void *handle) -+{ -+ bool unloadedAnyObj = false; -+ -+ IF_DEBUG(linker, debugBelch("unloadNativeObj: %p\n", handle)); -+ -+ ObjectCode *prev = NULL, *next; -+ for (ObjectCode *nc = loaded_objects; nc; nc = next) { -+ next = nc->next_loaded_object; // we might move nc -+ -+ if (nc->type == DYNAMIC_OBJECT && nc->dlopen_handle == handle) { -+ nc->status = OBJECT_UNLOADED; -+ n_unloaded_objects += 1; -+ -+ // dynamic objects have no symbols -+ CHECK(nc->symbols == NULL); -+ freeOcStablePtrs(nc); -+ -+ // Remove object code from root set -+ if (prev == NULL) { -+ loaded_objects = nc->next_loaded_object; -+ } else { -+ prev->next_loaded_object = nc->next_loaded_object; -+ } -+ unloadedAnyObj = true; -+ } else { -+ prev = nc; -+ } -+ } -+ -+ if (unloadedAnyObj) { -+ return 1; -+ } else { -+ errorBelch("unloadObjNativeObj_ELF: can't find `%p' to unload", handle); -+ return 0; -+ } -+} -+ - /* ----------------------------------------------------------------------------- - * Segment management - */ -@@ -1974,23 +2070,23 @@ initSegment (Segment *s, void *start, size_t size, SegmentProt prot, int n_secti - void freeSegments (ObjectCode *oc) - { - if (oc->segments != NULL) { -- IF_DEBUG(linker, debugBelch("freeSegments: freeing %d segments\n", oc->n_segments)); -+ IF_DEBUG(linker, ocDebugBelch(oc, "freeing %d segments\n", oc->n_segments)); - - for (int i = 0; i < oc->n_segments; i++) { - Segment *s = &oc->segments[i]; - -- IF_DEBUG(linker, debugBelch("freeSegments: freeing segment %d at %p size %zu\n", -- i, s->start, s->size)); -+ IF_DEBUG(linker, ocDebugBelch(oc, "freeing segment %d at %p size %zu\n", -+ i, s->start, s->size)); - - stgFree(s->sections_idx); - s->sections_idx = NULL; - - if (0 == s->size) { -- IF_DEBUG(linker, debugBelch("freeSegment: skipping segment of 0 size\n")); -+ IF_DEBUG(linker, ocDebugBelch(oc, "skipping segment of 0 size\n")); - continue; - } else { - #if RTS_LINKER_USE_MMAP -- CHECKM(0 == munmap(s->start, s->size), "freeSegments: failed to unmap memory"); -+ munmapForLinker(s->start, s->size, "freeSegments"); - #else - stgFree(s->start); - #endif -diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h -index b40d14e..60acbf0 100644 ---- a/rts/LinkerInternals.h -+++ b/rts/LinkerInternals.h -@@ -16,10 +16,71 @@ - #include - #endif - --#include "BeginPrivate.h" -+void printLoadedObjects(void); -+ -+/* Which object file format are we targeting? */ -+#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) \ -+|| defined(linux_android_HOST_OS) \ -+|| defined(freebsd_HOST_OS) || defined(kfreebsdgnu_HOST_OS) \ -+|| defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) \ -+|| defined(openbsd_HOST_OS) || defined(gnu_HOST_OS) -+# define OBJFORMAT_ELF -+#elif defined(mingw32_HOST_OS) -+# define OBJFORMAT_PEi386 -+#elif defined(darwin_HOST_OS) || defined(ios_HOST_OS) -+# define OBJFORMAT_MACHO -+#elif defined(wasm32_HOST_ARCH) -+# define OBJFORMAT_WASM32 -+#endif - - typedef void SymbolAddr; - typedef char SymbolName; -+typedef struct _ObjectCode ObjectCode; -+typedef struct _Section Section; -+ -+/* -+ * Note [Processing overflowed relocations] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * When processing relocations whose targets exceed the relocation's maximum -+ * displacement, we can take advantage of knowledge of the symbol type to avoid -+ * linker failures. In particular, if we know that a symbol is a code symbol -+ * then we can handle the relocation by creating a "jump island", a small bit -+ * of code which immediately jumps (with an instruction sequence capable of -+ * larger displacement) to the target. -+ * -+ * This is not possible for data symbols (or, for that matter, Haskell symbols -+ * when TNTC is in use). In these cases we have to rather fail and ask the user -+ * to recompile their program as position-independent. -+ */ -+ -+/* What kind of thing a symbol identifies. We need to know this to determine how -+ * to process overflowing relocations. See Note [Processing overflowed relocations]. -+ * This is bitfield however only the option SYM_TYPE_DUP_DISCARD can be combined -+ * with the other values. */ -+typedef enum _SymType { -+ SYM_TYPE_CODE = 1 << 0, /* the symbol is a function and can be relocated via a jump island */ -+ SYM_TYPE_DATA = 1 << 1, /* the symbol is data */ -+ SYM_TYPE_INDIRECT_DATA = 1 << 2, /* see Note [_iob_func symbol] */ -+ SYM_TYPE_DUP_DISCARD = 1 << 3, /* the symbol is a symbol in a BFD import library -+ however if a duplicate is found with a mismatching -+ SymType then discard this one. */ -+ SYM_TYPE_HIDDEN = 1 << 4, /* the symbol is hidden and should not be exported */ -+ -+} SymType; -+ -+ -+#if defined(OBJFORMAT_ELF) -+# include "linker/ElfTypes.h" -+#elif defined(OBJFORMAT_PEi386) -+# include "linker/PEi386Types.h" -+#elif defined(OBJFORMAT_MACHO) -+# include "linker/MachOTypes.h" -+#elif defined(OBJFORMAT_WASM32) -+# include "linker/Wasm32Types.h" -+#else -+# error "Unknown OBJECT_FORMAT for HOST_OS" -+#endif -+ - - /* Hold extended information about a symbol in case we need to resolve it at a - late stage. */ -@@ -27,8 +88,16 @@ typedef struct _Symbol - { - SymbolName *name; - SymbolAddr *addr; -+ SymType type; - } Symbol_t; - -+typedef struct NativeCodeRange_ { -+ void *start, *end; -+ -+ /* Allow a chain of these things */ -+ struct NativeCodeRange_ *next; -+} NativeCodeRange; -+ - /* Indication of section kinds for loaded objects. Needed by - the GC for deciding whether or not a pointer on the stack - is a code pointer. -@@ -42,16 +111,26 @@ typedef - /* Static initializer section. e.g. .ctors. */ - SECTIONKIND_INIT_ARRAY, - /* Static finalizer section. e.g. .dtors. */ -- SECTIONKIND_FINIT_ARRAY, -+ SECTIONKIND_FINI_ARRAY, - /* We don't know what the section is and don't care. */ - SECTIONKIND_OTHER, -+ -+ /* -+ * Windows-specific section kinds -+ */ -+ - /* Section contains debug information. e.g. .debug$. */ - SECTIONKIND_DEBUG, -+ /* Section contains exception table. e.g. .pdata. */ -+ SECTIONKIND_EXCEPTION_TABLE, -+ /* Section contains unwind info. e.g. .xdata. */ -+ SECTIONKIND_EXCEPTION_UNWIND, - /* Section belongs to an import section group. e.g. .idata$. */ - SECTIONKIND_IMPORT, -+ /* Section defines the head section of a BFD-style import library, e.g. idata$7. */ -+ SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD, - /* Section defines an import library entry, e.g. idata$7. */ -- SECTIONKIND_IMPORT_LIBRARY, -- SECTIONKIND_NOINFOAVAIL -+ SECTIONKIND_BFD_IMPORT_LIBRARY, - } - SectionKind; - -@@ -74,17 +153,16 @@ typedef enum { - SEGMENT_PROT_RO = PROT_READ, - SEGMENT_PROT_RX = PROT_READ | PROT_EXEC, - SEGMENT_PROT_RWO = PROT_READ | PROT_WRITE, -- SEGMENT_PROT_RWX = PROT_READ | PROT_WRITE | PROT_EXEC - #else - SEGMENT_PROT_RO, - SEGMENT_PROT_RX, - SEGMENT_PROT_RWO, -- SEGMENT_PROT_RWX - #endif - } SegmentProt; - - /* - * Note [No typedefs for customizable types] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * Some pointer-to-struct types are defined opaquely - * first, and customized later to architecture/ABI-specific - * instantiations. Having the usual -@@ -95,26 +173,24 @@ typedef enum { - * and always refer to it with the 'struct' qualifier. - */ - --typedef -- struct _Section { -- void* start; /* actual start of section in memory */ -- StgWord size; /* actual size of section in memory */ -- SectionKind kind; -- SectionAlloc alloc; -- -- /* -- * The following fields are relevant for SECTION_MMAP sections only -- */ -- StgWord mapped_offset; /* offset from the image of mapped_start */ -- void* mapped_start; /* start of mmap() block */ -- StgWord mapped_size; /* size of mmap() block */ -- -- /* A customizable type to augment the Section type. -- * See Note [No typedefs for customizable types] -- */ -- struct SectionFormatInfo* info; -- } -- Section; -+struct _Section { -+ void* start; /* actual start of section in memory */ -+ StgWord size; /* actual size of section in memory */ -+ SectionKind kind; -+ SectionAlloc alloc; -+ -+ /* -+ * The following fields are relevant for SECTION_MMAP sections only -+ */ -+ StgWord mapped_offset; /* offset from the image of mapped_start */ -+ void* mapped_start; /* start of mmap() block */ -+ StgWord mapped_size; /* size of mmap() block */ -+ -+ /* A customizable type to augment the Section type. -+ * See Note [No typedefs for customizable types] -+ */ -+ struct SectionFormatInfo* info; -+}; - - typedef - struct _ProddableBlock { -@@ -142,7 +218,7 @@ typedef struct _Segment { - * We use the m32 allocator for symbol extras on Windows and other mmap-using - * platforms. - */ --#if RTS_LINKER_USE_MMAP -+#if RTS_LINKER_USE_MMAP || defined(mingw32_HOST_ARCH) - #define NEED_M32 1 - #endif - -@@ -159,26 +235,37 @@ typedef struct { - } jumpIsland; - #elif defined(x86_64_HOST_ARCH) - uint64_t addr; -- uint8_t jumpIsland[6]; -+ // See Note [TLSGD relocation] in elf_tlsgd.c -+ uint8_t jumpIsland[8]; - #elif defined(arm_HOST_ARCH) - uint8_t jumpIsland[16]; - #endif - } SymbolExtra; - -+typedef enum { -+ /* Objects that were loaded by this linker */ -+ STATIC_OBJECT, -+ -+ /* Objects that were loaded by dlopen */ -+ DYNAMIC_OBJECT, -+} ObjectType; -+ -+typedef void (*cxa_finalize_fn)(void *); - - /* Top-level structure for an object module. One of these is allocated - * for each object file in use. - */ --typedef struct _ObjectCode { -+struct _ObjectCode { - OStatus status; - pathchar *fileName; - int fileSize; /* also mapped image size when using mmap() */ -- char* formatName; /* eg "ELF32", "DLL", "COFF", etc. */ -+ char* formatName; /* e.g. "ELF32", "DLL", "COFF", etc. */ -+ ObjectType type; /* who loaded this object? */ - - /* If this object is a member of an archive, archiveMemberName is - * like "libarchive.a(object.o)". Otherwise it's NULL. - */ -- char* archiveMemberName; -+ pathchar* archiveMemberName; - - /* An array containing ptrs to all the symbol names copied from - this object into the global symbol hash table. This is so that -@@ -202,6 +289,11 @@ typedef struct _ObjectCode { - after allocation, so that we can use realloc */ - int misalignment; - -+ /* The address of __cxa_finalize; set when at least one finalizer was -+ * register and therefore we must call __cxa_finalize before unloading. -+ * See Note [Resolving __dso_handle]. */ -+ cxa_finalize_fn cxa_finalize; -+ - /* The section-kind entries for this object module. An array. */ - int n_sections; - Section* sections; -@@ -223,8 +315,14 @@ typedef struct _ObjectCode { - struct _ObjectCode *next_loaded_object; - - // Mark bit -+ // N.B. This is a full word as we CAS it. - StgWord mark; - -+ // Can this object be safely unloaded? Not true for -+ // dynamic objects when dlinfo is not available as -+ // we cannot determine liveness. -+ bool unloadable; -+ - // Set of dependencies (ObjectCode*) of the object file. Traverse - // dependencies using `iterHashTable`. - // -@@ -246,19 +344,13 @@ typedef struct _ObjectCode { - outside one of these is an error in the linker. */ - ProddableBlock* proddables; - --#if defined(ia64_HOST_ARCH) -- /* Procedure Linkage Table for this object */ -- void *plt; -- unsigned int pltIndex; --#endif -- - #if defined(NEED_SYMBOL_EXTRAS) - SymbolExtra *symbol_extras; - unsigned long first_symbol_extra; - unsigned long n_symbol_extras; - #endif - /* Additional memory that is preallocated and contiguous with image -- which can be used used to relocate bss sections. */ -+ which can be used to relocate bss sections. */ - char* bssBegin; - char* bssEnd; - -@@ -267,7 +359,7 @@ typedef struct _ObjectCode { - - /* Holds the list of symbols in the .o file which - require extra information.*/ -- HashTable *extraInfos; -+ StrHashTable *extraInfos; - - #if defined(NEED_M32) - /* The m32 allocators used for allocating small sections and symbol extras -@@ -275,7 +367,37 @@ typedef struct _ObjectCode { - * (read-only/executable) code. */ - m32_allocator *rw_m32, *rx_m32; - #endif --} ObjectCode; -+ -+#if defined(OBJFORMAT_ELF) && defined(SHN_XINDEX) -+ /* Cached address of ELF's shndx table, or SHNDX_TABLE_UNINIT if not -+ * initialized yet. It would be better to put it info ELF-specific -+ * ObjectCodeFormatInfo, but unfortunately shndx table is needed in -+ * ocVerifyImage_ELF which runs before ObjectCodeFormatInfo is -+ * initialized by ocInit_ELF. */ -+ Elf_Word *shndx_table; -+#endif -+ -+ /* -+ * The following are only valid if .type == DYNAMIC_OBJECT -+ */ -+ -+ /* handle returned from dlopen */ -+ void *dlopen_handle; -+ -+ /* virtual memory ranges of loaded code. NULL if no range information is -+ * available (e.g. if dlinfo is unavailable on the current platform). -+ */ -+ NativeCodeRange *nc_ranges; -+}; -+ -+#if defined(OBJFORMAT_ELF) && defined(SHN_XINDEX) -+/* We cannot simply use NULL to signal uninitialised shndx_table because NULL -+ * is valid return value of get_shndx_table. Thus SHNDX_TABLE_UNINIT is defined -+ * as the address of global variable shndx_table_uninit_label, defined in -+ * rts/linker/Elf.c, which is definitely unequal to any heap-allocated address */ -+extern Elf_Word shndx_table_uninit_label; -+#define SHNDX_TABLE_UNINIT (&shndx_table_uninit_label) -+#endif - - #define OC_INFORMATIVE_FILENAME(OC) \ - ( (OC)->archiveMemberName ? \ -@@ -283,13 +405,33 @@ typedef struct _ObjectCode { - (OC)->fileName \ - ) - -+#define ocDebugBelch(oc, s, ...) \ -+ debugBelch("%s(%" PATH_FMT ": " s, \ -+ __func__, \ -+ OC_INFORMATIVE_FILENAME(oc), \ -+ ##__VA_ARGS__) -+ -+ - #if defined(THREADED_RTS) - extern Mutex linker_mutex; -+ -+#if defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO) -+extern Mutex dl_mutex; - #endif -+#endif /* THREADED_RTS */ - --/* Type of the initializer */ -+/* Type of an initializer */ - typedef void (*init_t) (int argc, char **argv, char **env); - -+/* Type of a finalizer */ -+typedef void (*fini_t) (void); -+ -+typedef enum _SymStrength { -+ STRENGTH_NORMAL, -+ STRENGTH_WEAK, -+ STRENGTH_STRONG, -+} SymStrength; -+ - /* SymbolInfo tracks a symbol's address, the object code from which - it originated, and whether or not it's weak. - -@@ -305,19 +447,17 @@ typedef void (*init_t) (int argc, char **argv, char **env); - typedef struct _RtsSymbolInfo { - SymbolAddr* value; - ObjectCode *owner; -- HsBool weak; -- HsBool hidden; -+ SymStrength strength; -+ SymType type; - } RtsSymbolInfo; - -+#include "BeginPrivate.h" -+ - void exitLinker( void ); - - void freeObjectCode (ObjectCode *oc); - SymbolAddr* loadSymbol(SymbolName *lbl, RtsSymbolInfo *pinfo); - --void *mmapAnonForLinker (size_t bytes); --void *mmapForLinker (size_t bytes, uint32_t prot, uint32_t flags, int fd, int offset); --void mmapForLinkerMarkExecutable (void *start, size_t len); -- - void addProddableBlock ( ObjectCode* oc, void* start, int size ); - void checkProddableBlock (ObjectCode *oc, void *addr, size_t size ); - void freeProddableBlocks (ObjectCode *oc); -@@ -326,27 +466,36 @@ void addSection (Section *s, SectionKind kind, SectionAlloc alloc, - void* start, StgWord size, StgWord mapped_offset, - void* mapped_start, StgWord mapped_size); - --HsBool ghciLookupSymbolInfo(HashTable *table, -+HsBool ghciLookupSymbolInfo(StrHashTable *table, - const SymbolName* key, RtsSymbolInfo **result); - - int ghciInsertSymbolTable( - pathchar* obj_name, -- HashTable *table, -+ StrHashTable *table, - const SymbolName* key, - SymbolAddr* data, -- int flags, -+ SymStrength weak, -+ SymType type, - ObjectCode *owner); - - /* Lock-free version of lookupSymbol. When 'dependent' is not NULL, adds it as a -- * dependent to the owner of the symbol. */ --SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent); -+ * dependent to the owner of the symbol. The type of the symbol is stored in 'type'. */ -+SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymType *type); -+ -+/* Perform TLSGD symbol lookup returning the address of the resulting GOT entry, -+ * which in this case holds the module id and the symbol offset. */ -+StgInt64 lookupTlsgdSymbol(const char *, unsigned long, ObjectCode *); - --extern /*Str*/HashTable *symhash; -+extern StrHashTable *symhash; - - pathchar* - resolveSymbolAddr (pathchar* buffer, int size, - SymbolAddr* symbol, uintptr_t* top); - -+/* defined in LoadArchive.c */ -+bool isArchive (pathchar *path); -+HsInt loadArchive_ (pathchar *path); -+ - /************************************************* - * Various bits of configuration - *************************************************/ -@@ -368,48 +517,16 @@ resolveSymbolAddr (pathchar* buffer, int size, - #define USE_CONTIGUOUS_MMAP 0 - #endif - -+ - HsInt isAlreadyLoaded( pathchar *path ); -+OStatus getObjectLoadStatus_ (pathchar *path); - HsInt loadOc( ObjectCode* oc ); --ObjectCode* mkOc( pathchar *path, char *image, int imageSize, -- bool mapped, char *archiveMemberName, -+ObjectCode* mkOc( ObjectType type, pathchar *path, char *image, int imageSize, -+ bool mapped, pathchar *archiveMemberName, - int misalignment - ); - - void initSegment(Segment *s, void *start, size_t size, SegmentProt prot, int n_sections); - void freeSegments(ObjectCode *oc); - --/* MAP_ANONYMOUS is MAP_ANON on some systems, -- e.g. OS X (before Sierra), OpenBSD etc */ --#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) --#define MAP_ANONYMOUS MAP_ANON --#endif -- --/* Which object file format are we targetting? */ --#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) \ --|| defined(linux_android_HOST_OS) \ --|| defined(freebsd_HOST_OS) || defined(kfreebsdgnu_HOST_OS) \ --|| defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) \ --|| defined(openbsd_HOST_OS) || defined(gnu_HOST_OS) --# define OBJFORMAT_ELF --# include "linker/ElfTypes.h" --#elif defined(mingw32_HOST_OS) --# define OBJFORMAT_PEi386 --# include "linker/PEi386Types.h" --#elif defined(darwin_HOST_OS) || defined(ios_HOST_OS) --# define OBJFORMAT_MACHO --# include "linker/MachOTypes.h" --#else --#error "Unknown OBJECT_FORMAT for HOST_OS" --#endif -- --/* In order to simplify control flow a bit, some references to mmap-related -- definitions are blocked off by a C-level if statement rather than a CPP-level -- #if statement. Since those are dead branches when !RTS_LINKER_USE_MMAP, we -- just stub out the relevant symbols here --*/ --#if !RTS_LINKER_USE_MMAP --#define munmap(x,y) /* nothing */ --#define MAP_ANONYMOUS 0 --#endif -- - #include "EndPrivate.h" -diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c -index e166e20..82ec0c8 100644 ---- a/rts/linker/Elf.c -+++ b/rts/linker/Elf.c -@@ -15,18 +15,26 @@ - - #include "RtsUtils.h" - #include "RtsSymbolInfo.h" -+#include "CheckUnload.h" -+#include "LinkerInternals.h" -+#include "linker/MMap.h" - #include "linker/Elf.h" - #include "linker/CacheFlush.h" - #include "linker/M32Alloc.h" - #include "linker/SymbolExtras.h" -+#include "ForeignExports.h" -+#include "Profiling.h" - #include "sm/OSMem.h" --#include "GetEnv.h" - #include "linker/util.h" - #include "linker/elf_util.h" - -+#include - #include - #include - #include -+#if defined(HAVE_DLFCN_H) -+#include -+#endif - #if defined(HAVE_SYS_STAT_H) - #include - #endif -@@ -79,9 +87,7 @@ - */ - #define X86_64_ELF_NONPIC_HACK (!RtsFlags.MiscFlags.linkerAlwaysPic) - --#if defined(sparc_HOST_ARCH) --# define ELF_TARGET_SPARC /* Used inside */ --#elif defined(i386_HOST_ARCH) -+#if defined(i386_HOST_ARCH) - # define ELF_TARGET_386 /* Used inside */ - #elif defined(x86_64_HOST_ARCH) - # define ELF_TARGET_X64_64 -@@ -95,18 +101,17 @@ - # include - #endif - -+#include "elf_got.h" -+ - #if defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH) --# define NEED_GOT - # define NEED_PLT --# include "elf_got.h" - # include "elf_plt.h" - # include "elf_reloc.h" - #endif - - /* -- - Note [Many ELF Sections] -- -+ ~~~~~~~~~~~~~~~~~~~~~~~~ - The normal section number fields in ELF are limited to 16 bits, which runs - out of bits when you try to cram in more sections than that. - -@@ -127,6 +132,11 @@ - - */ - -+#if defined(SHN_XINDEX) -+/* global variable which address is used to signal an uninitialised shndx_table */ -+Elf_Word shndx_table_uninit_label = 0; -+#endif -+ - static Elf_Word elf_shnum(Elf_Ehdr* ehdr) - { - Elf_Shdr* shdr = (Elf_Shdr*) ((char*)ehdr + ehdr->e_shoff); -@@ -149,16 +159,22 @@ static Elf_Word elf_shstrndx(Elf_Ehdr* ehdr) - - #if defined(SHN_XINDEX) - static Elf_Word* --get_shndx_table(Elf_Ehdr* ehdr) -+get_shndx_table(ObjectCode* oc) - { -+ if (RTS_LIKELY(oc->shndx_table != SHNDX_TABLE_UNINIT)) { -+ return oc->shndx_table; -+ } -+ - Elf_Word i; -- char* ehdrC = (char*)ehdr; -+ char* ehdrC = oc->image; -+ Elf_Ehdr* ehdr = (Elf_Ehdr*)ehdrC; - Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); - const Elf_Word shnum = elf_shnum(ehdr); - - for (i = 0; i < shnum; i++) { - if (shdr[i].sh_type == SHT_SYMTAB_SHNDX) { -- return (Elf32_Word*)(ehdrC + shdr[i].sh_offset); -+ oc->shndx_table = (Elf32_Word*)(ehdrC + shdr[i].sh_offset); -+ return oc->shndx_table; - } - } - return NULL; -@@ -188,6 +204,10 @@ ocInit_ELF(ObjectCode * oc) - - oc->n_sections = elf_shnum(oc->info->elfHeader); - -+ ElfRelocationTable *relTableLast = NULL; -+ ElfRelocationATable *relaTableLast = NULL; -+ ElfSymbolTable *symbolTablesLast = NULL; -+ - /* get the symbol table(s) */ - for(int i=0; i < oc->n_sections; i++) { - if(SHT_REL == oc->info->sectionHeader[i].sh_type) { -@@ -205,12 +225,12 @@ ocInit_ELF(ObjectCode * oc) - - relTab->sectionHeader = &oc->info->sectionHeader[i]; - -- if(oc->info->relTable == NULL) { -+ if(relTableLast == NULL) { - oc->info->relTable = relTab; -+ relTableLast = relTab; - } else { -- ElfRelocationTable * tail = oc->info->relTable; -- while(tail->next != NULL) tail = tail->next; -- tail->next = relTab; -+ relTableLast->next = relTab; -+ relTableLast = relTab; - } - - } else if(SHT_RELA == oc->info->sectionHeader[i].sh_type) { -@@ -228,12 +248,12 @@ ocInit_ELF(ObjectCode * oc) - - relTab->sectionHeader = &oc->info->sectionHeader[i]; - -- if(oc->info->relaTable == NULL) { -+ if(relaTableLast == NULL) { - oc->info->relaTable = relTab; -+ relaTableLast = relTab; - } else { -- ElfRelocationATable * tail = oc->info->relaTable; -- while(tail->next != NULL) tail = tail->next; -- tail->next = relTab; -+ relaTableLast->next = relTab; -+ relaTableLast = relTab; - } - - } else if(SHT_SYMTAB == oc->info->sectionHeader[i].sh_type) { -@@ -274,12 +294,12 @@ ocInit_ELF(ObjectCode * oc) - } - - /* append the ElfSymbolTable */ -- if(oc->info->symbolTables == NULL) { -+ if(symbolTablesLast == NULL) { - oc->info->symbolTables = symTab; -+ symbolTablesLast = symTab; - } else { -- ElfSymbolTable * tail = oc->info->symbolTables; -- while(tail->next != NULL) tail = tail->next; -- tail->next = symTab; -+ symbolTablesLast->next = symTab; -+ symbolTablesLast = symTab; - } - } - } -@@ -324,6 +344,9 @@ ocDeinit_ELF(ObjectCode * oc) - - stgFree(oc->info); - oc->info = NULL; -+#if defined(SHN_XINDEX) -+ oc->shndx_table = SHNDX_TABLE_UNINIT; -+#endif - } - } - -@@ -370,7 +393,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - errorBelch("%s: not a relocatable object (.o) file", oc->fileName); - return 0; - } -- IF_DEBUG(linker, debugBelch( "Is a relocatable object (.o) file\n" )); -+ IF_DEBUG(linker,debugBelch( "Is a relocatable object (.o) file\n" )); - - IF_DEBUG(linker,debugBelch( "Architecture is " )); - switch (ehdr->e_machine) { -@@ -405,6 +428,18 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - #endif - #if defined(EM_AARCH64) - case EM_AARCH64: IF_DEBUG(linker,debugBelch( "aarch64" )); break; -+#endif -+#if defined(EM_RISCV) -+ case EM_RISCV: IF_DEBUG(linker,debugBelch( "riscv" )); -+ errorBelch("%s: RTS linker not implemented on riscv", -+ oc->fileName); -+ return 0; -+#endif -+#if defined(EM_LOONGARCH) -+ case EM_LOONGARCH: IF_DEBUG(linker,debugBelch( "loongarch64" )); -+ errorBelch("%s: RTS linker not implemented on loongarch64", -+ oc->fileName); -+ return 0; - #endif - default: IF_DEBUG(linker,debugBelch( "unknown" )); - errorBelch("%s: unknown architecture (e_machine == %d)" -@@ -417,7 +452,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - "\nSection header table: start %ld, n_entries %d, ent_size %d\n", - (long)ehdr->e_shoff, shnum, ehdr->e_shentsize )); - -- ASSERT(ehdr->e_shentsize == sizeof(Elf_Shdr)); -+ CHECK(ehdr->e_shentsize == sizeof(Elf_Shdr)); - - shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); - -@@ -432,11 +467,11 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - } - - for (i = 0; i < shnum; i++) { -- IF_DEBUG(linker,debugBelch("%2d: ", i )); -- IF_DEBUG(linker,debugBelch("type=%2d ", (int)shdr[i].sh_type )); -- IF_DEBUG(linker,debugBelch("size=%4d ", (int)shdr[i].sh_size )); -- IF_DEBUG(linker,debugBelch("offs=%4d ", (int)shdr[i].sh_offset )); -- IF_DEBUG(linker,debugBelch(" (%p .. %p) ", -+ IF_DEBUG(linker_verbose,debugBelch("%2d: ", i )); -+ IF_DEBUG(linker_verbose,debugBelch("type=%2d ", (int)shdr[i].sh_type )); -+ IF_DEBUG(linker_verbose,debugBelch("size=%4d ", (int)shdr[i].sh_size )); -+ IF_DEBUG(linker_verbose,debugBelch("offs=%4d ", (int)shdr[i].sh_offset )); -+ IF_DEBUG(linker_verbose,debugBelch(" (%p .. %p) ", - ehdrC + shdr[i].sh_offset, - ehdrC + shdr[i].sh_offset + shdr[i].sh_size - 1)); - -@@ -446,7 +481,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - - case SHT_REL: - case SHT_RELA: -- IF_DEBUG(linker,debugBelch( shdr[i].sh_type == SHT_REL ? "Rel " : "RelA ")); -+ IF_DEBUG(linker_verbose,debugBelch( shdr[i].sh_type == SHT_REL ? "Rel " : "RelA ")); - - if (!SECTION_INDEX_VALID(shdr[i].sh_link)) { - if (shdr[i].sh_link == SHN_UNDEF) -@@ -474,7 +509,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - - break; - case SHT_SYMTAB: -- IF_DEBUG(linker,debugBelch("Sym ")); -+ IF_DEBUG(linker_verbose,debugBelch("Sym ")); - - if (!SECTION_INDEX_VALID(shdr[i].sh_link)) { - errorBelch("\n%s: symbol table section #%d has an invalid link field (%d)\n", -@@ -489,15 +524,15 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - return 0; - } - break; -- case SHT_STRTAB: IF_DEBUG(linker,debugBelch("Str ")); break; -- default: IF_DEBUG(linker,debugBelch(" ")); break; -+ case SHT_STRTAB: IF_DEBUG(linker_verbose,debugBelch("Str ")); break; -+ default: IF_DEBUG(linker_verbose,debugBelch(" ")); break; - } - if (sh_strtab) { -- IF_DEBUG(linker,debugBelch("sname=%s\n", sh_strtab + shdr[i].sh_name )); -+ IF_DEBUG(linker_verbose,debugBelch("sname=%s\n", sh_strtab + shdr[i].sh_name )); - } - } - -- IF_DEBUG(linker,debugBelch( "\nString tables\n" )); -+ IF_DEBUG(linker_verbose,debugBelch( "\nString tables\n" )); - nstrtab = 0; - for (i = 0; i < shnum; i++) { - if (shdr[i].sh_type == SHT_STRTAB -@@ -507,25 +542,25 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - debugging info. */ - && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8) - ) { -- IF_DEBUG(linker,debugBelch(" section %d is a normal string table\n", i )); -+ IF_DEBUG(linker_verbose,debugBelch(" section %d is a normal string table\n", i )); - nstrtab++; - } - } - if (nstrtab == 0) { -- IF_DEBUG(linker,debugBelch(" no normal string tables (potentially, but not necessarily a problem)\n")); -+ IF_DEBUG(linker_verbose,debugBelch(" no normal string tables (potentially, but not necessarily a problem)\n")); - } - #if defined(SHN_XINDEX) -- Elf_Word* shndxTable = get_shndx_table(ehdr); -+ Elf_Word* shndxTable = get_shndx_table(oc); - #endif - nsymtabs = 0; -- IF_DEBUG(linker,debugBelch( "Symbol tables\n" )); -+ IF_DEBUG(linker_verbose,debugBelch( "Symbol tables\n" )); - for (i = 0; i < shnum; i++) { - if (shdr[i].sh_type != SHT_SYMTAB) continue; -- IF_DEBUG(linker,debugBelch( "section %d is a symbol table\n", i )); -+ IF_DEBUG(linker_verbose,debugBelch( "section %d is a symbol table\n", i )); - nsymtabs++; - stab = (Elf_Sym*) (ehdrC + shdr[i].sh_offset); - nent = shdr[i].sh_size / sizeof(Elf_Sym); -- IF_DEBUG(linker,debugBelch( " number of entries is apparently %d (%ld rem)\n", -+ IF_DEBUG(linker_verbose,debugBelch( " number of entries is apparently %d (%ld rem)\n", - nent, - (long)shdr[i].sh_size % sizeof(Elf_Sym) - )); -@@ -538,38 +573,38 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - #if defined(SHN_XINDEX) - /* See Note [Many ELF Sections] */ - if (secno == SHN_XINDEX) { -- ASSERT(shndxTable); -+ CHECK(shndxTable); - secno = shndxTable[j]; - } - #endif -- IF_DEBUG(linker,debugBelch(" %2d ", j )); -- IF_DEBUG(linker,debugBelch(" sec=%-5d size=%-3d val=%5p ", -+ IF_DEBUG(linker_verbose,debugBelch(" %2d ", j )); -+ IF_DEBUG(linker_verbose,debugBelch(" sec=%-5d size=%-3d val=%5p ", - (int)secno, - (int)stab[j].st_size, - (char*)stab[j].st_value )); - -- IF_DEBUG(linker,debugBelch("type=" )); -+ IF_DEBUG(linker_verbose,debugBelch("type=" )); - switch (ELF_ST_TYPE(stab[j].st_info)) { -- case STT_NOTYPE: IF_DEBUG(linker,debugBelch("notype " )); break; -- case STT_OBJECT: IF_DEBUG(linker,debugBelch("object " )); break; -- case STT_FUNC : IF_DEBUG(linker,debugBelch("func " )); break; -- case STT_SECTION: IF_DEBUG(linker,debugBelch("section" )); break; -- case STT_FILE: IF_DEBUG(linker,debugBelch("file " )); break; -- default: IF_DEBUG(linker,debugBelch("? " )); break; -+ case STT_NOTYPE: IF_DEBUG(linker_verbose,debugBelch("notype " )); break; -+ case STT_OBJECT: IF_DEBUG(linker_verbose,debugBelch("object " )); break; -+ case STT_FUNC : IF_DEBUG(linker_verbose,debugBelch("func " )); break; -+ case STT_SECTION: IF_DEBUG(linker_verbose,debugBelch("section" )); break; -+ case STT_FILE: IF_DEBUG(linker_verbose,debugBelch("file " )); break; -+ default: IF_DEBUG(linker_verbose,debugBelch("? " )); break; - } -- IF_DEBUG(linker,debugBelch(" " )); -+ IF_DEBUG(linker_verbose,debugBelch(" " )); - -- IF_DEBUG(linker,debugBelch("bind=" )); -+ IF_DEBUG(linker_verbose,debugBelch("bind=" )); - switch (ELF_ST_BIND(stab[j].st_info)) { -- case STB_LOCAL : IF_DEBUG(linker,debugBelch("local " )); break; -- case STB_GLOBAL: IF_DEBUG(linker,debugBelch("global" )); break; -- case STB_WEAK : IF_DEBUG(linker,debugBelch("weak " )); break; -- default: IF_DEBUG(linker,debugBelch("? " )); break; -+ case STB_LOCAL : IF_DEBUG(linker_verbose,debugBelch("local " )); break; -+ case STB_GLOBAL: IF_DEBUG(linker_verbose,debugBelch("global" )); break; -+ case STB_WEAK : IF_DEBUG(linker_verbose,debugBelch("weak " )); break; -+ default: IF_DEBUG(linker_verbose,debugBelch("? " )); break; - } -- IF_DEBUG(linker,debugBelch(" " )); -+ IF_DEBUG(linker_verbose,debugBelch(" " )); - -- IF_DEBUG(linker,debugBelch("other=%2x ", stab[j].st_other )); -- IF_DEBUG(linker,debugBelch("name=%s [%x]\n", -+ IF_DEBUG(linker_verbose,debugBelch("other=%2x ", stab[j].st_other )); -+ IF_DEBUG(linker_verbose,debugBelch("name=%s [%x]\n", - ehdrC + shdr[shdr[i].sh_link].sh_offset - + stab[j].st_name, stab[j].st_name )); - } -@@ -579,7 +614,7 @@ ocVerifyImage_ELF ( ObjectCode* oc ) - // Not having a symbol table is not in principle a problem. - // When an object file has no symbols then the 'strip' program - // typically will remove the symbol table entirely. -- IF_DEBUG(linker,debugBelch(" no symbol tables (potentially, but not necessarily a problem)\n")); -+ IF_DEBUG(linker_verbose,debugBelch(" no symbol tables (potentially, but not necessarily a problem)\n")); - } - - return 1; -@@ -615,6 +650,13 @@ static SectionKind getSectionKind_ELF( Elf_Shdr *hdr, int *is_bss ) - /* .init_array section */ - return SECTIONKIND_INIT_ARRAY; - } -+#endif /* not SHT_INIT_ARRAY */ -+#if defined(SHT_FINI_ARRAY) -+ if (hdr->sh_type == SHT_FINI_ARRAY -+ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { -+ /* .fini_array section */ -+ return SECTIONKIND_FINI_ARRAY; -+ } - #endif /* not SHT_INIT_ARRAY */ - if (hdr->sh_type == SHT_NOBITS - && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { -@@ -638,7 +680,7 @@ mapObjectFileSection (int fd, Elf_Word offset, Elf_Word size, - - pageOffset = roundDownToPage(offset); - pageSize = roundUpToPage(offset-pageOffset+size); -- p = mmapForLinker(pageSize, PROT_READ | PROT_WRITE, 0, fd, pageOffset); -+ p = mmapForLinker(pageSize, MEM_READ_WRITE, 0, fd, pageOffset); - if (p == NULL) return NULL; - *mapped_size = pageSize; - *mapped_offset = pageOffset; -@@ -659,7 +701,7 @@ ocGetNames_ELF ( ObjectCode* oc ) - Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); - Section * sections; - #if defined(SHN_XINDEX) -- Elf_Word* shndxTable = get_shndx_table(ehdr); -+ Elf_Word* shndxTable = get_shndx_table(oc); - #endif - const Elf_Word shnum = elf_shnum(ehdr); - -@@ -691,12 +733,72 @@ ocGetNames_ELF ( ObjectCode* oc ) - StgWord size = shdr[i].sh_size; - StgWord offset = shdr[i].sh_offset; - StgWord align = shdr[i].sh_addralign; -+ const char *sh_name = oc->info->sectionHeaderStrtab + shdr[i].sh_name; -+ -+ /* -+ * Identify initializer and finalizer lists -+ * -+ * See Note [Initializers and finalizers (ELF)]. -+ */ -+ if (kind == SECTIONKIND_CODE_OR_RODATA -+ && 0 == memcmp(".init", sh_name, 5)) { -+ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_INIT, 0); -+ } else if (kind == SECTIONKIND_CODE_OR_RODATA -+ && 0 == memcmp(".fini", sh_name, 5)) { -+ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_FINI, 0); -+ } else if (kind == SECTIONKIND_INIT_ARRAY -+ || 0 == memcmp(".init_array", sh_name, 11)) { -+ uint32_t prio; -+ if (sscanf(sh_name, ".init_array.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ prio += 0x10000; // .init_arrays run after .ctors -+ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_INIT_ARRAY, prio); -+ kind = SECTIONKIND_INIT_ARRAY; -+ } else if (kind == SECTIONKIND_FINI_ARRAY -+ || 0 == memcmp(".fini_array", sh_name, 11)) { -+ uint32_t prio; -+ if (sscanf(sh_name, ".fini_array.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ prio += 0x10000; // .fini_arrays run before .dtors -+ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_FINI_ARRAY, prio); -+ kind = SECTIONKIND_FINI_ARRAY; -+ -+ /* N.B. a compilation unit may have more than one .ctor section; we -+ * must run them all. See #21618 for a case where this happened */ -+ } else if (0 == memcmp(".ctors", sh_name, 6)) { -+ uint32_t prio; -+ if (sscanf(sh_name, ".ctors.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ // .ctors/.dtors are executed in reverse order: higher numbers are -+ // executed first -+ prio = 0xffff - prio; -+ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_CTORS, prio); -+ kind = SECTIONKIND_INIT_ARRAY; -+ } else if (0 == memcmp(".dtors", sh_name, 6)) { -+ uint32_t prio; -+ if (sscanf(sh_name, ".dtors.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ // .ctors/.dtors are executed in reverse order: higher numbers are -+ // executed first -+ prio = 0xffff - prio; -+ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_DTORS, prio); -+ kind = SECTIONKIND_FINI_ARRAY; -+ } -+ - - if (is_bss && size > 0) { - /* This is a non-empty .bss section. Allocate zeroed space for - it, and set its .sh_offset field such that - ehdrC + .sh_offset == addr_of_zeroed_space. */ --#if defined(NEED_GOT) || RTS_LINKER_USE_MMAP -+#if RTS_LINKER_USE_MMAP - if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { - /* The space for bss sections is already preallocated */ - CHECK(oc->bssBegin != NULL); -@@ -760,9 +862,9 @@ ocGetNames_ELF ( ObjectCode* oc ) - - void * mem = mmapAnonForLinker(size+stub_space); - -- if( mem == NULL ) { -- barf("failed to mmap allocated memory to load section %d. " -- "errno = %d", i, errno); -+ if( mem == MAP_FAILED ) { -+ barf("failed to mmap allocated memory to load section %d. " -+ "errno = %d", i, errno); - } - - /* copy only the image part over; we don't want to copy data -@@ -783,17 +885,19 @@ ocGetNames_ELF ( ObjectCode* oc ) - alloc = SECTION_NOMEM; - } - // use the m32 allocator if either the image is not mapped -- // (i.e. we cannot map the secions separately), or if the section -+ // (i.e. we cannot map the sections separately), or if the section - // size is small. - else if (!oc->imageMapped || size < getPageSize() / 3) { - bool executable = kind == SECTIONKIND_CODE_OR_RODATA; - m32_allocator *allocator = executable ? oc->rx_m32 : oc->rw_m32; -- // align on 16 bytes. The reason being that llvm will emit see -- // paddq statements for x86_64 under optimisation and load from -- // RODATA sections. Specifically .rodata.cst16. However we don't -- // handle the cst part in any way what so ever, so 16 seems -- // better than 8. -- start = m32_alloc(allocator, size, 16); -+ // Correctly align the section. This is particularly important for -+ // the alignment of .rodata.cstNN sections. -+ // -+ // llvm will emit see paddq statements for x86_64 under -+ // optimisation and load from RODATA sections, specifically -+ // .rodata.cst16. Also we may encounter .rodata.cst32 sections -+ // in objects using AVX instructions (see #23066). -+ start = m32_alloc(allocator, size, align); - if (start == NULL) goto fail; - memcpy(start, oc->image + offset, size); - alloc = SECTION_M32; -@@ -829,13 +933,9 @@ ocGetNames_ELF ( ObjectCode* oc ) - oc->sections[i].info->stub_size = 0; - oc->sections[i].info->stubs = NULL; - } -- oc->sections[i].info->name = oc->info->sectionHeaderStrtab -- + shdr[i].sh_name; -+ oc->sections[i].info->name = sh_name; - oc->sections[i].info->sectionHeader = &shdr[i]; - -- -- -- - if (shdr[i].sh_type != SHT_SYMTAB) continue; - - /* copy stuff into this module's object symbol table */ -@@ -899,7 +999,7 @@ ocGetNames_ELF ( ObjectCode* oc ) - secno = shndx; - #if defined(SHN_XINDEX) - if (shndx == SHN_XINDEX) { -- ASSERT(shndxTable); -+ CHECK(shndxTable); - secno = shndxTable[j]; - } - #endif -@@ -908,15 +1008,15 @@ ocGetNames_ELF ( ObjectCode* oc ) - - if (shndx == SHN_COMMON) { - isLocal = false; -- ASSERT(common_used < common_size); -- ASSERT(common_mem); -+ CHECK(common_used < common_size); -+ CHECK(common_mem); - symbol->addr = (void*)((uintptr_t)common_mem + common_used); - common_used += symbol->elf_sym->st_size; -- ASSERT(common_used <= common_size); -+ CHECK(common_used <= common_size); - -- IF_DEBUG(linker, -- debugBelch("COMMON symbol, size %ld name %s allocated at %p\n", -- symbol->elf_sym->st_size, nm, symbol->addr)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("COMMON symbol, size %llu name %s allocated at %p\n", -+ (long long unsigned int) symbol->elf_sym->st_size, nm, symbol->addr)); - - /* Pointless to do addProddableBlock() for this area, - since the linker should never poke around in it. */ -@@ -941,7 +1041,7 @@ ocGetNames_ELF ( ObjectCode* oc ) - ) - ) { - /* Section 0 is the undefined section, hence > and not >=. */ -- ASSERT(secno > 0 && secno < shnum); -+ CHECK(secno > 0 && secno < shnum); - /* - if (shdr[secno].sh_type == SHT_NOBITS) { - debugBelch(" BSS symbol, size %d off %d name %s\n", -@@ -951,12 +1051,12 @@ ocGetNames_ELF ( ObjectCode* oc ) - symbol->addr = (SymbolAddr*)( - (intptr_t) oc->sections[secno].start + - (intptr_t) symbol->elf_sym->st_value); -- ASSERT(symbol->addr != 0x0); -+ CHECK(symbol->addr != 0x0); - if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL) { - isLocal = true; - isWeak = false; - } else { /* STB_GLOBAL or STB_WEAK */ -- IF_DEBUG(linker, -+ IF_DEBUG(linker_verbose, - debugBelch("addOTabName(GLOB): %10p %s %s\n", - symbol->addr, oc->fileName, nm)); - isLocal = false; -@@ -965,10 +1065,20 @@ ocGetNames_ELF ( ObjectCode* oc ) - } - } - -+ SymType sym_type; -+ if (ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_FUNC) { -+ sym_type = SYM_TYPE_CODE; -+ } else { -+ sym_type = SYM_TYPE_DATA; -+ } -+ if(ELF_ST_VISIBILITY(symbol->elf_sym->st_other) == STV_HIDDEN) { -+ sym_type |= SYM_TYPE_HIDDEN; -+ } -+ - /* And the decision is ... */ - - if (symbol->addr != NULL) { -- ASSERT(nm != NULL); -+ CHECK(nm != NULL); - /* Acquire! */ - if (!isLocal) { - -@@ -976,18 +1086,18 @@ ocGetNames_ELF ( ObjectCode* oc ) - setWeakSymbol(oc, nm); - } - if (!ghciInsertSymbolTable(oc->fileName, symhash, -- nm, symbol->addr, -- isWeak | ((ELF_ST_VISIBILITY(symbol->elf_sym->st_other) == STV_HIDDEN) << 1), -- oc) -+ nm, symbol->addr, isWeak, sym_type, oc) - ) { - goto fail; - } -- oc->symbols[curSymbol++].name = nm; -+ oc->symbols[curSymbol].name = nm; - oc->symbols[curSymbol].addr = symbol->addr; -+ oc->symbols[curSymbol].type = sym_type; -+ curSymbol++; - } - } else { - /* Skip. */ -- IF_DEBUG(linker, -+ IF_DEBUG(linker_verbose, - debugBelch("skipping `%s'\n", - nm) - ); -@@ -1006,13 +1116,11 @@ ocGetNames_ELF ( ObjectCode* oc ) - } - } - --#if defined(NEED_GOT) - if(makeGot( oc )) - errorBelch("Failed to create GOT for %s", - oc->archiveMemberName - ? oc->archiveMemberName - : oc->fileName); --#endif - result = 1; - goto end; - -@@ -1052,16 +1160,16 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - break; - } - } -- ASSERT(stab != NULL); -+ CHECK(stab != NULL); - - targ = (Elf_Word*)oc->sections[target_shndx].start; -- IF_DEBUG(linker,debugBelch( -+ IF_DEBUG(linker_verbose,debugBelch( - "relocations for section %d using symtab %d\n", - target_shndx, symtab_shndx)); - - /* Skip sections that we're not interested in. */ - if (oc->sections[target_shndx].kind == SECTIONKIND_OTHER) { -- IF_DEBUG(linker,debugBelch( "skipping (target section not loaded)")); -+ IF_DEBUG(linker_verbose,debugBelch( "skipping (target section not loaded)")); - return 1; - } - -@@ -1101,10 +1209,10 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - - ElfSymbol * symbol = NULL; - -- IF_DEBUG(linker,debugBelch( "Rel entry %3d is raw(%6p %6p): ", -+ IF_DEBUG(linker_verbose,debugBelch( "Rel entry %3d is raw(%6p %6p): ", - j, (void*)offset, (void*)info )); - if (!info) { -- IF_DEBUG(linker,debugBelch( " ZERO" )); -+ IF_DEBUG(linker_verbose,debugBelch( " ZERO" )); - S = 0; - } else { - symbol = &stab->symbols[ELF_R_SYM(info)]; -@@ -1112,7 +1220,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL || strncmp(symbol->name, "_GLOBAL_OFFSET_TABLE_", 21) == 0) { - S = (Elf_Addr)symbol->addr; - } else { -- S_tmp = lookupDependentSymbol( symbol->name, oc ); -+ S_tmp = lookupDependentSymbol( symbol->name, oc, NULL ); - S = (Elf_Addr)S_tmp; - } - if (!S) { -@@ -1120,7 +1228,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - oc->fileName, symbol->name); - return 0; - } -- IF_DEBUG(linker,debugBelch( "`%s' resolves to %p\n", symbol->name, -+ IF_DEBUG(linker_verbose,debugBelch( "`%s' resolves to %p\n", symbol->name, - (void*)S )); - - #if defined(arm_HOST_ARCH) -@@ -1159,9 +1267,14 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - } - - int reloc_type = ELF_R_TYPE(info); -- IF_DEBUG(linker,debugBelch("Reloc: P = %p S = %p A = %p type=%d\n", -- (void*)P, (void*)S, (void*)A, reloc_type )); -+ IF_DEBUG(linker_verbose, -+ debugBelch("Reloc: P = %p S = %p A = %p type=%d\n", -+ (void*)P, (void*)S, (void*)A, reloc_type )); -+#if defined(DEBUG) - checkProddableBlock ( oc, pP, sizeof(Elf_Word) ); -+#else -+ (void) pP; /* suppress unused varialbe warning in non-debug build */ -+#endif - - #if defined(i386_HOST_ARCH) - value = S + A; -@@ -1233,6 +1346,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - - if(needs_veneer) { /* overflow or thum interworking */ - // Note [PC bias] -+ // ~~~~~~~~~~~~~~ - // From the ELF for the ARM Architecture documentation: - // > 4.6.1.1 Addends and PC-bias compensation - // > A binary file may use REL or RELA relocations or a mixture -@@ -1258,7 +1372,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - result = ((S + A) | T) - P; - result &= ~1; // Clear thumb indicator bit - -- ASSERT(isInt(26, result)); /* X in range */ -+ CHECK(isInt(26, result)); /* X in range */ - } - - // Update the branch target -@@ -1273,7 +1387,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - const StgWord32 hBit = (result & 0x2) >> 1; - // Change instruction to BLX - *word = (*word & ~0xFF000000) | ((0xfa | hBit) << 24); -- IF_DEBUG(linker, debugBelch("Changed BL to BLX at %p\n", word)); -+ IF_DEBUG(linker_verbose, debugBelch("Changed BL to BLX at %p\n", word)); - } - break; - } -@@ -1433,7 +1547,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - case COMPAT_R_ARM_GOT_PREL: { - int32_t A = *pP; - void* GOT_S = symbol->got_addr; -- ASSERT(GOT_S); -+ CHECK(GOT_S); - *(uint32_t *)P = (uint32_t) GOT_S + A - P; - break; - } -@@ -1449,8 +1563,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, - return 1; - } - --/* Do ELF relocations for which explicit addends are supplied. -- sparc-solaris relocations appear to be of this form. */ -+/* Do ELF relocations for which explicit addends are supplied. */ - static int - do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, - Elf_Shdr* shdr, int shnum ) -@@ -1465,10 +1578,9 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, - int strtab_shndx = shdr[symtab_shndx].sh_link; - int target_shndx = shdr[shnum].sh_info; - #if defined(SHN_XINDEX) -- Elf_Word* shndx_table = get_shndx_table((Elf_Ehdr*)ehdrC); -+ Elf_Word* shndx_table = get_shndx_table(oc); - #endif --#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ -- || defined(x86_64_HOST_ARCH) -+#if defined(DEBUG) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) - /* This #if def only serves to avoid unused-var warnings. */ - Elf_Addr targ = (Elf_Addr) oc->sections[target_shndx].start; - #endif -@@ -1476,49 +1588,75 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, - stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset); - strtab= (char*) (ehdrC + shdr[ strtab_shndx ].sh_offset); - -- IF_DEBUG(linker,debugBelch( "relocations for section %d using symtab %d\n", -+ IF_DEBUG(linker_verbose,debugBelch( "relocations for section %d using symtab %d\n", - target_shndx, symtab_shndx )); - - /* Skip sections that we're not interested in. */ - if (oc->sections[target_shndx].kind == SECTIONKIND_OTHER) { -- IF_DEBUG(linker,debugBelch( "skipping (target section not loaded)")); -+ IF_DEBUG(linker_verbose,debugBelch( "skipping (target section not loaded)")); - return 1; - } - - for (j = 0; j < nent; j++) { --#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ -- || defined(x86_64_HOST_ARCH) -+#if defined(DEBUG) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) - /* This #if def only serves to avoid unused-var warnings. */ - Elf_Addr offset = rtab[j].r_offset; - Elf_Addr P = targ + offset; - Elf_Addr A = rtab[j].r_addend; - #endif --#if defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ -- || defined(x86_64_HOST_ARCH) -+#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) - Elf_Addr value; - #endif - Elf_Addr info = rtab[j].r_info; - Elf_Addr S; - void* S_tmp; --# if defined(sparc_HOST_ARCH) -- Elf_Word* pP = (Elf_Word*)P; -- Elf_Word w1, w2; --# elif defined(powerpc_HOST_ARCH) -+# if defined(powerpc_HOST_ARCH) - Elf_Sword delta; - # endif - -- IF_DEBUG(linker,debugBelch( "Rel entry %3d is raw(%6p %6p %6p) ", -+ IF_DEBUG(linker_verbose,debugBelch( "Rel entry %3d is raw(%6p %6p %6p) ", - j, (void*)offset, (void*)info, - (void*)A )); - if (!info) { -- IF_DEBUG(linker,debugBelch( " ZERO" )); -+ IF_DEBUG(linker_verbose,debugBelch( " ZERO" )); - S = 0; - } else { - Elf_Sym sym = stab[ELF_R_SYM(info)]; -- /* First see if it is a local symbol. */ -- if (ELF_ST_BIND(sym.st_info) == STB_LOCAL) { -- /* Yes, so we can get the address directly from the ELF symbol -- table. */ -+ if (ELF_R_TYPE(info) == COMPAT_R_X86_64_TLSGD) { -+ /* -+ * No support for TLSGD variables *defined* by the object, -+ * only references to *external* TLS variables in already -+ * loaded shared objects (the executable, libc, ...) are -+ * supported. See Note [TLSGD relocation] in elf_tlsgd.c. -+ */ -+ symbol = sym.st_name == 0 ? "(noname)" : strtab+sym.st_name; -+ if (ELF_ST_BIND(sym.st_info) == STB_LOCAL -+ || sym.st_value != 0 || sym.st_name == 0) { -+ errorBelch("%s: unsupported internal ELF TLSGD relocation for" -+ " symbol `%s'", oc->fileName, symbol); -+ return 0; -+ } -+#if defined(x86_64_HOST_ARCH) && defined(freebsd_HOST_OS) -+ S = lookupTlsgdSymbol(symbol, ELF_R_SYM(info), oc); -+#else -+ errorBelch("%s: ELF TLSGD relocation for symbol `%s'" -+ " not supported on the target platform", -+ oc->fileName, symbol); -+ return 0; -+#endif -+ } else if (ELF_ST_BIND(sym.st_info) == STB_LOCAL) { -+ /* -+ * For local symbols, we can get the address directly from the ELF -+ * symbol table. -+ * -+ * XXX: Is STB_LOCAL the right test here? Should we instead be -+ * checking whether the symbol is *defined* by the current object? -+ * Defined globals also need relocation. Perhaps the point is that -+ * conflicts are resolved in favour of any prior definition, so we -+ * must look at the accumulated symbol table instead (which has -+ * already been updated with our global symbols by the time we get -+ * here). -+ */ - symbol = sym.st_name==0 ? "(noname)" : strtab+sym.st_name; - /* See Note [Many ELF Sections] */ - Elf_Word secno = sym.st_shndx; -@@ -1530,78 +1668,30 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, - S = (Elf_Addr)oc->sections[secno].start - + stab[ELF_R_SYM(info)].st_value; - } else { -- /* No, so look up the name in our global table. */ -+ /* If not local, look up the name in our global table. */ - symbol = strtab + sym.st_name; -- S_tmp = lookupDependentSymbol( symbol, oc ); -+ S_tmp = lookupDependentSymbol( symbol, oc, NULL ); - S = (Elf_Addr)S_tmp; - } - if (!S) { - errorBelch("%s: unknown symbol `%s'", oc->fileName, symbol); - return 0; - } -- IF_DEBUG(linker,debugBelch("`%s' resolves to %p\n", symbol, (void*)S)); -+ IF_DEBUG(linker_verbose,debugBelch("`%s' resolves to %p\n", symbol, (void*)S)); - } - --#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ -- || defined(x86_64_HOST_ARCH) -- IF_DEBUG(linker,debugBelch("Reloc: P = %p S = %p A = %p\n", -- (void*)P, (void*)S, (void*)A )); -+#if defined(DEBUG) -+ IF_DEBUG(linker_verbose,debugBelch("Reloc: P = %p S = %p A = %p\n", -+ (void*)P, (void*)S, (void*)A )); - checkProddableBlock(oc, (void*)P, sizeof(Elf_Word)); - #endif - --#if defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) \ -- || defined(x86_64_HOST_ARCH) -+#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) - value = S + A; - #endif - - switch (ELF_R_TYPE(info)) { --# if defined(sparc_HOST_ARCH) -- case R_SPARC_WDISP30: -- w1 = *pP & 0xC0000000; -- w2 = (Elf_Word)((value - P) >> 2); -- ASSERT((w2 & 0xC0000000) == 0); -- w1 |= w2; -- *pP = w1; -- break; -- case R_SPARC_HI22: -- w1 = *pP & 0xFFC00000; -- w2 = (Elf_Word)(value >> 10); -- ASSERT((w2 & 0xFFC00000) == 0); -- w1 |= w2; -- *pP = w1; -- break; -- case R_SPARC_LO10: -- w1 = *pP & ~0x3FF; -- w2 = (Elf_Word)(value & 0x3FF); -- ASSERT((w2 & ~0x3FF) == 0); -- w1 |= w2; -- *pP = w1; -- break; -- -- /* According to the Sun documentation: -- R_SPARC_UA32 -- This relocation type resembles R_SPARC_32, except it refers to an -- unaligned word. That is, the word to be relocated must be treated -- as four separate bytes with arbitrary alignment, not as a word -- aligned according to the architecture requirements. -- */ -- case R_SPARC_UA32: -- w2 = (Elf_Word)value; -- -- // SPARC doesn't do misaligned writes of 32 bit words, -- // so we have to do this one byte-at-a-time. -- char *pPc = (char*)pP; -- pPc[0] = (char) ((Elf_Word)(w2 & 0xff000000) >> 24); -- pPc[1] = (char) ((Elf_Word)(w2 & 0x00ff0000) >> 16); -- pPc[2] = (char) ((Elf_Word)(w2 & 0x0000ff00) >> 8); -- pPc[3] = (char) ((Elf_Word)(w2 & 0x000000ff)); -- break; -- -- case R_SPARC_32: -- w2 = (Elf_Word)value; -- *pP = w2; -- break; --# elif defined(powerpc_HOST_ARCH) -+# if defined(powerpc_HOST_ARCH) - case R_PPC_ADDR16_LO: - *(Elf32_Half*) P = value; - break; -@@ -1753,6 +1843,19 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, - memcpy((void*)P, &payload, sizeof(payload)); - break; - } -+ case COMPAT_R_X86_64_TLSGD: -+ { -+ StgInt64 off = S + A - P; -+ if (off != (Elf64_Sword)off) { -+ barf( -+ "COMPAT_R_X86_64_TLSGD relocation out of range: " -+ "%s = %" PRIx64 " in %s.", -+ symbol, off, oc->fileName); -+ } -+ Elf64_Sword payload = off; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } - #if defined(dragonfly_HOST_OS) - case COMPAT_R_X86_64_GOTTPOFF: - { -@@ -1820,7 +1923,7 @@ ocMprotect_Elf( ObjectCode *oc ) - if (section->alloc != SECTION_M32) { - // N.B. m32 handles protection of its allocations during - // flushing. -- mmapForLinkerMarkExecutable(section->mapped_start, section->mapped_size); -+ mprotectForLinker(section->mapped_start, section->mapped_size, MEM_READ_EXECUTE); - } - break; - default: -@@ -1840,7 +1943,7 @@ ocResolve_ELF ( ObjectCode* oc ) - const Elf_Word shnum = elf_shnum(ehdr); - - #if defined(SHN_XINDEX) -- Elf_Word* shndxTable = get_shndx_table(ehdr); -+ Elf_Word* shndxTable = get_shndx_table(oc); - #endif - - /* resolve section symbols -@@ -1873,25 +1976,23 @@ ocResolve_ELF ( ObjectCode* oc ) - Elf_Word secno = symbol->elf_sym->st_shndx; - #if defined(SHN_XINDEX) - if (secno == SHN_XINDEX) { -- ASSERT(shndxTable); -+ CHECK(shndxTable); - secno = shndxTable[i]; - } - #endif -- ASSERT(symbol->elf_sym->st_name == 0); -- ASSERT(symbol->elf_sym->st_value == 0); -- ASSERT(0x0 != oc->sections[ secno ].start); -+ CHECK(symbol->elf_sym->st_name == 0); -+ CHECK(symbol->elf_sym->st_value == 0); -+ CHECK(0x0 != oc->sections[ secno ].start); - symbol->addr = oc->sections[ secno ].start; - } - } - } - --#if defined(NEED_GOT) - if(fillGot( oc )) - return 0; - /* silence warnings */ - (void) shnum; - (void) shdr; --#endif /* NEED_GOT */ - - #if defined(aarch64_HOST_ARCH) - /* use new relocation design */ -@@ -1921,61 +2022,209 @@ ocResolve_ELF ( ObjectCode* oc ) - return ocMprotect_Elf(oc); - } - -+/* -+ * Note [Initializers and finalizers (ELF)] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * The System V ABI describes a facility for allowing object code to mark -+ * functions to be run at load time. These functions are known as -+ * "initializers" (or "constructors"). Initializers are recorded in a section -+ * marked with the DT_INIT tag (often with the name `.init`). -+ * -+ * There is also a similar mechanism for code to be run at unload time (e.g. -+ * during program termination). These are known as finalizers and are collected -+ * in `.fini` section. -+ * -+ * For more about how the code generator emits initializers and finalizers see -+ * Note [Initializers and finalizers in Cmm] in GHC.Cmm.InitFini. -+ * -+ * See also: the "Initialization and Termination Functions" section of the -+ * System V ABI. -+ * -+ * Note [GCC 6 init/fini section workaround] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * The System V ABI specifies that .init_array and .fini_array sections should -+ * be marked with the SHT_INIT_ARRAY/SHT_FINI_ARRAY section types. However, it -+ * seems that GCC 6 (at least on i386) produces sections *named* -+ * .init_array/.fini_array but marks them as SHT_PROGBITS. Consequently we need -+ * to augment the usual section type check (which in an ideal world would be -+ * sufficient) with a check looking at the section name to catch this case. -+ */ -+ -+// Run the constructors/initializers of an ObjectCode. -+// Returns 1 on success. -+// See Note [Initializers and finalizers (ELF)]. - int ocRunInit_ELF( ObjectCode *oc ) - { -- Elf_Word i; -- char* ehdrC = (char*)(oc->image); -- Elf_Ehdr* ehdr = (Elf_Ehdr*) ehdrC; -- Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); -- char* sh_strtab = ehdrC + shdr[elf_shstrndx(ehdr)].sh_offset; -- int argc, envc; -- char **argv, **envv; -- -- getProgArgv(&argc, &argv); -- getProgEnvv(&envc, &envv); -- -- // XXX Apparently in some archs .init may be something -- // special! See DL_DT_INIT_ADDRESS macro in glibc -- // as well as ELF_FUNCTION_PTR_IS_SPECIAL. We've not handled -- // it here, please file a bug report if it affects you. -- for (i = 0; i < elf_shnum(ehdr); i++) { -- init_t *init_start, *init_end, *init; -- int is_bss = false; -- SectionKind kind = getSectionKind_ELF(&shdr[i], &is_bss); -- if (kind == SECTIONKIND_CODE_OR_RODATA -- && 0 == memcmp(".init", sh_strtab + shdr[i].sh_name, 5)) { -- init_t init_f = (init_t)(oc->sections[i].start); -- init_f(argc, argv, envv); -- } -+ if (oc && oc->info && oc->info->init) { -+ return runInit(&oc->info->init); -+ } -+ return true; -+} - -- if (kind == SECTIONKIND_INIT_ARRAY) { -- char *init_startC = oc->sections[i].start; -- init_start = (init_t*)init_startC; -- init_end = (init_t*)(init_startC + shdr[i].sh_size); -- for (init = init_start; init < init_end; init++) { -- ASSERT(0x0 != *init); -- (*init)(argc, argv, envv); -- } -- } -+// Run the finalizers of an ObjectCode. -+// Returns 1 on success. -+// See Note [Initializers and finalizers (ELF)]. -+int ocRunFini_ELF( ObjectCode *oc ) -+{ -+ if (oc && oc->info && oc->info->fini) { -+ return runFini(&oc->info->fini); -+ } -+ return true; -+} - -- // XXX could be more strict and assert that it's -- // SECTIONKIND_RWDATA; but allowing RODATA seems harmless enough. -- if ((kind == SECTIONKIND_RWDATA || kind == SECTIONKIND_CODE_OR_RODATA) -- && 0 == memcmp(".ctors", sh_strtab + shdr[i].sh_name, 6)) { -- char *init_startC = oc->sections[i].start; -- init_start = (init_t*)init_startC; -- init_end = (init_t*)(init_startC + shdr[i].sh_size); -- // ctors run in reverse -- for (init = init_end - 1; init >= init_start; init--) { -- (*init)(argc, argv, envv); -- } -+/* -+ * Shared object loading -+ */ -+ -+#if defined(HAVE_DLINFO) -+struct piterate_cb_info { -+ ObjectCode *nc; -+ void *l_addr; /* base virtual address of the loaded code */ -+}; -+ -+static int loadNativeObjCb_(struct dl_phdr_info *info, -+ size_t _size STG_UNUSED, void *data) { -+ struct piterate_cb_info *s = (struct piterate_cb_info *) data; -+ -+ // This logic mimicks _dl_addr_inside_object from glibc -+ // For reference: -+ // int -+ // internal_function -+ // _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) -+ // { -+ // int n = l->l_phnum; -+ // const ElfW(Addr) reladdr = addr - l->l_addr; -+ // -+ // while (--n >= 0) -+ // if (l->l_phdr[n].p_type == PT_LOAD -+ // && reladdr - l->l_phdr[n].p_vaddr >= 0 -+ // && reladdr - l->l_phdr[n].p_vaddr < l->l_phdr[n].p_memsz) -+ // return 1; -+ // return 0; -+ // } -+ -+ if ((void*) info->dlpi_addr == s->l_addr) { -+ int n = info->dlpi_phnum; -+ while (--n >= 0) { -+ if (info->dlpi_phdr[n].p_type == PT_LOAD) { -+ NativeCodeRange* ncr = -+ stgMallocBytes(sizeof(NativeCodeRange), "loadNativeObjCb_"); -+ ncr->start = (void*) ((char*) s->l_addr + info->dlpi_phdr[n].p_vaddr); -+ ncr->end = (void*) ((char*) ncr->start + info->dlpi_phdr[n].p_memsz); -+ -+ ncr->next = s->nc->nc_ranges; -+ s->nc->nc_ranges = ncr; - } -+ } -+ } -+ return 0; -+} -+#endif /* defined(HAVE_DLINFO) */ -+ -+static void copyErrmsg(char** errmsg_dest, char* errmsg) { -+ if (errmsg == NULL) errmsg = "loadNativeObj_ELF: unknown error"; -+ *errmsg_dest = stgMallocBytes(strlen(errmsg)+1, "loadNativeObj_ELF"); -+ strcpy(*errmsg_dest, errmsg); -+} -+ -+// need dl_mutex -+void freeNativeCode_ELF (ObjectCode *nc) { -+ dlclose(nc->dlopen_handle); -+ -+ NativeCodeRange *ncr = nc->nc_ranges; -+ while (ncr) { -+ NativeCodeRange* last_ncr = ncr; -+ ncr = ncr->next; -+ stgFree(last_ncr); -+ } -+} -+ -+void * loadNativeObj_ELF (pathchar *path, char **errmsg) -+{ -+ ObjectCode* nc; -+ void *hdl, *retval; -+ -+ IF_DEBUG(linker, debugBelch("loadNativeObj_ELF %" PATH_FMT "\n", path)); -+ -+ retval = NULL; -+ ACQUIRE_LOCK(&dl_mutex); -+ -+ /* Loading the same object multiple times will lead to chaos -+ * as we will have two ObjectCodes but one underlying dlopen -+ * handle. Fail if this happens. -+ */ -+ if (getObjectLoadStatus_(path) != OBJECT_NOT_LOADED) { -+ copyErrmsg(errmsg, "loadNativeObj_ELF: Already loaded"); -+ goto dlopen_fail; - } - -- freeProgEnvv(envc, envv); -- return 1; -+ nc = mkOc(DYNAMIC_OBJECT, path, NULL, 0, false, NULL, 0); -+ -+ foreignExportsLoadingObject(nc); -+ hdl = dlopen(path, RTLD_NOW|RTLD_LOCAL); -+ nc->dlopen_handle = hdl; -+ foreignExportsFinishedLoadingObject(); -+ if (hdl == NULL) { -+ /* dlopen failed; save the message in errmsg */ -+ copyErrmsg(errmsg, dlerror()); -+ goto dlopen_fail; -+ } -+ -+#if defined(HAVE_DLINFO) -+ struct link_map *map; -+ if (dlinfo(hdl, RTLD_DI_LINKMAP, &map) == -1) { -+ /* dlinfo failed; save the message in errmsg */ -+ copyErrmsg(errmsg, dlerror()); -+ goto dlinfo_fail; -+ } -+ -+ hdl = NULL; // pass handle ownership to nc -+ -+ struct piterate_cb_info piterate_info = { -+ .nc = nc, -+ .l_addr = (void *) map->l_addr -+ }; -+ dl_iterate_phdr(loadNativeObjCb_, &piterate_info); -+ if (!nc->nc_ranges) { -+ copyErrmsg(errmsg, "dl_iterate_phdr failed to find obj"); -+ goto dl_iterate_phdr_fail; -+ } -+ nc->unloadable = true; -+#else -+ nc->nc_ranges = NULL; -+ nc->unloadable = false; -+#endif /* defined (HAVE_DLINFO) */ -+ -+ insertOCSectionIndices(nc); -+ -+ nc->next_loaded_object = loaded_objects; -+ loaded_objects = nc; -+ -+ retval = nc->dlopen_handle; -+ -+#if defined(PROFILING) -+ // collect any new cost centres that were defined in the loaded object. -+ refreshProfilingCCSs(); -+#endif -+ -+ goto success; -+ -+dl_iterate_phdr_fail: -+ // already have dl_mutex -+ freeNativeCode_ELF(nc); -+dlinfo_fail: -+ if (hdl) dlclose(hdl); -+dlopen_fail: -+success: -+ -+ RELEASE_LOCK(&dl_mutex); -+ -+ IF_DEBUG(linker, debugBelch("loadNativeObj_ELF result=%p\n", retval)); -+ -+ return retval; - } - -+ - /* - * PowerPC & X86_64 ELF specifics - */ -diff --git a/rts/linker/Elf.c.orig b/rts/linker/Elf.c.orig -new file mode 100644 -index 0000000..f668cfe ---- /dev/null -+++ b/rts/linker/Elf.c.orig -@@ -0,0 +1,2274 @@ -+#include "Rts.h" -+ -+#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) \ -+|| defined(linux_android_HOST_OS) \ -+|| defined(freebsd_HOST_OS) || defined(kfreebsdgnu_HOST_OS) \ -+|| defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) \ -+|| defined(openbsd_HOST_OS) || defined(gnu_HOST_OS) -+ -+// It is essential that this is included before any is included. -+// defines R_XXX relocations, which would interfere with the COMPAT_R_XXX -+// relocations we generate. E.g. COMPAT_ ## R_ARM_ARM32 would end up as -+// const unsigned COMPAT_3 = 0x03; instead of -+// const unsigned COMPAT_R_ARM_ARM32 = 0x03; -+#include "elf_compat.h" -+ -+#include "RtsUtils.h" -+#include "RtsSymbolInfo.h" -+#include "CheckUnload.h" -+#include "LinkerInternals.h" -+#include "linker/MMap.h" -+#include "linker/Elf.h" -+#include "linker/CacheFlush.h" -+#include "linker/M32Alloc.h" -+#include "linker/SymbolExtras.h" -+#include "ForeignExports.h" -+#include "Profiling.h" -+#include "sm/OSMem.h" -+#include "linker/util.h" -+#include "linker/elf_util.h" -+ -+#include -+#include -+#include -+#include -+#if defined(HAVE_DLFCN_H) -+#include -+#endif -+#if defined(HAVE_SYS_STAT_H) -+#include -+#endif -+#if defined(HAVE_SYS_TYPES_H) -+#include -+#endif -+#if defined(HAVE_FCNTL_H) -+#include -+#endif -+#if defined(dragonfly_HOST_OS) -+#include -+#endif -+ -+/* on x86_64 we have a problem with relocating symbol references in -+ * code that was compiled without -fPIC. By default, the small memory -+ * model is used, which assumes that symbol references can fit in a -+ * 32-bit slot. The system dynamic linker makes this work for -+ * references to shared libraries by either (a) allocating a jump -+ * table slot for code references, or (b) moving the symbol at load -+ * time (and copying its contents, if necessary) for data references. -+ * -+ * We unfortunately can't tell whether symbol references are to code -+ * or data. So for now we assume they are code (the vast majority -+ * are), and allocate jump-table slots. Unfortunately this will -+ * SILENTLY generate crashing code for data references. This hack is -+ * enabled by X86_64_ELF_NONPIC_HACK. -+ * -+ * One workaround is to use shared Haskell libraries. This is the case -+ * when dynamically-linked GHCi is used. -+ * -+ * Another workaround is to keep the static libraries but compile them -+ * with -fPIC -fexternal-dynamic-refs, because that will generate PIC -+ * references to data which can be relocated. This is the case when -+ * +RTS -xp is passed. -+ * -+ * See bug #781 -+ * See thread http://www.haskell.org/pipermail/cvs-ghc/2007-September/038458.html -+ * -+ * Naming Scheme for Symbol Macros -+ * -+ * SymI_*: symbol is internal to the RTS. It resides in an object -+ * file/library that is statically. -+ * SymE_*: symbol is external to the RTS library. It might be linked -+ * dynamically. -+ * -+ * Sym*_HasProto : the symbol prototype is imported in an include file -+ * or defined explicitly -+ * Sym*_NeedsProto: the symbol is undefined and we add a dummy -+ * default proto extern void sym(void); -+ */ -+#define X86_64_ELF_NONPIC_HACK (!RtsFlags.MiscFlags.linkerAlwaysPic) -+ -+#if defined(i386_HOST_ARCH) -+# define ELF_TARGET_386 /* Used inside */ -+#elif defined(x86_64_HOST_ARCH) -+# define ELF_TARGET_X64_64 -+# define ELF_TARGET_AMD64 /* Used inside on Solaris 11 */ -+#endif -+ -+#if !defined(openbsd_HOST_OS) -+# include -+#else -+/* openbsd elf has things in different places, with diff names */ -+# include -+#endif -+ -+#include "elf_got.h" -+ -+#if defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH) -+# define NEED_PLT -+# include "elf_plt.h" -+# include "elf_reloc.h" -+#endif -+ -+/* -+ Note [Many ELF Sections] -+ ~~~~~~~~~~~~~~~~~~~~~~~~ -+ The normal section number fields in ELF are limited to 16 bits, which runs -+ out of bits when you try to cram in more sections than that. -+ -+ To solve this, the fields e_shnum and e_shstrndx in the ELF header have an -+ escape value (different for each case), and the actual section number is -+ stashed into unused fields in the first section header. -+ -+ For symbols, there seems to have been no place in the actual symbol table -+ for the extra bits, so the indexes have been moved into an auxiliary -+ section instead. -+ For symbols in sections beyond 0xff00, the symbol's st_shndx will be an -+ escape value (SHN_XINDEX), and the actual 32-bit section number for symbol N -+ is stored at index N in the SHT_SYMTAB_SHNDX table. -+ -+ These extensions seem to be undocumented in version 4.1 of the ABI and only -+ appear in the drafts for the "next" version: -+ https://refspecs.linuxfoundation.org/elf/gabi4+/contents.html -+ -+*/ -+ -+#if defined(SHN_XINDEX) -+/* global variable which address is used to signal an uninitialised shndx_table */ -+Elf_Word shndx_table_uninit_label = 0; -+#endif -+ -+static Elf_Word elf_shnum(Elf_Ehdr* ehdr) -+{ -+ Elf_Shdr* shdr = (Elf_Shdr*) ((char*)ehdr + ehdr->e_shoff); -+ Elf_Half shnum = ehdr->e_shnum; -+ return shnum != SHN_UNDEF ? shnum : shdr[0].sh_size; -+} -+ -+static Elf_Word elf_shstrndx(Elf_Ehdr* ehdr) -+{ -+ Elf_Half shstrndx = ehdr->e_shstrndx; -+#if defined(SHN_XINDEX) -+ Elf_Shdr* shdr = (Elf_Shdr*) ((char*)ehdr + ehdr->e_shoff); -+ return shstrndx != SHN_XINDEX ? shstrndx : shdr[0].sh_link; -+#else -+ // some OSes do not support SHN_XINDEX yet, let's revert to -+ // old way -+ return shstrndx; -+#endif -+} -+ -+#if defined(SHN_XINDEX) -+static Elf_Word* -+get_shndx_table(ObjectCode* oc) -+{ -+ if (RTS_LIKELY(oc->shndx_table != SHNDX_TABLE_UNINIT)) { -+ return oc->shndx_table; -+ } -+ -+ Elf_Word i; -+ char* ehdrC = oc->image; -+ Elf_Ehdr* ehdr = (Elf_Ehdr*)ehdrC; -+ Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); -+ const Elf_Word shnum = elf_shnum(ehdr); -+ -+ for (i = 0; i < shnum; i++) { -+ if (shdr[i].sh_type == SHT_SYMTAB_SHNDX) { -+ oc->shndx_table = (Elf32_Word*)(ehdrC + shdr[i].sh_offset); -+ return oc->shndx_table; -+ } -+ } -+ return NULL; -+} -+#endif -+ -+/* -+ * ocInit and ocDeinit -+ */ -+ -+void -+ocInit_ELF(ObjectCode * oc) -+{ -+ ocDeinit_ELF(oc); -+ -+ oc->info = (struct ObjectCodeFormatInfo*)stgCallocBytes( -+ 1, sizeof *oc->info, -+ "ocInit_Elf(ObjectCodeFormatInfo)"); -+ // TODO: fill info -+ oc->info->elfHeader = (Elf_Ehdr *)oc->image; -+ oc->info->programHeader = (Elf_Phdr *) ((uint8_t*)oc->image -+ + oc->info->elfHeader->e_phoff); -+ oc->info->sectionHeader = (Elf_Shdr *) ((uint8_t*)oc->image -+ + oc->info->elfHeader->e_shoff); -+ oc->info->sectionHeaderStrtab = (char*)((uint8_t*)oc->image + -+ oc->info->sectionHeader[oc->info->elfHeader->e_shstrndx].sh_offset); -+ -+ oc->n_sections = elf_shnum(oc->info->elfHeader); -+ -+ ElfRelocationTable *relTableLast = NULL; -+ ElfRelocationATable *relaTableLast = NULL; -+ ElfSymbolTable *symbolTablesLast = NULL; -+ -+ /* get the symbol table(s) */ -+ for(int i=0; i < oc->n_sections; i++) { -+ if(SHT_REL == oc->info->sectionHeader[i].sh_type) { -+ ElfRelocationTable *relTab = (ElfRelocationTable *)stgCallocBytes( -+ 1, sizeof(ElfRelocationTable), -+ "ocInit_Elf(ElfRelocationTable"); -+ relTab->index = i; -+ -+ relTab->relocations = -+ (Elf_Rel*) ((uint8_t*)oc->info->elfHeader -+ + oc->info->sectionHeader[i].sh_offset); -+ relTab->n_relocations = oc->info->sectionHeader[i].sh_size -+ / sizeof(Elf_Rel); -+ relTab->targetSectionIndex = oc->info->sectionHeader[i].sh_info; -+ -+ relTab->sectionHeader = &oc->info->sectionHeader[i]; -+ -+ if(relTableLast == NULL) { -+ oc->info->relTable = relTab; -+ relTableLast = relTab; -+ } else { -+ relTableLast->next = relTab; -+ relTableLast = relTab; -+ } -+ -+ } else if(SHT_RELA == oc->info->sectionHeader[i].sh_type) { -+ ElfRelocationATable *relTab = (ElfRelocationATable *)stgCallocBytes( -+ 1, sizeof(ElfRelocationATable), -+ "ocInit_Elf(ElfRelocationTable"); -+ relTab->index = i; -+ -+ relTab->relocations = -+ (Elf_Rela*) ((uint8_t*)oc->info->elfHeader -+ + oc->info->sectionHeader[i].sh_offset); -+ relTab->n_relocations = oc->info->sectionHeader[i].sh_size -+ / sizeof(Elf_Rela); -+ relTab->targetSectionIndex = oc->info->sectionHeader[i].sh_info; -+ -+ relTab->sectionHeader = &oc->info->sectionHeader[i]; -+ -+ if(relaTableLast == NULL) { -+ oc->info->relaTable = relTab; -+ relaTableLast = relTab; -+ } else { -+ relaTableLast->next = relTab; -+ relaTableLast = relTab; -+ } -+ -+ } else if(SHT_SYMTAB == oc->info->sectionHeader[i].sh_type) { -+ -+ ElfSymbolTable *symTab = (ElfSymbolTable *)stgCallocBytes( -+ 1, sizeof(ElfSymbolTable), -+ "ocInit_Elf(ElfSymbolTable"); -+ -+ symTab->index = i; /* store the original index, so we can later -+ * find or assert that we are dealing with the -+ * correct symbol table */ -+ -+ Elf_Sym *stab = (Elf_Sym*)((uint8_t*)oc->info->elfHeader -+ + oc->info->sectionHeader[i].sh_offset); -+ symTab->n_symbols = oc->info->sectionHeader[i].sh_size -+ / sizeof(Elf_Sym); -+ symTab->symbols = (ElfSymbol *)stgCallocBytes( -+ symTab->n_symbols, sizeof(ElfSymbol), -+ "ocInit_Elf(ElfSymbol)"); -+ -+ /* get the strings table */ -+ size_t lnkIdx = oc->info->sectionHeader[i].sh_link; -+ symTab->names = (char*)(uint8_t*)oc->info->elfHeader -+ + oc->info->sectionHeader[lnkIdx].sh_offset; -+ -+ /* build the ElfSymbols from the symbols */ -+ for(size_t j=0; j < symTab->n_symbols; j++) { -+ -+ symTab->symbols[j].name = stab[j].st_name == 0 -+ ? "(noname)" -+ : symTab->names + stab[j].st_name; -+ symTab->symbols[j].elf_sym = &stab[j]; -+ /* we don't have an address for this symbol yet; this will be -+ * populated during ocGetNames. hence addr = NULL. -+ */ -+ symTab->symbols[j].addr = NULL; -+ symTab->symbols[j].got_addr = NULL; -+ } -+ -+ /* append the ElfSymbolTable */ -+ if(symbolTablesLast == NULL) { -+ oc->info->symbolTables = symTab; -+ symbolTablesLast = symTab; -+ } else { -+ symbolTablesLast->next = symTab; -+ symbolTablesLast = symTab; -+ } -+ } -+ } -+} -+ -+void -+ocDeinit_ELF(ObjectCode * oc) -+{ -+ /* free all ElfSymbolTables, and their associated -+ * ElfSymbols -+ */ -+ if(oc->info != NULL) { -+#if defined(NEED_GOT) -+ freeGot(oc); -+#endif -+ ElfSymbolTable * last = oc->info->symbolTables; -+ -+ while(last != NULL) { -+ ElfSymbolTable * t = last; -+ last = last->next; -+ stgFree(t->symbols); -+ stgFree(t); -+ } -+ -+ { -+ ElfRelocationTable *last = oc->info->relTable; -+ while (last != NULL) { -+ ElfRelocationTable *t = last; -+ last = last->next; -+ stgFree(t); -+ } -+ } -+ -+ { -+ ElfRelocationATable *last = oc->info->relaTable; -+ while (last != NULL) { -+ ElfRelocationATable *t = last; -+ last = last->next; -+ stgFree(t); -+ } -+ } -+ -+ stgFree(oc->info); -+ oc->info = NULL; -+#if defined(SHN_XINDEX) -+ oc->shndx_table = SHNDX_TABLE_UNINIT; -+#endif -+ } -+} -+ -+/* -+ * Generic ELF functions -+ */ -+ -+int -+ocVerifyImage_ELF ( ObjectCode* oc ) -+{ -+ Elf_Shdr* shdr; -+ Elf_Sym* stab; -+ int j, nent, nstrtab, nsymtabs; -+ Elf_Word i, shnum, shstrndx; -+ char* sh_strtab; -+ -+ char* ehdrC = (char*)(oc->image); -+ Elf_Ehdr* ehdr = (Elf_Ehdr*)ehdrC; -+ -+ if (ehdr->e_ident[EI_MAG0] != ELFMAG0 || -+ ehdr->e_ident[EI_MAG1] != ELFMAG1 || -+ ehdr->e_ident[EI_MAG2] != ELFMAG2 || -+ ehdr->e_ident[EI_MAG3] != ELFMAG3) { -+ errorBelch("%s: not an ELF object", oc->fileName); -+ return 0; -+ } -+ -+ if (ehdr->e_ident[EI_CLASS] != ELFCLASS) { -+ errorBelch("%s: unsupported ELF format", oc->fileName); -+ return 0; -+ } -+ -+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) { -+ IF_DEBUG(linker,debugBelch( "Is little-endian\n" )); -+ } else -+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) { -+ IF_DEBUG(linker,debugBelch( "Is big-endian\n" )); -+ } else { -+ errorBelch("%s: unknown endianness", oc->fileName); -+ return 0; -+ } -+ -+ if (ehdr->e_type != ET_REL) { -+ errorBelch("%s: not a relocatable object (.o) file", oc->fileName); -+ return 0; -+ } -+ IF_DEBUG(linker,debugBelch( "Is a relocatable object (.o) file\n" )); -+ -+ IF_DEBUG(linker,debugBelch( "Architecture is " )); -+ switch (ehdr->e_machine) { -+#if defined(EM_ARM) -+ case EM_ARM: IF_DEBUG(linker,debugBelch( "arm" )); break; -+#endif -+ case EM_386: IF_DEBUG(linker,debugBelch( "x86" )); break; -+#if defined(EM_SPARC32PLUS) -+ case EM_SPARC32PLUS: -+#endif -+ case EM_SPARC: IF_DEBUG(linker,debugBelch( "sparc" )); break; -+#if defined(EM_IA_64) -+ case EM_IA_64: IF_DEBUG(linker,debugBelch( "ia64" )); break; -+#endif -+ case EM_PPC: IF_DEBUG(linker,debugBelch( "powerpc32" )); break; -+#if defined(EM_PPC64) -+ case EM_PPC64: IF_DEBUG(linker,debugBelch( "powerpc64" )); -+ errorBelch("%s: RTS linker not implemented on PowerPC 64-bit", -+ oc->fileName); -+ return 0; -+#endif -+#if defined(EM_S390) -+ case EM_S390: IF_DEBUG(linker,debugBelch( "s390" )); -+ errorBelch("%s: RTS linker not implemented on s390", -+ oc->fileName); -+ return 0; -+#endif -+#if defined(EM_X86_64) -+ case EM_X86_64: IF_DEBUG(linker,debugBelch( "x86_64" )); break; -+#elif defined(EM_AMD64) -+ case EM_AMD64: IF_DEBUG(linker,debugBelch( "amd64" )); break; -+#endif -+#if defined(EM_AARCH64) -+ case EM_AARCH64: IF_DEBUG(linker,debugBelch( "aarch64" )); break; -+#endif -+#if defined(EM_RISCV) -+ case EM_RISCV: IF_DEBUG(linker,debugBelch( "riscv" )); -+ errorBelch("%s: RTS linker not implemented on riscv", -+ oc->fileName); -+ return 0; -+#endif -+#if defined(EM_LOONGARCH) -+ case EM_LOONGARCH: IF_DEBUG(linker,debugBelch( "loongarch64" )); -+ errorBelch("%s: RTS linker not implemented on loongarch64", -+ oc->fileName); -+ return 0; -+#endif -+ default: IF_DEBUG(linker,debugBelch( "unknown" )); -+ errorBelch("%s: unknown architecture (e_machine == %d)" -+ , oc->fileName, ehdr->e_machine); -+ return 0; -+ } -+ -+ shnum = elf_shnum(ehdr); -+ IF_DEBUG(linker,debugBelch( -+ "\nSection header table: start %ld, n_entries %d, ent_size %d\n", -+ (long)ehdr->e_shoff, shnum, ehdr->e_shentsize )); -+ -+ CHECK(ehdr->e_shentsize == sizeof(Elf_Shdr)); -+ -+ shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); -+ -+ shstrndx = elf_shstrndx(ehdr); -+ if (shstrndx == SHN_UNDEF) { -+ errorBelch("%s: no section header string table", oc->fileName); -+ return 0; -+ } else { -+ IF_DEBUG(linker,debugBelch( "Section header string table is section %d\n", -+ shstrndx)); -+ sh_strtab = ehdrC + shdr[shstrndx].sh_offset; -+ } -+ -+ for (i = 0; i < shnum; i++) { -+ IF_DEBUG(linker_verbose,debugBelch("%2d: ", i )); -+ IF_DEBUG(linker_verbose,debugBelch("type=%2d ", (int)shdr[i].sh_type )); -+ IF_DEBUG(linker_verbose,debugBelch("size=%4d ", (int)shdr[i].sh_size )); -+ IF_DEBUG(linker_verbose,debugBelch("offs=%4d ", (int)shdr[i].sh_offset )); -+ IF_DEBUG(linker_verbose,debugBelch(" (%p .. %p) ", -+ ehdrC + shdr[i].sh_offset, -+ ehdrC + shdr[i].sh_offset + shdr[i].sh_size - 1)); -+ -+#define SECTION_INDEX_VALID(ndx) (ndx > SHN_UNDEF && ndx < shnum) -+ -+ switch (shdr[i].sh_type) { -+ -+ case SHT_REL: -+ case SHT_RELA: -+ IF_DEBUG(linker_verbose,debugBelch( shdr[i].sh_type == SHT_REL ? "Rel " : "RelA ")); -+ -+ if (!SECTION_INDEX_VALID(shdr[i].sh_link)) { -+ if (shdr[i].sh_link == SHN_UNDEF) -+ errorBelch("\n%s: relocation section #%d has no symbol table\n" -+ "This object file has probably been fully stripped. " -+ "Such files cannot be linked.\n", -+ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, i); -+ else -+ errorBelch("\n%s: relocation section #%d has an invalid link field (%d)\n", -+ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, -+ i, shdr[i].sh_link); -+ return 0; -+ } -+ if (shdr[shdr[i].sh_link].sh_type != SHT_SYMTAB) { -+ errorBelch("\n%s: relocation section #%d does not link to a symbol table\n", -+ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, i); -+ return 0; -+ } -+ if (!SECTION_INDEX_VALID(shdr[i].sh_info)) { -+ errorBelch("\n%s: relocation section #%d has an invalid info field (%d)\n", -+ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, -+ i, shdr[i].sh_info); -+ return 0; -+ } -+ -+ break; -+ case SHT_SYMTAB: -+ IF_DEBUG(linker_verbose,debugBelch("Sym ")); -+ -+ if (!SECTION_INDEX_VALID(shdr[i].sh_link)) { -+ errorBelch("\n%s: symbol table section #%d has an invalid link field (%d)\n", -+ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, -+ i, shdr[i].sh_link); -+ return 0; -+ } -+ if (shdr[shdr[i].sh_link].sh_type != SHT_STRTAB) { -+ errorBelch("\n%s: symbol table section #%d does not link to a string table\n", -+ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName, i); -+ -+ return 0; -+ } -+ break; -+ case SHT_STRTAB: IF_DEBUG(linker_verbose,debugBelch("Str ")); break; -+ default: IF_DEBUG(linker_verbose,debugBelch(" ")); break; -+ } -+ if (sh_strtab) { -+ IF_DEBUG(linker_verbose,debugBelch("sname=%s\n", sh_strtab + shdr[i].sh_name )); -+ } -+ } -+ -+ IF_DEBUG(linker_verbose,debugBelch( "\nString tables\n" )); -+ nstrtab = 0; -+ for (i = 0; i < shnum; i++) { -+ if (shdr[i].sh_type == SHT_STRTAB -+ /* Ignore the section header's string table. */ -+ && i != shstrndx -+ /* Ignore string tables named .stabstr, as they contain -+ debugging info. */ -+ && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8) -+ ) { -+ IF_DEBUG(linker_verbose,debugBelch(" section %d is a normal string table\n", i )); -+ nstrtab++; -+ } -+ } -+ if (nstrtab == 0) { -+ IF_DEBUG(linker_verbose,debugBelch(" no normal string tables (potentially, but not necessarily a problem)\n")); -+ } -+#if defined(SHN_XINDEX) -+ Elf_Word* shndxTable = get_shndx_table(oc); -+#endif -+ nsymtabs = 0; -+ IF_DEBUG(linker_verbose,debugBelch( "Symbol tables\n" )); -+ for (i = 0; i < shnum; i++) { -+ if (shdr[i].sh_type != SHT_SYMTAB) continue; -+ IF_DEBUG(linker_verbose,debugBelch( "section %d is a symbol table\n", i )); -+ nsymtabs++; -+ stab = (Elf_Sym*) (ehdrC + shdr[i].sh_offset); -+ nent = shdr[i].sh_size / sizeof(Elf_Sym); -+ IF_DEBUG(linker_verbose,debugBelch( " number of entries is apparently %d (%ld rem)\n", -+ nent, -+ (long)shdr[i].sh_size % sizeof(Elf_Sym) -+ )); -+ if (0 != shdr[i].sh_size % sizeof(Elf_Sym)) { -+ errorBelch("%s: non-integral number of symbol table entries", oc->fileName); -+ return 0; -+ } -+ for (j = 0; j < nent; j++) { -+ Elf_Word secno = stab[j].st_shndx; -+#if defined(SHN_XINDEX) -+ /* See Note [Many ELF Sections] */ -+ if (secno == SHN_XINDEX) { -+ CHECK(shndxTable); -+ secno = shndxTable[j]; -+ } -+#endif -+ IF_DEBUG(linker_verbose,debugBelch(" %2d ", j )); -+ IF_DEBUG(linker_verbose,debugBelch(" sec=%-5d size=%-3d val=%5p ", -+ (int)secno, -+ (int)stab[j].st_size, -+ (char*)stab[j].st_value )); -+ -+ IF_DEBUG(linker_verbose,debugBelch("type=" )); -+ switch (ELF_ST_TYPE(stab[j].st_info)) { -+ case STT_NOTYPE: IF_DEBUG(linker_verbose,debugBelch("notype " )); break; -+ case STT_OBJECT: IF_DEBUG(linker_verbose,debugBelch("object " )); break; -+ case STT_FUNC : IF_DEBUG(linker_verbose,debugBelch("func " )); break; -+ case STT_SECTION: IF_DEBUG(linker_verbose,debugBelch("section" )); break; -+ case STT_FILE: IF_DEBUG(linker_verbose,debugBelch("file " )); break; -+ default: IF_DEBUG(linker_verbose,debugBelch("? " )); break; -+ } -+ IF_DEBUG(linker_verbose,debugBelch(" " )); -+ -+ IF_DEBUG(linker_verbose,debugBelch("bind=" )); -+ switch (ELF_ST_BIND(stab[j].st_info)) { -+ case STB_LOCAL : IF_DEBUG(linker_verbose,debugBelch("local " )); break; -+ case STB_GLOBAL: IF_DEBUG(linker_verbose,debugBelch("global" )); break; -+ case STB_WEAK : IF_DEBUG(linker_verbose,debugBelch("weak " )); break; -+ default: IF_DEBUG(linker_verbose,debugBelch("? " )); break; -+ } -+ IF_DEBUG(linker_verbose,debugBelch(" " )); -+ -+ IF_DEBUG(linker_verbose,debugBelch("other=%2x ", stab[j].st_other )); -+ IF_DEBUG(linker_verbose,debugBelch("name=%s [%x]\n", -+ ehdrC + shdr[shdr[i].sh_link].sh_offset -+ + stab[j].st_name, stab[j].st_name )); -+ } -+ } -+ -+ if (nsymtabs == 0) { -+ // Not having a symbol table is not in principle a problem. -+ // When an object file has no symbols then the 'strip' program -+ // typically will remove the symbol table entirely. -+ IF_DEBUG(linker_verbose,debugBelch(" no symbol tables (potentially, but not necessarily a problem)\n")); -+ } -+ -+ return 1; -+} -+ -+/* Figure out what kind of section it is. Logic derived from -+ Figure 1.14 ("Special Sections") of the ELF document -+ ("Portable Formats Specification, Version 1.1"). */ -+static SectionKind getSectionKind_ELF( Elf_Shdr *hdr, int *is_bss ) -+{ -+ *is_bss = false; -+ -+ if (hdr->sh_type == SHT_PROGBITS -+ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_EXECINSTR)) { -+ /* .text-style section */ -+ return SECTIONKIND_CODE_OR_RODATA; -+ } -+ -+ if (hdr->sh_type == SHT_PROGBITS -+ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { -+ /* .data-style section */ -+ return SECTIONKIND_RWDATA; -+ } -+ -+ if (hdr->sh_type == SHT_PROGBITS -+ && (hdr->sh_flags & SHF_ALLOC) && !(hdr->sh_flags & SHF_WRITE)) { -+ /* .rodata-style section */ -+ return SECTIONKIND_CODE_OR_RODATA; -+ } -+#if defined(SHT_INIT_ARRAY) -+ if (hdr->sh_type == SHT_INIT_ARRAY -+ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { -+ /* .init_array section */ -+ return SECTIONKIND_INIT_ARRAY; -+ } -+#endif /* not SHT_INIT_ARRAY */ -+#if defined(SHT_FINI_ARRAY) -+ if (hdr->sh_type == SHT_FINI_ARRAY -+ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { -+ /* .fini_array section */ -+ return SECTIONKIND_FINI_ARRAY; -+ } -+#endif /* not SHT_INIT_ARRAY */ -+ if (hdr->sh_type == SHT_NOBITS -+ && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) { -+ /* .bss-style section */ -+ *is_bss = true; -+ return SECTIONKIND_RWDATA; -+ } -+ -+ return SECTIONKIND_OTHER; -+} -+ -+#if !defined(NEED_PLT) -+ -+static void * -+mapObjectFileSection (int fd, Elf_Word offset, Elf_Word size, -+ void **mapped_start, StgWord *mapped_size, -+ StgWord *mapped_offset) -+{ -+ void *p; -+ size_t pageOffset, pageSize; -+ -+ pageOffset = roundDownToPage(offset); -+ pageSize = roundUpToPage(offset-pageOffset+size); -+ p = mmapForLinker(pageSize, MEM_READ_WRITE, 0, fd, pageOffset); -+ if (p == NULL) return NULL; -+ *mapped_size = pageSize; -+ *mapped_offset = pageOffset; -+ *mapped_start = p; -+ return (void*)((StgWord)p + offset - pageOffset); -+} -+#endif -+ -+int -+ocGetNames_ELF ( ObjectCode* oc ) -+{ -+ Elf_Word i; -+ int result, fd = -1; -+ -+ char* ehdrC = (char*)(oc->image); -+ Elf_Ehdr* ehdr = (Elf_Ehdr*)ehdrC; -+ -+ Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); -+ Section * sections; -+#if defined(SHN_XINDEX) -+ Elf_Word* shndxTable = get_shndx_table(oc); -+#endif -+ const Elf_Word shnum = elf_shnum(ehdr); -+ -+ ASSERT(symhash != NULL); -+ -+ sections = (Section*)stgCallocBytes(sizeof(Section), shnum, -+ "ocGetNames_ELF(sections)"); -+ oc->sections = sections; -+ oc->n_sections = shnum; -+ -+ if (oc->imageMapped) { -+#if defined(openbsd_HOST_OS) -+ fd = open(oc->fileName, O_RDONLY, S_IRUSR); -+#else -+ fd = open(oc->fileName, O_RDONLY); -+#endif -+ if (fd == -1) { -+ errorBelch("loadObj: can't open %" PATH_FMT, oc->fileName); -+ return 0; -+ } -+ } -+ -+ for (i = 0; i < shnum; i++) { -+ int is_bss = false; -+ SectionKind kind = getSectionKind_ELF(&shdr[i], &is_bss); -+ SectionAlloc alloc = SECTION_NOMEM; -+ void *start = NULL, *mapped_start = NULL; -+ StgWord mapped_size = 0, mapped_offset = 0; -+ StgWord size = shdr[i].sh_size; -+ StgWord offset = shdr[i].sh_offset; -+ StgWord align = shdr[i].sh_addralign; -+ const char *sh_name = oc->info->sectionHeaderStrtab + shdr[i].sh_name; -+ -+ /* -+ * Identify initializer and finalizer lists -+ * -+ * See Note [Initializers and finalizers (ELF)]. -+ */ -+ if (kind == SECTIONKIND_CODE_OR_RODATA -+ && 0 == memcmp(".init", sh_name, 5)) { -+ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_INIT, 0); -+ } else if (kind == SECTIONKIND_CODE_OR_RODATA -+ && 0 == memcmp(".fini", sh_name, 5)) { -+ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_FINI, 0); -+ } else if (kind == SECTIONKIND_INIT_ARRAY -+ || 0 == memcmp(".init_array", sh_name, 11)) { -+ uint32_t prio; -+ if (sscanf(sh_name, ".init_array.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ prio += 0x10000; // .init_arrays run after .ctors -+ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_INIT_ARRAY, prio); -+ kind = SECTIONKIND_INIT_ARRAY; -+ } else if (kind == SECTIONKIND_FINI_ARRAY -+ || 0 == memcmp(".fini_array", sh_name, 11)) { -+ uint32_t prio; -+ if (sscanf(sh_name, ".fini_array.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ prio += 0x10000; // .fini_arrays run before .dtors -+ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_FINI_ARRAY, prio); -+ kind = SECTIONKIND_FINI_ARRAY; -+ -+ /* N.B. a compilation unit may have more than one .ctor section; we -+ * must run them all. See #21618 for a case where this happened */ -+ } else if (0 == memcmp(".ctors", sh_name, 6)) { -+ uint32_t prio; -+ if (sscanf(sh_name, ".ctors.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ // .ctors/.dtors are executed in reverse order: higher numbers are -+ // executed first -+ prio = 0xffff - prio; -+ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_CTORS, prio); -+ kind = SECTIONKIND_INIT_ARRAY; -+ } else if (0 == memcmp(".dtors", sh_name, 6)) { -+ uint32_t prio; -+ if (sscanf(sh_name, ".dtors.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ // .ctors/.dtors are executed in reverse order: higher numbers are -+ // executed first -+ prio = 0xffff - prio; -+ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_DTORS, prio); -+ kind = SECTIONKIND_FINI_ARRAY; -+ } -+ -+ -+ if (is_bss && size > 0) { -+ /* This is a non-empty .bss section. Allocate zeroed space for -+ it, and set its .sh_offset field such that -+ ehdrC + .sh_offset == addr_of_zeroed_space. */ -+#if RTS_LINKER_USE_MMAP -+ if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { -+ /* The space for bss sections is already preallocated */ -+ CHECK(oc->bssBegin != NULL); -+ alloc = SECTION_NOMEM; -+ CHECK(oc->image != 0x0); -+ start = -+ oc->image + roundUpToAlign(oc->bssBegin - oc->image, align); -+ oc->bssBegin = (char*)start + size; -+ CHECK(oc->bssBegin <= oc->bssEnd); -+ } else { -+ /* Use mmapForLinker to allocate .bss, otherwise the malloced -+ * address might be out of range for sections that are mmaped. -+ */ -+ alloc = SECTION_MMAP; -+ start = mmapAnonForLinker(size); -+ if (start == NULL) { -+ barf("failed to mmap memory for bss. " -+ "errno = %d", errno); -+ } -+ mapped_start = start; -+ mapped_offset = 0; -+ mapped_size = roundUpToPage(size); -+ } -+ CHECK(start != 0x0); -+#else -+ alloc = SECTION_MALLOC; -+ start = stgCallocBytes(1, size, "ocGetNames_ELF(BSS)"); -+ mapped_start = start; -+#endif -+ /* -+ debugBelch("BSS section at 0x%x, size %d\n", -+ zspace, shdr[i].sh_size); -+ */ -+ addSection(§ions[i], kind, alloc, start, size, -+ mapped_offset, mapped_start, mapped_size); -+ -+ oc->sections[i].info->nstubs = 0; -+ oc->sections[i].info->stub_offset = NULL; -+ oc->sections[i].info->stub_size = 0; -+ oc->sections[i].info->stubs = NULL; -+ } else if (kind != SECTIONKIND_OTHER && size > 0) { -+ -+#if defined(NEED_PLT) -+ /* To support stubs next to sections, we will use the following -+ * layout: -+ * -+ * .--------------. -+ * | Section data | -+ * |--------------| -+ * | Stub space | -+ * '--------------' -+ * -+ * This ensures that the plt stubs are in range for the section data, -+ * Unless the section data exceeds the size for relative jump, in -+ * which case I wouldn't know how to solve this, without starting to -+ * break up the section itself. -+ */ -+ -+ unsigned nstubs = numberOfStubsForSection(oc, i); -+ unsigned stub_space = STUB_SIZE * nstubs; -+ -+ void * mem = mmapAnonForLinker(size+stub_space); -+ -+ if( mem == MAP_FAILED ) { -+ barf("failed to mmap allocated memory to load section %d. " -+ "errno = %d", i, errno); -+ } -+ -+ /* copy only the image part over; we don't want to copy data -+ * into the stub part. -+ */ -+ memcpy( mem, oc->image + offset, size ); -+ -+ alloc = SECTION_MMAP; -+ -+ mapped_offset = 0; -+ mapped_size = roundUpToPage(size+stub_space); -+ start = mem; -+ mapped_start = mem; -+#else -+ if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { -+ // already mapped. -+ start = oc->image + offset; -+ alloc = SECTION_NOMEM; -+ } -+ // use the m32 allocator if either the image is not mapped -+ // (i.e. we cannot map the sections separately), or if the section -+ // size is small. -+ else if (!oc->imageMapped || size < getPageSize() / 3) { -+ bool executable = kind == SECTIONKIND_CODE_OR_RODATA; -+ m32_allocator *allocator = executable ? oc->rx_m32 : oc->rw_m32; -+ // Correctly align the section. This is particularly important for -+ // the alignment of .rodata.cstNN sections. -+ // -+ // llvm will emit see paddq statements for x86_64 under -+ // optimisation and load from RODATA sections, specifically -+ // .rodata.cst16. Also we may encounter .rodata.cst32 sections -+ // in objects using AVX instructions (see #23066). -+ start = m32_alloc(allocator, size, align); -+ if (start == NULL) goto fail; -+ memcpy(start, oc->image + offset, size); -+ alloc = SECTION_M32; -+ } else { -+ start = mapObjectFileSection(fd, offset, size, -+ &mapped_start, &mapped_size, -+ &mapped_offset); -+ if (start == NULL) goto fail; -+ alloc = SECTION_MMAP; -+ } -+#endif -+ addSection(§ions[i], kind, alloc, start, size, -+ mapped_offset, mapped_start, mapped_size); -+ -+#if defined(NEED_PLT) -+ oc->sections[i].info->nstubs = 0; -+ oc->sections[i].info->stub_offset = (uint8_t*)mem + size; -+ oc->sections[i].info->stub_size = stub_space; -+ oc->sections[i].info->stubs = NULL; -+#else -+ oc->sections[i].info->nstubs = 0; -+ oc->sections[i].info->stub_offset = NULL; -+ oc->sections[i].info->stub_size = 0; -+ oc->sections[i].info->stubs = NULL; -+#endif -+ -+ addProddableBlock(oc, start, size); -+ } else { -+ addSection(&oc->sections[i], kind, alloc, oc->image+offset, size, -+ 0, 0, 0); -+ oc->sections[i].info->nstubs = 0; -+ oc->sections[i].info->stub_offset = NULL; -+ oc->sections[i].info->stub_size = 0; -+ oc->sections[i].info->stubs = NULL; -+ } -+ oc->sections[i].info->name = sh_name; -+ oc->sections[i].info->sectionHeader = &shdr[i]; -+ -+ if (shdr[i].sh_type != SHT_SYMTAB) continue; -+ -+ /* copy stuff into this module's object symbol table */ -+ -+ oc->n_symbols = 0; -+ for(ElfSymbolTable *symTab = oc->info->symbolTables; -+ symTab != NULL; symTab = symTab->next) { -+ oc->n_symbols += symTab->n_symbols; -+ } -+ -+ oc->symbols = stgCallocBytes(oc->n_symbols, sizeof(Symbol_t), -+ "ocGetNames_ELF(oc->symbols)"); -+ // Note calloc: if we fail partway through initializing symbols, we need -+ // to undo the additions to the symbol table so far. We know which ones -+ // have been added by whether the entry is NULL or not. -+ -+ unsigned curSymbol = 0; -+ -+ unsigned long common_size = 0; -+ unsigned long common_used = 0; -+ for(ElfSymbolTable *symTab = oc->info->symbolTables; -+ symTab != NULL; symTab = symTab->next) { -+ for (size_t j = 0; j < symTab->n_symbols; j++) { -+ ElfSymbol *symbol = &symTab->symbols[j]; -+ if (SHN_COMMON == symTab->symbols[j].elf_sym->st_shndx) { -+ common_size += symbol->elf_sym->st_size; -+ } -+ } -+ } -+ void * common_mem = NULL; -+ if(common_size > 0) { -+ common_mem = mmapAnonForLinker(common_size); -+ if (common_mem == NULL) { -+ barf("ocGetNames_ELF: Failed to allocate memory for SHN_COMMONs"); -+ } -+ } -+ -+ //TODO: we ignore local symbols anyway right? So we can use the -+ // shdr[i].sh_info to get the index of the first non-local symbol -+ // ie we should use j = shdr[i].sh_info -+ for(ElfSymbolTable *symTab = oc->info->symbolTables; -+ symTab != NULL; symTab = symTab->next) { -+ for (size_t j = 0; j < symTab->n_symbols; j++) { -+ -+ char isLocal = false; /* avoids uninit-var warning */ -+ HsBool isWeak = HS_BOOL_FALSE; -+ SymbolName *nm = symTab->symbols[j].name; -+ unsigned short shndx = symTab->symbols[j].elf_sym->st_shndx; -+ -+ ElfSymbol *symbol = &symTab->symbols[j]; -+ -+ Elf_Word secno; -+ -+ -+ /* See Note [Many ELF Sections] */ -+ /* Note that future checks for special SHN_* numbers should check -+ * the shndx variable, not the section number in secno. Sections -+ * with the real number in the SHN_LORESERVE..HIRESERVE range -+ * will have shndx SHN_XINDEX and a secno with one of the -+ * reserved values. */ -+ secno = shndx; -+#if defined(SHN_XINDEX) -+ if (shndx == SHN_XINDEX) { -+ CHECK(shndxTable); -+ secno = shndxTable[j]; -+ } -+#endif -+ /* Figure out if we want to add it; if so, set ad to its -+ address. Otherwise leave ad == NULL. */ -+ -+ if (shndx == SHN_COMMON) { -+ isLocal = false; -+ CHECK(common_used < common_size); -+ CHECK(common_mem); -+ symbol->addr = (void*)((uintptr_t)common_mem + common_used); -+ common_used += symbol->elf_sym->st_size; -+ CHECK(common_used <= common_size); -+ -+ IF_DEBUG(linker_verbose, -+ debugBelch("COMMON symbol, size %llu name %s allocated at %p\n", -+ (long long unsigned int) symbol->elf_sym->st_size, nm, symbol->addr)); -+ -+ /* Pointless to do addProddableBlock() for this area, -+ since the linker should never poke around in it. */ -+ } else if ((ELF_ST_BIND(symbol->elf_sym->st_info) == STB_GLOBAL -+ || ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL -+ || ELF_ST_BIND(symbol->elf_sym->st_info) == STB_WEAK -+ ) -+ /* and not an undefined symbol */ -+ && shndx != SHN_UNDEF -+ /* and not in a "special section" */ -+ && (shndx < SHN_LORESERVE -+#if defined(SHN_XINDEX) -+ || shndx == SHN_XINDEX -+#endif -+ ) -+ && -+ /* and it's a not a section or string table or -+ * anything silly */ -+ (ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_FUNC -+ || ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_OBJECT -+ || ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_NOTYPE -+ ) -+ ) { -+ /* Section 0 is the undefined section, hence > and not >=. */ -+ CHECK(secno > 0 && secno < shnum); -+ /* -+ if (shdr[secno].sh_type == SHT_NOBITS) { -+ debugBelch(" BSS symbol, size %d off %d name %s\n", -+ stab[j].st_size, stab[j].st_value, nm); -+ } -+ */ -+ symbol->addr = (SymbolAddr*)( -+ (intptr_t) oc->sections[secno].start + -+ (intptr_t) symbol->elf_sym->st_value); -+ CHECK(symbol->addr != 0x0); -+ if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL) { -+ isLocal = true; -+ isWeak = false; -+ } else { /* STB_GLOBAL or STB_WEAK */ -+ IF_DEBUG(linker_verbose, -+ debugBelch("addOTabName(GLOB): %10p %s %s\n", -+ symbol->addr, oc->fileName, nm)); -+ isLocal = false; -+ isWeak = ELF_ST_BIND(symbol->elf_sym->st_info) -+ == STB_WEAK; -+ } -+ } -+ -+ SymType sym_type; -+ if (ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_FUNC) { -+ sym_type = SYM_TYPE_CODE; -+ } else { -+ sym_type = SYM_TYPE_DATA; -+ } -+ -+ /* And the decision is ... */ -+ -+ if (symbol->addr != NULL) { -+ CHECK(nm != NULL); -+ /* Acquire! */ -+ if (!isLocal) { -+ -+ if (isWeak == HS_BOOL_TRUE) { -+ setWeakSymbol(oc, nm); -+ } -+ if (!ghciInsertSymbolTable(oc->fileName, symhash, -+ nm, symbol->addr, isWeak, sym_type, oc) -+ ) { -+ goto fail; -+ } -+ oc->symbols[curSymbol].name = nm; -+ oc->symbols[curSymbol].addr = symbol->addr; -+ oc->symbols[curSymbol].type = sym_type; -+ curSymbol++; -+ } -+ } else { -+ /* Skip. */ -+ IF_DEBUG(linker_verbose, -+ debugBelch("skipping `%s'\n", -+ nm) -+ ); -+ -+ /* -+ debugBelch( -+ "skipping bind = %d, type = %d, secno = %d `%s'\n", -+ (int)ELF_ST_BIND(stab[j].st_info), -+ (int)ELF_ST_TYPE(stab[j].st_info), -+ (int)secno, -+ nm -+ ); -+ */ -+ } -+ } -+ } -+ } -+ -+ if(makeGot( oc )) -+ errorBelch("Failed to create GOT for %s", -+ oc->archiveMemberName -+ ? oc->archiveMemberName -+ : oc->fileName); -+ result = 1; -+ goto end; -+ -+fail: -+ result = 0; -+ goto end; -+ -+end: -+ if (fd >= 0) close(fd); -+ return result; -+} -+ -+// the aarch64 linker uses relocacteObjectCodeAarch64, -+// see elf_reloc_aarch64.{h,c} -+#if !defined(aarch64_HOST_ARCH) -+ -+/* Do ELF relocations which lack an explicit addend. All x86-linux -+ and arm-linux relocations appear to be of this form. */ -+static int -+do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, -+ Elf_Shdr* shdr, int shnum ) -+{ -+ int j; -+ -+ Elf_Word* targ; -+ Elf_Rel* rtab = (Elf_Rel*) (ehdrC + shdr[shnum].sh_offset); -+ -+ int nent = shdr[shnum].sh_size / sizeof(Elf_Rel); -+ int target_shndx = shdr[shnum].sh_info; -+ int symtab_shndx = shdr[shnum].sh_link; -+ -+ ElfSymbolTable *stab = NULL; -+ for(ElfSymbolTable * st = oc->info->symbolTables; -+ st != NULL; st = st->next) { -+ if((int)st->index == symtab_shndx) { -+ stab = st; -+ break; -+ } -+ } -+ CHECK(stab != NULL); -+ -+ targ = (Elf_Word*)oc->sections[target_shndx].start; -+ IF_DEBUG(linker_verbose,debugBelch( -+ "relocations for section %d using symtab %d\n", -+ target_shndx, symtab_shndx)); -+ -+ /* Skip sections that we're not interested in. */ -+ if (oc->sections[target_shndx].kind == SECTIONKIND_OTHER) { -+ IF_DEBUG(linker_verbose,debugBelch( "skipping (target section not loaded)")); -+ return 1; -+ } -+ -+ /* The following nomenclature is used for the operation: -+ * - S -- (when used on its own) is the address of the symbol. -+ * - A -- is the addend for the relocation. -+ * - P -- is the address of the place being relocated (derived from r_offset). -+ * - Pa - is the adjusted address of the place being relocated, defined as (P & 0xFFFFFFFC). -+ * - T -- is 1 if the target symbol S has type STT_FUNC and the symbol addresses a Thumb instruction; it is 0 otherwise. -+ * - B(S) is the addressing origin of the output segment defining the symbol S. The origin is not required to be the -+ * base address of the segment. This value must always be word-aligned. -+ * - GOT_ORG is the addressing origin of the Global Offset Table (the indirection table for imported data addresses). -+ * This value must always be word-aligned. See §4.6.1.8, Proxy generating relocations. -+ * - GOT(S) is the address of the GOT entry for the symbol S. -+ * -+ * See the ELF for "ARM Specification" for details: -+ * https://developer.arm.com/architectures/system-architectures/software-standards/abi -+ */ -+ -+ for (j = 0; j < nent; j++) { -+ Elf_Addr offset = rtab[j].r_offset; -+ Elf_Addr info = rtab[j].r_info; -+ -+ Elf_Addr P = ((Elf_Addr)targ) + offset; -+ Elf_Word* pP = (Elf_Word*)P; -+#if defined(i386_HOST_ARCH) || defined(DEBUG) -+ Elf_Addr A = *pP; -+#endif -+ Elf_Addr S; -+ void* S_tmp; -+#if defined(i386_HOST_ARCH) -+ Elf_Addr value; -+#endif -+#if defined(arm_HOST_ARCH) -+ int is_target_thm=0, T=0; -+#endif -+ -+ ElfSymbol * symbol = NULL; -+ -+ IF_DEBUG(linker_verbose,debugBelch( "Rel entry %3d is raw(%6p %6p): ", -+ j, (void*)offset, (void*)info )); -+ if (!info) { -+ IF_DEBUG(linker_verbose,debugBelch( " ZERO" )); -+ S = 0; -+ } else { -+ symbol = &stab->symbols[ELF_R_SYM(info)]; -+ /* First see if it is a local symbol. */ -+ if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL || strncmp(symbol->name, "_GLOBAL_OFFSET_TABLE_", 21) == 0) { -+ S = (Elf_Addr)symbol->addr; -+ } else { -+ S_tmp = lookupDependentSymbol( symbol->name, oc, NULL ); -+ S = (Elf_Addr)S_tmp; -+ } -+ if (!S) { -+ errorBelch("%s: unknown symbol `%s'", -+ oc->fileName, symbol->name); -+ return 0; -+ } -+ IF_DEBUG(linker_verbose,debugBelch( "`%s' resolves to %p\n", symbol->name, -+ (void*)S )); -+ -+#if defined(arm_HOST_ARCH) -+ /* -+ * 4.5.3 Symbol Values -+ * -+ * In addition to the normal rules for symbol values the following -+ * rules shall also apply to symbols of type STT_FUNC: -+ * - If the symbol addresses an ARM instruction, its value is the -+ * address of the instruction (in a relocatable object, the -+ * offset of the instruction from the start of the section -+ * containing it). -+ * - If the symbol addresses a Thumb instruction, its value is the -+ * address of the instruction with bit zero set (in a relocatable -+ * object, the section offset with bit zero set). -+ * - For the purposes of relocation the value used shall be the -+ * address of the instruction (st_value & ~1). -+ * -+ * Note: This allows a linker to distinguish ARM and Thumb code -+ * symbols without having to refer to the map. An ARM symbol -+ * will always have an even value, while a Thumb symbol will -+ * always have an odd value. However, a linker should strip -+ * the discriminating bit from the value before using it for -+ * relocation. -+ * -+ * (source: ELF for the ARM Architecture -+ * ARM IHI 0044F, current through ABI release 2.10 -+ * 24th November 2015) -+ */ -+ if(ELF_ST_TYPE(symbol->elf_sym->st_info) == STT_FUNC) { -+ is_target_thm = S & 0x1; -+ T = is_target_thm; -+ S &= ~1; -+ } -+#endif -+ } -+ -+ int reloc_type = ELF_R_TYPE(info); -+ IF_DEBUG(linker_verbose, -+ debugBelch("Reloc: P = %p S = %p A = %p type=%d\n", -+ (void*)P, (void*)S, (void*)A, reloc_type )); -+#if defined(DEBUG) -+ checkProddableBlock ( oc, pP, sizeof(Elf_Word) ); -+#else -+ (void) pP; /* suppress unused varialbe warning in non-debug build */ -+#endif -+ -+#if defined(i386_HOST_ARCH) -+ value = S + A; -+#endif -+ -+ switch (reloc_type) { -+# if defined(i386_HOST_ARCH) -+ case COMPAT_R_386_NONE: break; -+ case COMPAT_R_386_32: *pP = value; break; -+ case COMPAT_R_386_PC32: *pP = value - P; break; -+# endif -+ -+# if defined(arm_HOST_ARCH) -+ case COMPAT_R_ARM_ABS32: /* (S + A) | T */ -+ // Specified by Linux ARM ABI to be equivalent to ABS32 -+ case COMPAT_R_ARM_TARGET1: -+ *(Elf32_Word *)P += S; -+ *(Elf32_Word *)P |= T; -+ break; -+ -+ case COMPAT_R_ARM_REL32: /* ((S + A) | T) – P */ -+ *(Elf32_Word *)P += S; -+ *(Elf32_Word *)P |= T; -+ *(Elf32_Word *)P -= P; -+ break; -+ -+ case COMPAT_R_ARM_BASE_PREL: /* B(S) + A – P */ -+ { -+ int32_t A = *pP; -+ // bfd used to encode sb (B(S)) as 0. -+ *(uint32_t *)P += 0 + A - P; -+ break; -+ } -+ -+ case COMPAT_R_ARM_GOT_BREL: /* GOT(S) + A – GOT_ORG */ -+ { -+ int32_t A = *pP; -+ void* GOT_S = symbol->got_addr; -+ *(uint32_t *)P = (uint32_t) GOT_S + A - (uint32_t) oc->info->got_start; -+ break; -+ } -+ -+ case COMPAT_R_ARM_CALL: -+ case COMPAT_R_ARM_JUMP24: -+ { -+ // N.B. LLVM's LLD linker's relocation implementation is a fantastic -+ // resource -+ StgWord32 *word = (StgWord32 *)P; -+ StgInt32 imm = (*word & ((1<<24)-1)) << 2; -+ -+ const StgBool is_blx = (*word & 0xf0000000) == 0xf0000000; -+ const StgWord32 hBit = is_blx ? ((*word >> 24) & 1) : 0; -+ imm |= hBit << 1; -+ -+ // Sign extend to 32 bits -+ // I would have thought this would be 24 bits but LLD uses 26 here. -+ // Hmm. -+ int32_t A = signExtend32(26, imm); -+ -+ S = S + A; A = 0; -+ -+ StgWord32 result = ((S + A) | T) - P; -+ -+ const StgBool overflow = !isInt(26, (StgInt32) result); -+ // Handle overflow and Thumb interworking -+ const StgBool needs_veneer = -+ (is_target_thm && ELF_R_TYPE(info) == COMPAT_R_ARM_JUMP24) -+ || overflow; -+ -+ if(needs_veneer) { /* overflow or thum interworking */ -+ // Note [PC bias] -+ // ~~~~~~~~~~~~~~ -+ // From the ELF for the ARM Architecture documentation: -+ // > 4.6.1.1 Addends and PC-bias compensation -+ // > A binary file may use REL or RELA relocations or a mixture -+ // > of the two (but multiple relocations for the same address -+ // > must use only one type). -+ // > If the relocation is pc-relative then compensation for the -+ // > PC bias (the PC value is 8 bytes ahead of the executing -+ // > instruction in ARM state and 4 bytes in Thumb state) must -+ // > be encoded in the relocation by the object producer. -+ int32_t bias = 8; -+ -+ S += bias; -+ /* try to locate an existing stub for this target */ -+ if(findStub(&oc->sections[target_shndx], (void**)&S, 0)) { -+ /* didn't find any. Need to create one */ -+ if(makeStub(&oc->sections[target_shndx], (void**)&S, 0)) { -+ errorBelch("Unable to create veneer for ARM_CALL\n"); -+ return 0; -+ } -+ } -+ S -= bias; -+ -+ result = ((S + A) | T) - P; -+ result &= ~1; // Clear thumb indicator bit -+ -+ CHECK(isInt(26, result)); /* X in range */ -+ } -+ -+ // Update the branch target -+ const StgWord32 imm24 = (result & 0x03fffffc) >> 2; -+ *word = (*word & ~0x00ffffff) -+ | (imm24 & 0x00ffffff); -+ -+ // Change the relocated branch into a BLX if necessary -+ const StgBool switch_mode = -+ is_target_thm && (reloc_type == COMPAT_R_ARM_CALL); -+ if (!needs_veneer && switch_mode) { -+ const StgWord32 hBit = (result & 0x2) >> 1; -+ // Change instruction to BLX -+ *word = (*word & ~0xFF000000) | ((0xfa | hBit) << 24); -+ IF_DEBUG(linker_verbose, debugBelch("Changed BL to BLX at %p\n", word)); -+ } -+ break; -+ } -+ -+ case COMPAT_R_ARM_MOVT_ABS: -+ case COMPAT_R_ARM_MOVW_ABS_NC: -+ { -+ StgWord32 *word = (StgWord32 *)P; -+ StgWord32 imm12 = *word & 0xfff; -+ StgWord32 imm4 = (*word >> 16) & 0xf; -+ StgInt32 offset = imm4 << 12 | imm12; -+ StgWord32 result = (S + offset) | T; -+ -+ if (reloc_type == COMPAT_R_ARM_MOVT_ABS) -+ result = (result & 0xffff0000) >> 16; -+ -+ StgWord32 result12 = result & 0xfff; -+ StgWord32 result4 = (result >> 12) & 0xf; -+ *word = (*word & ~0xf0fff) | (result4 << 16) | result12; -+ break; -+ } -+ -+ case COMPAT_R_ARM_THM_CALL: -+ case COMPAT_R_ARM_THM_JUMP24: -+ { -+ StgWord16 *upper = (StgWord16 *)P; -+ StgWord16 *lower = (StgWord16 *)(P + 2); -+ -+ int overflow; -+ int to_thm = (*lower >> 12) & 1; -+ int sign = (*upper >> 10) & 1; -+ int j1, j2, i1, i2; -+ -+ // Decode immediate value -+ j1 = (*lower >> 13) & 1; i1 = ~(j1 ^ sign) & 1; -+ j2 = (*lower >> 11) & 1; i2 = ~(j2 ^ sign) & 1; -+ -+ StgInt32 A = (sign << 24) -+ | (i1 << 23) -+ | (i2 << 22) -+ | ((*upper & 0x03ff) << 12) -+ | ((*lower & 0x07ff) << 1); -+ -+ // Sign extend 25 to 32 bits -+ if (A & 0x01000000) -+ A -= 0x02000000; -+ -+ S = S + A; A = 0; -+ -+ offset = ((S + A) | T) - P; -+ overflow = offset <= (StgWord32)0xff000000 -+ || offset >= (StgWord32)0x01000000; -+ -+ if ((!is_target_thm && ELF_R_TYPE(info) == COMPAT_R_ARM_THM_JUMP24) -+ || overflow) { -+ // Generate veneer -+ -+ // see [PC bias] above. -+ int32_t bias = 4; -+ S += bias; -+ // set the Thumb indicator to S, the final address should -+ // carry the correct thumb indicator. -+ S |= T; -+ /* try to locate an existing stub for this target */ -+ if(findStub(&oc->sections[target_shndx], (void**)&S, 1)) { -+ /* didn't find any. Need to create one */ -+ if(makeStub(&oc->sections[target_shndx], (void**)&S, 1)) { -+ errorBelch("Unable to create veneer for ARM_THM_CALL\n"); -+ return 0; -+ } -+ } -+ S -= bias; -+ -+ offset = ((S + A) | T) - P; -+ -+ sign = offset >> 31; -+ to_thm = 1; -+ } else if (!is_target_thm -+ && ELF_R_TYPE(info) == COMPAT_R_ARM_THM_CALL) { -+ offset &= ~0x3; -+ to_thm = 0; -+ } -+ -+ // Reencode instruction -+ i1 = ~(offset >> 23) & 1; j1 = sign ^ i1; -+ i2 = ~(offset >> 22) & 1; j2 = sign ^ i2; -+ *upper = ( (*upper & 0xf800) -+ | (sign << 10) -+ | ((offset >> 12) & 0x03ff) ); -+ *lower = ( (*lower & 0xd000) -+ | (j1 << 13) -+ | (to_thm << 12) -+ | (j2 << 11) -+ | ((offset >> 1) & 0x07ff) ); -+ break; -+ } -+ -+ case COMPAT_R_ARM_THM_MOVT_ABS: -+ case COMPAT_R_ARM_THM_MOVW_ABS_NC: -+ { -+ StgWord16 *upper = (StgWord16 *)P; -+ StgWord16 *lower = (StgWord16 *)(P + 2); -+ StgInt32 offset = ((*upper & 0x000f) << 12) -+ | ((*upper & 0x0400) << 1) -+ | ((*lower & 0x7000) >> 4) -+ | (*lower & 0x00ff); -+ -+ offset = (offset ^ 0x8000) - 0x8000; // Sign extend -+ offset += S; -+ if (ELF_R_TYPE(info) == COMPAT_R_ARM_THM_MOVW_ABS_NC) -+ offset |= T; -+ else if (ELF_R_TYPE(info) == COMPAT_R_ARM_THM_MOVT_ABS) -+ offset >>= 16; -+ -+ *upper = ( (*upper & 0xfbf0) -+ | ((offset & 0xf000) >> 12) -+ | ((offset & 0x0800) >> 1) ); -+ *lower = ( (*lower & 0x8f00) -+ | ((offset & 0x0700) << 4) -+ | (offset & 0x00ff) ); -+ break; -+ } -+ -+ case COMPAT_R_ARM_THM_JUMP8: -+ { -+ StgWord16 *word = (StgWord16 *)P; -+ StgWord offset = *word & 0x01fe; -+ offset += S - P; -+ if (!is_target_thm) { -+ errorBelch("%s: Thumb to ARM transition with JUMP8 relocation " -+ "not supported\n", -+ oc->fileName); -+ return 0; -+ } -+ -+ *word = (*word & ~0x01fe) -+ | (offset & 0x01fe); -+ break; -+ } -+ -+ case COMPAT_R_ARM_THM_JUMP11: -+ { -+ StgWord16 *word = (StgWord16 *)P; -+ StgWord offset = *word & 0x0ffe; -+ offset += S - P; -+ if (!is_target_thm) { -+ errorBelch("%s: Thumb to ARM transition with JUMP11 relocation " -+ "not supported\n", -+ oc->fileName); -+ return 0; -+ } -+ -+ *word = (*word & ~0x0ffe) -+ | (offset & 0x0ffe); -+ break; -+ } -+ case COMPAT_R_ARM_GOT_PREL: { -+ int32_t A = *pP; -+ void* GOT_S = symbol->got_addr; -+ CHECK(GOT_S); -+ *(uint32_t *)P = (uint32_t) GOT_S + A - P; -+ break; -+ } -+# endif // arm_HOST_ARCH -+ -+ default: -+ errorBelch("%s: unhandled ELF relocation(Rel) type %" FMT_Word "\n", -+ oc->fileName, (W_)ELF_R_TYPE(info)); -+ return 0; -+ } -+ -+ } -+ return 1; -+} -+ -+/* Do ELF relocations for which explicit addends are supplied. */ -+static int -+do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, -+ Elf_Shdr* shdr, int shnum ) -+{ -+ int j; -+ SymbolName* symbol = NULL; -+ Elf_Rela* rtab = (Elf_Rela*) (ehdrC + shdr[shnum].sh_offset); -+ Elf_Sym* stab; -+ char* strtab; -+ int nent = shdr[shnum].sh_size / sizeof(Elf_Rela); -+ int symtab_shndx = shdr[shnum].sh_link; -+ int strtab_shndx = shdr[symtab_shndx].sh_link; -+ int target_shndx = shdr[shnum].sh_info; -+#if defined(SHN_XINDEX) -+ Elf_Word* shndx_table = get_shndx_table(oc); -+#endif -+#if defined(DEBUG) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) -+ /* This #if def only serves to avoid unused-var warnings. */ -+ Elf_Addr targ = (Elf_Addr) oc->sections[target_shndx].start; -+#endif -+ -+ stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset); -+ strtab= (char*) (ehdrC + shdr[ strtab_shndx ].sh_offset); -+ -+ IF_DEBUG(linker_verbose,debugBelch( "relocations for section %d using symtab %d\n", -+ target_shndx, symtab_shndx )); -+ -+ /* Skip sections that we're not interested in. */ -+ if (oc->sections[target_shndx].kind == SECTIONKIND_OTHER) { -+ IF_DEBUG(linker_verbose,debugBelch( "skipping (target section not loaded)")); -+ return 1; -+ } -+ -+ for (j = 0; j < nent; j++) { -+#if defined(DEBUG) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) -+ /* This #if def only serves to avoid unused-var warnings. */ -+ Elf_Addr offset = rtab[j].r_offset; -+ Elf_Addr P = targ + offset; -+ Elf_Addr A = rtab[j].r_addend; -+#endif -+#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) -+ Elf_Addr value; -+#endif -+ Elf_Addr info = rtab[j].r_info; -+ Elf_Addr S; -+ void* S_tmp; -+# if defined(powerpc_HOST_ARCH) -+ Elf_Sword delta; -+# endif -+ -+ IF_DEBUG(linker_verbose,debugBelch( "Rel entry %3d is raw(%6p %6p %6p) ", -+ j, (void*)offset, (void*)info, -+ (void*)A )); -+ if (!info) { -+ IF_DEBUG(linker_verbose,debugBelch( " ZERO" )); -+ S = 0; -+ } else { -+ Elf_Sym sym = stab[ELF_R_SYM(info)]; -+ if (ELF_R_TYPE(info) == COMPAT_R_X86_64_TLSGD) { -+ /* -+ * No support for TLSGD variables *defined* by the object, -+ * only references to *external* TLS variables in already -+ * loaded shared objects (the executable, libc, ...) are -+ * supported. See Note [TLSGD relocation] in elf_tlsgd.c. -+ */ -+ symbol = sym.st_name == 0 ? "(noname)" : strtab+sym.st_name; -+ if (ELF_ST_BIND(sym.st_info) == STB_LOCAL -+ || sym.st_value != 0 || sym.st_name == 0) { -+ errorBelch("%s: unsupported internal ELF TLSGD relocation for" -+ " symbol `%s'", oc->fileName, symbol); -+ return 0; -+ } -+#if defined(x86_64_HOST_ARCH) && defined(freebsd_HOST_OS) -+ S = lookupTlsgdSymbol(symbol, ELF_R_SYM(info), oc); -+#else -+ errorBelch("%s: ELF TLSGD relocation for symbol `%s'" -+ " not supported on the target platform", -+ oc->fileName, symbol); -+ return 0; -+#endif -+ } else if (ELF_ST_BIND(sym.st_info) == STB_LOCAL) { -+ /* -+ * For local symbols, we can get the address directly from the ELF -+ * symbol table. -+ * -+ * XXX: Is STB_LOCAL the right test here? Should we instead be -+ * checking whether the symbol is *defined* by the current object? -+ * Defined globals also need relocation. Perhaps the point is that -+ * conflicts are resolved in favour of any prior definition, so we -+ * must look at the accumulated symbol table instead (which has -+ * already been updated with our global symbols by the time we get -+ * here). -+ */ -+ symbol = sym.st_name==0 ? "(noname)" : strtab+sym.st_name; -+ /* See Note [Many ELF Sections] */ -+ Elf_Word secno = sym.st_shndx; -+#if defined(SHN_XINDEX) -+ if (secno == SHN_XINDEX) { -+ secno = shndx_table[ELF_R_SYM(info)]; -+ } -+#endif -+ S = (Elf_Addr)oc->sections[secno].start -+ + stab[ELF_R_SYM(info)].st_value; -+ } else { -+ /* If not local, look up the name in our global table. */ -+ symbol = strtab + sym.st_name; -+ S_tmp = lookupDependentSymbol( symbol, oc, NULL ); -+ S = (Elf_Addr)S_tmp; -+ } -+ if (!S) { -+ errorBelch("%s: unknown symbol `%s'", oc->fileName, symbol); -+ return 0; -+ } -+ IF_DEBUG(linker_verbose,debugBelch("`%s' resolves to %p\n", symbol, (void*)S)); -+ } -+ -+#if defined(DEBUG) -+ IF_DEBUG(linker_verbose,debugBelch("Reloc: P = %p S = %p A = %p\n", -+ (void*)P, (void*)S, (void*)A )); -+ checkProddableBlock(oc, (void*)P, sizeof(Elf_Word)); -+#endif -+ -+#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) -+ value = S + A; -+#endif -+ -+ switch (ELF_R_TYPE(info)) { -+# if defined(powerpc_HOST_ARCH) -+ case R_PPC_ADDR16_LO: -+ *(Elf32_Half*) P = value; -+ break; -+ -+ case R_PPC_ADDR16_HI: -+ *(Elf32_Half*) P = value >> 16; -+ break; -+ -+ case R_PPC_ADDR16_HA: -+ *(Elf32_Half*) P = (value + 0x8000) >> 16; -+ break; -+ -+ case R_PPC_ADDR32: -+ *(Elf32_Word *) P = value; -+ break; -+ -+ case R_PPC_REL32: -+ *(Elf32_Word *) P = value - P; -+ break; -+ -+ case R_PPC_PLTREL24: -+ value -= 0x8000; /* See Note [.LCTOC1 in PPC PIC code] */ -+ FALLTHROUGH; -+ case R_PPC_REL24: -+ delta = value - P; -+ -+ if( delta << 6 >> 6 != delta ) -+ { -+ value = (Elf_Addr)(&makeSymbolExtra( oc, ELF_R_SYM(info), value ) -+ ->jumpIsland); -+ delta = value - P; -+ -+ if( value == 0 || delta << 6 >> 6 != delta ) -+ { -+ barf( "Unable to make SymbolExtra for #%d", -+ ELF_R_SYM(info) ); -+ return 0; -+ } -+ } -+ -+ *(Elf_Word *) P = (*(Elf_Word *) P & 0xfc000003) -+ | (delta & 0x3fffffc); -+ break; -+ -+ case R_PPC_REL16_LO: -+ *(Elf32_Half*) P = value - P; -+ break; -+ -+ case R_PPC_REL16_HI: -+ *(Elf32_Half*) P = (value - P) >> 16; -+ break; -+ -+ case R_PPC_REL16_HA: -+ *(Elf32_Half*) P = (value + 0x8000 - P) >> 16; -+ break; -+# endif -+ -+#if defined(x86_64_HOST_ARCH) -+ case COMPAT_R_X86_64_NONE: -+ break; -+ -+ case COMPAT_R_X86_64_64: -+ { -+ Elf64_Xword payload = value; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+ -+ case COMPAT_R_X86_64_PC32: -+ { -+ StgInt64 off = value - P; -+ if (off != (Elf64_Sword)off && X86_64_ELF_NONPIC_HACK) { -+ StgInt64 pltAddress = -+ (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S) -+ -> jumpIsland; -+ off = pltAddress + A - P; -+ } -+ if (off != (Elf64_Sword)off) { -+ errorBelch( -+ "R_X86_64_PC32 relocation out of range: %s = %" PRIx64 -+ "\nRecompile %s with -fPIC -fexternal-dynamic-refs.", -+ symbol, off, oc->fileName); -+ return 0; -+ } -+ Elf64_Sword payload = off; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+ -+ case COMPAT_R_X86_64_PC64: -+ { -+ Elf64_Sxword payload = value - P; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+ -+ case COMPAT_R_X86_64_32: -+ { -+ if (value != (Elf64_Word)value && X86_64_ELF_NONPIC_HACK) { -+ StgInt64 pltAddress = -+ (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S) -+ -> jumpIsland; -+ value = pltAddress + A; -+ } -+ if (value != (Elf64_Word)value) { -+ errorBelch( -+ "R_X86_64_32 relocation out of range: %s = %" PRIx64 -+ "\nRecompile %s with -fPIC -fexternal-dynamic-refs.", -+ symbol, value, oc->fileName); -+ return 0; -+ } -+ Elf64_Word payload = value; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+ -+ case COMPAT_R_X86_64_32S: -+ { -+ if ((StgInt64)value != (Elf64_Sword)value && X86_64_ELF_NONPIC_HACK) { -+ StgInt64 pltAddress = -+ (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S) -+ -> jumpIsland; -+ value = pltAddress + A; -+ } -+ if ((StgInt64)value != (Elf64_Sword)value) { -+ errorBelch( -+ "R_X86_64_32S relocation out of range: %s = %" PRIx64 -+ "\nRecompile %s with -fPIC -fexternal-dynamic-refs.", -+ symbol, value, oc->fileName); -+ return 0; -+ } -+ Elf64_Sword payload = value; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+ case COMPAT_R_X86_64_REX_GOTPCRELX: -+ case COMPAT_R_X86_64_GOTPCRELX: -+ case COMPAT_R_X86_64_GOTPCREL: -+ { -+ StgInt64 gotAddress = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S)->addr; -+ StgInt64 off = gotAddress + A - P; -+ if (off != (Elf64_Sword)off) { -+ barf( -+ "COMPAT_R_X86_64_GOTPCREL relocation out of range: " -+ "%s = %" PRIx64 " in %s.", -+ symbol, off, oc->fileName); -+ } -+ Elf64_Sword payload = off; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+ case COMPAT_R_X86_64_TLSGD: -+ { -+ StgInt64 off = S + A - P; -+ if (off != (Elf64_Sword)off) { -+ barf( -+ "COMPAT_R_X86_64_TLSGD relocation out of range: " -+ "%s = %" PRIx64 " in %s.", -+ symbol, off, oc->fileName); -+ } -+ Elf64_Sword payload = off; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+#if defined(dragonfly_HOST_OS) -+ case COMPAT_R_X86_64_GOTTPOFF: -+ { -+ /* determine the offset of S to the current thread's tls -+ area -+ XXX: Move this to the beginning of function */ -+ struct tls_info ti; -+ get_tls_area(0, &ti, sizeof(ti)); -+ /* make entry in GOT that contains said offset */ -+ StgInt64 gotEntry = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), -+ (S - (Elf64_Addr)(ti.base)))->addr; -+ StgInt64 off = gotEntry + A - P; -+ if (off != (Elf64_Sword)off) { -+ barf( -+ "COMPAT_R_X86_64_GOTTPOFF relocation out of range: " -+ "%s = %" PRIx64 " in %s.", -+ symbol, off, oc->fileName); -+ } -+ Elf64_SWord payload = off; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+#endif -+ -+ case COMPAT_R_X86_64_PLT32: -+ { -+ StgInt64 off = value - P; -+ if (off != (Elf64_Sword)off) { -+ StgInt64 pltAddress = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S) -+ -> jumpIsland; -+ off = pltAddress + A - P; -+ } -+ if (off != (Elf64_Sword)off) { -+ barf( -+ "R_X86_64_PLT32 relocation out of range: " -+ "%s = %" PRIx64 " in %s.", -+ symbol, off, oc->fileName); -+ } -+ Elf64_Sword payload = off; -+ memcpy((void*)P, &payload, sizeof(payload)); -+ break; -+ } -+#endif -+ -+ default: -+ barf("%s: unhandled ELF relocation(RelA) type %" FMT_Word "\n", -+ oc->fileName, (W_)ELF_R_TYPE(info)); -+ return 0; -+ } -+ -+ } -+ return 1; -+} -+#endif /* !aarch64_HOST_ARCH */ -+ -+ -+static bool -+ocMprotect_Elf( ObjectCode *oc ) -+{ -+ for(int i=0; i < oc->n_sections; i++) { -+ Section *section = &oc->sections[i]; -+ if(section->size == 0) continue; -+ switch (section->kind) { -+ case SECTIONKIND_CODE_OR_RODATA: -+ if (section->alloc != SECTION_M32) { -+ // N.B. m32 handles protection of its allocations during -+ // flushing. -+ mprotectForLinker(section->mapped_start, section->mapped_size, MEM_READ_EXECUTE); -+ } -+ break; -+ default: -+ break; -+ } -+ } -+ -+ return true; -+} -+ -+int -+ocResolve_ELF ( ObjectCode* oc ) -+{ -+ char* ehdrC = (char*)(oc->image); -+ Elf_Ehdr* ehdr = (Elf_Ehdr*) ehdrC; -+ Elf_Shdr* shdr = (Elf_Shdr*) (ehdrC + ehdr->e_shoff); -+ const Elf_Word shnum = elf_shnum(ehdr); -+ -+#if defined(SHN_XINDEX) -+ Elf_Word* shndxTable = get_shndx_table(oc); -+#endif -+ -+ /* resolve section symbols -+ * these are special symbols that point to sections, and have no name. -+ * Usually there should be one symbol for each text and data section. -+ * -+ * We need to resolve (assign addresses) to them, to be able to use them -+ * during relocation. -+ */ -+ for(ElfSymbolTable *symTab = oc->info->symbolTables; -+ symTab != NULL; symTab = symTab->next) { -+ for (size_t i = 0; i < symTab->n_symbols; i++) { -+ ElfSymbol *symbol = &symTab->symbols[i]; -+ if(STT_SECTION == ELF_ST_TYPE(symbol->elf_sym->st_info)) { -+ /* NOTE: We assume that oc->sections corresponds to the -+ * sections in the object file. This is currently true, -+ * and will stay true, unless we start to compress -+ * oc->sections by not having an entry for sections we -+ * are not interested in. -+ */ -+ -+ -+ /* See Note [Many ELF Sections] */ -+ /* Note that future checks for special SHN_* numbers should -+ * check the shndx variable, not the section number in secno. -+ * Sections with the real number in the SHN_LORESERVE..HIRESERVE -+ * range will have shndx SHN_XINDEX and a secno with one of the -+ * reserved values. -+ */ -+ Elf_Word secno = symbol->elf_sym->st_shndx; -+#if defined(SHN_XINDEX) -+ if (secno == SHN_XINDEX) { -+ CHECK(shndxTable); -+ secno = shndxTable[i]; -+ } -+#endif -+ CHECK(symbol->elf_sym->st_name == 0); -+ CHECK(symbol->elf_sym->st_value == 0); -+ CHECK(0x0 != oc->sections[ secno ].start); -+ symbol->addr = oc->sections[ secno ].start; -+ } -+ } -+ } -+ -+ if(fillGot( oc )) -+ return 0; -+ /* silence warnings */ -+ (void) shnum; -+ (void) shdr; -+ -+#if defined(aarch64_HOST_ARCH) -+ /* use new relocation design */ -+ if(relocateObjectCode( oc )) -+ return 0; -+#else -+ /* Process the relocation sections. */ -+ for (Elf_Word i = 0; i < shnum; i++) { -+ if (shdr[i].sh_type == SHT_REL) { -+ bool ok = do_Elf_Rel_relocations ( oc, ehdrC, shdr, i ); -+ if (!ok) -+ return ok; -+ } -+ else -+ if (shdr[i].sh_type == SHT_RELA) { -+ bool ok = do_Elf_Rela_relocations ( oc, ehdrC, shdr, i ); -+ if (!ok) -+ return ok; -+ } -+ } -+#endif -+ -+#if defined(powerpc_HOST_ARCH) -+ ocFlushInstructionCache( oc ); -+#endif -+ -+ return ocMprotect_Elf(oc); -+} -+ -+/* -+ * Note [Initializers and finalizers (ELF)] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * The System V ABI describes a facility for allowing object code to mark -+ * functions to be run at load time. These functions are known as -+ * "initializers" (or "constructors"). Initializers are recorded in a section -+ * marked with the DT_INIT tag (often with the name `.init`). -+ * -+ * There is also a similar mechanism for code to be run at unload time (e.g. -+ * during program termination). These are known as finalizers and are collected -+ * in `.fini` section. -+ * -+ * For more about how the code generator emits initializers and finalizers see -+ * Note [Initializers and finalizers in Cmm] in GHC.Cmm.InitFini. -+ * -+ * See also: the "Initialization and Termination Functions" section of the -+ * System V ABI. -+ * -+ * Note [GCC 6 init/fini section workaround] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * The System V ABI specifies that .init_array and .fini_array sections should -+ * be marked with the SHT_INIT_ARRAY/SHT_FINI_ARRAY section types. However, it -+ * seems that GCC 6 (at least on i386) produces sections *named* -+ * .init_array/.fini_array but marks them as SHT_PROGBITS. Consequently we need -+ * to augment the usual section type check (which in an ideal world would be -+ * sufficient) with a check looking at the section name to catch this case. -+ */ -+ -+// Run the constructors/initializers of an ObjectCode. -+// Returns 1 on success. -+// See Note [Initializers and finalizers (ELF)]. -+int ocRunInit_ELF( ObjectCode *oc ) -+{ -+ if (oc && oc->info && oc->info->init) { -+ return runInit(&oc->info->init); -+ } -+ return true; -+} -+ -+// Run the finalizers of an ObjectCode. -+// Returns 1 on success. -+// See Note [Initializers and finalizers (ELF)]. -+int ocRunFini_ELF( ObjectCode *oc ) -+{ -+ if (oc && oc->info && oc->info->fini) { -+ return runFini(&oc->info->fini); -+ } -+ return true; -+} -+ -+/* -+ * Shared object loading -+ */ -+ -+#if defined(HAVE_DLINFO) -+struct piterate_cb_info { -+ ObjectCode *nc; -+ void *l_addr; /* base virtual address of the loaded code */ -+}; -+ -+static int loadNativeObjCb_(struct dl_phdr_info *info, -+ size_t _size STG_UNUSED, void *data) { -+ struct piterate_cb_info *s = (struct piterate_cb_info *) data; -+ -+ // This logic mimicks _dl_addr_inside_object from glibc -+ // For reference: -+ // int -+ // internal_function -+ // _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) -+ // { -+ // int n = l->l_phnum; -+ // const ElfW(Addr) reladdr = addr - l->l_addr; -+ // -+ // while (--n >= 0) -+ // if (l->l_phdr[n].p_type == PT_LOAD -+ // && reladdr - l->l_phdr[n].p_vaddr >= 0 -+ // && reladdr - l->l_phdr[n].p_vaddr < l->l_phdr[n].p_memsz) -+ // return 1; -+ // return 0; -+ // } -+ -+ if ((void*) info->dlpi_addr == s->l_addr) { -+ int n = info->dlpi_phnum; -+ while (--n >= 0) { -+ if (info->dlpi_phdr[n].p_type == PT_LOAD) { -+ NativeCodeRange* ncr = -+ stgMallocBytes(sizeof(NativeCodeRange), "loadNativeObjCb_"); -+ ncr->start = (void*) ((char*) s->l_addr + info->dlpi_phdr[n].p_vaddr); -+ ncr->end = (void*) ((char*) ncr->start + info->dlpi_phdr[n].p_memsz); -+ -+ ncr->next = s->nc->nc_ranges; -+ s->nc->nc_ranges = ncr; -+ } -+ } -+ } -+ return 0; -+} -+#endif /* defined(HAVE_DLINFO) */ -+ -+static void copyErrmsg(char** errmsg_dest, char* errmsg) { -+ if (errmsg == NULL) errmsg = "loadNativeObj_ELF: unknown error"; -+ *errmsg_dest = stgMallocBytes(strlen(errmsg)+1, "loadNativeObj_ELF"); -+ strcpy(*errmsg_dest, errmsg); -+} -+ -+// need dl_mutex -+void freeNativeCode_ELF (ObjectCode *nc) { -+ dlclose(nc->dlopen_handle); -+ -+ NativeCodeRange *ncr = nc->nc_ranges; -+ while (ncr) { -+ NativeCodeRange* last_ncr = ncr; -+ ncr = ncr->next; -+ stgFree(last_ncr); -+ } -+} -+ -+void * loadNativeObj_ELF (pathchar *path, char **errmsg) -+{ -+ ObjectCode* nc; -+ void *hdl, *retval; -+ -+ IF_DEBUG(linker, debugBelch("loadNativeObj_ELF %" PATH_FMT "\n", path)); -+ -+ retval = NULL; -+ ACQUIRE_LOCK(&dl_mutex); -+ -+ /* Loading the same object multiple times will lead to chaos -+ * as we will have two ObjectCodes but one underlying dlopen -+ * handle. Fail if this happens. -+ */ -+ if (getObjectLoadStatus_(path) != OBJECT_NOT_LOADED) { -+ copyErrmsg(errmsg, "loadNativeObj_ELF: Already loaded"); -+ goto dlopen_fail; -+ } -+ -+ nc = mkOc(DYNAMIC_OBJECT, path, NULL, 0, false, NULL, 0); -+ -+ foreignExportsLoadingObject(nc); -+ hdl = dlopen(path, RTLD_NOW|RTLD_LOCAL); -+ nc->dlopen_handle = hdl; -+ foreignExportsFinishedLoadingObject(); -+ if (hdl == NULL) { -+ /* dlopen failed; save the message in errmsg */ -+ copyErrmsg(errmsg, dlerror()); -+ goto dlopen_fail; -+ } -+ -+#if defined(HAVE_DLINFO) -+ struct link_map *map; -+ if (dlinfo(hdl, RTLD_DI_LINKMAP, &map) == -1) { -+ /* dlinfo failed; save the message in errmsg */ -+ copyErrmsg(errmsg, dlerror()); -+ goto dlinfo_fail; -+ } -+ -+ hdl = NULL; // pass handle ownership to nc -+ -+ struct piterate_cb_info piterate_info = { -+ .nc = nc, -+ .l_addr = (void *) map->l_addr -+ }; -+ dl_iterate_phdr(loadNativeObjCb_, &piterate_info); -+ if (!nc->nc_ranges) { -+ copyErrmsg(errmsg, "dl_iterate_phdr failed to find obj"); -+ goto dl_iterate_phdr_fail; -+ } -+ nc->unloadable = true; -+#else -+ nc->nc_ranges = NULL; -+ nc->unloadable = false; -+#endif /* defined (HAVE_DLINFO) */ -+ -+ insertOCSectionIndices(nc); -+ -+ nc->next_loaded_object = loaded_objects; -+ loaded_objects = nc; -+ -+ retval = nc->dlopen_handle; -+ -+#if defined(PROFILING) -+ // collect any new cost centres that were defined in the loaded object. -+ refreshProfilingCCSs(); -+#endif -+ -+ goto success; -+ -+dl_iterate_phdr_fail: -+ // already have dl_mutex -+ freeNativeCode_ELF(nc); -+dlinfo_fail: -+ if (hdl) dlclose(hdl); -+dlopen_fail: -+success: -+ -+ RELEASE_LOCK(&dl_mutex); -+ -+ IF_DEBUG(linker, debugBelch("loadNativeObj_ELF result=%p\n", retval)); -+ -+ return retval; -+} -+ -+ -+/* -+ * PowerPC & X86_64 ELF specifics -+ */ -+ -+#if defined(NEED_SYMBOL_EXTRAS) -+ -+int ocAllocateExtras_ELF( ObjectCode *oc ) -+{ -+ Elf_Ehdr *ehdr = (Elf_Ehdr *) oc->image; -+ Elf_Shdr* shdr = (Elf_Shdr *) ( ((char *)oc->image) + ehdr->e_shoff ); -+ Elf_Shdr* symtab = NULL; -+ Elf_Word shnum = elf_shnum(ehdr); -+ int bssSize = 0; -+ -+ for (Elf_Word i = 0; i < shnum; ++i) { -+ if(shdr[i].sh_type == SHT_SYMTAB) { -+ symtab = &shdr[i]; -+ } else { -+ int isBss = 0; -+ getSectionKind_ELF(&shdr[i], &isBss); -+ if (isBss && shdr[i].sh_size > 0) { -+ bssSize += roundUpToAlign(shdr[i].sh_size, shdr[i].sh_addralign); -+ } -+ } -+ } -+ -+ if (symtab == NULL) -+ { -+ // Not having a symbol table is not in principle a problem. -+ // When an object file has no symbols then the 'strip' program -+ // typically will remove the symbol table entirely. -+ IF_DEBUG(linker, debugBelch( "The ELF file %s contains no symtab\n", -+ oc->archiveMemberName ? oc->archiveMemberName : oc->fileName )); -+ return 1; -+ } -+ -+ if( symtab->sh_entsize != sizeof( Elf_Sym ) ) -+ { -+ errorBelch( "The entry size (%d) of the symtab isn't %d\n", -+ (int) symtab->sh_entsize, (int) sizeof( Elf_Sym ) ); -+ -+ return 0; -+ } -+ -+ return ocAllocateExtras(oc, symtab->sh_size / sizeof( Elf_Sym ), 0, bssSize); -+} -+ -+#endif /* NEED_SYMBOL_EXTRAS */ -+ -+#endif /* elf */ -diff --git a/rts/linker/Elf.h b/rts/linker/Elf.h -index 30c993b..2b9ad87 100644 ---- a/rts/linker/Elf.h -+++ b/rts/linker/Elf.h -@@ -2,17 +2,19 @@ - - #include "Rts.h" - #include "LinkerInternals.h" -+#include "linker/ElfTypes.h" - - #include "BeginPrivate.h" - --#include -- - void ocInit_ELF ( ObjectCode* oc ); - void ocDeinit_ELF ( ObjectCode* oc ); - int ocVerifyImage_ELF ( ObjectCode* oc ); - int ocGetNames_ELF ( ObjectCode* oc ); - int ocResolve_ELF ( ObjectCode* oc ); - int ocRunInit_ELF ( ObjectCode* oc ); -+int ocRunFini_ELF ( ObjectCode* oc ); - int ocAllocateExtras_ELF ( ObjectCode *oc ); -+void freeNativeCode_ELF ( ObjectCode *nc ); -+void *loadNativeObj_ELF ( pathchar *path, char **errmsg ); - - #include "EndPrivate.h" -diff --git a/rts/linker/ElfTypes.h b/rts/linker/ElfTypes.h -index 0a8e44a..d3524e1 100644 ---- a/rts/linker/ElfTypes.h -+++ b/rts/linker/ElfTypes.h -@@ -6,6 +6,7 @@ - #include "ghcplatform.h" - - #include -+#include "linker/InitFini.h" - - /* - * Define a set of types which can be used for both ELF32 and ELF64 -@@ -143,6 +144,8 @@ struct ObjectCodeFormatInfo { - ElfRelocationTable *relTable; - ElfRelocationATable *relaTable; - -+ struct InitFiniList* init; // Freed by ocRunInit_PEi386 -+ struct InitFiniList* fini; // Freed by ocRunFini_PEi386 - - /* pointer to the global offset table */ - void * got_start; -@@ -170,7 +173,7 @@ struct SectionFormatInfo { - size_t nstubs; - Stub * stubs; - -- char * name; -+ const char * name; - - Elf_Shdr *sectionHeader; - }; -diff --git a/rts/linker/InitFini.c b/rts/linker/InitFini.c -new file mode 100644 -index 0000000..6c787fe ---- /dev/null -+++ b/rts/linker/InitFini.c -@@ -0,0 +1,201 @@ -+#include "Rts.h" -+#include "RtsUtils.h" -+#include "LinkerInternals.h" -+#include "GetEnv.h" -+#include "InitFini.h" -+ -+/* -+ * Note [Initializers and finalizers (PEi386/ELF)] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * Most ABIs allow an object to define initializers and finalizers to be run -+ * at load/unload time, respectively. These are represented in two ways: -+ * -+ * - a `.init`/`.fini` section which contains a function of type init_t which -+ * is to be executed during initialization/finalization. -+ * -+ * - `.ctors`/`.dtors` sections; these contain an array of pointers to -+ * `init_t`/`fini_t` functions, all of which should be executed at -+ * initialization/finalization time. The `.ctors` entries are run in reverse -+ * order. The list may end in a 0 or -1 sentinel value. -+ * -+ * - `.init_array`/`.fini_array` sections; these contain an array -+ * of pointers to `init_t`/`fini_t` functions. -+ * -+ * Objects may contain multiple `.ctors`/`.dtors` and -+ * `.init_array`/`.fini_array` sections, each optionally suffixed with an -+ * 16-bit integer priority (e.g. `.init_array.1234`). Confusingly, `.ctors` -+ * priorities and `.init_array` priorities have different orderings: `.ctors` -+ * sections are run from high to low priority whereas `.init_array` sections -+ * are run from low-to-high. -+ * -+ * Sections without a priority (e.g. `.ctors`) are assumed to run last (that -+ * is, are given a priority of 0xffff). -+ * -+ * In general, we run finalizers in the reverse order of the associated -+ * initializers. That is to say, e.g., .init_array entries are run from first -+ * to last entry and therefore .fini_array entries are run from last-to-first. -+ * -+ * To determine the ordering among the various section types, we follow glibc's -+ * model: -+ * -+ * - first run .ctors (last entry to first entry) -+ * - then run .init_arrays (first-to-last) -+ * -+ * and on unload we run in opposite order: -+ * -+ * - first run fini_arrays (first-to-last) -+ * - then run .dtors (last-to-first) -+ * -+ * For more about how the code generator emits initializers and finalizers see -+ * Note [Initializers and finalizers in Cmm] in GHC.Cmm.InitFini. -+ */ -+ -+// Priority follows the init_array definition: initializers are run -+// lowest-to-highest, finalizers run highest-to-lowest. -+void addInitFini(struct InitFiniList **head, Section *section, enum InitFiniKind kind, uint32_t priority) -+{ -+ struct InitFiniList *slist = stgMallocBytes(sizeof(struct InitFiniList), "addInitFini"); -+ slist->section = section; -+ slist->kind = kind; -+ slist->priority = priority; -+ slist->next = *head; -+ *head = slist; -+} -+ -+enum SortOrder { INCREASING, DECREASING }; -+ -+// Sort a InitFiniList by priority. -+static void sortInitFiniList(struct InitFiniList **slist, enum SortOrder order) -+{ -+ // Bubble sort -+ bool done = false; -+ while (!done) { -+ struct InitFiniList **last = slist; -+ done = true; -+ while (*last != NULL && (*last)->next != NULL) { -+ struct InitFiniList *s0 = *last; -+ struct InitFiniList *s1 = s0->next; -+ bool flip; -+ switch (order) { -+ case INCREASING: flip = s0->priority > s1->priority; break; -+ case DECREASING: flip = s0->priority < s1->priority; break; -+ } -+ if (flip) { -+ s0->next = s1->next; -+ s1->next = s0; -+ *last = s1; -+ done = false; -+ } else { -+ last = &s0->next; -+ } -+ } -+ } -+} -+ -+void freeInitFiniList(struct InitFiniList *slist) -+{ -+ while (slist != NULL) { -+ struct InitFiniList *next = slist->next; -+ stgFree(slist); -+ slist = next; -+ } -+} -+ -+static bool runInitFini(struct InitFiniList **head) -+{ -+ int argc, envc; -+ char **argv, **envv; -+ -+ getProgArgv(&argc, &argv); -+ getProgEnvv(&envc, &envv); -+ -+ for (struct InitFiniList *slist = *head; -+ slist != NULL; -+ slist = slist->next) -+ { -+ Section *section = slist->section; -+ switch (slist->kind) { -+ case INITFINI_INIT: { -+ init_t *init = (init_t*)section->start; -+ (*init)(argc, argv, envv); -+ break; -+ } -+ case INITFINI_FINI: { -+ fini_t *fini = (fini_t*)section->start; -+ (*fini)(); -+ break; -+ } -+ case INITFINI_CTORS: { -+ uint8_t *init_startC = section->start; -+ init_t *init_start = (init_t*)init_startC; -+ init_t *init_end = (init_t*)(init_startC + section->size); -+ -+ // ctors are run *backwards*! -+ for (init_t *init = init_end - 1; init >= init_start; init--) { -+ if ((intptr_t) *init == 0x0 || (intptr_t)*init == -1) { -+ continue; -+ } -+ (*init)(argc, argv, envv); -+ } -+ break; -+ } -+ case INITFINI_DTORS: { -+ char *fini_startC = section->start; -+ fini_t *fini_start = (fini_t*)fini_startC; -+ fini_t *fini_end = (fini_t*)(fini_startC + section->size); -+ for (fini_t *fini = fini_start; fini < fini_end; fini++) { -+ if ((intptr_t) *fini == 0x0 || (intptr_t) *fini == -1) { -+ continue; -+ } -+ (*fini)(); -+ } -+ break; -+ } -+ case INITFINI_INIT_ARRAY: { -+ char *init_startC = section->start; -+ init_t *init_start = (init_t*)init_startC; -+ init_t *init_end = (init_t*)(init_startC + section->size); -+ for (init_t *init = init_start; init < init_end; init++) { -+ CHECK(0x0 != *init); -+ (*init)(argc, argv, envv); -+ } -+ break; -+ } -+ case INITFINI_FINI_ARRAY: { -+ char *fini_startC = section->start; -+ fini_t *fini_start = (fini_t*)fini_startC; -+ fini_t *fini_end = (fini_t*)(fini_startC + section->size); -+ // .fini_array finalizers are run backwards -+ for (fini_t *fini = fini_end - 1; fini >= fini_start; fini--) { -+ CHECK(0x0 != *fini); -+ (*fini)(); -+ } -+ break; -+ } -+ default: barf("unknown InitFiniKind"); -+ } -+ } -+ freeInitFiniList(*head); -+ *head = NULL; -+ -+ freeProgEnvv(envc, envv); -+ return true; -+} -+ -+// Run the constructors/initializers of an ObjectCode. -+// Returns 1 on success. -+// See Note [Initializers and finalizers (PEi386/ELF)]. -+bool runInit(struct InitFiniList **head) -+{ -+ sortInitFiniList(head, INCREASING); -+ return runInitFini(head); -+} -+ -+// Run the finalizers of an ObjectCode. -+// Returns 1 on success. -+// See Note [Initializers and finalizers (PEi386/ELF)]. -+bool runFini(struct InitFiniList **head) -+{ -+ sortInitFiniList(head, DECREASING); -+ return runInitFini(head); -+} -diff --git a/rts/linker/InitFini.h b/rts/linker/InitFini.h -new file mode 100644 -index 0000000..c0a0444 ---- /dev/null -+++ b/rts/linker/InitFini.h -@@ -0,0 +1,23 @@ -+#pragma once -+ -+enum InitFiniKind { -+ INITFINI_INIT, // .init section -+ INITFINI_FINI, // .fini section -+ INITFINI_CTORS, // .ctors section -+ INITFINI_DTORS, // .dtors section -+ INITFINI_INIT_ARRAY, // .init_array section -+ INITFINI_FINI_ARRAY, // .fini_array section -+}; -+ -+// A linked-list of initializer or finalizer sections. -+struct InitFiniList { -+ Section *section; -+ uint32_t priority; -+ enum InitFiniKind kind; -+ struct InitFiniList *next; -+}; -+ -+void addInitFini(struct InitFiniList **slist, Section *section, enum InitFiniKind kind, uint32_t priority); -+void freeInitFiniList(struct InitFiniList *slist); -+bool runInit(struct InitFiniList **slist); -+bool runFini(struct InitFiniList **slist); -diff --git a/rts/linker/LoadArchive.c b/rts/linker/LoadArchive.c -index 366b45d..3c35a02 100644 ---- a/rts/linker/LoadArchive.c -+++ b/rts/linker/LoadArchive.c -@@ -7,6 +7,7 @@ - #include "LinkerInternals.h" - #include "CheckUnload.h" // loaded_objects, insertOCSectionIndices - #include "linker/M32Alloc.h" -+#include "linker/MMap.h" - - /* Platform specific headers */ - #if defined(OBJFORMAT_PEi386) -@@ -240,11 +241,12 @@ lookupGNUArchiveIndex(int gnuFileIndexSize, char **fileName_, - return true; - } - --static HsInt loadArchive_ (pathchar *path) -+HsInt loadArchive_ (pathchar *path) - { - char *image = NULL; - HsInt retcode = 0; - int memberSize; -+ int memberIdx = 0; - FILE *f = NULL; - int n; - size_t thisFileNameSize = (size_t)-1; /* shut up bogus GCC warning */ -@@ -440,7 +442,7 @@ static HsInt loadArchive_ (pathchar *path) - break; - } - } -- /* If we didn't find a '/', then a space teminates the -+ /* If we didn't find a '/', then a space terminates the - filename. Note that if we don't find one, then - thisFileNameSize ends up as 16, and we already have the - '\0' at the end. */ -@@ -468,6 +470,7 @@ static HsInt loadArchive_ (pathchar *path) - #if defined(OBJFORMAT_PEi386) - /* - * Note [MSVC import files (ext .lib)] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * MSVC compilers store the object files in - * the import libraries with extension .dll - * so on Windows we should look for those too. -@@ -483,7 +486,7 @@ static HsInt loadArchive_ (pathchar *path) - DEBUG_LOG("\tisObject = %d\n", isObject); - - if (isObject) { -- char *archiveMemberName; -+ pathchar *archiveMemberName; - - DEBUG_LOG("Member is an object file...loading...\n"); - -@@ -515,12 +518,16 @@ static HsInt loadArchive_ (pathchar *path) - } - } - -- archiveMemberName = stgMallocBytes(pathlen(path) + thisFileNameSize + 3, -- "loadArchive(file)"); -- sprintf(archiveMemberName, "%" PATH_FMT "(%.*s)", -- path, (int)thisFileNameSize, fileName); -+ int size = pathprintf(NULL, 0, WSTR("%" PATH_FMT "(#%d:%.*s)"), -+ path, memberIdx, (int)thisFileNameSize, fileName); -+ // I don't understand why this extra +1 is needed here; pathprintf -+ // should have given us the correct length but in practice it seems -+ // to be one byte short on Win32. -+ archiveMemberName = stgMallocBytes((size+1+1) * sizeof(pathchar), "loadArchive(file)"); -+ pathprintf(archiveMemberName, size+1, WSTR("%" PATH_FMT "(#%d:%.*s)"), -+ path, memberIdx, (int)thisFileNameSize, fileName); - -- ObjectCode *oc = mkOc(path, image, memberSize, false, archiveMemberName, -+ ObjectCode *oc = mkOc(STATIC_OBJECT, path, image, memberSize, false, archiveMemberName, - misalignment); - #if defined(OBJFORMAT_MACHO) - ocInit_MachO( oc ); -@@ -601,6 +608,7 @@ while reading filename from `%" PATH_FMT "'", path); - } - DEBUG_LOG("successfully read one pad byte\n"); - } -+ memberIdx ++; - DEBUG_LOG("reached end of archive loading while loop\n"); - } - retcode = 1; -@@ -612,7 +620,7 @@ fail: - stgFree(fileName); - if (gnuFileIndex != NULL) { - #if RTS_LINKER_USE_MMAP -- munmap(gnuFileIndex, gnuFileIndexSize + 1); -+ munmapForLinker(gnuFileIndex, gnuFileIndexSize + 1, "loadArchive_"); - #else - stgFree(gnuFileIndex); - #endif -@@ -629,3 +637,21 @@ HsInt loadArchive (pathchar *path) - RELEASE_LOCK(&linker_mutex); - return r; - } -+ -+bool isArchive (pathchar *path) -+{ -+ static const char ARCHIVE_HEADER[] = "!\n"; -+ char buffer[10]; -+ FILE *f = pathopen(path, WSTR("rb")); -+ if (f == NULL) { -+ return false; -+ } -+ -+ size_t ret = fread(buffer, 1, sizeof(buffer), f); -+ fclose(f); -+ if (ret < sizeof(buffer)) { -+ return false; -+ } -+ return strncmp(ARCHIVE_HEADER, buffer, sizeof(ARCHIVE_HEADER)-1) == 0; -+} -+ -diff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.c -index d2b9114..17d3d12 100644 ---- a/rts/linker/M32Alloc.c -+++ b/rts/linker/M32Alloc.c -@@ -10,7 +10,8 @@ - #include "sm/OSMem.h" - #include "RtsUtils.h" - #include "linker/M32Alloc.h" --#include "LinkerInternals.h" -+#include "linker/MMap.h" -+#include "ReportMemoryMap.h" - - #include - #include -@@ -18,10 +19,8 @@ - #include - - /* -- - Note [Compile Time Trickery] - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- - This file implements two versions of each of the `m32_*` functions. At the top - of the file there is the real implementation (compiled in when - `NEED_M32` is true) and a dummy implementation that exists only to -@@ -45,10 +44,8 @@ still check the call for syntax and correct function parameter types. - #if defined(NEED_M32) - - /* -- - Note [M32 Allocator] - ~~~~~~~~~~~~~~~~~~~~ -- - A memory allocator that allocates only pages in the 32-bit range (lower 2GB). - This is useful on 64-bit platforms to ensure that addresses of allocated - objects can be referenced with a 32-bit relative offset. -@@ -97,7 +94,7 @@ life-cycle it is in: - allocation) - - Allocation (in the case of a small request) consists of walking the nursery to --find a page that will accomodate the request. If none exists then we allocate a -+find a page that will accommodate the request. If none exists then we allocate a - new nursery page (flushing an existing one to the filled list if the nursery is - full). - -@@ -135,6 +132,11 @@ The allocator is *not* thread-safe. - - */ - -+// Enable internal consistency checking -+#if defined(DEBUG) -+#define M32_DEBUG -+#endif -+ - #define ROUND_UP(x,size) ((x + size - 1) & ~(size - 1)) - #define ROUND_DOWN(x,size) (x & ~(size - 1)) - -@@ -147,7 +149,21 @@ The allocator is *not* thread-safe. - /* How many pages should we map at once when re-filling the free page pool? */ - #define M32_MAP_PAGES 32 - /* Upper bound on the number of pages to keep in the free page pool */ --#define M32_MAX_FREE_PAGE_POOL_SIZE 64 -+#define M32_MAX_FREE_PAGE_POOL_SIZE 256 -+ -+/* A utility to verify that a given address is "acceptable" for use by m32. */ -+static bool -+is_okay_address(void *p) { -+ int8_t *here = LINKER_LOAD_BASE; -+ ssize_t displacement = (int8_t *) p - here; -+ return (displacement > -0x7fffffff) && (displacement < 0x7fffffff); -+} -+ -+enum m32_page_type { -+ FREE_PAGE, // a page in the free page pool -+ NURSERY_PAGE, // a nursery page -+ FILLED_PAGE, // a page on the filled list -+}; - - /** - * Page header -@@ -161,8 +177,7 @@ struct m32_page_t { - // unprotected_list or protected_list are linked together with this field. - struct { - uint32_t size; -- uint32_t next; // this is a m32_page_t*, truncated to 32-bits. This is safe -- // as we are only allocating in the bottom 32-bits -+ struct m32_page_t *next; - } filled_page; - - // Pages in the small-allocation nursery encode their current allocation -@@ -174,21 +189,64 @@ struct m32_page_t { - struct m32_page_t *next; - } free_page; - }; -+#if defined(M32_DEBUG) -+ enum m32_page_type type; -+#endif -+ uint8_t contents[]; - }; - -+/* Consistency-checking infrastructure */ -+#if defined(M32_DEBUG) -+static void ASSERT_PAGE_ALIGNED(void *page) { -+ const size_t pgsz = getPageSize(); -+ if ((((uintptr_t) page) & (pgsz-1)) != 0) { -+ barf("m32: invalid page alignment"); -+ } -+} -+static void ASSERT_VALID_PAGE(struct m32_page_t *page) { -+ ASSERT_PAGE_ALIGNED(page); -+ switch (page->type) { -+ case FREE_PAGE: -+ case NURSERY_PAGE: -+ case FILLED_PAGE: -+ break; -+ default: -+ barf("m32: invalid page state\n"); -+ } -+} -+static void ASSERT_PAGE_TYPE(struct m32_page_t *page, enum m32_page_type ty) { -+ if (page->type != ty) { barf("m32: unexpected page type"); } -+} -+static void ASSERT_PAGE_NOT_FREE(struct m32_page_t *page) { -+ if (page->type == FREE_PAGE) { barf("m32: unexpected free page"); } -+} -+static void SET_PAGE_TYPE(struct m32_page_t *page, enum m32_page_type ty) { -+ page->type = ty; -+} -+#else -+#define ASSERT_PAGE_ALIGNED(page) -+#define ASSERT_VALID_PAGE(page) -+#define ASSERT_PAGE_NOT_FREE(page) -+#define ASSERT_PAGE_TYPE(page, ty) -+#define SET_PAGE_TYPE(page, ty) -+#endif -+ -+/* Accessors */ - static void - m32_filled_page_set_next(struct m32_page_t *page, struct m32_page_t *next) - { -- if (next > (struct m32_page_t *) 0xffffffff) { -- barf("m32_filled_page_set_next: Page not in lower 32-bits"); -+ ASSERT_PAGE_TYPE(page, FILLED_PAGE); -+ if (next != NULL && ! is_okay_address(next)) { -+ barf("m32_filled_page_set_next: Page %p not within 4GB of program text", next); - } -- page->filled_page.next = (uint32_t) (uintptr_t) next; -+ page->filled_page.next = next; - } - - static struct m32_page_t * - m32_filled_page_get_next(struct m32_page_t *page) - { -- return (struct m32_page_t *) (uintptr_t) page->filled_page.next; -+ ASSERT_PAGE_TYPE(page, FILLED_PAGE); -+ return (struct m32_page_t *) (uintptr_t) page->filled_page.next; - } - - /** -@@ -213,40 +271,42 @@ struct m32_allocator_t { - * We keep a small pool of free pages around to avoid fragmentation. - */ - struct m32_page_t *m32_free_page_pool = NULL; -+/** Number of pages in free page pool */ - unsigned int m32_free_page_pool_size = 0; --// TODO -- --/** -- * Wrapper for `unmap` that handles error cases. -- * This is the real implementation. There is another dummy implementation below. -- * See the note titled "Compile Time Trickery" at the top of this file. -- */ --static void --munmapForLinker (void * addr, size_t size) --{ -- IF_DEBUG(linker, -- debugBelch("m32_alloc: Unmapping %zu bytes at %p\n", -- size, addr)); -- -- int r = munmap(addr,size); -- if (r == -1) { -- // Should we abort here? -- sysErrorBelch("munmap"); -- } --} - - /** -- * Free a page or, if possible, place it in the free page pool. -+ * Free a filled page or, if possible, place it in the free page pool. - */ - static void - m32_release_page(struct m32_page_t *page) - { -- if (m32_free_page_pool_size < M32_MAX_FREE_PAGE_POOL_SIZE) { -- page->free_page.next = m32_free_page_pool; -- m32_free_page_pool = page; -- m32_free_page_pool_size ++; -- } else { -- munmapForLinker((void *) page, getPageSize()); -+ // Some sanity-checking -+ ASSERT_VALID_PAGE(page); -+ ASSERT_PAGE_NOT_FREE(page); -+ -+ const size_t pgsz = getPageSize(); -+ ssize_t sz = page->filled_page.size; -+ -+ // Break the page, which may be a large multi-page allocation, into -+ // individual pages for the page pool -+ while (sz > 0) { -+ if (m32_free_page_pool_size < M32_MAX_FREE_PAGE_POOL_SIZE) { -+ mprotectForLinker(page, pgsz, MEM_READ_WRITE); -+ IF_DEBUG(sanity, memset(page, 0xaa, pgsz)); -+ SET_PAGE_TYPE(page, FREE_PAGE); -+ page->free_page.next = m32_free_page_pool; -+ m32_free_page_pool = page; -+ m32_free_page_pool_size ++; -+ } else { -+ break; -+ } -+ page = (struct m32_page_t *) ((uint8_t *) page + pgsz); -+ sz -= pgsz; -+ } -+ -+ // The free page pool is full, release the rest back to the system -+ if (sz > 0) { -+ munmapForLinker((void *) page, ROUND_UP(sz, pgsz), "m32_release_page"); - } - } - -@@ -265,13 +325,16 @@ m32_alloc_page(void) - const size_t pgsz = getPageSize(); - const size_t map_sz = pgsz * M32_MAP_PAGES; - uint8_t *chunk = mmapAnonForLinker(map_sz); -- if (chunk + map_sz > (uint8_t *) 0xffffffff) { -- barf("m32_alloc_page: failed to get allocation in lower 32-bits"); -+ if (! is_okay_address(chunk + map_sz)) { -+ reportMemoryMap(); -+ barf("m32_alloc_page: failed to allocate pages within 4GB of program text (got %p)", chunk); - } -+ IF_DEBUG(sanity, memset(chunk, 0xaa, map_sz)); - - #define GET_PAGE(i) ((struct m32_page_t *) (chunk + (i) * pgsz)) - for (int i=0; i < M32_MAP_PAGES; i++) { - struct m32_page_t *page = GET_PAGE(i); -+ SET_PAGE_TYPE(page, FREE_PAGE); - page->free_page.next = GET_PAGE(i+1); - } - -@@ -284,6 +347,7 @@ m32_alloc_page(void) - struct m32_page_t *page = m32_free_page_pool; - m32_free_page_pool = page->free_page.next; - m32_free_page_pool_size --; -+ ASSERT_PAGE_TYPE(page, FREE_PAGE); - return page; - } - -@@ -309,8 +373,9 @@ static void - m32_allocator_unmap_list(struct m32_page_t *head) - { - while (head != NULL) { -+ ASSERT_VALID_PAGE(head); - struct m32_page_t *next = m32_filled_page_get_next(head); -- munmapForLinker((void *) head, head->filled_page.size); -+ m32_release_page(head); - head = next; - } - } -@@ -325,10 +390,9 @@ void m32_allocator_free(m32_allocator *alloc) - m32_allocator_unmap_list(alloc->protected_list); - - /* free partially-filled pages */ -- const size_t pgsz = getPageSize(); - for (int i=0; i < M32_MAX_PAGES; i++) { - if (alloc->pages[i]) { -- munmapForLinker(alloc->pages[i], pgsz); -+ m32_release_page(alloc->pages[i]); - } - } - -@@ -341,6 +405,8 @@ void m32_allocator_free(m32_allocator *alloc) - static void - m32_allocator_push_filled_list(struct m32_page_t **head, struct m32_page_t *page) - { -+ ASSERT_PAGE_TYPE(page, FILLED_PAGE); -+ // N.B. it's the caller's responsibility to set the pagetype to FILLED_PAGE - m32_filled_page_set_next(page, *head); - *head = page; - } -@@ -367,6 +433,7 @@ m32_allocator_flush(m32_allocator *alloc) { - m32_release_page(alloc->pages[i]); - } else { - // the page contains data, move it to the unprotected list -+ SET_PAGE_TYPE(alloc->pages[i], FILLED_PAGE); - m32_allocator_push_filled_list(&alloc->unprotected_list, alloc->pages[i]); - } - alloc->pages[i] = NULL; -@@ -376,9 +443,10 @@ m32_allocator_flush(m32_allocator *alloc) { - if (alloc->executable) { - struct m32_page_t *page = alloc->unprotected_list; - while (page != NULL) { -+ ASSERT_PAGE_TYPE(page, FILLED_PAGE); - struct m32_page_t *next = m32_filled_page_get_next(page); - m32_allocator_push_filled_list(&alloc->protected_list, page); -- mmapForLinkerMarkExecutable(page, page->filled_page.size); -+ mprotectForLinker(page, page->filled_page.size, MEM_READ_EXECUTE); - page = next; - } - alloc->unprotected_list = NULL; -@@ -394,6 +462,15 @@ m32_is_large_object(size_t size, size_t alignment) - return size >= getPageSize() - ROUND_UP(sizeof(struct m32_page_t), alignment); - } - -+static void -+m32_report_allocation(struct m32_allocator_t *alloc STG_UNUSED, void *addr STG_UNUSED, size_t size STG_UNUSED) -+{ -+ IF_DEBUG(linker_verbose, debugBelch( -+ "m32_allocated(%p:%s): %p - %p\n", -+ alloc, alloc->executable ? "RX": "RW", -+ addr, (uint8_t*) addr + size)); -+} -+ - /** - * Allocate `size` bytes of memory with the given alignment. - * -@@ -408,17 +485,23 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) - if (m32_is_large_object(size,alignment)) { - // large object - size_t alsize = ROUND_UP(sizeof(struct m32_page_t), alignment); -+ // TODO: lower-bound allocation size to allocation granularity and return -+ // remainder to free pool. - struct m32_page_t *page = mmapAnonForLinker(alsize+size); - if (page == NULL) { - sysErrorBelch("m32_alloc: Failed to map pages for %zd bytes", size); - return NULL; -- } else if (page > (struct m32_page_t *) 0xffffffff) { -- debugBelch("m32_alloc: warning: Allocation of %zd bytes resulted in pages above 4GB (%p)", -- size, page); -+ } else if (! is_okay_address(page)) { -+ reportMemoryMap(); -+ barf("m32_alloc: warning: Allocation of %zd bytes resulted in pages above 4GB (%p)", -+ size, page); - } -+ SET_PAGE_TYPE(page, FILLED_PAGE); - page->filled_page.size = alsize + size; - m32_allocator_push_filled_list(&alloc->unprotected_list, (struct m32_page_t *) page); -- return (char*) page + alsize; -+ uint8_t *res = (uint8_t *) page + alsize; -+ m32_report_allocation(alloc, res, size); -+ return res; - } - - // small object -@@ -434,10 +517,13 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) - } - - // page can contain the buffer? -+ ASSERT_VALID_PAGE(alloc->pages[i]); -+ ASSERT_PAGE_TYPE(alloc->pages[i], NURSERY_PAGE); - size_t alsize = ROUND_UP(alloc->pages[i]->current_size, alignment); - if (size <= pgsz - alsize) { - void * addr = (char*)alloc->pages[i] + alsize; - alloc->pages[i]->current_size = alsize + size; -+ m32_report_allocation(alloc, addr, size); - return addr; - } - -@@ -451,6 +537,7 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) - - // If we haven't found an empty page, flush the most filled one - if (empty == -1) { -+ SET_PAGE_TYPE(alloc->pages[most_filled], FILLED_PAGE); - m32_allocator_push_filled_list(&alloc->unprotected_list, alloc->pages[most_filled]); - alloc->pages[most_filled] = NULL; - empty = most_filled; -@@ -461,11 +548,13 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) - if (page == NULL) { - return NULL; - } -+ SET_PAGE_TYPE(page, NURSERY_PAGE); - alloc->pages[empty] = page; - // Add header size and padding -- alloc->pages[empty]->current_size = -- size+ROUND_UP(sizeof(struct m32_page_t),alignment); -- return (char*)page + ROUND_UP(sizeof(struct m32_page_t),alignment); -+ alloc->pages[empty]->current_size = size + ROUND_UP(sizeof(struct m32_page_t),alignment); -+ uint8_t *res = (uint8_t *) page + ROUND_UP(sizeof(struct m32_page_t), alignment); -+ m32_report_allocation(alloc, res, size); -+ return res; - } - - #else -diff --git a/rts/linker/M32Alloc.h b/rts/linker/M32Alloc.h -index 8a349a3..c866029 100644 ---- a/rts/linker/M32Alloc.h -+++ b/rts/linker/M32Alloc.h -@@ -12,7 +12,7 @@ - * We use the m32 allocator for symbol extras on Windows and other mmap-using - * platforms. - */ --#if RTS_LINKER_USE_MMAP -+#if RTS_LINKER_USE_MMAP || defined(mingw32_HOST_OS) - #define NEED_M32 1 - #endif - -@@ -21,7 +21,7 @@ - #if defined(NEED_M32) - #define M32_NO_RETURN /* Nothing */ - #else --#define M32_NO_RETURN GNUC3_ATTRIBUTE(__noreturn__) -+#define M32_NO_RETURN STG_NORETURN - #endif - - struct m32_allocator_t; -diff --git a/rts/linker/MMap.c b/rts/linker/MMap.c -new file mode 100644 -index 0000000..30abad1 ---- /dev/null -+++ b/rts/linker/MMap.c -@@ -0,0 +1,466 @@ -+#include "Rts.h" -+ -+#include "sm/OSMem.h" -+#include "linker/MMap.h" -+#include "Trace.h" -+#include "ReportMemoryMap.h" -+ -+#if RTS_LINKER_USE_MMAP -+#include -+#endif -+ -+/* Link objects into the lower 2Gb on x86_64 and AArch64. GHC assumes the -+ * small memory model on this architecture (see gcc docs, -+ * -mcmodel=small). -+ * -+ * MAP_32BIT not available on OpenBSD/amd64 -+ */ -+#if defined(MAP_32BIT) && (defined(x86_64_HOST_ARCH) || (defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH))) -+#define MAP_LOW_MEM -+#define TRY_MAP_32BIT MAP_32BIT -+#else -+#define TRY_MAP_32BIT 0 -+#endif -+ -+/* MAP_ANONYMOUS is MAP_ANON on some systems, -+ e.g. OS X (before Sierra), OpenBSD etc */ -+#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) -+#define MAP_ANONYMOUS MAP_ANON -+#endif -+ -+/* In order to simplify control flow a bit, some references to mmap-related -+ definitions are blocked off by a C-level if statement rather than a CPP-level -+ #if statement. Since those are dead branches when !RTS_LINKER_USE_MMAP, we -+ just stub out the relevant symbols here -+*/ -+#if !RTS_LINKER_USE_MMAP -+#define munmap(x,y) /* nothing */ -+#define MAP_ANONYMOUS 0 -+#endif -+ -+void *mmap_32bit_base = LINKER_LOAD_BASE; -+ -+static const char *memoryAccessDescription(MemoryAccess mode) -+{ -+ switch (mode) { -+ case MEM_NO_ACCESS: return "no-access"; -+ case MEM_READ_ONLY: return "read-only"; -+ case MEM_READ_WRITE: return "read-write"; -+ case MEM_READ_WRITE_THEN_READ_EXECUTE: -+ return "read-write-then-read-execute"; -+ case MEM_READ_EXECUTE: return "read-execute"; -+ case MEM_READ_WRITE_EXECUTE: -+ return "read-write-execute"; -+ default: barf("invalid MemoryAccess"); -+ } -+} -+ -+/* A region of memory that we might map into. */ -+struct MemoryRegion { -+ void *start; -+ void *end; -+ void *last; -+ /* the end of the last mapping which we made into this region. -+ * this is where we will start searching next time we need to allocate. -+ */ -+}; -+ -+#if defined(mingw32_HOST_OS) -+ -+/* A wrapper for VirtualQuery() providing useful debug output */ -+static int virtualQuery(void *baseAddr, PMEMORY_BASIC_INFORMATION info) -+{ -+ int res = VirtualQuery (baseAddr, info, sizeof (*info)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("Probing region 0x%p (0x%p) - 0x%p (%" FMT_SizeT ") [%ld] with base 0x%p\n", -+ baseAddr, -+ info->BaseAddress, -+ (uint8_t *) info->BaseAddress + info->RegionSize, -+ info->RegionSize, info->State, -+ info->AllocationBase)); -+ if (!res) { -+ IF_DEBUG(linker_verbose, debugBelch("Querying 0x%p failed. Aborting..\n", baseAddr)); -+ return 1; -+ } -+ return 0; -+} -+ -+static inline uintptr_t round_up(uintptr_t num, uint64_t factor) -+{ -+ return num + factor - 1 - (num + factor - 1) % factor; -+} -+ -+/* -+ * Try and find a location in the VMMAP to allocate SZ bytes starting at -+ * BASEADDR. If successful then location to use is returned and the amount of -+ * bytes you *must* allocate is returned in REQ. You are free to use less but -+ * you must allocate the amount given in REQ. If not successful NULL. -+ */ -+static void *allocateBytes(void* baseAddr, void *endAddr, size_t sz, size_t *req) -+{ -+ SYSTEM_INFO sys; -+ GetSystemInfo(&sys); -+ -+ IF_DEBUG(linker_verbose, debugBelch("Requesting mapping of %" FMT_SizeT " bytes between %p and %p\n", -+ sz, baseAddr, endAddr)); -+ -+ MEMORY_BASIC_INFORMATION info; -+ uint8_t *initialAddr = baseAddr; -+ uint8_t *region = NULL; -+ while (!region -+ && initialAddr <= (uint8_t *) endAddr -+ && (void *) initialAddr < sys.lpMaximumApplicationAddress) -+ { -+ int res = virtualQuery(initialAddr, &info); -+ if (res) { -+ return NULL; -+ } -+ -+ if ((info.State & MEM_FREE) == MEM_FREE) { -+ IF_DEBUG(linker_verbose, debugBelch("Free range at 0x%p of %zu bytes\n", -+ info.BaseAddress, info.RegionSize)); -+ -+ if (info.RegionSize >= sz) { -+ if (info.AllocationBase == 0) { -+ size_t needed_sz = round_up (sz, sys.dwAllocationGranularity); -+ if (info.RegionSize >= needed_sz) { -+ IF_DEBUG(linker_verbose, debugBelch("Range is unmapped, Allocation " -+ "required by granule...\n")); -+ *req = needed_sz; -+ region -+ = (void*)(uintptr_t)round_up ((uintptr_t)initialAddr, -+ sys.dwAllocationGranularity); -+ IF_DEBUG(linker_verbose, debugBelch("Requested %" PRId64 ", rounded: %" -+ PRId64 ".\n", sz, *req)); -+ IF_DEBUG(linker_verbose, debugBelch("Aligned region claimed 0x%p -> " -+ "0x%p.\n", initialAddr, region)); -+ } -+ } else { -+ IF_DEBUG(linker_verbose, debugBelch("Range is usable for us, claiming...\n")); -+ *req = sz; -+ region = initialAddr; -+ } -+ } -+ } -+ initialAddr = (uint8_t *) info.BaseAddress + info.RegionSize; -+ } -+ -+ return region; -+} -+ -+/* Find free address space for mapping anonymous memory. */ -+static void *allocateLocalBytes(size_t sz, size_t *req) -+{ -+ // We currently don't attempt to take address space from the region below -+ // the image as malloc() tends to like to use this space, but we could do if -+ // necessary. -+ size_t max_range = 0x7fffffff - sz; -+ -+ static void *base_addr = NULL; -+ if (base_addr == NULL) { -+ base_addr = GetModuleHandleW(NULL); -+ } -+ uint8_t *end_addr = (uint8_t *) base_addr + max_range; -+ -+ // We track the location of the last allocation to avoid having to -+ // do a linear search of address space looking for space on every allocation -+ // as this can easily devolve into quadratic complexity. -+ static void *last_alloca = NULL; -+ if (last_alloca == NULL) { -+ // Start the search at the image base -+ last_alloca = base_addr; -+ } -+ -+ void *result = NULL; -+ result = allocateBytes (last_alloca, end_addr, sz, req); -+ if (result == NULL) { -+ // We failed to find suitable address space; restart the search at base_addr. -+ result = allocateBytes (base_addr, end_addr, sz, req); -+ } -+ -+ if (result != NULL) { -+ last_alloca = (uint8_t *) result + *req; -+ } -+ return result; -+} -+ -+static DWORD -+memoryAccessToProt(MemoryAccess access) -+{ -+ switch (access) { -+ case MEM_NO_ACCESS: return PAGE_NOACCESS; -+ case MEM_READ_ONLY: return PAGE_READONLY; -+ case MEM_READ_WRITE: return PAGE_READWRITE; -+ case MEM_READ_WRITE_THEN_READ_EXECUTE: -+ return PAGE_READWRITE; -+ case MEM_READ_EXECUTE: return PAGE_EXECUTE_READ; -+ case MEM_READ_WRITE_EXECUTE: -+ return PAGE_EXECUTE_READWRITE; -+ default: barf("invalid MemoryAccess"); -+ } -+} -+ -+// -+// Returns NULL on failure. -+// -+void * -+mmapAnonForLinker (size_t bytes) -+{ -+ size_t size = 0; -+ /* For linking purposes we want to load code within a 4GB range from the -+ load address of the application. As such we need to find a location to -+ allocate at. */ -+ void* region = allocateLocalBytes (bytes, &size); -+ if (region == NULL) { -+ return NULL; -+ } -+ return VirtualAlloc(region, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); -+} -+ -+void -+munmapForLinker (void *addr, size_t bytes, const char *caller) -+{ -+ if (VirtualFree(addr, 0, MEM_RELEASE) == 0) { -+ sysErrorBelch("munmapForLinker: %s: Failed to unmap %zd bytes at %p", -+ caller, bytes, addr); -+ } -+} -+ -+/** -+ * Change the allowed access modes of a region of memory previously allocated -+ * with mmapAnonForLinker. -+ */ -+void -+mprotectForLinker(void *start, size_t len, MemoryAccess mode) -+{ -+ DWORD old; -+ if (len == 0) { -+ return; -+ } -+ DWORD prot = memoryAccessToProt(mode); -+ -+ if (VirtualProtect(start, len, prot, &old) == 0) { -+ sysErrorBelch("mprotectForLinker: failed to protect %zd bytes at %p as %s", -+ len, start, memoryAccessDescription(mode)); -+ ASSERT(false); -+ } -+} -+ -+#elif RTS_LINKER_USE_MMAP -+ -+static int -+memoryAccessToProt(MemoryAccess access) -+{ -+ switch (access) { -+ case MEM_NO_ACCESS: return 0; -+ case MEM_READ_ONLY: return PROT_READ; -+ case MEM_READ_WRITE: return PROT_READ | PROT_WRITE; -+ case MEM_READ_WRITE_THEN_READ_EXECUTE: -+# if defined(netbsd_HOST_OS) -+ /* PROT_MPROTECT(PROT_EXEC) means that the pages are going to be -+ * marked as executable in the future. On NetBSD requesting -+ * additional permissions with mprotect(2) only succeeds when -+ * permissions were initially requested in this manner. -+ */ -+ return PROT_READ | PROT_WRITE | PROT_MPROTECT(PROT_EXEC); -+# else -+ return PROT_READ | PROT_WRITE; -+# endif -+ case MEM_READ_EXECUTE: return PROT_READ | PROT_EXEC; -+ case MEM_READ_WRITE_EXECUTE: -+ return PROT_READ | PROT_WRITE | PROT_EXEC; -+ default: barf("invalid MemoryAccess"); -+ } -+} -+ -+static void * -+doMmap(void *map_addr, size_t bytes, int prot, uint32_t flags, int fd, int offset) -+{ -+ flags |= MAP_PRIVATE; -+ -+ IF_DEBUG(linker_verbose, -+ debugBelch("mmapForLinker: \tprotection %#0x\n", prot)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("mmapForLinker: \tflags %#0x\n", flags)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("mmapForLinker: \tsize %#0zx\n", bytes)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("mmapForLinker: \tmap_addr %p\n", map_addr)); -+ -+ void * result = mmap(map_addr, bytes, prot, flags, fd, offset); -+ if (result == MAP_FAILED) { -+ sysErrorBelch("mmap %zx bytes at %p", bytes, map_addr); -+ reportMemoryMap(); -+ errorBelch("Try specifying an address with +RTS -xm -RTS"); -+ return NULL; -+ } -+ return result; -+} -+ -+ -+static struct MemoryRegion * -+nearImage(void) { -+ static struct MemoryRegion region = { NULL, NULL, NULL }; -+ if (region.end == NULL) { -+ region.start = mmap_32bit_base; -+ region.end = (uint8_t *) region.start + 0x80000000; -+ region.last = region.start; -+ } -+ return ®ion; -+} -+ -+static void * -+mmapAnywhere ( -+ size_t bytes, -+ MemoryAccess access, -+ uint32_t flags, -+ int fd, -+ int offset) -+{ -+ int prot = memoryAccessToProt(access); -+ return doMmap(NULL, bytes, prot, flags, fd, offset); -+} -+ -+static void * -+mmapInRegion ( -+ struct MemoryRegion *region, -+ size_t bytes, -+ MemoryAccess access, -+ uint32_t flags, -+ int fd, -+ int offset) -+{ -+ bool wrapped = false; -+ int prot = memoryAccessToProt(access); -+ void *p = region->last; -+ while (1) { -+ void *result = doMmap(p, bytes, prot, flags, fd, offset); -+ if (result == NULL) { -+ // The mapping failed -+ return NULL; -+ } else if (result < region->start) { -+ // Uh oh, we assume that mmap() will only give us a -+ // an address at or after the requested address. -+ // Try again. -+ p = (uint8_t *) result + bytes; -+ } else if (result < region->end) { -+ // Success! -+ region->last = (uint8_t *) result + bytes; -+ return result; -+ } else if (wrapped) { -+ // We failed to find a suitable mapping -+ munmap(result, bytes); -+ reportMemoryMap(); -+ errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " -+ "asked for %zu bytes at %p. " -+ "Try specifying an address with +RTS -xm -RTS", -+ bytes, p); -+ return NULL; -+ } -+ -+ // mmap() gave us too high an address; wrap around and try again -+ munmap(result, bytes); -+ wrapped = true; -+ p = region->start; -+ } -+} -+ -+/* -+ * Map memory for code. -+ * Returns NULL on failure. -+ */ -+void * -+mmapForLinker (size_t bytes, MemoryAccess access, uint32_t flags, int fd, int offset) -+{ -+ bytes = roundUpToPage(bytes); -+ struct MemoryRegion *region; -+ -+ IF_DEBUG(linker_verbose, debugBelch("mmapForLinker: start\n")); -+ if (RtsFlags.MiscFlags.linkerAlwaysPic) { -+ /* make no attempt at mapping low memory if we are assuming PIC */ -+ region = NULL; -+ } else { -+ region = nearImage(); -+ } -+ -+ /* Use MAP_32BIT if appropriate */ -+ if (region && region->end <= (void *) 0xffffffff) { -+ flags |= TRY_MAP_32BIT; -+ } -+ -+ void *result; -+ if (region) { -+ result = mmapInRegion(region, bytes, access, flags, fd, offset); -+ } -+ else { -+ result = mmapAnywhere(bytes, access, flags, fd, offset); -+ } -+ IF_DEBUG(linker_verbose, -+ debugBelch("mmapForLinker: mapped %zd bytes starting at %p\n", -+ bytes, result)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("mmapForLinker: done\n")); -+ return result; -+} -+ -+/* -+ * Map read/write pages in low memory. Returns NULL on failure. -+ */ -+void * -+mmapAnonForLinker (size_t bytes) -+{ -+ return mmapForLinker (bytes, MEM_READ_WRITE_THEN_READ_EXECUTE, MAP_ANONYMOUS, -1, 0); -+} -+ -+void munmapForLinker (void *addr, size_t bytes, const char *caller) -+{ -+ int r = munmap(addr, bytes); -+ if (r == -1) { -+ // Should we abort here? -+ sysErrorBelch("munmap: %s", caller); -+ } -+} -+ -+/* Note [Memory protection in the linker] -+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ * For many years the linker would simply map all of its memory -+ * with PROT_READ|PROT_WRITE|PROT_EXEC. However operating systems have been -+ * becoming increasingly reluctant to accept this practice (e.g. #17353, -+ * #12657) and for good reason: writable code is ripe for exploitation. -+ * -+ * Consequently mmapForLinker now maps its memory with PROT_READ|PROT_WRITE. -+ * After the linker has finished filling/relocating the mapping it must then -+ * call mprotectForLinker on the sections of the mapping which -+ * contain executable code. -+ * -+ * Note that the m32 allocator handles protection of its allocations. For this -+ * reason the caller to m32_alloc() must tell the allocator whether the -+ * allocation needs to be executable. The caller must then ensure that they -+ * call m32_allocator_flush() after they are finished filling the region, which -+ * will cause the allocator to change the protection bits to -+ * PROT_READ|PROT_EXEC. -+ * -+ */ -+ -+/* -+ * Mark an portion of a mapping previously reserved by mmapForLinker -+ * as executable (but not writable). -+ */ -+void mprotectForLinker(void *start, size_t len, MemoryAccess mode) -+{ -+ if (len == 0) { -+ return; -+ } -+ IF_DEBUG(linker_verbose, -+ debugBelch("mprotectForLinker: protecting %" FMT_Word -+ " bytes starting at %p as %s\n", -+ (W_)len, start, memoryAccessDescription(mode))); -+ -+ int prot = memoryAccessToProt(mode); -+ -+ if (mprotect(start, len, prot) == -1) { -+ sysErrorBelch("mprotectForLinker: failed to protect %zd bytes at %p as %s", -+ len, start, memoryAccessDescription(mode)); -+ } -+} -+#endif -diff --git a/rts/linker/MMap.h b/rts/linker/MMap.h -new file mode 100644 -index 0000000..683ec1f ---- /dev/null -+++ b/rts/linker/MMap.h -@@ -0,0 +1,82 @@ -+#pragma once -+ -+#include "BeginPrivate.h" -+ -+#if defined(aarch64_HOST_ARCH) -+// On AArch64 MAP_32BIT is not available but we are still bound by the small -+// memory model. Consequently we still try using the MAP_LOW_MEM allocation -+// strategy. -+#define MAP_LOW_MEM -+#endif -+ -+/* -+ * Note [MAP_LOW_MEM] -+ * ~~~~~~~~~~~~~~~~~~ -+ * Due to the small memory model (see above), on x86_64 and AArch64 we have to -+ * map all our non-PIC object files into the low 2Gb of the address space (why -+ * 2Gb and not 4Gb? Because all addresses must be reachable using a 32-bit -+ * signed PC-relative offset). On x86_64 Linux we can do this using the -+ * MAP_32BIT flag to mmap(), however on other OSs (e.g. *BSD, see #2063, and -+ * also on Linux inside Xen, see #2512), we can't do this. So on these -+ * systems, we have to pick a base address in the low 2Gb of the address space -+ * and try to allocate memory from there. -+ * -+ * The same holds for aarch64, where the default, even with PIC, model -+ * is 4GB. The linker is free to emit AARCH64_ADR_PREL_PG_HI21 -+ * relocations. -+ * -+ * We pick a default address based on the OS, but also make this -+ * configurable via an RTS flag (+RTS -xm) -+ */ -+ -+#if defined(aarch64_TARGET_ARCH) || defined(aarch64_HOST_ARCH) -+// Try to use stg_upd_frame_info as the base. We need to be within +-4GB of that -+// address, otherwise we violate the aarch64 memory model. Any object we load -+// can potentially reference any of the ones we bake into the binary (and list) -+// in RtsSymbols. Thus we'll need to be within +-4GB of those, -+// stg_upd_frame_info is a good candidate as it's referenced often. -+#define LINKER_LOAD_BASE ((void *) &stg_upd_frame_info) -+#elif defined(x86_64_HOST_ARCH) && defined(mingw32_HOST_OS) -+// On Windows (which now uses high-entropy ASLR by default) we need to ensure -+// that we map code near the executable image. We use stg_upd_frame_info as a -+// proxy for the image location. -+#define LINKER_LOAD_BASE ((void *) &stg_upd_frame_info) -+#elif defined(MAP_32BIT) || DEFAULT_LINKER_ALWAYS_PIC -+// Try to use MAP_32BIT -+#define LINKER_LOAD_BASE ((void *) 0x0) -+#else -+// A guess: 1 GB. -+#define LINKER_LOAD_BASE ((void *) 0x40000000) -+#endif -+ -+/** Access modes for mprotectForLinker */ -+typedef enum { -+ MEM_NO_ACCESS, -+ MEM_READ_ONLY, -+ MEM_READ_WRITE, -+ // Initially map pages as rw- and then switch to r-x later. -+ MEM_READ_WRITE_THEN_READ_EXECUTE, -+ MEM_READ_EXECUTE, -+ MEM_READ_WRITE_EXECUTE, -+} MemoryAccess; -+ -+extern void *mmap_32bit_base; -+ -+// Map read/write anonymous memory. -+void *mmapAnonForLinker (size_t bytes); -+ -+// Change protection of previous mapping memory. -+void mprotectForLinker(void *start, size_t len, MemoryAccess mode); -+ -+// Release a mapping. -+void munmapForLinker (void *addr, size_t bytes, const char *caller); -+ -+#if !defined(mingw32_HOST_OS) -+// Map a file. -+// -+// Note that this not available on Windows since file mapping on Windows is -+// sufficiently different to warrant its own interface. -+void *mmapForLinker (size_t bytes, MemoryAccess prot, uint32_t flags, int fd, int offset); -+#endif -+ -+#include "EndPrivate.h" -diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c -index d633699..a9b5f0c 100644 ---- a/rts/linker/MachO.c -+++ b/rts/linker/MachO.c -@@ -11,6 +11,7 @@ - #include "linker/MachO.h" - #include "linker/CacheFlush.h" - #include "linker/SymbolExtras.h" -+#include "linker/MMap.h" - - #include - #include -@@ -55,7 +56,7 @@ int64_t signExtend(uint64_t val, uint8_t bits); - static bool isVectorOp(uint32_t *p); - static bool isLoadStore(uint32_t *p); - --/* aarch64 relocations may contain an addend alreay in the position -+/* aarch64 relocations may contain an addend already in the position - * where we want to write the address offset to. Thus decoding as well - * as encoding is needed. - */ -@@ -240,7 +241,7 @@ resolveImports( - addr = (SymbolAddr*) (symbol->nlist->n_value); - IF_DEBUG(linker, debugBelch("resolveImports: undefined external %s has value %p\n", symbol->name, addr)); - } else { -- addr = lookupDependentSymbol(symbol->name, oc); -+ addr = lookupDependentSymbol(symbol->name, oc, NULL); - IF_DEBUG(linker, debugBelch("resolveImports: looking up %s, %p\n", symbol->name, addr)); - } - -@@ -250,7 +251,6 @@ resolveImports( - "%s: unknown symbol `%s'", oc->fileName, symbol->name); - return 0; - } -- ASSERT(addr); - - checkProddableBlock(oc, - ((void**)(oc->image + sect->offset)) + i, -@@ -289,13 +289,23 @@ decodeAddend(ObjectCode * oc, Section * section, MachORelocationInfo * ri) { - checkProddableBlock(oc, (void*)p, 1 << ri->r_length); - - switch(ri->r_type) { -- case ARM64_RELOC_UNSIGNED: -+ case ARM64_RELOC_UNSIGNED: { -+ switch (ri->r_length) { -+ case 0: return signExtend(*(uint8_t*)p, 8 << ri->r_length); -+ case 1: return signExtend(*(uint16_t*)p, 8 << ri->r_length); -+ case 2: return signExtend(*(uint32_t*)p, 8 << ri->r_length); -+ case 3: return signExtend(*(uint64_t*)p, 8 << ri->r_length); -+ default: -+ barf("Unsupported r_length (%d) for UNSIGNED relocation", -+ ri->r_length); -+ } -+ } - case ARM64_RELOC_SUBTRACTOR: { - switch (ri->r_length) { -- case 0: return signExtend(*(uint8_t*)p, 8 * (1 << ri->r_length)); -- case 1: return signExtend(*(uint16_t*)p, 8 * (1 << ri->r_length)); -- case 2: return signExtend(*(uint32_t*)p, 8 * (1 << ri->r_length)); -- case 3: return signExtend(*(uint64_t*)p, 8 * (1 << ri->r_length)); -+ case 0: return signExtend(*(uint8_t*)p, 8 << ri->r_length); -+ case 1: return signExtend(*(uint16_t*)p, 8 << ri->r_length); -+ case 2: return signExtend(*(uint32_t*)p, 8 << ri->r_length); -+ case 3: return signExtend(*(uint64_t*)p, 8 << ri->r_length); - default: - barf("Unsupported r_length (%d) for SUBTRACTOR relocation", - ri->r_length); -@@ -303,7 +313,7 @@ decodeAddend(ObjectCode * oc, Section * section, MachORelocationInfo * ri) { - } - case ARM64_RELOC_BRANCH26: - /* take the lower 26 bits and shift them by 2. The last two are -- * implicilty 0 (as the instructions must be aligned!) and sign -+ * implicitly 0 (as the instructions must be aligned!) and sign - * extend to 64 bits. - */ - return signExtend( (*p & 0x03FFFFFF) << 2, 28 ); -@@ -356,10 +366,23 @@ encodeAddend(ObjectCode * oc, Section * section, - checkProddableBlock(oc, (void*)p, 1 << ri->r_length); - - switch (ri->r_type) { -- case ARM64_RELOC_UNSIGNED: -+ case ARM64_RELOC_UNSIGNED: { -+ if(!fitsBits(8 << ri->r_length, addend)) -+ barf("Relocation out of range for UNSIGNED"); -+ switch (ri->r_length) { -+ case 0: *(uint8_t*)p = (uint8_t)addend; break; -+ case 1: *(uint16_t*)p = (uint16_t)addend; break; -+ case 2: *(uint32_t*)p = (uint32_t)addend; break; -+ case 3: *(uint64_t*)p = (uint64_t)addend; break; -+ default: -+ barf("Unsupported r_length (%d) for UNSIGNED relocation", -+ ri->r_length); -+ } -+ return; -+ } - case ARM64_RELOC_SUBTRACTOR: { - if(!fitsBits(8 << ri->r_length, addend)) -- barf("Relocation out of range for UNSIGNED/SUBTRACTOR"); -+ barf("Relocation out of range for SUBTRACTOR"); - switch (ri->r_length) { - case 0: *(uint8_t*)p = (uint8_t)addend; break; - case 1: *(uint16_t*)p = (uint16_t)addend; break; -@@ -463,11 +486,33 @@ makeGot(ObjectCode * oc) { - - void - freeGot(ObjectCode * oc) { -- munmap(oc->info->got_start, oc->info->got_size); -+ /* sanity check */ -+ if(NULL != oc->info->got_start && oc->info->got_size > 0) { -+ munmapForLinker(oc->info->got_start, oc->info->got_size, "freeGot"); -+ } - oc->info->got_start = NULL; - oc->info->got_size = 0; - } - -+// Retrieve symbol value -+static uint64_t symbol_value(ObjectCode* oc, MachOSymbol* symbol) { -+ uint64_t value = 0; -+ if(symbol->nlist->n_type & N_EXT) { -+ /* external symbols should be able to be -+ * looked up via the lookupDependentSymbol function. -+ * Either through the global symbol hashmap -+ * or asking the system, if not found -+ * in the symbol hashmap -+ */ -+ value = (uint64_t)lookupDependentSymbol((char*)symbol->name, oc, NULL); -+ if(!value) -+ barf("Could not lookup symbol: %s!", symbol->name); -+ } else { -+ value = (uint64_t)symbol->addr; // address of the symbol. -+ } -+ return value; -+} -+ - static int - relocateSectionAarch64(ObjectCode * oc, Section * section) - { -@@ -477,7 +522,7 @@ relocateSectionAarch64(ObjectCode * oc, Section * section) - * - * - loaded the sections (potentially into non-contiguous memory), - * (in ocGetNames_MachO) -- * - registered exported sybmols -+ * - registered exported symbols - * (in ocGetNames_MachO) - * - and fixed the nlist[i].n_value for common storage symbols (N_UNDF, - * N_EXT and n_value != 0) so that they point into the common storage. -@@ -495,43 +540,45 @@ relocateSectionAarch64(ObjectCode * oc, Section * section) - case ARM64_RELOC_UNSIGNED: { - MachOSymbol* symbol = &oc->info->macho_symbols[ri->r_symbolnum]; - int64_t addend = decodeAddend(oc, section, ri); -- uint64_t value = 0; -- if(symbol->nlist->n_type & N_EXT) { -- /* external symbols should be able to be -- * looked up via the lookupDependentSymbol function. -- * Either through the global symbol hashmap -- * or asking the system, if not found -- * in the symbol hashmap -- */ -- value = (uint64_t)lookupDependentSymbol((char*)symbol->name, oc); -- if(!value) -- barf("Could not lookup symbol: %s!", symbol->name); -- } else { -- value = (uint64_t)symbol->addr; // address of the symbol. -- } -+ uint64_t value = symbol_value(oc, symbol); - encodeAddend(oc, section, ri, value + addend); - break; - } - case ARM64_RELOC_SUBTRACTOR: - { -- MachOSymbol* symbol = &oc->info->macho_symbols[ri->r_symbolnum]; - // subtractor and unsigned are called in tandem: - // first pc <- pc - symbol address (SUBTRACTOR) - // second pc <- pc + symbol address (UNSIGNED) - // to achieve pc <- pc + target - base. -- // -- // the current implementation uses absolute addresses, -- // which is simpler than trying to do this section -- // relative, but could more easily lead to overflow. -- // -+ -+ // check that the following relocation exists and has the -+ // expected ARM64_RELOC_UNSIGNED type - if(!(i+1 < nreloc) - || !(section->info->relocation_info[i+1].r_type - == ARM64_RELOC_UNSIGNED)) - barf("SUBTRACTOR relocation *must* be followed by UNSIGNED relocation."); - -+ // we *know* that the next relocation is ARM64_RELOC_UNSIGNED -+ // (see above). So let's process both relocations and write the -+ // combined result in the target location. This prevents -+ // overflow. (Compared to trying to store the intermediate -+ // result which may not fit in the target bits). -+ -+ // sub part (ARM64_RELOC_SUBTRACTOR) -+ MachOSymbol* symbol1 = &oc->info->macho_symbols[ri->r_symbolnum]; -+ uint64_t sub_value = symbol_value(oc, symbol1); -+ -+ // add part (ARM64_RELOC_UNSIGNED) -+ MachORelocationInfo * ri2 = §ion->info->relocation_info[i+1]; -+ MachOSymbol* symbol2 = &oc->info->macho_symbols[ri2->r_symbolnum]; -+ uint64_t add_value = symbol_value(oc, symbol2); -+ -+ // combine with addend and store - int64_t addend = decodeAddend(oc, section, ri); -- int64_t value = (uint64_t)symbol->addr; -- encodeAddend(oc, section, ri, addend - value); -+ encodeAddend(oc, section, ri, addend - sub_value + add_value); -+ -+ // skip next relocation: we've already handled it -+ i += 1; - break; - } - case ARM64_RELOC_BRANCH26: { -@@ -543,7 +590,7 @@ relocateSectionAarch64(ObjectCode * oc, Section * section) - uint64_t pc = (uint64_t)section->start + ri->r_address; - uint64_t value = 0; - if(symbol->nlist->n_type & N_EXT) { -- value = (uint64_t)lookupDependentSymbol((char*)symbol->name, oc); -+ value = (uint64_t)lookupDependentSymbol((char*)symbol->name, oc, NULL); - if(!value) - barf("Could not lookup symbol: %s!", symbol->name); - } else { -@@ -621,6 +668,14 @@ static int - relocateSection(ObjectCode* oc, int curSection) - { - Section * sect = &oc->sections[curSection]; -+ -+ IF_DEBUG(linker, debugBelch("relocateSection %d, info: %p\n", curSection, (void*)sect->info)); -+ -+ // empty sections (without segments), won't have their info filled. -+ // there is no relocation to be done for them. -+ if(sect->info == NULL) -+ return 1; -+ - MachOSection * msect = sect->info->macho_section; // for access convenience - MachORelocationInfo * relocs = sect->info->relocation_info; - MachOSymbol * symbols = oc->info->macho_symbols; -@@ -653,14 +708,14 @@ relocateSection(ObjectCode* oc, int curSection) - int relocLenBytes; - int nextInstrAdj = 0; - -- IF_DEBUG(linker, debugBelch("relocateSection: relocation %d\n", i)); -- IF_DEBUG(linker, debugBelch(" : type = %d\n", reloc->r_type)); -- IF_DEBUG(linker, debugBelch(" : address = %d\n", reloc->r_address)); -- IF_DEBUG(linker, debugBelch(" : symbolnum = %u\n", reloc->r_symbolnum)); -- IF_DEBUG(linker, debugBelch(" : pcrel = %d\n", reloc->r_pcrel)); -- IF_DEBUG(linker, debugBelch(" : length = %d\n", reloc->r_length)); -- IF_DEBUG(linker, debugBelch(" : extern = %d\n", reloc->r_extern)); -- IF_DEBUG(linker, debugBelch(" : type = %d\n", reloc->r_type)); -+ IF_DEBUG(linker_verbose, debugBelch("relocateSection: relocation %d\n", i)); -+ IF_DEBUG(linker_verbose, debugBelch(" : type = %d\n", reloc->r_type)); -+ IF_DEBUG(linker_verbose, debugBelch(" : address = %d\n", reloc->r_address)); -+ IF_DEBUG(linker_verbose, debugBelch(" : symbolnum = %u\n", reloc->r_symbolnum)); -+ IF_DEBUG(linker_verbose, debugBelch(" : pcrel = %d\n", reloc->r_pcrel)); -+ IF_DEBUG(linker_verbose, debugBelch(" : length = %d\n", reloc->r_length)); -+ IF_DEBUG(linker_verbose, debugBelch(" : extern = %d\n", reloc->r_extern)); -+ IF_DEBUG(linker_verbose, debugBelch(" : type = %d\n", reloc->r_type)); - - switch(reloc->r_length) - { -@@ -704,7 +759,7 @@ relocateSection(ObjectCode* oc, int curSection) - - - -- IF_DEBUG(linker, -+ IF_DEBUG(linker_verbose, - debugBelch("relocateSection: length = %d, thing = %" PRId64 ", baseValue = %p\n", - reloc->r_length, thing, (char *)baseValue)); - -@@ -715,7 +770,7 @@ relocateSection(ObjectCode* oc, int curSection) - SymbolName* nm = symbol->name; - SymbolAddr* addr = NULL; - -- IF_DEBUG(linker, debugBelch("relocateSection: making jump island for %s, extern = %d, X86_64_RELOC_GOT\n", -+ IF_DEBUG(linker_verbose, debugBelch("relocateSection: making jump island for %s, extern = %d, X86_64_RELOC_GOT\n", - nm, reloc->r_extern)); - - if (reloc->r_extern == 0) { -@@ -728,10 +783,11 @@ relocateSection(ObjectCode* oc, int curSection) - // symtab, or it is undefined, meaning dlsym must be used - // to resolve it. - -- addr = lookupDependentSymbol(nm, oc); -- IF_DEBUG(linker, debugBelch("relocateSection: looked up %s, " -- "external X86_64_RELOC_GOT or X86_64_RELOC_GOT_LOAD\n" -- " : addr = %p\n", nm, addr)); -+ addr = lookupDependentSymbol(nm, oc, NULL); -+ IF_DEBUG(linker_verbose, -+ debugBelch("relocateSection: looked up %s, " -+ "external X86_64_RELOC_GOT or X86_64_RELOC_GOT_LOAD\n" -+ " : addr = %p\n", nm, addr)); - - if (addr == NULL) { - errorBelch("\nlookupSymbol failed in relocateSection (RELOC_GOT)\n" -@@ -739,7 +795,7 @@ relocateSection(ObjectCode* oc, int curSection) - return 0; - } - } else { -- IF_DEBUG(linker, debugBelch("relocateSection: %s is not an exported symbol\n", nm)); -+ IF_DEBUG(linker_verbose, debugBelch("relocateSection: %s is not an exported symbol\n", nm)); - - // The symbol is not exported, or defined in another - // module, so it must be in the current object module, -@@ -754,9 +810,11 @@ relocateSection(ObjectCode* oc, int curSection) - - addr = symbol->addr; - -- IF_DEBUG(linker, debugBelch("relocateSection: calculated relocation of " -- "non-external X86_64_RELOC_GOT or X86_64_RELOC_GOT_LOAD\n")); -- IF_DEBUG(linker, debugBelch(" : addr = %p\n", addr)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("relocateSection: calculated relocation of " -+ "non-external X86_64_RELOC_GOT or X86_64_RELOC_GOT_LOAD\n")); -+ IF_DEBUG(linker_verbose, -+ debugBelch(" : addr = %p\n", addr)); - } else { - errorBelch("\nrelocateSection: %s is not exported," - " and should be defined in a section, but isn't!\n", nm); -@@ -776,20 +834,21 @@ relocateSection(ObjectCode* oc, int curSection) - SymbolName* nm = symbol->name; - SymbolAddr* addr = NULL; - -- IF_DEBUG(linker, debugBelch("relocateSection: looking up external symbol %s\n", nm)); -- IF_DEBUG(linker, debugBelch(" : type = %d\n", symbol->nlist->n_type)); -- IF_DEBUG(linker, debugBelch(" : sect = %d\n", symbol->nlist->n_sect)); -- IF_DEBUG(linker, debugBelch(" : desc = %d\n", symbol->nlist->n_desc)); -- IF_DEBUG(linker, debugBelch(" : value = %p\n", (void *)symbol->nlist->n_value)); -+ IF_DEBUG(linker_verbose, debugBelch("relocateSection: looking up external symbol %s\n", nm)); -+ IF_DEBUG(linker_verbose, debugBelch(" : type = %d\n", symbol->nlist->n_type)); -+ IF_DEBUG(linker_verbose, debugBelch(" : sect = %d\n", symbol->nlist->n_sect)); -+ IF_DEBUG(linker_verbose, debugBelch(" : desc = %d\n", symbol->nlist->n_desc)); -+ IF_DEBUG(linker_verbose, debugBelch(" : value = %p\n", (void *)symbol->nlist->n_value)); - - if ((symbol->nlist->n_type & N_TYPE) == N_SECT) { -- ASSERT(symbol->addr != NULL); -+ CHECK(symbol->addr != NULL); - value = (uint64_t) symbol->addr; -- IF_DEBUG(linker, debugBelch("relocateSection, defined external symbol %s, relocated address %p\n", -- nm, (void *)value)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("relocateSection, defined external symbol %s, relocated address %p\n", -+ nm, (void *)value)); - } - else { -- addr = lookupDependentSymbol(nm, oc); -+ addr = lookupDependentSymbol(nm, oc, NULL); - if (addr == NULL) - { - errorBelch("\nlookupSymbol failed in relocateSection (relocate external)\n" -@@ -798,7 +857,9 @@ relocateSection(ObjectCode* oc, int curSection) - } - - value = (uint64_t) addr; -- IF_DEBUG(linker, debugBelch("relocateSection: external symbol %s, address %p\n", nm, (void *)value)); -+ IF_DEBUG(linker_verbose, -+ debugBelch("relocateSection: external symbol %s, address %p\n", -+ nm, (void *)value)); - } - } - else -@@ -822,7 +883,7 @@ relocateSection(ObjectCode* oc, int curSection) - Section * targetSec = &oc->sections[targetSecNum]; - MachOSection * targetMacho = targetSec->info->macho_section; - -- IF_DEBUG(linker, -+ IF_DEBUG(linker_verbose, - debugBelch("relocateSection: internal relocation relative to section %d (%s, %s)\n", - targetSecNum, targetMacho->segname, targetMacho->sectname)); - -@@ -833,13 +894,15 @@ relocateSection(ObjectCode* oc, int curSection) - thing, (uint64_t) targetMacho->addr); - - uint64_t thingRelativeOffset = thing - targetMacho->addr; -- IF_DEBUG(linker, debugBelch(" " -- "unsigned displacement %" PRIx64 " with section relative offset %" PRIx64 "\n", -+ IF_DEBUG(linker_verbose, -+ debugBelch(" " -+ "unsigned displacement %" PRIx64 " with section relative offset %" PRIx64 "\n", - thing, thingRelativeOffset)); - - thing = (uint64_t) targetSec->start + thingRelativeOffset; -- IF_DEBUG(linker, debugBelch(" " -- "relocated address is %p\n", (void *) thing)); -+ IF_DEBUG(linker_verbose, -+ debugBelch(" " -+ "relocated address is %p\n", (void *) thing)); - - /* Compared to external relocation we don't need to adjust value - * any further since thing already has absolute address. -@@ -859,7 +922,7 @@ relocateSection(ObjectCode* oc, int curSection) - (void *) imThingLoc, (void *) targetMacho->addr); - - int64_t thingRelativeOffset = imThingLoc - targetMacho->addr; -- IF_DEBUG(linker, -+ IF_DEBUG(linker_verbose, - debugBelch(" " - "original displacement %" PRId64 " to %p with section relative offset %" PRIu64 "\n", - thing, (void *) imThingLoc, thingRelativeOffset)); -@@ -867,7 +930,7 @@ relocateSection(ObjectCode* oc, int curSection) - thing = (int64_t) ((uint64_t) targetSec->start + thingRelativeOffset) - - ((uint64_t) sect->start + baseValueOffset); - value = baseValue; // so that it further cancels out with baseValue -- IF_DEBUG(linker, -+ IF_DEBUG(linker_verbose, - debugBelch(" " - "relocated displacement %" PRId64 " to %p\n", - (int64_t) thing, (void *) (baseValue + thing))); -@@ -879,42 +942,42 @@ relocateSection(ObjectCode* oc, int curSection) - } - } - -- IF_DEBUG(linker, debugBelch("relocateSection: value = %p\n", (void *) value)); -+ IF_DEBUG(linker_verbose, debugBelch("relocateSection: value = %p\n", (void *) value)); - - if (type == X86_64_RELOC_BRANCH) - { - if((int32_t)(value - baseValue) != (int64_t)(value - baseValue)) - { -- ASSERT(reloc->r_extern); -+ CHECK(reloc->r_extern); - value = (uint64_t) &makeSymbolExtra(oc, reloc->r_symbolnum, value) - -> jumpIsland; - } -- ASSERT((int32_t)(value - baseValue) == (int64_t)(value - baseValue)); -+ CHECK((int32_t)(value - baseValue) == (int64_t)(value - baseValue)); - type = X86_64_RELOC_SIGNED; - } - - switch(type) - { - case X86_64_RELOC_UNSIGNED: -- ASSERT(!reloc->r_pcrel); -+ CHECK(!reloc->r_pcrel); - thing += value; - break; - case X86_64_RELOC_SIGNED: - case X86_64_RELOC_SIGNED_1: - case X86_64_RELOC_SIGNED_2: - case X86_64_RELOC_SIGNED_4: -- ASSERT(reloc->r_pcrel); -+ CHECK(reloc->r_pcrel); - thing += value - baseValue; - break; - case X86_64_RELOC_SUBTRACTOR: -- ASSERT(!reloc->r_pcrel); -+ CHECK(!reloc->r_pcrel); - thing -= value; - break; - default: - barf("unknown relocation"); - } - -- IF_DEBUG(linker, debugBelch("relocateSection: thing = %p\n", (void *) thing)); -+ IF_DEBUG(linker_verbose, debugBelch("relocateSection: thing = %p\n", (void *) thing)); - - /* Thing points to memory within one of the relocated sections. We can - * probe the first byte to sanity check internal relocations. -@@ -952,22 +1015,18 @@ relocateSection(ObjectCode* oc, int curSection) - SectionKind - getSectionKind_MachO(MachOSection *section) - { -- SectionKind kind; -- -- /* todo: Use section flags instead */ -- if (0==strcmp(section->sectname,"__text")) { -- kind = SECTIONKIND_CODE_OR_RODATA; -- } else if (0==strcmp(section->sectname,"__const") || -- 0==strcmp(section->sectname,"__data") || -- 0==strcmp(section->sectname,"__bss") || -- 0==strcmp(section->sectname,"__common") || -- 0==strcmp(section->sectname,"__mod_init_func")) { -- kind = SECTIONKIND_RWDATA; -+ uint8_t s_type = section->flags & SECTION_TYPE; -+ if (s_type == S_MOD_INIT_FUNC_POINTERS) { -+ return SECTIONKIND_INIT_ARRAY; -+ } else if (s_type == S_MOD_TERM_FUNC_POINTERS) { -+ return SECTIONKIND_FINI_ARRAY; -+ } else if (0==strcmp(section->segname,"__TEXT")) { -+ return SECTIONKIND_CODE_OR_RODATA; -+ } else if (0==strcmp(section->segname,"__DATA")) { -+ return SECTIONKIND_RWDATA; - } else { -- kind = SECTIONKIND_OTHER; -+ return SECTIONKIND_OTHER; - } -- -- return kind; - } - - /* Calculate the # of active segments and their sizes based on section -@@ -1136,7 +1195,7 @@ ocGetNames_MachO(ObjectCode* oc) - SymbolAddr* commonStorage = NULL; - unsigned long commonCounter; - -- IF_DEBUG(linker,debugBelch("ocGetNames_MachO: start\n")); -+ IF_DEBUG(linker,debugBelch("ocGetNames_MachO: %s start\n", OC_INFORMATIVE_FILENAME(oc))); - - Section *secArray; - secArray = (Section*)stgCallocBytes( -@@ -1200,7 +1259,7 @@ ocGetNames_MachO(ObjectCode* oc) - unsigned nstubs = numberOfStubsForSection(oc, sec_idx); - unsigned stub_space = STUB_SIZE * nstubs; - -- void * mem = mmapForLinker(section->size+stub_space, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); -+ void * mem = mmapForLinker(section->size+stub_space, MEM_READ_WRITE, MAP_ANON, -1, 0); - - if( mem == MAP_FAILED ) { - sysErrorBelch("failed to mmap allocated memory to load section %d. " -@@ -1316,42 +1375,45 @@ ocGetNames_MachO(ObjectCode* oc) - SymbolName* nm = oc->info->macho_symbols[i].name; - if (oc->info->nlist[i].n_type & N_STAB) - { -- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: Skip STAB: %s\n", nm)); -+ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: Skip STAB: %s\n", nm)); - } - else if ((oc->info->nlist[i].n_type & N_TYPE) == N_SECT) - { - if (oc->info->nlist[i].n_type & N_EXT) - { - if ( (oc->info->nlist[i].n_desc & N_WEAK_DEF) -- && lookupDependentSymbol(nm, oc)) { -+ && lookupDependentSymbol(nm, oc, NULL)) { - // weak definition, and we already have a definition -- IF_DEBUG(linker, debugBelch(" weak: %s\n", nm)); -+ IF_DEBUG(linker_verbose, debugBelch(" weak: %s\n", nm)); - } - else - { -- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting %s\n", nm)); -+ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: inserting %s\n", nm)); - SymbolAddr* addr = oc->info->macho_symbols[i].addr; -- -+ // TODO: Make figure out how to determine this from the object file -+ SymType sym_type = SYM_TYPE_CODE; - ghciInsertSymbolTable( oc->fileName - , symhash - , nm - , addr -- , HS_BOOL_FALSE | (HS_BOOL_FALSE << 1) -+ , HS_BOOL_FALSE -+ , sym_type - , oc); - - oc->symbols[curSymbol].name = nm; - oc->symbols[curSymbol].addr = addr; -+ oc->symbols[curSymbol].type = sym_type; - curSymbol++; - } - } - else - { -- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: \t...not external, skipping %s\n", nm)); -+ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: \t...not external, skipping %s\n", nm)); - } - } - else - { -- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: \t...not defined in this section, skipping %s\n", nm)); -+ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: \t...not defined in this section, skipping %s\n", nm)); - } - } - } -@@ -1373,10 +1435,12 @@ ocGetNames_MachO(ObjectCode* oc) - - /* also set the final address to the macho_symbol */ - oc->info->macho_symbols[i].addr = (void*)commonCounter; -+ /* TODO: Figure out how to determine this from object */ -+ SymType sym_type = SYM_TYPE_CODE; - -- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting common symbol: %s\n", nm)); -+ IF_DEBUG(linker_verbose, debugBelch("ocGetNames_MachO: inserting common symbol: %s\n", nm)); - ghciInsertSymbolTable(oc->fileName, symhash, nm, -- (void*)commonCounter, HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), oc); -+ (void*)commonCounter, HS_BOOL_FALSE, sym_type, oc); - oc->symbols[curSymbol].name = nm; - oc->symbols[curSymbol].addr = oc->info->macho_symbols[i].addr; - curSymbol++; -@@ -1418,7 +1482,7 @@ ocMprotect_MachO( ObjectCode *oc ) - if(segment->size == 0) continue; - - if(segment->prot == SEGMENT_PROT_RX) { -- mmapForLinkerMarkExecutable(segment->start, segment->size); -+ mprotectForLinker(segment->start, segment->size, MEM_READ_EXECUTE); - } - } - -@@ -1433,7 +1497,7 @@ ocMprotect_MachO( ObjectCode *oc ) - if(section->alloc == SECTION_M32) continue; - switch (section->kind) { - case SECTIONKIND_CODE_OR_RODATA: { -- mmapForLinkerMarkExecutable(section->mapped_start, section->mapped_size); -+ mprotectForLinker(section->mapped_start, section->mapped_size, MEM_READ_EXECUTE); - break; - } - default: -@@ -1447,7 +1511,7 @@ ocMprotect_MachO( ObjectCode *oc ) - int - ocResolve_MachO(ObjectCode* oc) - { -- IF_DEBUG(linker, debugBelch("ocResolve_MachO: start\n")); -+ IF_DEBUG(linker, debugBelch("ocResolve_MachO: %s start\n", OC_INFORMATIVE_FILENAME(oc))); - - if(NULL != oc->info->dsymCmd) - { -@@ -1458,6 +1522,9 @@ ocResolve_MachO(ObjectCode* oc) - for (int i = 0; i < oc->n_sections; i++) - { - const char * sectionName = oc->info->macho_sections[i].sectname; -+ -+ IF_DEBUG(linker, debugBelch("ocResolve_MachO: section %d/%d: %s\n", i, oc->n_sections, sectionName)); -+ - if( !strcmp(sectionName,"__la_symbol_ptr") - || !strcmp(sectionName,"__la_sym_ptr2") - || !strcmp(sectionName,"__la_sym_ptr3")) -@@ -1481,7 +1548,7 @@ ocResolve_MachO(ObjectCode* oc) - } - else - { -- IF_DEBUG(linker, debugBelch("ocResolve_MachO: unknown section\n")); -+ IF_DEBUG(linker, debugBelch("ocResolve_MachO: unknown section %d/%d\n", i, oc->n_sections)); - } - } - } -@@ -1495,7 +1562,7 @@ ocResolve_MachO(ObjectCode* oc) - * have the address. - */ - if(NULL == symbol->addr) { -- symbol->addr = lookupDependentSymbol((char*)symbol->name, oc); -+ symbol->addr = lookupDependentSymbol((char*)symbol->name, oc, NULL); - if(NULL == symbol->addr) { - errorBelch("Failed to lookup symbol: %s", symbol->name); - return 0; -@@ -1522,7 +1589,7 @@ ocResolve_MachO(ObjectCode* oc) - - for(int i = 0; i < oc->n_sections; i++) - { -- IF_DEBUG(linker, debugBelch("ocResolve_MachO: relocating section %d\n", i)); -+ IF_DEBUG(linker, debugBelch("ocResolve_MachO: relocating section %d/%d\n", i, oc->n_sections)); - - #if defined(aarch64_HOST_ARCH) - if (!relocateSectionAarch64(oc, &oc->sections[i])) -@@ -1554,12 +1621,7 @@ ocRunInit_MachO ( ObjectCode *oc ) - for (int i = 0; i < oc->n_sections; i++) { - IF_DEBUG(linker, debugBelch("ocRunInit_MachO: checking section %d\n", i)); - -- // ToDo: replace this with a proper check for the S_MOD_INIT_FUNC_POINTERS -- // flag. We should do this elsewhere in the Mach-O linker code -- // too. Note that the system linker will *refuse* to honor -- // sections which don't have this flag, so this could cause -- // weird behavior divergence (albeit reproducible). -- if (0 == strcmp(oc->info->macho_sections[i].sectname, "__mod_init_func")) { -+ if (oc->sections[i].kind == SECTIONKIND_INIT_ARRAY) { - IF_DEBUG(linker, debugBelch("ocRunInit_MachO: running mod init functions\n")); - - void *init_startC = oc->sections[i].start; -@@ -1579,6 +1641,35 @@ ocRunInit_MachO ( ObjectCode *oc ) - return 1; - } - -+int -+ocRunFini_MachO ( ObjectCode *oc ) -+{ -+ if (NULL == oc->info->segCmd) { -+ barf("ocRunInit_MachO: no segment load command"); -+ } -+ -+ for (int i = 0; i < oc->n_sections; i++) { -+ IF_DEBUG(linker, debugBelch("ocRunFini_MachO: checking section %d\n", i)); -+ -+ if (oc->sections[i].kind == SECTIONKIND_FINI_ARRAY) { -+ IF_DEBUG(linker, debugBelch("ocRunFini_MachO: running mod fini functions\n")); -+ -+ void *fini_startC = oc->sections[i].start; -+ fini_t *fini = (fini_t*)fini_startC; -+ fini_t *fini_end = (fini_t*)((uint8_t*)fini_startC -+ + oc->sections[i].info->macho_section->size); -+ -+ for (int pn = 0; fini < fini_end; fini++, pn++) { -+ IF_DEBUG(linker, debugBelch("ocRunFini_MachO: function pointer %d at %p to %p\n", -+ pn, (void *) fini, (void *) *fini)); -+ (*fini)(); -+ } -+ } -+ } -+ -+ return 1; -+} -+ - /* - * Figure out by how much to shift the entire Mach-O file in memory - * when loading so that its single segment ends up 16-byte-aligned -diff --git a/rts/linker/MachO.h b/rts/linker/MachO.h -index 518c2ce..4af3532 100644 ---- a/rts/linker/MachO.h -+++ b/rts/linker/MachO.h -@@ -1,11 +1,10 @@ - #pragma once - - #include "Rts.h" -+#include "MachOTypes.h" - - #include "BeginPrivate.h" - --#include "MachOTypes.h" -- - void ocInit_MachO ( ObjectCode* oc ); - void ocDeinit_MachO ( ObjectCode* oc ); - int ocVerifyImage_MachO ( ObjectCode* oc ); -@@ -13,6 +12,7 @@ int ocBuildSegments_MachO ( ObjectCode* oc ); - int ocGetNames_MachO ( ObjectCode* oc ); - int ocResolve_MachO ( ObjectCode* oc ); - int ocRunInit_MachO ( ObjectCode* oc ); -+int ocRunFini_MachO ( ObjectCode* oc ); - int machoGetMisalignment ( FILE * ); - int ocAllocateExtras_MachO ( ObjectCode* oc ); - -diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c -index f4fc98d..531ed4d 100644 ---- a/rts/linker/PEi386.c -+++ b/rts/linker/PEi386.c -@@ -55,11 +55,61 @@ - COFF_IMPORT_LIB and commonly has the file extension .lib - - * GNU BFD import format - The import library format defined and used by GNU -- tools. See note below. -+ tools and commonly has the file extension .dll.a . See note below. -+ -+ Note [The need for import libraries] -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ In its original incarnation, PE had no native support for dynamic linking. -+ Let's examine how dynamic linking is now implemented. Consider a simple -+ program with a reference to function and data symbols provided by a DLL: -+ -+ // myprogram.c -+ #include -+ int do_something() { -+ libfoo_function(); -+ return libfoo_data; -+ } -+ -+ The header file shipped with libfoo will look like the following: -+ -+ // libfoo.h -+ __declspec(dllimport) int libfoo_function(); -+ __declspec(dllimport) int libfoo_data; -+ -+ When the C compiler is compiling myprogram.c, it will see these dllimport -+ declarations and use them to produce a module definition (.def) file which -+ summarizes the symbols that we expect the DLL to export. This will look like: -+ -+ EXPORTS -+ libfoo_function -+ libfoo_data DATA -+ -+ The C compiler will pass this file to the `dlltool` utility, which will -+ generate an *import library*. The import library will contain -+ placeholder symbols (with names starting with `__imp_`), along with -+ instructions for the dynamic linker to fix-up these references to point to -+ the "real" symbol definition. -+ -+ For historical reasons involving lack of documentation, NDAs, and (probably) -+ Steve Balmer, there are two flavours of import flavours: -+ -+ * Native Windows-style import libraries. These typically bear the .lib file -+ extension and encode their relocation information in the `.idata` section. -+ Documentation for this format is not available -+ [here](https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#import-library-format). -+ These are handled in `checkAndLoadImportLibrary()` -+ -+ * GNU BFD-style import libraries. These typically have the .dll.a -+ extension and encode the relocation information in a set of sections -+ named `.idata$` where `` is an integer which encodes the section's -+ meaning. Somewhat ironically, despite being devised in response to the -+ native Windows format having no public documentation, there is no official -+ documentation for this format but Note [BFD import library] attempts to -+ summarize what we know. These are handled in `ocGetNames_PEi386()`. -+ - - Note [BFD import library] - ~~~~~~~~~~~~~~~~~~~~~~~~~ -- - On Windows, compilers don't link directly to dynamic libraries. - The reason for this is that the exports are not always by symbol, the - Import Address Table (IAT) also allows exports by ordinal number -@@ -78,7 +128,7 @@ - - Anyway, the Windows PE format specifies a simple and efficient format for - this: It's essentially a list, saying these X symbols can be found in DLL y. -- Commonly, y is a versioned name. e.g. liby_43.dll. This is an artifact of -+ Commonly, y is a versioned name. e.g. `liby_43.dll`. This is an artifact of - the days when Windows did not support side-by-side assemblies. So the - solution was to version the DLLs by renaming them to include explicit - version numbers, and to then use the import libraries to point to the right -@@ -89,35 +139,62 @@ - have created their own format. This format is either named using the suffix - .dll.a or .a depending on the tool that makes them. This format is - undocumented. However the source of dlltool.c in binutils is pretty handy to -- understant it. -+ understand it (see binutils/dlltool.c; grep for ".idata section description"). - - To understand the implementation in GHC, this is what is important: - -- the .idata section group is used to hold this information. An import library -+ The import library is generally an archive containing one object file for -+ each imported symbol. In addition, there is a "head" object, which contains -+ the name of the DLL which the symbols are imported from, among other things. -+ -+ The `.idata$` section group is used to hold this information. An import library - object file will always have these section groups, but the specific - configuration depends on what the purpose of the file is. They will also - never have a CODE or DATA section, though depending on the tool that creates - them they may have the section headers, which will mostly be empty. - -- You have to different possible configuration: -+ The import data sections consist of the following: -+ -+ * `.idata$2` contains the Import Directory Table (IDT), which contains an entry -+ for each imported DLL. Each entry contains: a reference to the DLL's name -+ (in `.idata$7`) and references to its entries in the ILT and IAT sections. -+ This is contained in the head object. -+ -+ * `.idata$6` contains the Hint Name Table (HNT). This is a table of -+ of (symbol ordinal, symbol name) pairs, which are referred to be the ILT -+ and IAT as described below. -+ -+ * `.idata$5` contains the Import Address Table (IAT). This consists of an -+ array of pointers (one array for each imported DLL) which the loader will -+ update to point to the target symbol identified by the hint referenced by -+ the corresponding ILT entry. Moreover, the IAT pointers' initial values -+ also point to the corresponding HNT entry. -+ -+ * `.idata$4` contains the Import Lookup Table (ILT). This contains an array -+ of references to HNT entries for each imported DLL. - -- 1) Those that define a redirection. In this case the .idata$7 section will -+ * `.idata$7` contains the names of the imported DLLs. This is contained -+ in the head object. -+ -+ You have two different possible configurations: -+ -+ 1) Those that define a redirection. In this case the `.idata$7` section will - contain the name of the actual dll to load. This will be the only content - of the section. In the symbol table, the last symbol will be the name - used to refer to the dll in the relocation tables. This name will always -- be in the format "symbol_name_iname", however when refered to, the format -- "_head_symbol_name" is used. -+ be in the format `symbol_name_iname`, however when referred to, the format -+ `_head_symbol_name` is used. - -- We record this symbol early on during GetNames and load the dll and use -+ We record this symbol early on during `ocGetNames` and load the dll and use - the module handle as the symbol address. - -- 2) Symbol definitions. In this case .idata$6 will contain the symbol to load. -- This is stored in the fixed format of 2-byte ordinals followed by a null -- terminated string with the symbol name. The ordinal is to be used when -- the dll does not export symbols by name. (NOTE: We don't currently -- support this in the runtime linker, but it's easy to add should it be -- needed). The last symbol in the symbol table of the section will contain -- the name symbol which contains the dll name to use to resolve the -+ 2) Symbol definitions. In this case the HNT (`.idata$6`) will contain the -+ symbol to load. This is stored in the fixed format of 2-byte ordinals -+ followed by (null-terminated) symbol name. The ordinal is -+ to be used when the DLL does not export symbols by name. (note: We don't -+ currently support this in the runtime linker, but it's easy to add should -+ it be needed). The last symbol in the symbol table of the section will -+ contain the name symbol which contains the dll name to use to resolve the - reference. - - As a technicality, this also means that the GCC format will allow us to use -@@ -126,50 +203,145 @@ - required for dynamic linking support for GHC. So the runtime linker now - supports this too. - -- Note [Memory allocation] -- ~~~~~~~~~~~~~~~~~~~~~~~~ - -- Previously on Windows we would use VirtualAlloc to allocate enough space for -- loading the entire object file into memory and keep it there for the duration -- until the entire object file has been unloaded. -- -- This has a couple of problems, first of, VirtualAlloc and the other Virtual -- functions interact directly with the memory manager. Requesting memory from -- VirtualAlloc will always return whole pages (32k), aligned on a 4k boundary. -- -- This means for an object file of size N kbytes, we're always wasting 32-N -- kbytes of memory. Nothing else can access this memory. -- -- Because of this we're now using HeapAlloc and other heap function to create -- a private heap. Another solution would have been to write our own memory -- manager to keep track of where we have free memory, but the private heap -- solution is simpler. -- -- The private heap is created with full rights just as the pages we used to get -- from VirtualAlloc (e.g. READ/WRITE/EXECUTE). In the end we end up using -- memory much more efficiently than before. The downside is that heap memory -- is always Allocated AND Committed, thus when the heap resizes the new size is -- committed. It becomes harder to see how much we're actually using. This makes -- it seem like for small programs that we're using more memory than before. -- Certainly a clean GHCi startup will have a slightly higher commit count. -- -- The second major change in how we allocate memory is that we no longer need -- the entire object file. We now allocate the object file using normal malloc -- and instead read bits from it. All tables are stored in the Object file info -- table and are discarded as soon as they are no longer needed, e.g. after -- relocation is finished. Only section data is kept around, but this data is -- copied into the private heap. -- -- The major knock on effect of this is that we have more memory to use in the -- sub 2GB range, which means that Template Haskell should fail a lot less as we -- will violate the small memory model much less than before. -- -- Note [Section alignment] -+ Example: Dynamic code references -+ -------------------------------- -+ To see what such an import library looks like, let's first start with the case -+ of a function (e.g. `libfoo_function` above) with bind-now semantics (lazy-loading -+ will look much different). The import library will contain the following: -+ -+ .section .text -+ # This stub (which Windows calls a thunk) is what calls to -+ # libfoo_function will hit if the symbol isn't declared with -+ # __declspec(dllimport) -+ libfoo_function: -+ jmp *0x0(%rip) -+ .quad __imp_libfoo_function -+ -+ .section .idata$5 # IAT -+ # This is the location which the loader will -+ # update to point to the definition -+ # of libfoo_function -+ __imp_libfoo_function: -+ .quad hint1 - __image_base__ -+ -+ .section .idata$4 # ILT -+ # This (and hint1 below) is what tells the -+ # loader where __imp_libfoo_function should point -+ ilt1: -+ .quad hint1 - __image_base__ -+ -+ .section .idata$6 # HNT -+ hint1: -+ .short ORDINAL_OF_libfoo_function -+ .asciiz "libfoo_function" -+ -+ To handle a reference to an IAT entry like `__imp_libfoo_function`, the GHC -+ linker will (in `lookupSymbolInDLLs`) first strip off the `__imp_` prefix to -+ find the name of the referenced dynamic symbol. It then resolves the -+ symbol's address and allocates an `IndirectAddr` where it can place the -+ address, which it will return as the resolution of the `___libfoo_function`. -+ -+ Example: Dynamic data references -+ -------------------------------- -+ Let's now consider the import library for a data symbol. This is essentially -+ equivalent to the code case, but without the need to emit a thunk: -+ -+ .section .idata$5 # IAT -+ __imp_libfoo_data: -+ .quad hint2 - __image_base__ -+ -+ .section .idata$4 # ILT -+ ilt2: -+ .quad hint2 - __image_base__ -+ -+ .section .idata$6 # ILT -+ hint2: -+ .short ORDINAL_OF_libfoo_data -+ .asciiz "libfoo_data" -+ -+ -+ Note [GHC Linking model and import libraries] -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ The above describes how import libraries work for static linking. -+ Fundamentally this does not apply to dynamic linking as we do in GHC. -+ The issue is two-folds: -+ -+ 1. In the linking model above it is expected that the .idata sections be -+ materialized into PLTs during linking. However in GHC we never create -+ PLTs, but have out own mechanism for this which is the jump island -+ machinery. This is required for efficiency. For one materializing the -+ .idata sections would result in wasting pages. We'd use one page for -+ every ~100 bytes. This is extremely wasteful and also fragments the -+ memory. Secondly the dynamic linker is lazy. We only perform the final -+ loading if the symbol is used, however with an import library we can -+ discard the actual OC immediately after reading it. This prevents us from -+ keeping ~1k in memory per symbol for no reason. -+ -+ 2. GHC itself does not observe symbol visibility correctly during NGC. This -+ in itself isn't an academic exercise. The issue stems from GHC using one -+ mechanism for providing two incompatible linking modes: -+ a) The first mode is generating Haskell shared libraries which are -+ intended to be used by other Haskell code. This requires us to -+ export the info, data and closures. For this GHC just re-exports -+ all symbols. But it doesn't correcly mark data/code. Symbol -+ visibility is overwritten by telling the linker to export all -+ symbols. -+ b) The second code is producing code that's supposed to be call-able -+ through a C insterface. This in reality does not require the -+ export of closures and info tables. But also does not require the -+ inclusion of the RTS inside the DLL. Hover this is done today -+ because we don't properly have the RTS as a dynamic library. -+ i.e. GHC does not only export symbols denoted by foreign export. -+ Also GHC should depend on an RTS library, but at the moment it -+ cannot because of TNTC is incompatible with dynamic linking. -+ -+ These two issues mean that for GHC we need to take a different approach -+ to handling import libraries. For normal C libraries we have proper -+ differentiation between CODE and DATA. For GHC produced import libraries -+ we do not. As such the SYM_TYPE_DUP_DISCARD tells the linker that if a -+ duplicate symbol is found, and we were going to discard it anyway, just do -+ so quitely. This works because the RTS symbols themselves are provided by -+ the currently loaded RTS as built-in symbols. -+ -+ Secondly we cannot rely on a text symbol being available. As such we -+ should only depend on the symbols as defined in the .idata sections, -+ otherwise we would not be able to correctly link against GHC produced -+ import libraries. -+ -+ Note [Memory allocation] - ~~~~~~~~~~~~~~~~~~~~~~~~ -+ The loading of an object begins in `preloadObjectFile`, which allocates a buffer, -+ `oc->image`, into which the object file is read. It then calls `ocVerifyImage`, -+ where we traverse the object file's header and populate `ObjectCode.sections`. -+ Specifically, we create a Section for each of the object's sections such -+ that: -+ -+ * the `.start` field points to its data in the mapped image -+ * the `.size` field reflects its intended size -+ * the .`info` field contains a `SectionFormatField` with other information -+ from its section header entry (namely `VirtualSize`, `VirtualAddress`, and -+ `Characteristics`) -+ -+ We then proceed to `ocGetNames`, where we again walk the section table header -+ and determine which sections need to be mapped and how (e.g. as readable-writable or -+ readable-executable). We then allocate memory for each section using the -+ appropriate m32 allocator and, where necessary, copy the data from -+ `section.start` (which points to the section in `oc->image`) -+ into the new allocation. Finally, `addSection()` updates the `section.start` field -+ to reflect the section's new home. In addition, we also allocate space for -+ the global BSS section. -+ -+ At this point we have no further need for the preloaded image buffer, -+ `oc->image` and therefore free it. -+ -+ Having populated the sections, we can proceed to add the object's symbols to -+ the symbol table. This is a matter of walking the object file's symbol table, -+ computing the symbol's address, and calling `ghciInsertSymbolTable`. -+ -+ Finally, we enter `ocResolve`, where we resolve relocations and and allocate -+ jump islands (using the m32 allocator for backing storage) as necessary. - -- The Windows linker aligns memory to it's section alignment requirement by -- aligning it during the copying to the private heap. We also ensure that the -- trampoline "region" we reserve is 8 bytes aligned. - */ - - #include "Rts.h" -@@ -184,12 +356,11 @@ - - #include "RtsUtils.h" - #include "RtsSymbolInfo.h" --#include "GetEnv.h" - #include "CheckUnload.h" -+#include "LinkerInternals.h" - #include "linker/PEi386.h" - #include "linker/PEi386Types.h" - #include "linker/SymbolExtras.h" --#include "LinkerInternals.h" - - #include - #include /* SHGetFolderPathW */ -@@ -208,7 +379,8 @@ static size_t makeSymbolExtra_PEi386( - ObjectCode* oc, - uint64_t index, - size_t s, -- SymbolName* symbol); -+ SymbolName* symbol, -+ SymType sym_type); - #endif - - static void addDLLHandle( -@@ -226,34 +398,14 @@ static bool checkIfDllLoaded( - static uint32_t getSectionAlignment( - Section section); - --static uint8_t* getAlignedMemory( -- uint8_t* value, -- Section section); -- - static size_t getAlignedValue( - size_t value, - Section section); - --static void addCopySection( -- ObjectCode *oc, -- Section *s, -- SectionKind kind, -- SectionAlloc alloc, -- void* start, -- StgWord size); -- - static void releaseOcInfo( - ObjectCode* oc); - --/* Add ld symbol for PE image base. */ --#if defined(__GNUC__) --#define __ImageBase __MINGW_LSYMBOL(_image_base__) --#endif -- --/* Get the base of the module. */ --/* This symbol is defined by ld. */ --extern IMAGE_DOS_HEADER __ImageBase; --#define __image_base (void*)((HINSTANCE)&__ImageBase) -+static SymbolAddr *lookupSymbolInDLLs ( const SymbolName* lbl, ObjectCode *dependent ); - - const Alignments pe_alignments[] = { - { IMAGE_SCN_ALIGN_1BYTES , 1 }, -@@ -274,8 +426,6 @@ const Alignments pe_alignments[] = { - - const int pe_alignments_cnt = sizeof (pe_alignments) / sizeof (Alignments); - const int default_alignment = 8; --const int initHeapSizeMB = 15; --static HANDLE code_heap = NULL; - - /* See Note [_iob_func symbol] - In order to emulate __iob_func the memory location needs to point the -@@ -283,72 +433,32 @@ static HANDLE code_heap = NULL; - the pointer as a redirect. Essentially it's a DATA DLL reference. */ - const void* __rts_iob_func = (void*)&__acrt_iob_func; - --/* Low Fragmentation Heap, try to prevent heap from increasing in size when -- space can simply be reclaimed. These are enums missing from mingw-w64's -- headers. */ --#define HEAP_LFH 2 --#define HeapOptimizeResources 3 -- --void initLinker_PEi386() -+void initLinker_PEi386(void) - { - if (!ghciInsertSymbolTable(WSTR("(GHCi/Ld special symbols)"), -- symhash, "__image_base__", __image_base, HS_BOOL_TRUE | (HS_BOOL_FALSE << 1), NULL)) { -+ symhash, "__image_base__", -+ GetModuleHandleW (NULL), HS_BOOL_TRUE, -+ SYM_TYPE_CODE, NULL)) { - barf("ghciInsertSymbolTable failed"); - } - - #if defined(mingw32_HOST_OS) - addDLLHandle(WSTR("*.exe"), GetModuleHandle(NULL)); -- /* -- * Most of these are included by base, but GCC always includes them -- * So lets make sure we always have them too. -- * -- * In most cases they would have been loaded by the -- * addDLLHandle above. -- */ -- addDLL(WSTR("msvcrt")); -- addDLL(WSTR("kernel32")); -- addDLL(WSTR("advapi32")); -- addDLL(WSTR("shell32")); -- addDLL(WSTR("user32")); - #endif - -- /* See Note [Memory allocation]. */ -- /* Create a private heap which we will use to store all code and data. */ -- SYSTEM_INFO sSysInfo; -- GetSystemInfo(&sSysInfo); -- code_heap = HeapCreate (HEAP_CREATE_ENABLE_EXECUTE, -- initHeapSizeMB * sSysInfo.dwPageSize , 0); -- if (!code_heap) -- barf ("Could not create private heap during initialization. Aborting."); -- -- /* Set some flags for the new code heap. */ -- HeapSetInformation(code_heap, HeapEnableTerminationOnCorruption, NULL, 0); -- unsigned long HeapInformation = HEAP_LFH; -- HeapSetInformation(code_heap, HeapEnableTerminationOnCorruption, -- &HeapInformation, sizeof(HeapInformation)); -- HeapSetInformation(code_heap, HeapOptimizeResources, NULL, 0); -- - /* Register the cleanup routine as an exit handler, this gives other exit handlers - a chance to run which may need linker information. Exit handlers are ran in - reverse registration order so this needs to be before the linker loads anything. */ - atexit (exitLinker_PEi386); - } - --void exitLinker_PEi386() -+void exitLinker_PEi386(void) - { -- /* See Note [Memory allocation]. */ -- if (code_heap) { -- HeapDestroy (code_heap); -- code_heap = NULL; -- } - } - - /* A list thereof. */ - static OpenedDLL* opened_dlls = NULL; - --/* A list thereof. */ --static IndirectAddr* indirects = NULL; -- - /* Adds a DLL instance to the list of DLLs in which to search for symbols. */ - static void addDLLHandle(pathchar* dll_name, HINSTANCE instance) { - -@@ -431,33 +541,34 @@ void freePreloadObjectFile_PEi386(ObjectCode *oc) - } - - if (oc->info) { -- if (oc->info->image) { -- HeapFree(code_heap, 0, oc->info->image); -- oc->info->image = NULL; -+ /* Release the unwinder information. -+ See Note [Exception Unwinding]. */ -+ if (oc->info->pdata) { -+ if (!RtlDeleteFunctionTable (oc->info->pdata->start)) -+ debugBelch ("Unable to remove Exception handlers for %" PATH_FMT "\n", -+ oc->fileName); -+ oc->info->xdata = NULL; -+ oc->info->pdata = NULL; - } -- if (oc->info->ch_info) -+ -+ if (oc->info->ch_info) { - stgFree (oc->info->ch_info); -+ } - stgFree (oc->info); - oc->info = NULL; - } -- -- IndirectAddr *ia, *ia_next; -- ia = indirects; -- while (ia != NULL) { -- ia_next = ia->next; -- stgFree(ia); -- ia = ia_next; -- } -- indirects = NULL; - } - -+// Free oc->info and oc->sections[i]->info. - static void releaseOcInfo(ObjectCode* oc) { - if (!oc) return; - - if (oc->info) { -+ freeInitFiniList(oc->info->init); -+ freeInitFiniList(oc->info->fini); - stgFree (oc->info->ch_info); -- stgFree (oc->info->str_tab); - stgFree (oc->info->symbols); -+ stgFree (oc->info->str_tab); - stgFree (oc->info); - oc->info = NULL; - } -@@ -533,7 +644,7 @@ COFF_OBJ_TYPE getObjectType ( char* image, pathchar* fileName ) - *************/ - COFF_HEADER_INFO* getHeaderInfo ( ObjectCode* oc ) - { -- COFF_OBJ_TYPE coff_type = getObjectType (oc->image, oc->fileName); -+ COFF_OBJ_TYPE coff_type = getObjectType (oc->image, OC_INFORMATIVE_FILENAME(oc)); - - COFF_HEADER_INFO* info - = stgMallocBytes (sizeof(COFF_HEADER_INFO), "getHeaderInfo"); -@@ -589,8 +700,16 @@ size_t getSymbolSize ( COFF_HEADER_INFO *info ) - } - } - -+// Constants which may be returned by getSymSectionNumber. -+// See https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-number-values -+#define PE_SECTION_UNDEFINED ((uint32_t) 0) -+#define PE_SECTION_ABSOLUTE ((uint32_t) -1) -+#define PE_SECTION_DEBUG ((uint32_t) -2) -+ -+// Returns either PE_SECTION_{UNDEFINED,ABSOLUTE,DEBUG} or the (one-based) -+// section number of the given symbol. - __attribute__ ((always_inline)) inline --int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) -+uint32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) - { - ASSERT(info); - ASSERT(sym); -@@ -599,7 +718,16 @@ int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) - case COFF_ANON_BIG_OBJ: - return sym->ex.SectionNumber; - default: -- return sym->og.SectionNumber; -+ // Take care to catch reserved values; see #22941. -+ switch (sym->og.SectionNumber) { -+ case IMAGE_SYM_UNDEFINED: return PE_SECTION_UNDEFINED; -+ case IMAGE_SYM_ABSOLUTE : return PE_SECTION_ABSOLUTE; -+ case IMAGE_SYM_DEBUG: return PE_SECTION_DEBUG; -+ default: -+ // Ensure that we catch if SectionNumber is made wider in the future -+ ASSERT(sizeof(sym->og.SectionNumber) == 2); -+ return (uint16_t) sym->og.SectionNumber; -+ } - } - } - -@@ -744,7 +872,7 @@ addDLL_PEi386( pathchar *dll_name, HINSTANCE *loaded ) - error: - stgFree(buf); - -- char* errormsg = malloc(sizeof(char) * 80); -+ char* errormsg = stgMallocBytes(sizeof(char) * 80, "addDLL_PEi386"); - snprintf(errormsg, 80, "addDLL: %" PATH_FMT " or dependencies not loaded. (Win32 error %lu)", dll_name, GetLastError()); - /* LoadLibrary failed; return a ptr to the error msg. */ - return errormsg; -@@ -754,7 +882,7 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) - { - const unsigned int init_buf_size = 1024; - unsigned int bufsize = init_buf_size; -- wchar_t* result = malloc(sizeof(wchar_t) * bufsize); -+ wchar_t* result = stgMallocBytes(sizeof(wchar_t) * bufsize, "findSystemLibrary_PEi386"); - DWORD wResult = SearchPathW(NULL, dll_name, NULL, bufsize, result, NULL); - - if (wResult > bufsize) { -@@ -764,7 +892,7 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) - - - if (!wResult) { -- free(result); -+ stgFree(result); - return NULL; - } - -@@ -773,68 +901,18 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) - - HsPtr addLibrarySearchPath_PEi386(pathchar* dll_path) - { -- HINSTANCE hDLL = LoadLibraryW(L"Kernel32.DLL"); -- LPAddDLLDirectory AddDllDirectory = (LPAddDLLDirectory)(void*)GetProcAddress((HMODULE)hDLL, "AddDllDirectory"); -- -- HsPtr result = NULL; -- -- const unsigned int init_buf_size = 4096; -- int bufsize = init_buf_size; -- -- // Make sure the path is an absolute path -- WCHAR* abs_path = malloc(sizeof(WCHAR) * init_buf_size); -- DWORD wResult = GetFullPathNameW(dll_path, bufsize, abs_path, NULL); -- if (!wResult){ -- IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError())); -- } -- else if (wResult > init_buf_size) { -- abs_path = realloc(abs_path, sizeof(WCHAR) * wResult); -- if (!GetFullPathNameW(dll_path, bufsize, abs_path, NULL)) { -- IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError())); -- } -- } -- -- if (AddDllDirectory) { -- result = AddDllDirectory(abs_path); -- } -- else -- { -- warnMissingKBLibraryPaths(); -- WCHAR* str = malloc(sizeof(WCHAR) * init_buf_size); -- wResult = GetEnvironmentVariableW(L"PATH", str, bufsize); -- -- if (wResult > init_buf_size) { -- str = realloc(str, sizeof(WCHAR) * wResult); -- bufsize = wResult; -- wResult = GetEnvironmentVariableW(L"PATH", str, bufsize); -- if (!wResult) { -- sysErrorBelch("addLibrarySearchPath[GetEnvironmentVariableW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError()); -- } -- } -- -- bufsize = wResult + 2 + pathlen(abs_path); -- wchar_t* newPath = malloc(sizeof(wchar_t) * bufsize); -- -- wcscpy(newPath, abs_path); -- wcscat(newPath, L";"); -- wcscat(newPath, str); -- if (!SetEnvironmentVariableW(L"PATH", (LPCWSTR)newPath)) { -- sysErrorBelch("addLibrarySearchPath[SetEnvironmentVariableW]: %" PATH_FMT " (Win32 error %lu)", abs_path, GetLastError()); -- } -- -- free(newPath); -- free(abs_path); -- -- return str; -- } -+ // Make sure the path is an absolute path in UNC-style to ensure that we -+ // aren't subject to the MAX_PATH restriction. See #21059. -+ wchar_t *abs_path = __rts_create_device_name(dll_path); - -+ HsPtr result = AddDllDirectory(abs_path); - if (!result) { - sysErrorBelch("addLibrarySearchPath: %" PATH_FMT " (Win32 error %lu)", abs_path, GetLastError()); -- free(abs_path); -+ stgFree(abs_path); - return NULL; - } - -- free(abs_path); -+ stgFree(abs_path); - return result; - } - -@@ -843,19 +921,8 @@ bool removeLibrarySearchPath_PEi386(HsPtr dll_path_index) - bool result = false; - - if (dll_path_index != NULL) { -- HINSTANCE hDLL = LoadLibraryW(L"Kernel32.DLL"); -- LPRemoveDLLDirectory RemoveDllDirectory = (LPRemoveDLLDirectory)(void*)GetProcAddress((HMODULE)hDLL, "RemoveDllDirectory"); -- -- if (RemoveDllDirectory) { -- result = RemoveDllDirectory(dll_path_index); -- // dll_path_index is now invalid, do not use it after this point. -- } -- else -- { -- warnMissingKBLibraryPaths(); -- result = SetEnvironmentVariableW(L"PATH", (LPCWSTR)dll_path_index); -- free(dll_path_index); -- } -+ result = RemoveDllDirectory(dll_path_index); -+ // dll_path_index is now invalid, do not use it after this point. - - if (!result) { - sysErrorBelch("removeLibrarySearchPath: (Win32 error %lu)", GetLastError()); -@@ -883,16 +950,6 @@ static uint32_t getSectionAlignment( - return default_alignment; - } - --/* ---------------------- -- * return a memory location aligned to the section requirements -- */ --static uint8_t* getAlignedMemory( -- uint8_t* value, Section section) { -- uint32_t alignment = getSectionAlignment(section); -- uintptr_t mask = (uintptr_t)alignment - 1; -- return (uint8_t*)(((uintptr_t)value + mask) & ~mask); --} -- - /* ---------------------- - * return a value aligned to the section requirements - */ -@@ -1084,7 +1141,7 @@ zapTrailingAtSign ( SymbolName* sym ) - #endif - - SymbolAddr* --lookupSymbolInDLLs ( const SymbolName* lbl ) -+lookupSymbolInDLLs ( const SymbolName* lbl, ObjectCode *dependent ) - { - OpenedDLL* o_dll; - SymbolAddr* sym; -@@ -1092,17 +1149,13 @@ lookupSymbolInDLLs ( const SymbolName* lbl ) - for (o_dll = opened_dlls; o_dll != NULL; o_dll = o_dll->next) { - /* debugBelch("look in %ls for %s\n", o_dll->name, lbl); */ - -- if (wcsncmp(o_dll->name,WSTR("ucrtbase.dll"),wcslen(WSTR("ucrtbase.dll"))) == 0) { -- IF_DEBUG(linker, debugBelch("warning: ignoring " PATH_FMT "\n", o_dll->name)); -- continue; -- } -- - sym = GetProcAddress(o_dll->instance, lbl+STRIP_LEADING_UNDERSCORE); - if (sym != NULL) { - /*debugBelch("found %s in %s\n", lbl+1,o_dll->name);*/ - return sym; - } - -+ // TODO: Drop this - /* Ticket #2283. - Long description: http://support.microsoft.com/kb/132044 - tl;dr: -@@ -1114,15 +1167,15 @@ lookupSymbolInDLLs ( const SymbolName* lbl ) - sym = GetProcAddress(o_dll->instance, - lbl + 6 + STRIP_LEADING_UNDERSCORE); - if (sym != NULL) { -- IndirectAddr* ret; -- ret = stgMallocBytes( sizeof(IndirectAddr), "lookupSymbolInDLLs" ); -- ret->addr = sym; -- ret->next = indirects; -- indirects = ret; -+ SymbolAddr** indirect = m32_alloc(dependent->rw_m32, sizeof(SymbolAddr*), 8); -+ if (indirect == NULL) { -+ barf("lookupSymbolInDLLs: Failed to allocation indirection"); -+ } -+ *indirect = sym; - IF_DEBUG(linker, - debugBelch("warning: %s from %S is linked instead of %s\n", - lbl+6+STRIP_LEADING_UNDERSCORE, o_dll->name, lbl)); -- return (void*) & ret->addr; -+ return (void*) indirect; - } - } - -@@ -1213,10 +1266,8 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) - oc->n_sections = info->numberOfSections + 1; - oc->info = stgCallocBytes (sizeof(struct ObjectCodeFormatInfo), 1, - "ocVerifyImage_PEi386(info)"); -- oc->info->secBytesTotal = 0; -- oc->info->secBytesUsed = 0; - oc->info->init = NULL; -- oc->info->finit = NULL; -+ oc->info->fini = NULL; - oc->info->ch_info = info; - - /* Copy the tables over from object-file. Copying these allows us to -@@ -1285,31 +1336,14 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) - memcpy (section->info->relocs, reltab + relocs_offset, - noRelocs * sizeof (COFF_reloc)); - } -- -- oc->info->secBytesTotal += getAlignedValue (section->size, *section); - } - - /* Initialize the last section's info field which contains the .bss -- section, it doesn't need an info so set it to NULL. */ -+ section, the .info of which will be initialized by ocGetNames. Discard the -+ .info that we computed above. */ -+ stgFree(sections[info->numberOfSections].info); - sections[info->numberOfSections].info = NULL; - -- /* Calculate space for trampolines nearby. -- We get back 8-byte aligned memory (is that guaranteed?), but -- the offsets to the sections within the file are all 4 mod 8 -- (is that guaranteed?). We therefore need to offset the image -- by 4, so that all the pointers are 8-byte aligned, so that -- pointer tagging works. */ -- /* For 32-bit case we don't need this, hence we use macro -- PEi386_IMAGE_OFFSET, which equals to 4 for 64-bit case and 0 for -- 32-bit case. */ -- /* We allocate trampolines area for all symbols right behind -- image data, aligned on 8. */ -- oc->info->trampoline -- = (PEi386_IMAGE_OFFSET + 2 * default_alignment -- + oc->info->secBytesTotal) & ~0x7; -- oc->info->secBytesTotal -- = oc->info->trampoline + info->numberOfSymbols * sizeof(SymbolExtra); -- - /* No further verification after this point; only debug printing. */ - i = 0; - IF_DEBUG(linker, i=1); -@@ -1363,6 +1397,10 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) - return false; - } - -+ i = 0; -+ IF_DEBUG(linker_verbose, i=1); -+ if (i == 0) return true; -+ - /* Print the section table. */ - debugBelch("\n" ); - for (i = 0; i < info->numberOfSections; i++) { -@@ -1457,113 +1495,109 @@ bool - ocGetNames_PEi386 ( ObjectCode* oc ) - { - bool has_code_section = false; -- -- SymbolName* sname = NULL; -- SymbolAddr* addr = NULL; -- unsigned int i; -- - COFF_HEADER_INFO *info = oc->info->ch_info; - - /* Copy section information into the ObjectCode. */ - -- for (i = 0; i < info->numberOfSections; i++) { -- uint8_t* start; -- uint8_t* end; -- uint32_t sz; -- -+ for (unsigned int i = 0; i < info->numberOfSections; i++) { - /* By default consider all section as CODE or DATA, - which means we want to load them. */ - SectionKind kind = SECTIONKIND_CODE_OR_RODATA; -- Section section = oc->sections[i]; -+ Section *section = &oc->sections[i]; -+ uint32_t alignment = getSectionAlignment(*section); - -- IF_DEBUG(linker, debugBelch("section name = %s\n", section.info->name )); -+ // These will be computed below and determine how we will handle the -+ // section -+ size_t sz = section->size; -+ bool do_copy = true; -+ bool do_zero = false; -+ -+ IF_DEBUG(linker, debugBelch("section name = %s (%x)\n", section->info->name, section->info->props )); - - /* The PE file section flag indicates whether the section - contains code or data. */ -- if (section.info->props & IMAGE_SCN_CNT_CODE) { -- has_code_section = has_code_section || section.size > 0; -+ if (section->info->props & IMAGE_SCN_CNT_CODE) { -+ has_code_section = has_code_section || section->size > 0; - kind = SECTIONKIND_CODE_OR_RODATA; - } - -- if (section.info->props & IMAGE_SCN_CNT_INITIALIZED_DATA) -- kind = SECTIONKIND_CODE_OR_RODATA; -+ if (section->info->props & IMAGE_SCN_MEM_WRITE) { -+ kind = SECTIONKIND_RWDATA; -+ } - - /* Check next if it contains any uninitialized data */ -- if (section.info->props & IMAGE_SCN_CNT_UNINITIALIZED_DATA) -+ if (section->info->props & IMAGE_SCN_CNT_UNINITIALIZED_DATA) { - kind = SECTIONKIND_RWDATA; -+ do_copy = false; -+ } - - /* Finally check if it can be discarded. - This will also ignore .debug sections */ -- if ( section.info->props & IMAGE_SCN_MEM_DISCARDABLE -- || section.info->props & IMAGE_SCN_LNK_REMOVE) -+ if ( section->info->props & IMAGE_SCN_MEM_DISCARDABLE -+ || section->info->props & IMAGE_SCN_LNK_REMOVE) { - kind = SECTIONKIND_OTHER; -+ } - -- if (0==strncmp(".ctors", section.info->name, 6)) { -+ if (0==strncmp(".ctors", section->info->name, 6)) { -+ /* N.B. a compilation unit may have more than one .ctor section; we -+ * must run them all. See #21618 for a case where this happened */ -+ uint32_t prio; -+ if (sscanf(section->info->name, ".ctors.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ // .ctors/.dtors are executed in reverse order: higher numbers are -+ // executed first -+ prio = 0xffff - prio; -+ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_CTORS, prio); - kind = SECTIONKIND_INIT_ARRAY; -- oc->info->init = &oc->sections[i]; - } - -- if (0==strncmp(".dtors", section.info->name, 6)) { -- kind = SECTIONKIND_FINIT_ARRAY; -- oc->info->finit = &oc->sections[i]; -+ if (0==strncmp(".dtors", section->info->name, 6)) { -+ uint32_t prio; -+ if (sscanf(section->info->name, ".dtors.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ // .ctors/.dtors are executed in reverse order: higher numbers are -+ // executed first -+ prio = 0xffff - prio; -+ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_DTORS, prio); -+ kind = SECTIONKIND_FINI_ARRAY; - } - -- if ( 0 == strncmp(".stab" , section.info->name, 5 ) -- || 0 == strncmp(".stabstr" , section.info->name, 8 ) -- || 0 == strncmp(".pdata" , section.info->name, 6 ) -- || 0 == strncmp(".xdata" , section.info->name, 6 ) -- || 0 == strncmp(".debug" , section.info->name, 6 ) -- || 0 == strncmp(".rdata$zzz", section.info->name, 10)) -+ if ( 0 == strncmp(".stab" , section->info->name, 5 ) -+ || 0 == strncmp(".stabstr" , section->info->name, 8 ) -+ || 0 == strncmp(".debug" , section->info->name, 6 ) -+ || 0 == strncmp(".rdata$zzz", section->info->name, 10)) - kind = SECTIONKIND_DEBUG; - -- if (0==strncmp(".idata", section.info->name, 6)) -- kind = SECTIONKIND_IMPORT; -+ /* Exception Unwind information. See Note [Exception Unwinding]. */ -+ if (0 == strncmp(".xdata" , section->info->name, 6 )) { -+ kind = SECTIONKIND_EXCEPTION_UNWIND; -+ } - -- /* See Note [BFD import library]. */ -- if (0==strncmp(".idata$7", section.info->name, 8)) -- kind = SECTIONKIND_IMPORT_LIBRARY; -+ /* Exception handler tables, See Note [Exception Unwinding]. */ -+ if (0 == strncmp(".pdata" , section->info->name, 6 )) { -+ kind = SECTIONKIND_EXCEPTION_TABLE; -+ } - -- if (0==strncmp(".idata$6", section.info->name, 8)) { -- /* The first two bytes contain the ordinal of the function -- in the format of lowpart highpart. The two bytes combined -- for the total range of 16 bits which is the function export limit -- of DLLs. */ -- sname = (SymbolName*)section.start+2; -- COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; -- addr = get_sym_name( getSymShortName (info, sym), oc); -+ if (0==strncmp(".idata", section->info->name, 6)) { -+ kind = SECTIONKIND_IMPORT; -+ } - -- IF_DEBUG(linker, -- debugBelch("addImportSymbol `%s' => `%s'\n", -- sname, (char*)addr)); -- /* We're going to free the any data associated with the import -- library without copying the sections. So we have to duplicate -- the symbol name and values before the pointers become invalid. */ -- sname = strdup (sname); -- addr = strdup (addr); -- if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, -- addr, HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), oc)) { -- releaseOcInfo (oc); -- stgFree (oc->image); -- oc->image = NULL; -- return false; -- } -- setImportSymbol (oc, sname); - -- /* Don't process this oc any futher. Just exit. */ -- oc->n_symbols = 0; -- oc->symbols = NULL; -- stgFree (oc->image); -- oc->image = NULL; -- releaseOcInfo (oc); -- oc->status = OBJECT_DONT_RESOLVE; -- return true; -+ /* See Note [BFD import library]. */ -+ if (0==strncmp(".idata$7", section->info->name, 8)) { -+ kind = SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD; - } - -- /* Allocate space for any (local, anonymous) .bss sections. */ -- if (0==strncmp(".bss", section.info->name, 4)) { -- uint32_t bss_sz; -- uint8_t* zspace; -+ if (0==strncmp(".idata$6", section->info->name, 8)) { -+ kind = SECTIONKIND_BFD_IMPORT_LIBRARY; -+ } - -+ /* Allocate space for any (local, anonymous) .bss sections. */ -+ if (0==strncmp(".bss", section->info->name, 4)) { - /* sof 10/05: the PE spec text isn't too clear regarding what - * the SizeOfRawData field is supposed to hold for object - * file sections containing just uninitialized data -- for executables, -@@ -1583,42 +1617,49 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - * - * TODO: check if this comment is still relevant. - */ -- if (section.info->virtualSize == 0 && section.size == 0) continue; -+ if (section->info->virtualSize == 0 && section->size == 0) { -+ IF_DEBUG(linker_verbose, debugBelch("skipping empty .bss section\n")); -+ continue; -+ } -+ - /* This is a non-empty .bss section. - Allocate zeroed space for it */ -- bss_sz = section.info->virtualSize; -- if (bss_sz < section.size) { bss_sz = section.size; } -- zspace = stgCallocBytes(1, bss_sz, "ocGetNames_PEi386(anonymous bss)"); -- oc->sections[i].start = zspace; -- oc->sections[i].size = bss_sz; -- section = oc->sections[i]; -- /* debugBelch("BSS anon section at 0x%x\n", zspace); */ -+ kind = SECTIONKIND_RWDATA; -+ do_zero = true; -+ do_copy = false; -+ IF_DEBUG(linker_verbose, debugBelch("BSS anon section\n")); - } - -- /* Allocate space for the sections since we have a real oc. -- We initially mark it the region as non-accessible. But will adjust -- as we go along. */ -- if (!oc->info->image) { -- /* See Note [Memory allocation]. */ -- ASSERT(code_heap); -- oc->info->image -- = HeapAlloc (code_heap, HEAP_ZERO_MEMORY, oc->info->secBytesTotal); -- if (!oc->info->image) -- barf ("Could not allocate any heap memory from private heap."); -+ CHECK(section->size == 0 || section->info->virtualSize == 0); -+ if (sz < section->info->virtualSize) { -+ sz = section->info->virtualSize; - } - -- ASSERT(section.size == 0 || section.info->virtualSize == 0); -- sz = section.size; -- if (sz < section.info->virtualSize) sz = section.info->virtualSize; -+ // Ignore these section types -+ if (kind == SECTIONKIND_OTHER || sz == 0) { -+ continue; -+ } - -- start = section.start; -- end = start + sz; -+ // Allocate memory for the section. -+ uint8_t *start; -+ if (section->info->props & IMAGE_SCN_MEM_WRITE) { -+ start = m32_alloc(oc->rw_m32, sz, alignment); -+ } else { -+ start = m32_alloc(oc->rx_m32, sz, alignment); -+ } -+ if (!start) { -+ barf("Could not allocate any heap memory from private heap (requested %" FMT_SizeT " bytes).", -+ sz); -+ } - -- if (kind != SECTIONKIND_OTHER && end > start) { -- /* See Note [Section alignment]. */ -- addCopySection(oc, &oc->sections[i], kind, SECTION_NOMEM, start, sz); -- addProddableBlock(oc, oc->sections[i].start, sz); -+ if (do_copy) { -+ memcpy(start, section->start, sz); -+ } else if (do_zero) { -+ memset(start, 0, sz); - } -+ -+ addSection(section, kind, SECTION_NOMEM, start, sz, 0, 0, 0); -+ addProddableBlock(oc, oc->sections[i].start, sz); - } - - /* Copy exported symbols into the ObjectCode. */ -@@ -1629,9 +1670,9 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - - /* Work out the size of the global BSS section */ - StgWord globalBssSize = 0; -- for (i=0; i < info->numberOfSymbols; i++) { -+ for (unsigned int i=0; i < info->numberOfSymbols; i++) { - COFF_symbol* sym = &oc->info->symbols[i]; -- if (getSymSectionNumber (info, sym) == IMAGE_SYM_UNDEFINED -+ if (getSymSectionNumber (info, sym) == PE_SECTION_UNDEFINED - && getSymValue (info, sym) > 0 - && getSymStorageClass (info, sym) != IMAGE_SYM_CLASS_SECTION) { - globalBssSize += getSymValue (info, sym); -@@ -1642,12 +1683,14 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - /* Allocate BSS space */ - SymbolAddr* bss = NULL; - if (globalBssSize > 0) { -- bss = stgCallocBytes(1, globalBssSize, -- "ocGetNames_PEi386(non-anonymous bss)"); -+ bss = m32_alloc(oc->rw_m32, globalBssSize, 16); -+ if (bss == NULL) { -+ barf("ocGetNames_PEi386: Failed to allocate global bss section"); -+ } - addSection(&oc->sections[oc->n_sections-1], - SECTIONKIND_RWDATA, SECTION_MALLOC, - bss, globalBssSize, 0, 0, 0); -- IF_DEBUG(linker, debugBelch("bss @ %p %" FMT_Word "\n", bss, globalBssSize)); -+ IF_DEBUG(linker_verbose, debugBelch("bss @ %p %" FMT_Word "\n", bss, globalBssSize)); - addProddableBlock(oc, bss, globalBssSize); - } else { - addSection(&oc->sections[oc->n_sections-1], -@@ -1659,22 +1702,52 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - stgFree (oc->image); - oc->image = NULL; - -- for (i = 0; i < (uint32_t)oc->n_symbols; i++) { -+ for (unsigned int i = 0; i < (uint32_t)oc->n_symbols; i++) { - COFF_symbol* sym = &oc->info->symbols[i]; - -- int32_t secNumber = getSymSectionNumber (info, sym); - uint32_t symValue = getSymValue (info, sym); - uint8_t symStorageClass = getSymStorageClass (info, sym); -- -- addr = NULL; -+ SymbolAddr *addr = NULL; - bool isWeak = false; -- sname = get_sym_name (getSymShortName (info, sym), oc); -- Section *section = secNumber > 0 ? &oc->sections[secNumber-1] : NULL; -+ SymbolName *sname = get_sym_name (getSymShortName (info, sym), oc); -+ -+ uint32_t secNumber = getSymSectionNumber (info, sym); -+ Section *section; -+ switch (secNumber) { -+ case PE_SECTION_UNDEFINED: -+ // N.B. This may be a weak symbol -+ section = NULL; -+ break; -+ case PE_SECTION_ABSOLUTE: -+ IF_DEBUG(linker, debugBelch("symbol %s is ABSOLUTE, skipping...\n", sname)); -+ i += getSymNumberOfAuxSymbols (info, sym); -+ continue; -+ case PE_SECTION_DEBUG: -+ IF_DEBUG(linker, debugBelch("symbol %s is DEBUG, skipping...\n", sname)); -+ i += getSymNumberOfAuxSymbols (info, sym); -+ continue; -+ default: -+ CHECK(secNumber < (uint32_t) oc->n_sections); -+ section = &oc->sections[secNumber-1]; -+ } -+ -+ SymType type; -+ switch (getSymType(oc->info->ch_info, sym)) { -+ case 0x00: type = SYM_TYPE_DATA; break; -+ case 0x20: type = SYM_TYPE_CODE; break; -+ default: -+ debugBelch("Symbol %s has invalid type 0x%x\n", -+ sname, getSymType(oc->info->ch_info, sym)); -+ return 1; -+ } - - if ( secNumber != IMAGE_SYM_UNDEFINED - && secNumber > 0 - && section -- && section->kind != SECTIONKIND_IMPORT_LIBRARY) { -+ /* Skip all BFD import sections. */ -+ && section->kind != SECTIONKIND_IMPORT -+ && section->kind != SECTIONKIND_BFD_IMPORT_LIBRARY -+ && section->kind != SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD) { - /* This symbol is global and defined, viz, exported */ - /* for IMAGE_SYMCLASS_EXTERNAL - && !IMAGE_SYM_UNDEFINED, -@@ -1691,18 +1764,85 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - } - else if (symStorageClass == IMAGE_SYM_CLASS_WEAK_EXTERNAL) { - isWeak = true; -+ CHECK(getSymNumberOfAuxSymbols (info, sym) == 1); -+ CHECK(symValue == 0); -+ COFF_symbol_aux_weak_external *aux = (COFF_symbol_aux_weak_external *) (sym+1); -+ COFF_symbol* targetSym = &oc->info->symbols[aux->TagIndex]; -+ -+ uint32_t targetSecNumber = getSymSectionNumber (info, targetSym); -+ Section *targetSection; -+ switch (targetSecNumber) { -+ case PE_SECTION_UNDEFINED: -+ case PE_SECTION_ABSOLUTE: -+ case PE_SECTION_DEBUG: -+ targetSection = NULL; -+ break; -+ default: -+ // targetSecNumber is a uint32_t, and the 0 case should be caught by PE_SECTION_UNDEFINED. -+ // The compiler should be smart enough to eliminate the guard, we'll keep it in as fail -+ // safe nontheless. -+ targetSection = targetSecNumber > 0 ? &oc->sections[targetSecNumber-1] : NULL; -+ } -+ if(NULL != targetSection) -+ addr = (SymbolAddr*) ((size_t) targetSection->start + getSymValue(info, targetSym)); - } - else if ( secNumber == IMAGE_SYM_UNDEFINED && symValue > 0) { - /* This symbol isn't in any section at all, ie, global bss. - Allocate zeroed space for it from the BSS section */ - addr = bss; - bss = (SymbolAddr*)((StgWord)bss + (StgWord)symValue); -- IF_DEBUG(linker, debugBelch("bss symbol @ %p %u\n", addr, symValue)); -+ IF_DEBUG(linker_verbose, debugBelch("bss symbol @ %p %u\n", addr, symValue)); -+ } -+ else if (section && section->kind == SECTIONKIND_BFD_IMPORT_LIBRARY) { -+ /* Disassembly of section .idata$5: -+ -+ 0000000000000000 <__imp_Insert>: -+ ... -+ 0: IMAGE_REL_AMD64_ADDR32NB .idata$6 -+ -+ The first two bytes contain the ordinal of the function -+ in the format of lowpart highpart. The two bytes combined -+ for the total range of 16 bits which is the function export limit -+ of DLLs. See note [GHC Linking model and import libraries]. */ -+ sname = (SymbolName*)section->start+2; -+ // load the symbol that specifies the dll we need to load to resolve this. -+ COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; -+ addr = get_sym_name( getSymShortName (info, sym), oc); -+ -+ IF_DEBUG(linker, -+ debugBelch("addImportSymbol `%s' => `%s'\n", -+ sname, (char*)addr)); -+ /* We're going to free the any data associated with the import -+ library without copying the sections. So we have to duplicate -+ the symbol name and values before the pointers become invalid. */ -+ sname = strdup (sname); -+ addr = strdup (addr); -+ type = has_code_section ? SYM_TYPE_CODE : SYM_TYPE_DATA; -+ type |= SYM_TYPE_DUP_DISCARD; -+ if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, -+ addr, false, type, oc)) { -+ releaseOcInfo (oc); -+ stgFree (oc->image); -+ oc->image = NULL; -+ return false; -+ } -+ setImportSymbol (oc, sname); -+ -+ /* Don't process this oc any further. Just exit. */ -+ oc->n_symbols = 0; -+ oc->symbols = NULL; -+ stgFree (oc->image); -+ oc->image = NULL; -+ releaseOcInfo (oc); -+ // There is nothing that we need to resolve in this object since we -+ // will never call the import stubs in its text section -+ oc->status = OBJECT_DONT_RESOLVE; -+ return true; - } - else if (secNumber > 0 - && section -- && section->kind == SECTIONKIND_IMPORT_LIBRARY) { -- /* This is an import section. We should load the dll and lookup -+ && section->kind == SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD) { -+ /* This is an Gnu BFD import section. We should load the dll and lookup - the symbols. - See Note [BFD import library]. */ - char* dllName = section->start; -@@ -1716,7 +1856,7 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - sym = &oc->info->symbols[oc->n_symbols-1]; - sname = get_sym_name (getSymShortName (info, sym), oc); - -- IF_DEBUG(linker, -+ IF_DEBUG(linker_verbose, - debugBelch("loading symbol `%s' from dll: '%ls' => `%s'\n", - sname, oc->fileName, dllName)); - -@@ -1758,29 +1898,36 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - sname[size-start]='\0'; - stgFree(tmp); - sname = strdup (sname); -+ if(secNumber == IMAGE_SYM_UNDEFINED) -+ type |= SYM_TYPE_HIDDEN; -+ - if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, -- addr, -- HS_BOOL_FALSE | ((secNumber == IMAGE_SYM_UNDEFINED) << 1), -- oc)) -+ addr, false, type, oc)) - return false; - - break; -+ } else if (secNumber == PE_SECTION_UNDEFINED) { -+ IF_DEBUG(linker, debugBelch("symbol %s is UNDEFINED, skipping...\n", sname)); -+ i += getSymNumberOfAuxSymbols (info, sym); - } - - if ((addr != NULL || isWeak) - && (!section || (section && section->kind != SECTIONKIND_IMPORT))) { - /* debugBelch("addSymbol %p `%s' Weak:%lld \n", addr, sname, isWeak); */ - sname = strdup (sname); -- IF_DEBUG(linker, debugBelch("addSymbol %p `%s'\n", addr, sname)); -+ if(secNumber == IMAGE_SYM_UNDEFINED) -+ type |= SYM_TYPE_HIDDEN; -+ IF_DEBUG(linker_verbose, debugBelch("addSymbol %p `%s'\n", addr, sname)); - ASSERT(i < (uint32_t)oc->n_symbols); - oc->symbols[i].name = sname; - oc->symbols[i].addr = addr; -+ oc->symbols[i].type = type; - if (isWeak) { - setWeakSymbol(oc, sname); - } -+ - if (! ghciInsertSymbolTable(oc->fileName, symhash, sname, addr, -- isWeak | ((secNumber == IMAGE_SYM_UNDEFINED) << 1), -- oc)) -+ isWeak, type, oc)) - return false; - } else { - /* We're skipping the symbol, but if we ever load this -@@ -1797,50 +1944,37 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - - #if defined(x86_64_HOST_ARCH) - --/* We've already reserved a room for symbol extras in loadObj, -- * so simply set correct pointer here. -- */ --bool --ocAllocateExtras_PEi386 ( ObjectCode* oc ) --{ -- /* If the ObjectCode was unloaded we don't need a trampoline, it's likely -- an import library so we're discarding it earlier. */ -- if (!oc->info) -- return false; -- -- const int mask = default_alignment - 1; -- size_t origin = oc->info->trampoline; -- oc->symbol_extras -- = (SymbolExtra*)((uintptr_t)(oc->info->image + origin + mask) & ~mask); -- oc->first_symbol_extra = 0; -- COFF_HEADER_INFO *info = oc->info->ch_info; -- oc->n_symbol_extras = info->numberOfSymbols; -- -- return true; --} -- - static size_t --makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index, size_t s, char* symbol ) -+makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index STG_UNUSED, size_t s, char* symbol STG_UNUSED, SymType type ) - { -- unsigned int curr_thunk; - SymbolExtra *extra; -- curr_thunk = oc->first_symbol_extra + index; -- if (index >= oc->n_symbol_extras) { -- IF_DEBUG(linker, debugBelch("makeSymbolExtra first:%d, num:%lu, member:%s, index:%llu\n", curr_thunk, oc->n_symbol_extras, oc->archiveMemberName, index)); -- barf("Can't allocate thunk for `%s' in `%" PATH_FMT "' with member `%s'", symbol, oc->fileName, oc->archiveMemberName); -- } -- -- extra = oc->symbol_extras + curr_thunk; -- -- if (!extra->addr) -- { -- // jmp *-14(%rip) -- static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; -- extra->addr = (uint64_t)s; -- memcpy(extra->jumpIsland, jmp, 6); -+ switch(type & ~(SYM_TYPE_DUP_DISCARD | SYM_TYPE_HIDDEN)) { -+ case SYM_TYPE_CODE: { -+ // jmp *-14(%rip) -+ extra = m32_alloc(oc->rx_m32, sizeof(SymbolExtra), 8); -+ CHECK(extra); -+ extra->addr = (uint64_t)s; -+ static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; -+ memcpy(extra->jumpIsland, jmp, 6); -+ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(code): %s -> %p\n", symbol, &extra->jumpIsland)); -+ return (size_t)&extra->jumpIsland; -+ } -+ case SYM_TYPE_INDIRECT_DATA: { -+ extra = m32_alloc(oc->rw_m32, sizeof(SymbolExtra), 8); -+ CHECK(extra); -+ void *v = *(void**) s; -+ extra->addr = (uint64_t)v; -+ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(data): %s -> %p\n", symbol, &extra->addr)); -+ return (size_t)&extra->addr; -+ } -+ default: { -+ extra = m32_alloc(oc->rw_m32, sizeof(SymbolExtra), 8); -+ CHECK(extra); -+ extra->addr = (uint64_t)s; -+ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(indirect-data): %s -> %p\n", symbol, &extra->addr)); -+ return (size_t)&extra->addr; -+ } - } -- -- return (size_t)extra->jumpIsland; - } - - void ocProtectExtras(ObjectCode* oc STG_UNUSED) { } -@@ -1860,7 +1994,7 @@ ocResolve_PEi386 ( ObjectCode* oc ) - /* ToDo: should be variable-sized? But is at least safe in the - sense of buffer-overrun-proof. */ - uint8_t symbol[1000]; -- /* debugBelch("resolving for %s\n", oc->fileName); */ -+ /* debugBelch("resolving for %"PATH_FMT "\n", oc->fileName); */ - - /* Such libraries have been partially freed and can't be resolved. */ - if (oc->status == OBJECT_DONT_RESOLVE) -@@ -1874,7 +2008,7 @@ ocResolve_PEi386 ( ObjectCode* oc ) - - /* Ignore sections called which contain stabs debugging information. */ - if (section.kind == SECTIONKIND_DEBUG) -- continue; -+ continue; - - noRelocs = section.info->noRelocs; - for (j = 0; j < noRelocs; j++) { -@@ -1893,30 +2027,46 @@ ocResolve_PEi386 ( ObjectCode* oc ) - uint64_t symIndex = reloc->SymbolTableIndex; - sym = &oc->info->symbols[symIndex]; - -- IF_DEBUG(linker, -+ SymType sym_type; -+ -+ IF_DEBUG(linker_verbose, - debugBelch( -- "reloc sec %2d num %3d: type 0x%-4x " -+ "reloc sec %2d num %3d: P=%p, type 0x%-4x " - "vaddr 0x%-8lx name `", -- i, j, -+ i, j, pP, - reloc->Type, - reloc->VirtualAddress ); - printName (getSymShortName (info, sym), oc); -- debugBelch("'\n" )); -+ debugBelch("'\n" )); - - if (getSymStorageClass (info, sym) == IMAGE_SYM_CLASS_STATIC) { -- Section section = oc->sections[getSymSectionNumber (info, sym)-1]; -+ uint32_t sect_n = getSymSectionNumber (info, sym); -+ switch (sect_n) { -+ case PE_SECTION_UNDEFINED: -+ case PE_SECTION_ABSOLUTE: -+ case PE_SECTION_DEBUG: -+ errorBelch(" | %" PATH_FMT ": symbol `%s' has invalid section number %02x", -+ oc->fileName, symbol, sect_n); -+ return false; -+ default: -+ break; -+ } -+ CHECK(sect_n < (uint32_t) oc->n_sections); -+ Section section = oc->sections[sect_n - 1]; - S = ((size_t)(section.start)) - + ((size_t)(getSymValue (info, sym))); - } else { - copyName ( getSymShortName (info, sym), oc, symbol, - sizeof(symbol)-1 ); -- S = (size_t) lookupDependentSymbol( (char*)symbol, oc ); -+ S = (size_t) lookupDependentSymbol( (char*)symbol, oc, &sym_type ); - if ((void*)S == NULL) { - errorBelch(" | %" PATH_FMT ": unknown symbol `%s'", oc->fileName, symbol); - releaseOcInfo (oc); - return false; - } - } -+ IF_DEBUG(linker_verbose, debugBelch("S=%zx\n", S)); -+ - /* All supported relocations write at least 4 bytes */ - checkProddableBlock(oc, pP, 4); - switch (reloc->Type) { -@@ -1963,27 +2113,46 @@ ocResolve_PEi386 ( ObjectCode* oc ) - break; - } - case 2: /* R_X86_64_32 (ELF constant 10) - IMAGE_REL_AMD64_ADDR32 (PE constant 2) */ -- case 3: /* R_X86_64_32S (ELF constant 11) - IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */ -+ case 3: /* IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */ - case 17: /* R_X86_64_32S ELF constant, no PE mapping. See note [ELF constant in PE file] */ - { - uint64_t v; - v = S + A; -+ -+ /* If IMAGE_REL_AMD64_ADDR32NB then subtract the image base. */ -+ if (reloc->Type == 3) -+ v -= (uint64_t) GetModuleHandleW(NULL); -+ - // N.B. in the case of the sign-extended relocations we must ensure that v - // fits in a signed 32-bit value. See #15808. - if (((int64_t) v > (int64_t) INT32_MAX) || ((int64_t) v < (int64_t) INT32_MIN)) { - copyName (getSymShortName (info, sym), oc, - symbol, sizeof(symbol)-1); -- S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); -+ S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol, sym_type); - /* And retry */ - v = S + A; -+ -+ /* If IMAGE_REL_AMD64_ADDR32NB then subtract the image base. */ -+ if (reloc->Type == 3) -+ v -= (uint64_t) GetModuleHandleW(NULL); -+ - if (((int64_t) v > (int64_t) INT32_MAX) || ((int64_t) v < (int64_t) INT32_MIN)) { -- barf("IMAGE_REL_AMD64_ADDR32[NB]: High bits are set in %zx for %s", -+ barf("IMAGE_REL_AMD64_ADDR32[NB]: High bits are set in 0x%zx for %s", - v, (char *)symbol); - } - } - *(uint32_t *)pP = (uint32_t)v; - break; - } -+ case 14: /* R_X86_64_PC64 (ELF constant 24) - IMAGE_REL_AMD64_SREL32 (PE constant 14) */ -+ { -+ /* mingw will emit this for a pc-rel 64 relocation */ -+ uint64_t A; -+ checkProddableBlock(oc, pP, 8); -+ A = *(uint64_t*)pP; -+ *(uint64_t *)pP = S + A - (intptr_t)pP; -+ break; -+ } - case 4: /* R_X86_64_PC32 (ELF constant 2) - IMAGE_REL_AMD64_REL32 (PE constant 4) */ - { - intptr_t v; -@@ -1992,11 +2161,11 @@ ocResolve_PEi386 ( ObjectCode* oc ) - /* Make the trampoline then */ - copyName (getSymShortName (info, sym), - oc, symbol, sizeof(symbol)-1); -- S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); -+ S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol, sym_type); - /* And retry */ - v = S + (int32_t)A - ((intptr_t)pP) - 4; - if ((v > (int64_t) INT32_MAX) || (v < (int64_t) INT32_MIN)) { -- barf("IMAGE_REL_AMD64_REL32: High bits are set in %zx for %s", -+ barf("IMAGE_REL_AMD64_REL32: High bits are set in 0x%zx for %s", - v, (char *)symbol); - } - } -@@ -2012,15 +2181,45 @@ ocResolve_PEi386 ( ObjectCode* oc ) - } - - } -+ -+ /* Register the exceptions inside this OC. -+ See Note [Exception Unwinding]. */ -+ if (section.kind == SECTIONKIND_EXCEPTION_TABLE) { -+ oc->info->pdata = &oc->sections[i]; -+#if defined(x86_64_HOST_ARCH) -+ unsigned numEntries = section.size / sizeof(RUNTIME_FUNCTION); -+ if (numEntries == 0) -+ continue; -+ -+ /* Now register the exception handler for the range and point it -+ to the unwind data. */ -+ if (!RtlAddFunctionTable (section.start, numEntries, (uintptr_t) GetModuleHandleW(NULL))) { -+ sysErrorBelch("Unable to register Exception handler for %p for " -+ "section %s in %" PATH_FMT " (Win32 error %lu)", -+ section.start, section.info->name, oc->fileName, -+ GetLastError()); -+ releaseOcInfo (oc); -+ return false; -+ } -+#endif /* x86_64_HOST_ARCH. */ -+ } else if (section.kind == SECTIONKIND_EXCEPTION_UNWIND) { -+ oc->info->xdata = &oc->sections[i]; -+ } - } - -+ // We now have no more need of info->ch_info and info->symbols. -+ stgFree(oc->info->ch_info); -+ oc->info->ch_info = NULL; -+ stgFree(oc->info->symbols); -+ oc->info->symbols = NULL; -+ - IF_DEBUG(linker, debugBelch("completed %" PATH_FMT "\n", oc->fileName)); - return true; - } - - /* - Note [ELF constant in PE file] -- -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - For some reason, the PE files produced by GHC contain a linux - relocation constant 17 (0x11) in the object files. As far as I (Phyx-) can tell - this constant doesn't seem like it's coming from GHC, or at least I could not find -@@ -2033,36 +2232,95 @@ ocResolve_PEi386 ( ObjectCode* oc ) - See #9907 - */ - -+/* -+ Note [Exception Unwinding] -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ -+ Exception Unwinding on Windows is handled using two named sections. -+ -+ .pdata: Exception registration tables. -+ -+ The .pdata section contains an array of function table entries (of type -+ RUNTIME_FUNCTION) that are used for exception handling. The entries must be -+ sorted according to the function addresses (the first field in each -+ structure) before being emitted into the final image. It is pointed to by -+ the exception table entry in the image data directory. For x64 each entry -+ contains: -+ -+ Offset Size Field Description -+ 0 4 Begin Address The RVA of the corresponding function. -+ 4 4 End Address The RVA of the end of the function. -+ 8 4 Unwind Information The RVA of the unwind information. -+ -+ Note that these are RVAs even after being resolved by the linker, they are -+ however ImageBase relative rather than PC relative. These are typically -+ filled in by an ADDR32NB relocation. On disk the section looks like: -+ -+ Function Table #6 (4) -+ -+ Begin End Info -+ -+ 00000000 00000000 000001A1 00000000 -+ 0000000C 000001A1 000001BF 00000034 -+ 00000018 000001BF 00000201 00000040 -+ 00000024 00000201 0000021F 0000004C -+ -+ RELOCATIONS #6 -+ Symbol Symbol -+ Offset Type Applied To Index Name -+ -------- ---------------- ----------------- -------- ------ -+ 00000000 ADDR32NB 00000000 E .text -+ 00000004 ADDR32NB 000001A1 E .text -+ 00000008 ADDR32NB 00000000 16 .xdata -+ 0000000C ADDR32NB 000001A1 E .text -+ 00000010 ADDR32NB 000001BF E .text -+ 00000014 ADDR32NB 00000034 16 .xdata -+ 00000018 ADDR32NB 000001BF E .text -+ 0000001C ADDR32NB 00000201 E .text -+ 00000020 ADDR32NB 00000040 16 .xdata -+ 00000024 ADDR32NB 00000201 E .text -+ 00000028 ADDR32NB 0000021F E .text -+ 0000002C ADDR32NB 0000004C 16 .xdata -+ -+ This means that if we leave it up to the relocation processing to -+ do the work we don't need to do anything special here. Note that -+ every single function will have an entry in this table regardless -+ whether they have an unwind code or not. The reason for this is -+ that unwind handlers can be chained, and such another function -+ may have registered an overlapping region. -+ -+ .xdata: Exception unwind codes. -+ -+ This section contains an array of entries telling the unwinder how -+ to do unwinding. They are pointed to by the .pdata table enteries -+ from the Info field. Each entry is very complicated but for now -+ what is important is that the addresses are resolved by the relocs -+ for us. -+ -+ Once we have resolved .pdata and .xdata we can simply pass the -+ content of .pdata on to RtlAddFunctionTable and the OS will do -+ the rest. When we're unloading the object we have to unregister -+ them using RtlDeleteFunctionTable. -+*/ -+ - bool - ocRunInit_PEi386 ( ObjectCode *oc ) - { -- if (!oc || !oc->info || !oc->info->init) { -+ if (oc && oc->info && oc->info->init) { -+ return runInit(&oc->info->init); -+ } - return true; -- } -- -- int argc, envc; -- char **argv, **envv; -- -- getProgArgv(&argc, &argv); -- getProgEnvv(&envc, &envv); -- -- Section section = *oc->info->init; -- ASSERT(SECTIONKIND_INIT_ARRAY == section.kind); -- -- uint8_t *init_startC = section.start; -- init_t *init_start = (init_t*)init_startC; -- init_t *init_end = (init_t*)(init_startC + section.size); -- -- // ctors are run *backwards*! -- for (init_t *init = init_end - 1; init >= init_start; init--) -- (*init)(argc, argv, envv); -+} - -- freeProgEnvv(envc, envv); -- releaseOcInfo (oc); -- return true; -+bool ocRunFini_PEi386( ObjectCode *oc ) -+{ -+ if (oc && oc->info && oc->info->fini) { -+ return runFini(&oc->info->fini); -+ } -+ return true; - } - --SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) -+SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl, ObjectCode *dependent, SymType *type) - { - RtsSymbolInfo *pinfo; - -@@ -2075,24 +2333,21 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) - #if !defined(x86_64_HOST_ARCH) - zapTrailingAtSign ( lbl ); - #endif -- sym = lookupSymbolInDLLs(lbl); -+ if (type) { -+ // Unfortunately we can only assume that this is the case. Ideally -+ // the user would have given us an import library, which would allow -+ // us to determine the symbol type precisely. -+ *type = SYM_TYPE_CODE; -+ } -+ sym = lookupSymbolInDLLs(lbl, dependent); - return sym; // might be NULL if not found - } else { --#if defined(mingw32_HOST_OS) -- // If Windows, perform initialization of uninitialized -- // Symbols from the C runtime which was loaded above. -- // We do this on lookup to prevent the hit when -- // The symbol isn't being used. -- if (pinfo->value == (void*)0xBAADF00D) -- { -- char symBuffer[50]; -- sprintf(symBuffer, "_%s", lbl); -- static HMODULE msvcrt = NULL; -- if (!msvcrt) msvcrt = GetModuleHandle("msvcrt"); -- pinfo->value = GetProcAddress(msvcrt, symBuffer); -- } -- else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) -+ if (type) *type = pinfo->type; -+ -+ if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) - { -+ /* See Note [BFD import library]. */ -+ - // we only want to _update_ the type, if the dependent symbol is _not_ a dllInstance. - SymType depType = 0; - HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, &depType); -@@ -2100,7 +2355,6 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) - *type = depType; - return pinfo->value; - } -- - if (!dllInstance) - { - errorBelch("Unable to load import dll symbol `%s'. " -@@ -2113,42 +2367,34 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) - pinfo->value = GetProcAddress((HMODULE)dllInstance, lbl); - clearImportSymbol (pinfo->owner, lbl); - return pinfo->value; -+ } else { -+ if (dependent) { -+ // Add dependent as symbol's owner's dependency -+ ObjectCode *owner = pinfo->owner; -+ if (owner) { -+ // TODO: what does it mean for a symbol to not have an owner? -+ insertHashSet(dependent->dependencies, (W_)owner); -+ } -+ } -+ return loadSymbol(lbl, pinfo); - } --#endif -- return loadSymbol(lbl, pinfo); - } - } - - /* ----------------------------------------------------------------------------- -- * Section management. -+ * Debugging operations. - */ - -- /* See Note [Section alignment]. */ --static void --addCopySection (ObjectCode *oc, Section *s, SectionKind kind, -- SectionAlloc alloc, void* start, StgWord size) { -- char* pos = oc->info->image + oc->info->secBytesUsed; -- char* newStart = (char*)getAlignedMemory ((uint8_t*)pos, *s); -- memcpy (newStart, start, size); -- uintptr_t offset = (uintptr_t)newStart - (uintptr_t)oc->info->image; -- oc->info->secBytesUsed = (size_t)offset + size; -- start = newStart; -- -- /* Initially I wanted to apply the right memory protection to the region and -- which would leaved the gaps in between the regions as inaccessible memory -- to prevent exploits. -- The problem is protection is always on page granularity, so we can use -- less memory and be insecure or use more memory and be secure. -- For now, I've chosen lower memory over secure as the first pass, this -- doesn't regress security over the current implementation. After this -- patch I will change to different implementation that will fix the mem -- protection and keep the memory size small. */ -- addSection (s, kind, alloc, start, size, 0, 0, 0); --} -+typedef struct _SymX { SymbolName* name; uintptr_t loc; } SymX; - --/* ----------------------------------------------------------------------------- -- * Debugging operations. -- */ -+static int comp (const void * elem1, const void * elem2) -+{ -+ SymX f = *((SymX*)elem1); -+ SymX s = *((SymX*)elem2); -+ if (f.loc > s.loc) return 1; -+ if (f.loc < s.loc) return -1; -+ return 0; -+} - - pathchar* - resolveSymbolAddr_PEi386 (pathchar* buffer, int size, -@@ -2198,9 +2444,7 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, - wcscat (buffer, WSTR(" ")); - if (oc->archiveMemberName) - { -- pathchar* name = mkPath (oc->archiveMemberName); -- wcscat (buffer, name); -- stgFree (name); -+ wcscat (buffer, oc->archiveMemberName); - } - else - { -@@ -2277,7 +2521,6 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, - else if (obj) - { - /* Try to calculate from information inside the rts. */ -- typedef struct _SymX { SymbolName* name; uintptr_t loc; } SymX; - SymX* locs = stgCallocBytes (sizeof(SymX), obj->n_symbols, - "resolveSymbolAddr"); - int blanks = 0; -@@ -2297,14 +2540,6 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, - locs[i] = sx; - } - } -- int comp (const void * elem1, const void * elem2) -- { -- SymX f = *((SymX*)elem1); -- SymX s = *((SymX*)elem2); -- if (f.loc > s.loc) return 1; -- if (f.loc < s.loc) return -1; -- return 0; -- } - qsort (locs, obj->n_symbols, sizeof (SymX), comp); - uintptr_t key = (uintptr_t)symbol; - SymX* res = NULL; -diff --git a/rts/linker/PEi386.c.orig b/rts/linker/PEi386.c.orig -index da3946b..8622166 100644 ---- a/rts/linker/PEi386.c.orig -+++ b/rts/linker/PEi386.c.orig -@@ -55,11 +55,61 @@ - COFF_IMPORT_LIB and commonly has the file extension .lib - - * GNU BFD import format - The import library format defined and used by GNU -- tools. See note below. -+ tools and commonly has the file extension .dll.a . See note below. -+ -+ Note [The need for import libraries] -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ In its original incarnation, PE had no native support for dynamic linking. -+ Let's examine how dynamic linking is now implemented. Consider a simple -+ program with a reference to function and data symbols provided by a DLL: -+ -+ // myprogram.c -+ #include -+ int do_something() { -+ libfoo_function(); -+ return libfoo_data; -+ } -+ -+ The header file shipped with libfoo will look like the following: -+ -+ // libfoo.h -+ __declspec(dllimport) int libfoo_function(); -+ __declspec(dllimport) int libfoo_data; -+ -+ When the C compiler is compiling myprogram.c, it will see these dllimport -+ declarations and use them to produce a module definition (.def) file which -+ summarizes the symbols that we expect the DLL to export. This will look like: -+ -+ EXPORTS -+ libfoo_function -+ libfoo_data DATA -+ -+ The C compiler will pass this file to the `dlltool` utility, which will -+ generate an *import library*. The import library will contain -+ placeholder symbols (with names starting with `__imp_`), along with -+ instructions for the dynamic linker to fix-up these references to point to -+ the "real" symbol definition. -+ -+ For historical reasons involving lack of documentation, NDAs, and (probably) -+ Steve Balmer, there are two flavours of import flavours: -+ -+ * Native Windows-style import libraries. These typically bear the .lib file -+ extension and encode their relocation information in the `.idata` section. -+ Documentation for this format is not available -+ [here](https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#import-library-format). -+ These are handled in `checkAndLoadImportLibrary()` -+ -+ * GNU BFD-style import libraries. These typically have the .dll.a -+ extension and encode the relocation information in a set of sections -+ named `.idata$` where `` is an integer which encodes the section's -+ meaning. Somewhat ironically, despite being devised in response to the -+ native Windows format having no public documentation, there is no official -+ documentation for this format but Note [BFD import library] attempts to -+ summarize what we know. These are handled in `ocGetNames_PEi386()`. -+ - - Note [BFD import library] - ~~~~~~~~~~~~~~~~~~~~~~~~~ -- - On Windows, compilers don't link directly to dynamic libraries. - The reason for this is that the exports are not always by symbol, the - Import Address Table (IAT) also allows exports by ordinal number -@@ -78,7 +128,7 @@ - - Anyway, the Windows PE format specifies a simple and efficient format for - this: It's essentially a list, saying these X symbols can be found in DLL y. -- Commonly, y is a versioned name. e.g. liby_43.dll. This is an artifact of -+ Commonly, y is a versioned name. e.g. `liby_43.dll`. This is an artifact of - the days when Windows did not support side-by-side assemblies. So the - solution was to version the DLLs by renaming them to include explicit - version numbers, and to then use the import libraries to point to the right -@@ -89,35 +139,62 @@ - have created their own format. This format is either named using the suffix - .dll.a or .a depending on the tool that makes them. This format is - undocumented. However the source of dlltool.c in binutils is pretty handy to -- understant it. -+ understand it (see binutils/dlltool.c; grep for ".idata section description"). - - To understand the implementation in GHC, this is what is important: - -- the .idata section group is used to hold this information. An import library -+ The import library is generally an archive containing one object file for -+ each imported symbol. In addition, there is a "head" object, which contains -+ the name of the DLL which the symbols are imported from, among other things. -+ -+ The `.idata$` section group is used to hold this information. An import library - object file will always have these section groups, but the specific - configuration depends on what the purpose of the file is. They will also - never have a CODE or DATA section, though depending on the tool that creates - them they may have the section headers, which will mostly be empty. - -- You have to different possible configuration: -+ The import data sections consist of the following: -+ -+ * `.idata$2` contains the Import Directory Table (IDT), which contains an entry -+ for each imported DLL. Each entry contains: a reference to the DLL's name -+ (in `.idata$7`) and references to its entries in the ILT and IAT sections. -+ This is contained in the head object. -+ -+ * `.idata$6` contains the Hint Name Table (HNT). This is a table of -+ of (symbol ordinal, symbol name) pairs, which are referred to be the ILT -+ and IAT as described below. -+ -+ * `.idata$5` contains the Import Address Table (IAT). This consists of an -+ array of pointers (one array for each imported DLL) which the loader will -+ update to point to the target symbol identified by the hint referenced by -+ the corresponding ILT entry. Moreover, the IAT pointers' initial values -+ also point to the corresponding HNT entry. -+ -+ * `.idata$4` contains the Import Lookup Table (ILT). This contains an array -+ of references to HNT entries for each imported DLL. - -- 1) Those that define a redirection. In this case the .idata$7 section will -+ * `.idata$7` contains the names of the imported DLLs. This is contained -+ in the head object. -+ -+ You have two different possible configurations: -+ -+ 1) Those that define a redirection. In this case the `.idata$7` section will - contain the name of the actual dll to load. This will be the only content - of the section. In the symbol table, the last symbol will be the name - used to refer to the dll in the relocation tables. This name will always -- be in the format "symbol_name_iname", however when refered to, the format -- "_head_symbol_name" is used. -+ be in the format `symbol_name_iname`, however when referred to, the format -+ `_head_symbol_name` is used. - -- We record this symbol early on during GetNames and load the dll and use -+ We record this symbol early on during `ocGetNames` and load the dll and use - the module handle as the symbol address. - -- 2) Symbol definitions. In this case .idata$6 will contain the symbol to load. -- This is stored in the fixed format of 2-byte ordinals followed by a null -- terminated string with the symbol name. The ordinal is to be used when -- the dll does not export symbols by name. (NOTE: We don't currently -- support this in the runtime linker, but it's easy to add should it be -- needed). The last symbol in the symbol table of the section will contain -- the name symbol which contains the dll name to use to resolve the -+ 2) Symbol definitions. In this case the HNT (`.idata$6`) will contain the -+ symbol to load. This is stored in the fixed format of 2-byte ordinals -+ followed by (null-terminated) symbol name. The ordinal is -+ to be used when the DLL does not export symbols by name. (note: We don't -+ currently support this in the runtime linker, but it's easy to add should -+ it be needed). The last symbol in the symbol table of the section will -+ contain the name symbol which contains the dll name to use to resolve the - reference. - - As a technicality, this also means that the GCC format will allow us to use -@@ -126,50 +203,145 @@ - required for dynamic linking support for GHC. So the runtime linker now - supports this too. - -- Note [Memory allocation] -- ~~~~~~~~~~~~~~~~~~~~~~~~ - -- Previously on Windows we would use VirtualAlloc to allocate enough space for -- loading the entire object file into memory and keep it there for the duration -- until the entire object file has been unloaded. -- -- This has a couple of problems, first of, VirtualAlloc and the other Virtual -- functions interact directly with the memory manager. Requesting memory from -- VirtualAlloc will always return whole pages (32k), aligned on a 4k boundary. -- -- This means for an object file of size N kbytes, we're always wasting 32-N -- kbytes of memory. Nothing else can access this memory. -- -- Because of this we're now using HeapAlloc and other heap function to create -- a private heap. Another solution would have been to write our own memory -- manager to keep track of where we have free memory, but the private heap -- solution is simpler. -- -- The private heap is created with full rights just as the pages we used to get -- from VirtualAlloc (e.g. READ/WRITE/EXECUTE). In the end we end up using -- memory much more efficiently than before. The downside is that heap memory -- is always Allocated AND Committed, thus when the heap resizes the new size is -- committed. It becomes harder to see how much we're actually using. This makes -- it seem like for small programs that we're using more memory than before. -- Certainly a clean GHCi startup will have a slightly higher commit count. -- -- The second major change in how we allocate memory is that we no longer need -- the entire object file. We now allocate the object file using normal malloc -- and instead read bits from it. All tables are stored in the Object file info -- table and are discarded as soon as they are no longer needed, e.g. after -- relocation is finished. Only section data is kept around, but this data is -- copied into the private heap. -- -- The major knock on effect of this is that we have more memory to use in the -- sub 2GB range, which means that Template Haskell should fail a lot less as we -- will violate the small memory model much less than before. -- -- Note [Section alignment] -+ Example: Dynamic code references -+ -------------------------------- -+ To see what such an import library looks like, let's first start with the case -+ of a function (e.g. `libfoo_function` above) with bind-now semantics (lazy-loading -+ will look much different). The import library will contain the following: -+ -+ .section .text -+ # This stub (which Windows calls a thunk) is what calls to -+ # libfoo_function will hit if the symbol isn't declared with -+ # __declspec(dllimport) -+ libfoo_function: -+ jmp *0x0(%rip) -+ .quad __imp_libfoo_function -+ -+ .section .idata$5 # IAT -+ # This is the location which the loader will -+ # update to point to the definition -+ # of libfoo_function -+ __imp_libfoo_function: -+ .quad hint1 - __image_base__ -+ -+ .section .idata$4 # ILT -+ # This (and hint1 below) is what tells the -+ # loader where __imp_libfoo_function should point -+ ilt1: -+ .quad hint1 - __image_base__ -+ -+ .section .idata$6 # HNT -+ hint1: -+ .short ORDINAL_OF_libfoo_function -+ .asciiz "libfoo_function" -+ -+ To handle a reference to an IAT entry like `__imp_libfoo_function`, the GHC -+ linker will (in `lookupSymbolInDLLs`) first strip off the `__imp_` prefix to -+ find the name of the referenced dynamic symbol. It then resolves the -+ symbol's address and allocates an `IndirectAddr` where it can place the -+ address, which it will return as the resolution of the `___libfoo_function`. -+ -+ Example: Dynamic data references -+ -------------------------------- -+ Let's now consider the import library for a data symbol. This is essentially -+ equivalent to the code case, but without the need to emit a thunk: -+ -+ .section .idata$5 # IAT -+ __imp_libfoo_data: -+ .quad hint2 - __image_base__ -+ -+ .section .idata$4 # ILT -+ ilt2: -+ .quad hint2 - __image_base__ -+ -+ .section .idata$6 # ILT -+ hint2: -+ .short ORDINAL_OF_libfoo_data -+ .asciiz "libfoo_data" -+ -+ -+ Note [GHC Linking model and import libraries] -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ The above describes how import libraries work for static linking. -+ Fundamentally this does not apply to dynamic linking as we do in GHC. -+ The issue is two-folds: -+ -+ 1. In the linking model above it is expected that the .idata sections be -+ materialized into PLTs during linking. However in GHC we never create -+ PLTs, but have out own mechanism for this which is the jump island -+ machinery. This is required for efficiency. For one materializing the -+ .idata sections would result in wasting pages. We'd use one page for -+ every ~100 bytes. This is extremely wasteful and also fragments the -+ memory. Secondly the dynamic linker is lazy. We only perform the final -+ loading if the symbol is used, however with an import library we can -+ discard the actual OC immediately after reading it. This prevents us from -+ keeping ~1k in memory per symbol for no reason. -+ -+ 2. GHC itself does not observe symbol visibility correctly during NGC. This -+ in itself isn't an academic exercise. The issue stems from GHC using one -+ mechanism for providing two incompatible linking modes: -+ a) The first mode is generating Haskell shared libraries which are -+ intended to be used by other Haskell code. This requires us to -+ export the info, data and closures. For this GHC just re-exports -+ all symbols. But it doesn't correcly mark data/code. Symbol -+ visibility is overwritten by telling the linker to export all -+ symbols. -+ b) The second code is producing code that's supposed to be call-able -+ through a C insterface. This in reality does not require the -+ export of closures and info tables. But also does not require the -+ inclusion of the RTS inside the DLL. Hover this is done today -+ because we don't properly have the RTS as a dynamic library. -+ i.e. GHC does not only export symbols denoted by foreign export. -+ Also GHC should depend on an RTS library, but at the moment it -+ cannot because of TNTC is incompatible with dynamic linking. -+ -+ These two issues mean that for GHC we need to take a different approach -+ to handling import libraries. For normal C libraries we have proper -+ differentiation between CODE and DATA. For GHC produced import libraries -+ we do not. As such the SYM_TYPE_DUP_DISCARD tells the linker that if a -+ duplicate symbol is found, and we were going to discard it anyway, just do -+ so quitely. This works because the RTS symbols themselves are provided by -+ the currently loaded RTS as built-in symbols. -+ -+ Secondly we cannot rely on a text symbol being available. As such we -+ should only depend on the symbols as defined in the .idata sections, -+ otherwise we would not be able to correctly link against GHC produced -+ import libraries. -+ -+ Note [Memory allocation] - ~~~~~~~~~~~~~~~~~~~~~~~~ -+ The loading of an object begins in `preloadObjectFile`, which allocates a buffer, -+ `oc->image`, into which the object file is read. It then calls `ocVerifyImage`, -+ where we traverse the object file's header and populate `ObjectCode.sections`. -+ Specifically, we create a Section for each of the object's sections such -+ that: -+ -+ * the `.start` field points to its data in the mapped image -+ * the `.size` field reflects its intended size -+ * the .`info` field contains a `SectionFormatField` with other information -+ from its section header entry (namely `VirtualSize`, `VirtualAddress`, and -+ `Characteristics`) -+ -+ We then proceed to `ocGetNames`, where we again walk the section table header -+ and determine which sections need to be mapped and how (e.g. as readable-writable or -+ readable-executable). We then allocate memory for each section using the -+ appropriate m32 allocator and, where necessary, copy the data from -+ `section.start` (which points to the section in `oc->image`) -+ into the new allocation. Finally, `addSection()` updates the `section.start` field -+ to reflect the section's new home. In addition, we also allocate space for -+ the global BSS section. -+ -+ At this point we have no further need for the preloaded image buffer, -+ `oc->image` and therefore free it. -+ -+ Having populated the sections, we can proceed to add the object's symbols to -+ the symbol table. This is a matter of walking the object file's symbol table, -+ computing the symbol's address, and calling `ghciInsertSymbolTable`. -+ -+ Finally, we enter `ocResolve`, where we resolve relocations and and allocate -+ jump islands (using the m32 allocator for backing storage) as necessary. - -- The Windows linker aligns memory to it's section alignment requirement by -- aligning it during the copying to the private heap. We also ensure that the -- trampoline "region" we reserve is 8 bytes aligned. - */ - - #include "Rts.h" -@@ -184,12 +356,11 @@ - - #include "RtsUtils.h" - #include "RtsSymbolInfo.h" --#include "GetEnv.h" - #include "CheckUnload.h" -+#include "LinkerInternals.h" - #include "linker/PEi386.h" - #include "linker/PEi386Types.h" - #include "linker/SymbolExtras.h" --#include "LinkerInternals.h" - - #include - #include /* SHGetFolderPathW */ -@@ -208,7 +379,8 @@ static size_t makeSymbolExtra_PEi386( - ObjectCode* oc, - uint64_t index, - size_t s, -- SymbolName* symbol); -+ SymbolName* symbol, -+ SymType sym_type); - #endif - - static void addDLLHandle( -@@ -226,34 +398,14 @@ static bool checkIfDllLoaded( - static uint32_t getSectionAlignment( - Section section); - --static uint8_t* getAlignedMemory( -- uint8_t* value, -- Section section); -- - static size_t getAlignedValue( - size_t value, - Section section); - --static void addCopySection( -- ObjectCode *oc, -- Section *s, -- SectionKind kind, -- SectionAlloc alloc, -- void* start, -- StgWord size); -- - static void releaseOcInfo( - ObjectCode* oc); - --/* Add ld symbol for PE image base. */ --#if defined(__GNUC__) --#define __ImageBase __MINGW_LSYMBOL(_image_base__) --#endif -- --/* Get the base of the module. */ --/* This symbol is defined by ld. */ --extern IMAGE_DOS_HEADER __ImageBase; --#define __image_base (void*)((HINSTANCE)&__ImageBase) -+static SymbolAddr *lookupSymbolInDLLs ( const SymbolName* lbl, ObjectCode *dependent ); - - const Alignments pe_alignments[] = { - { IMAGE_SCN_ALIGN_1BYTES , 1 }, -@@ -274,8 +426,6 @@ const Alignments pe_alignments[] = { - - const int pe_alignments_cnt = sizeof (pe_alignments) / sizeof (Alignments); - const int default_alignment = 8; --const int initHeapSizeMB = 15; --static HANDLE code_heap = NULL; - - /* See Note [_iob_func symbol] - In order to emulate __iob_func the memory location needs to point the -@@ -283,72 +433,32 @@ static HANDLE code_heap = NULL; - the pointer as a redirect. Essentially it's a DATA DLL reference. */ - const void* __rts_iob_func = (void*)&__acrt_iob_func; - --/* Low Fragmentation Heap, try to prevent heap from increasing in size when -- space can simply be reclaimed. These are enums missing from mingw-w64's -- headers. */ --#define HEAP_LFH 2 --#define HeapOptimizeResources 3 -- --void initLinker_PEi386() -+void initLinker_PEi386(void) - { - if (!ghciInsertSymbolTable(WSTR("(GHCi/Ld special symbols)"), -- symhash, "__image_base__", __image_base, HS_BOOL_TRUE | (HS_BOOL_FALSE << 1), NULL)) { -+ symhash, "__image_base__", -+ GetModuleHandleW (NULL), HS_BOOL_TRUE, -+ SYM_TYPE_CODE, NULL)) { - barf("ghciInsertSymbolTable failed"); - } - - #if defined(mingw32_HOST_OS) - addDLLHandle(WSTR("*.exe"), GetModuleHandle(NULL)); -- /* -- * Most of these are included by base, but GCC always includes them -- * So lets make sure we always have them too. -- * -- * In most cases they would have been loaded by the -- * addDLLHandle above. -- */ -- addDLL(WSTR("msvcrt")); -- addDLL(WSTR("kernel32")); -- addDLL(WSTR("advapi32")); -- addDLL(WSTR("shell32")); -- addDLL(WSTR("user32")); - #endif - -- /* See Note [Memory allocation]. */ -- /* Create a private heap which we will use to store all code and data. */ -- SYSTEM_INFO sSysInfo; -- GetSystemInfo(&sSysInfo); -- code_heap = HeapCreate (HEAP_CREATE_ENABLE_EXECUTE, -- initHeapSizeMB * sSysInfo.dwPageSize , 0); -- if (!code_heap) -- barf ("Could not create private heap during initialization. Aborting."); -- -- /* Set some flags for the new code heap. */ -- HeapSetInformation(code_heap, HeapEnableTerminationOnCorruption, NULL, 0); -- unsigned long HeapInformation = HEAP_LFH; -- HeapSetInformation(code_heap, HeapEnableTerminationOnCorruption, -- &HeapInformation, sizeof(HeapInformation)); -- HeapSetInformation(code_heap, HeapOptimizeResources, NULL, 0); -- - /* Register the cleanup routine as an exit handler, this gives other exit handlers - a chance to run which may need linker information. Exit handlers are ran in - reverse registration order so this needs to be before the linker loads anything. */ - atexit (exitLinker_PEi386); - } - --void exitLinker_PEi386() -+void exitLinker_PEi386(void) - { -- /* See Note [Memory allocation]. */ -- if (code_heap) { -- HeapDestroy (code_heap); -- code_heap = NULL; -- } - } - - /* A list thereof. */ - static OpenedDLL* opened_dlls = NULL; - --/* A list thereof. */ --static IndirectAddr* indirects = NULL; -- - /* Adds a DLL instance to the list of DLLs in which to search for symbols. */ - static void addDLLHandle(pathchar* dll_name, HINSTANCE instance) { - -@@ -431,33 +541,34 @@ void freePreloadObjectFile_PEi386(ObjectCode *oc) - } - - if (oc->info) { -- if (oc->info->image) { -- HeapFree(code_heap, 0, oc->info->image); -- oc->info->image = NULL; -+ /* Release the unwinder information. -+ See Note [Exception Unwinding]. */ -+ if (oc->info->pdata) { -+ if (!RtlDeleteFunctionTable (oc->info->pdata->start)) -+ debugBelch ("Unable to remove Exception handlers for %" PATH_FMT "\n", -+ oc->fileName); -+ oc->info->xdata = NULL; -+ oc->info->pdata = NULL; - } -- if (oc->info->ch_info) -+ -+ if (oc->info->ch_info) { - stgFree (oc->info->ch_info); -+ } - stgFree (oc->info); - oc->info = NULL; - } -- -- IndirectAddr *ia, *ia_next; -- ia = indirects; -- while (ia != NULL) { -- ia_next = ia->next; -- stgFree(ia); -- ia = ia_next; -- } -- indirects = NULL; - } - -+// Free oc->info and oc->sections[i]->info. - static void releaseOcInfo(ObjectCode* oc) { - if (!oc) return; - - if (oc->info) { -+ freeInitFiniList(oc->info->init); -+ freeInitFiniList(oc->info->fini); - stgFree (oc->info->ch_info); -- stgFree (oc->info->str_tab); - stgFree (oc->info->symbols); -+ stgFree (oc->info->str_tab); - stgFree (oc->info); - oc->info = NULL; - } -@@ -533,7 +644,7 @@ COFF_OBJ_TYPE getObjectType ( char* image, pathchar* fileName ) - *************/ - COFF_HEADER_INFO* getHeaderInfo ( ObjectCode* oc ) - { -- COFF_OBJ_TYPE coff_type = getObjectType (oc->image, oc->fileName); -+ COFF_OBJ_TYPE coff_type = getObjectType (oc->image, OC_INFORMATIVE_FILENAME(oc)); - - COFF_HEADER_INFO* info - = stgMallocBytes (sizeof(COFF_HEADER_INFO), "getHeaderInfo"); -@@ -589,8 +700,16 @@ size_t getSymbolSize ( COFF_HEADER_INFO *info ) - } - } - -+// Constants which may be returned by getSymSectionNumber. -+// See https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-number-values -+#define PE_SECTION_UNDEFINED ((uint32_t) 0) -+#define PE_SECTION_ABSOLUTE ((uint32_t) -1) -+#define PE_SECTION_DEBUG ((uint32_t) -2) -+ -+// Returns either PE_SECTION_{UNDEFINED,ABSOLUTE,DEBUG} or the (one-based) -+// section number of the given symbol. - __attribute__ ((always_inline)) inline --int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) -+uint32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) - { - ASSERT(info); - ASSERT(sym); -@@ -599,7 +718,16 @@ int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ) - case COFF_ANON_BIG_OBJ: - return sym->ex.SectionNumber; - default: -- return sym->og.SectionNumber; -+ // Take care to catch reserved values; see #22941. -+ switch (sym->og.SectionNumber) { -+ case IMAGE_SYM_UNDEFINED: return PE_SECTION_UNDEFINED; -+ case IMAGE_SYM_ABSOLUTE : return PE_SECTION_ABSOLUTE; -+ case IMAGE_SYM_DEBUG: return PE_SECTION_DEBUG; -+ default: -+ // Ensure that we catch if SectionNumber is made wider in the future -+ ASSERT(sizeof(sym->og.SectionNumber) == 2); -+ return (uint16_t) sym->og.SectionNumber; -+ } - } - } - -@@ -744,7 +872,7 @@ addDLL_PEi386( pathchar *dll_name, HINSTANCE *loaded ) - error: - stgFree(buf); - -- char* errormsg = malloc(sizeof(char) * 80); -+ char* errormsg = stgMallocBytes(sizeof(char) * 80, "addDLL_PEi386"); - snprintf(errormsg, 80, "addDLL: %" PATH_FMT " or dependencies not loaded. (Win32 error %lu)", dll_name, GetLastError()); - /* LoadLibrary failed; return a ptr to the error msg. */ - return errormsg; -@@ -754,7 +882,7 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) - { - const unsigned int init_buf_size = 1024; - unsigned int bufsize = init_buf_size; -- wchar_t* result = malloc(sizeof(wchar_t) * bufsize); -+ wchar_t* result = stgMallocBytes(sizeof(wchar_t) * bufsize, "findSystemLibrary_PEi386"); - DWORD wResult = SearchPathW(NULL, dll_name, NULL, bufsize, result, NULL); - - if (wResult > bufsize) { -@@ -764,7 +892,7 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) - - - if (!wResult) { -- free(result); -+ stgFree(result); - return NULL; - } - -@@ -773,68 +901,18 @@ pathchar* findSystemLibrary_PEi386( pathchar* dll_name ) - - HsPtr addLibrarySearchPath_PEi386(pathchar* dll_path) - { -- HINSTANCE hDLL = LoadLibraryW(L"Kernel32.DLL"); -- LPAddDLLDirectory AddDllDirectory = (LPAddDLLDirectory)(void*)GetProcAddress((HMODULE)hDLL, "AddDllDirectory"); -- -- HsPtr result = NULL; -- -- const unsigned int init_buf_size = 4096; -- int bufsize = init_buf_size; -- -- // Make sure the path is an absolute path -- WCHAR* abs_path = malloc(sizeof(WCHAR) * init_buf_size); -- DWORD wResult = GetFullPathNameW(dll_path, bufsize, abs_path, NULL); -- if (!wResult){ -- IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError())); -- } -- else if (wResult > init_buf_size) { -- abs_path = realloc(abs_path, sizeof(WCHAR) * wResult); -- if (!GetFullPathNameW(dll_path, bufsize, abs_path, NULL)) { -- IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError())); -- } -- } -- -- if (AddDllDirectory) { -- result = AddDllDirectory(abs_path); -- } -- else -- { -- warnMissingKBLibraryPaths(); -- WCHAR* str = malloc(sizeof(WCHAR) * init_buf_size); -- wResult = GetEnvironmentVariableW(L"PATH", str, bufsize); -- -- if (wResult > init_buf_size) { -- str = realloc(str, sizeof(WCHAR) * wResult); -- bufsize = wResult; -- wResult = GetEnvironmentVariableW(L"PATH", str, bufsize); -- if (!wResult) { -- sysErrorBelch("addLibrarySearchPath[GetEnvironmentVariableW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError()); -- } -- } -- -- bufsize = wResult + 2 + pathlen(abs_path); -- wchar_t* newPath = malloc(sizeof(wchar_t) * bufsize); -- -- wcscpy(newPath, abs_path); -- wcscat(newPath, L";"); -- wcscat(newPath, str); -- if (!SetEnvironmentVariableW(L"PATH", (LPCWSTR)newPath)) { -- sysErrorBelch("addLibrarySearchPath[SetEnvironmentVariableW]: %" PATH_FMT " (Win32 error %lu)", abs_path, GetLastError()); -- } -- -- free(newPath); -- free(abs_path); -- -- return str; -- } -+ // Make sure the path is an absolute path in UNC-style to ensure that we -+ // aren't subject to the MAX_PATH restriction. See #21059. -+ wchar_t *abs_path = __rts_create_device_name(dll_path); - -+ HsPtr result = AddDllDirectory(abs_path); - if (!result) { - sysErrorBelch("addLibrarySearchPath: %" PATH_FMT " (Win32 error %lu)", abs_path, GetLastError()); -- free(abs_path); -+ stgFree(abs_path); - return NULL; - } - -- free(abs_path); -+ stgFree(abs_path); - return result; - } - -@@ -843,19 +921,8 @@ bool removeLibrarySearchPath_PEi386(HsPtr dll_path_index) - bool result = false; - - if (dll_path_index != NULL) { -- HINSTANCE hDLL = LoadLibraryW(L"Kernel32.DLL"); -- LPRemoveDLLDirectory RemoveDllDirectory = (LPRemoveDLLDirectory)(void*)GetProcAddress((HMODULE)hDLL, "RemoveDllDirectory"); -- -- if (RemoveDllDirectory) { -- result = RemoveDllDirectory(dll_path_index); -- // dll_path_index is now invalid, do not use it after this point. -- } -- else -- { -- warnMissingKBLibraryPaths(); -- result = SetEnvironmentVariableW(L"PATH", (LPCWSTR)dll_path_index); -- free(dll_path_index); -- } -+ result = RemoveDllDirectory(dll_path_index); -+ // dll_path_index is now invalid, do not use it after this point. - - if (!result) { - sysErrorBelch("removeLibrarySearchPath: (Win32 error %lu)", GetLastError()); -@@ -883,16 +950,6 @@ static uint32_t getSectionAlignment( - return default_alignment; - } - --/* ---------------------- -- * return a memory location aligned to the section requirements -- */ --static uint8_t* getAlignedMemory( -- uint8_t* value, Section section) { -- uint32_t alignment = getSectionAlignment(section); -- uintptr_t mask = (uintptr_t)alignment - 1; -- return (uint8_t*)(((uintptr_t)value + mask) & ~mask); --} -- - /* ---------------------- - * return a value aligned to the section requirements - */ -@@ -1084,7 +1141,7 @@ zapTrailingAtSign ( SymbolName* sym ) - #endif - - SymbolAddr* --lookupSymbolInDLLs ( const SymbolName* lbl ) -+lookupSymbolInDLLs ( const SymbolName* lbl, ObjectCode *dependent ) - { - OpenedDLL* o_dll; - SymbolAddr* sym; -@@ -1092,17 +1149,13 @@ lookupSymbolInDLLs ( const SymbolName* lbl ) - for (o_dll = opened_dlls; o_dll != NULL; o_dll = o_dll->next) { - /* debugBelch("look in %ls for %s\n", o_dll->name, lbl); */ - -- if (wcsncmp(o_dll->name,WSTR("ucrtbase.dll"),wcslen(WSTR("ucrtbase.dll"))) == 0) { -- IF_DEBUG(linker, debugBelch("warning: ignoring " PATH_FMT "\n", o_dll->name)); -- continue; -- } -- - sym = GetProcAddress(o_dll->instance, lbl+STRIP_LEADING_UNDERSCORE); - if (sym != NULL) { - /*debugBelch("found %s in %s\n", lbl+1,o_dll->name);*/ - return sym; - } - -+ // TODO: Drop this - /* Ticket #2283. - Long description: http://support.microsoft.com/kb/132044 - tl;dr: -@@ -1114,15 +1167,15 @@ lookupSymbolInDLLs ( const SymbolName* lbl ) - sym = GetProcAddress(o_dll->instance, - lbl + 6 + STRIP_LEADING_UNDERSCORE); - if (sym != NULL) { -- IndirectAddr* ret; -- ret = stgMallocBytes( sizeof(IndirectAddr), "lookupSymbolInDLLs" ); -- ret->addr = sym; -- ret->next = indirects; -- indirects = ret; -+ SymbolAddr** indirect = m32_alloc(dependent->rw_m32, sizeof(SymbolAddr*), 8); -+ if (indirect == NULL) { -+ barf("lookupSymbolInDLLs: Failed to allocation indirection"); -+ } -+ *indirect = sym; - IF_DEBUG(linker, - debugBelch("warning: %s from %S is linked instead of %s\n", - lbl+6+STRIP_LEADING_UNDERSCORE, o_dll->name, lbl)); -- return (void*) & ret->addr; -+ return (void*) indirect; - } - } - -@@ -1213,10 +1266,8 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) - oc->n_sections = info->numberOfSections + 1; - oc->info = stgCallocBytes (sizeof(struct ObjectCodeFormatInfo), 1, - "ocVerifyImage_PEi386(info)"); -- oc->info->secBytesTotal = 0; -- oc->info->secBytesUsed = 0; - oc->info->init = NULL; -- oc->info->finit = NULL; -+ oc->info->fini = NULL; - oc->info->ch_info = info; - - /* Copy the tables over from object-file. Copying these allows us to -@@ -1285,31 +1336,14 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) - memcpy (section->info->relocs, reltab + relocs_offset, - noRelocs * sizeof (COFF_reloc)); - } -- -- oc->info->secBytesTotal += getAlignedValue (section->size, *section); - } - - /* Initialize the last section's info field which contains the .bss -- section, it doesn't need an info so set it to NULL. */ -+ section, the .info of which will be initialized by ocGetNames. Discard the -+ .info that we computed above. */ -+ stgFree(sections[info->numberOfSections].info); - sections[info->numberOfSections].info = NULL; - -- /* Calculate space for trampolines nearby. -- We get back 8-byte aligned memory (is that guaranteed?), but -- the offsets to the sections within the file are all 4 mod 8 -- (is that guaranteed?). We therefore need to offset the image -- by 4, so that all the pointers are 8-byte aligned, so that -- pointer tagging works. */ -- /* For 32-bit case we don't need this, hence we use macro -- PEi386_IMAGE_OFFSET, which equals to 4 for 64-bit case and 0 for -- 32-bit case. */ -- /* We allocate trampolines area for all symbols right behind -- image data, aligned on 8. */ -- oc->info->trampoline -- = (PEi386_IMAGE_OFFSET + 2 * default_alignment -- + oc->info->secBytesTotal) & ~0x7; -- oc->info->secBytesTotal -- = oc->info->trampoline + info->numberOfSymbols * sizeof(SymbolExtra); -- - /* No further verification after this point; only debug printing. */ - i = 0; - IF_DEBUG(linker, i=1); -@@ -1363,6 +1397,10 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) - return false; - } - -+ i = 0; -+ IF_DEBUG(linker_verbose, i=1); -+ if (i == 0) return true; -+ - /* Print the section table. */ - debugBelch("\n" ); - for (i = 0; i < info->numberOfSections; i++) { -@@ -1457,113 +1495,109 @@ bool - ocGetNames_PEi386 ( ObjectCode* oc ) - { - bool has_code_section = false; -- -- SymbolName* sname = NULL; -- SymbolAddr* addr = NULL; -- unsigned int i; -- - COFF_HEADER_INFO *info = oc->info->ch_info; - - /* Copy section information into the ObjectCode. */ - -- for (i = 0; i < info->numberOfSections; i++) { -- uint8_t* start; -- uint8_t* end; -- uint32_t sz; -- -+ for (unsigned int i = 0; i < info->numberOfSections; i++) { - /* By default consider all section as CODE or DATA, - which means we want to load them. */ - SectionKind kind = SECTIONKIND_CODE_OR_RODATA; -- Section section = oc->sections[i]; -+ Section *section = &oc->sections[i]; -+ uint32_t alignment = getSectionAlignment(*section); - -- IF_DEBUG(linker, debugBelch("section name = %s\n", section.info->name )); -+ // These will be computed below and determine how we will handle the -+ // section -+ size_t sz = section->size; -+ bool do_copy = true; -+ bool do_zero = false; -+ -+ IF_DEBUG(linker, debugBelch("section name = %s (%x)\n", section->info->name, section->info->props )); - - /* The PE file section flag indicates whether the section - contains code or data. */ -- if (section.info->props & IMAGE_SCN_CNT_CODE) { -- has_code_section = has_code_section || section.size > 0; -+ if (section->info->props & IMAGE_SCN_CNT_CODE) { -+ has_code_section = has_code_section || section->size > 0; - kind = SECTIONKIND_CODE_OR_RODATA; - } - -- if (section.info->props & IMAGE_SCN_CNT_INITIALIZED_DATA) -- kind = SECTIONKIND_CODE_OR_RODATA; -+ if (section->info->props & IMAGE_SCN_MEM_WRITE) { -+ kind = SECTIONKIND_RWDATA; -+ } - - /* Check next if it contains any uninitialized data */ -- if (section.info->props & IMAGE_SCN_CNT_UNINITIALIZED_DATA) -+ if (section->info->props & IMAGE_SCN_CNT_UNINITIALIZED_DATA) { - kind = SECTIONKIND_RWDATA; -+ do_copy = false; -+ } - - /* Finally check if it can be discarded. - This will also ignore .debug sections */ -- if ( section.info->props & IMAGE_SCN_MEM_DISCARDABLE -- || section.info->props & IMAGE_SCN_LNK_REMOVE) -+ if ( section->info->props & IMAGE_SCN_MEM_DISCARDABLE -+ || section->info->props & IMAGE_SCN_LNK_REMOVE) { - kind = SECTIONKIND_OTHER; -+ } - -- if (0==strncmp(".ctors", section.info->name, 6)) { -+ if (0==strncmp(".ctors", section->info->name, 6)) { -+ /* N.B. a compilation unit may have more than one .ctor section; we -+ * must run them all. See #21618 for a case where this happened */ -+ uint32_t prio; -+ if (sscanf(section->info->name, ".ctors.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ // .ctors/.dtors are executed in reverse order: higher numbers are -+ // executed first -+ prio = 0xffff - prio; -+ addInitFini(&oc->info->init, &oc->sections[i], INITFINI_CTORS, prio); - kind = SECTIONKIND_INIT_ARRAY; -- oc->info->init = &oc->sections[i]; - } - -- if (0==strncmp(".dtors", section.info->name, 6)) { -- kind = SECTIONKIND_FINIT_ARRAY; -- oc->info->finit = &oc->sections[i]; -+ if (0==strncmp(".dtors", section->info->name, 6)) { -+ uint32_t prio; -+ if (sscanf(section->info->name, ".dtors.%d", &prio) != 1) { -+ // Sections without an explicit priority are run last -+ prio = 0; -+ } -+ // .ctors/.dtors are executed in reverse order: higher numbers are -+ // executed first -+ prio = 0xffff - prio; -+ addInitFini(&oc->info->fini, &oc->sections[i], INITFINI_DTORS, prio); -+ kind = SECTIONKIND_FINI_ARRAY; - } - -- if ( 0 == strncmp(".stab" , section.info->name, 5 ) -- || 0 == strncmp(".stabstr" , section.info->name, 8 ) -- || 0 == strncmp(".pdata" , section.info->name, 6 ) -- || 0 == strncmp(".xdata" , section.info->name, 6 ) -- || 0 == strncmp(".debug" , section.info->name, 6 ) -- || 0 == strncmp(".rdata$zzz", section.info->name, 10)) -+ if ( 0 == strncmp(".stab" , section->info->name, 5 ) -+ || 0 == strncmp(".stabstr" , section->info->name, 8 ) -+ || 0 == strncmp(".debug" , section->info->name, 6 ) -+ || 0 == strncmp(".rdata$zzz", section->info->name, 10)) - kind = SECTIONKIND_DEBUG; - -- if (0==strncmp(".idata", section.info->name, 6)) -- kind = SECTIONKIND_IMPORT; -+ /* Exception Unwind information. See Note [Exception Unwinding]. */ -+ if (0 == strncmp(".xdata" , section->info->name, 6 )) { -+ kind = SECTIONKIND_EXCEPTION_UNWIND; -+ } - -- /* See Note [BFD import library]. */ -- if (0==strncmp(".idata$7", section.info->name, 8)) -- kind = SECTIONKIND_IMPORT_LIBRARY; -+ /* Exception handler tables, See Note [Exception Unwinding]. */ -+ if (0 == strncmp(".pdata" , section->info->name, 6 )) { -+ kind = SECTIONKIND_EXCEPTION_TABLE; -+ } - -- if (0==strncmp(".idata$6", section.info->name, 8)) { -- /* The first two bytes contain the ordinal of the function -- in the format of lowpart highpart. The two bytes combined -- for the total range of 16 bits which is the function export limit -- of DLLs. */ -- sname = (SymbolName*)section.start+2; -- COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; -- addr = get_sym_name( getSymShortName (info, sym), oc); -+ if (0==strncmp(".idata", section->info->name, 6)) { -+ kind = SECTIONKIND_IMPORT; -+ } - -- IF_DEBUG(linker, -- debugBelch("addImportSymbol `%s' => `%s'\n", -- sname, (char*)addr)); -- /* We're going to free the any data associated with the import -- library without copying the sections. So we have to duplicate -- the symbol name and values before the pointers become invalid. */ -- sname = strdup (sname); -- addr = strdup (addr); -- if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, -- addr, HS_BOOL_FALSE | (HS_BOOL_FALSE << 1), oc)) { -- releaseOcInfo (oc); -- stgFree (oc->image); -- oc->image = NULL; -- return false; -- } -- setImportSymbol (oc, sname); - -- /* Don't process this oc any futher. Just exit. */ -- oc->n_symbols = 0; -- oc->symbols = NULL; -- stgFree (oc->image); -- oc->image = NULL; -- releaseOcInfo (oc); -- oc->status = OBJECT_DONT_RESOLVE; -- return true; -+ /* See Note [BFD import library]. */ -+ if (0==strncmp(".idata$7", section->info->name, 8)) { -+ kind = SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD; - } - -- /* Allocate space for any (local, anonymous) .bss sections. */ -- if (0==strncmp(".bss", section.info->name, 4)) { -- uint32_t bss_sz; -- uint8_t* zspace; -+ if (0==strncmp(".idata$6", section->info->name, 8)) { -+ kind = SECTIONKIND_BFD_IMPORT_LIBRARY; -+ } - -+ /* Allocate space for any (local, anonymous) .bss sections. */ -+ if (0==strncmp(".bss", section->info->name, 4)) { - /* sof 10/05: the PE spec text isn't too clear regarding what - * the SizeOfRawData field is supposed to hold for object - * file sections containing just uninitialized data -- for executables, -@@ -1583,42 +1617,49 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - * - * TODO: check if this comment is still relevant. - */ -- if (section.info->virtualSize == 0 && section.size == 0) continue; -+ if (section->info->virtualSize == 0 && section->size == 0) { -+ IF_DEBUG(linker_verbose, debugBelch("skipping empty .bss section\n")); -+ continue; -+ } -+ - /* This is a non-empty .bss section. - Allocate zeroed space for it */ -- bss_sz = section.info->virtualSize; -- if (bss_sz < section.size) { bss_sz = section.size; } -- zspace = stgCallocBytes(1, bss_sz, "ocGetNames_PEi386(anonymous bss)"); -- oc->sections[i].start = zspace; -- oc->sections[i].size = bss_sz; -- section = oc->sections[i]; -- /* debugBelch("BSS anon section at 0x%x\n", zspace); */ -+ kind = SECTIONKIND_RWDATA; -+ do_zero = true; -+ do_copy = false; -+ IF_DEBUG(linker_verbose, debugBelch("BSS anon section\n")); - } - -- /* Allocate space for the sections since we have a real oc. -- We initially mark it the region as non-accessible. But will adjust -- as we go along. */ -- if (!oc->info->image) { -- /* See Note [Memory allocation]. */ -- ASSERT(code_heap); -- oc->info->image -- = HeapAlloc (code_heap, HEAP_ZERO_MEMORY, oc->info->secBytesTotal); -- if (!oc->info->image) -- barf ("Could not allocate any heap memory from private heap."); -+ CHECK(section->size == 0 || section->info->virtualSize == 0); -+ if (sz < section->info->virtualSize) { -+ sz = section->info->virtualSize; - } - -- ASSERT(section.size == 0 || section.info->virtualSize == 0); -- sz = section.size; -- if (sz < section.info->virtualSize) sz = section.info->virtualSize; -+ // Ignore these section types -+ if (kind == SECTIONKIND_OTHER || sz == 0) { -+ continue; -+ } - -- start = section.start; -- end = start + sz; -+ // Allocate memory for the section. -+ uint8_t *start; -+ if (section->info->props & IMAGE_SCN_MEM_WRITE) { -+ start = m32_alloc(oc->rw_m32, sz, alignment); -+ } else { -+ start = m32_alloc(oc->rx_m32, sz, alignment); -+ } -+ if (!start) { -+ barf("Could not allocate any heap memory from private heap (requested %" FMT_SizeT " bytes).", -+ sz); -+ } - -- if (kind != SECTIONKIND_OTHER && end > start) { -- /* See Note [Section alignment]. */ -- addCopySection(oc, &oc->sections[i], kind, SECTION_NOMEM, start, sz); -- addProddableBlock(oc, oc->sections[i].start, sz); -+ if (do_copy) { -+ memcpy(start, section->start, sz); -+ } else if (do_zero) { -+ memset(start, 0, sz); - } -+ -+ addSection(section, kind, SECTION_NOMEM, start, sz, 0, 0, 0); -+ addProddableBlock(oc, oc->sections[i].start, sz); - } - - /* Copy exported symbols into the ObjectCode. */ -@@ -1629,9 +1670,9 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - - /* Work out the size of the global BSS section */ - StgWord globalBssSize = 0; -- for (i=0; i < info->numberOfSymbols; i++) { -+ for (unsigned int i=0; i < info->numberOfSymbols; i++) { - COFF_symbol* sym = &oc->info->symbols[i]; -- if (getSymSectionNumber (info, sym) == IMAGE_SYM_UNDEFINED -+ if (getSymSectionNumber (info, sym) == PE_SECTION_UNDEFINED - && getSymValue (info, sym) > 0 - && getSymStorageClass (info, sym) != IMAGE_SYM_CLASS_SECTION) { - globalBssSize += getSymValue (info, sym); -@@ -1642,12 +1683,14 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - /* Allocate BSS space */ - SymbolAddr* bss = NULL; - if (globalBssSize > 0) { -- bss = stgCallocBytes(1, globalBssSize, -- "ocGetNames_PEi386(non-anonymous bss)"); -+ bss = m32_alloc(oc->rw_m32, globalBssSize, 16); -+ if (bss == NULL) { -+ barf("ocGetNames_PEi386: Failed to allocate global bss section"); -+ } - addSection(&oc->sections[oc->n_sections-1], - SECTIONKIND_RWDATA, SECTION_MALLOC, - bss, globalBssSize, 0, 0, 0); -- IF_DEBUG(linker, debugBelch("bss @ %p %" FMT_Word "\n", bss, globalBssSize)); -+ IF_DEBUG(linker_verbose, debugBelch("bss @ %p %" FMT_Word "\n", bss, globalBssSize)); - addProddableBlock(oc, bss, globalBssSize); - } else { - addSection(&oc->sections[oc->n_sections-1], -@@ -1659,22 +1702,52 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - stgFree (oc->image); - oc->image = NULL; - -- for (i = 0; i < (uint32_t)oc->n_symbols; i++) { -+ for (unsigned int i = 0; i < (uint32_t)oc->n_symbols; i++) { - COFF_symbol* sym = &oc->info->symbols[i]; - -- int32_t secNumber = getSymSectionNumber (info, sym); - uint32_t symValue = getSymValue (info, sym); - uint8_t symStorageClass = getSymStorageClass (info, sym); -- -- addr = NULL; -+ SymbolAddr *addr = NULL; - bool isWeak = false; -- sname = get_sym_name (getSymShortName (info, sym), oc); -- Section *section = secNumber > 0 ? &oc->sections[secNumber-1] : NULL; -+ SymbolName *sname = get_sym_name (getSymShortName (info, sym), oc); -+ -+ uint32_t secNumber = getSymSectionNumber (info, sym); -+ Section *section; -+ switch (secNumber) { -+ case PE_SECTION_UNDEFINED: -+ // N.B. This may be a weak symbol -+ section = NULL; -+ break; -+ case PE_SECTION_ABSOLUTE: -+ IF_DEBUG(linker, debugBelch("symbol %s is ABSOLUTE, skipping...\n", sname)); -+ i += getSymNumberOfAuxSymbols (info, sym); -+ continue; -+ case PE_SECTION_DEBUG: -+ IF_DEBUG(linker, debugBelch("symbol %s is DEBUG, skipping...\n", sname)); -+ i += getSymNumberOfAuxSymbols (info, sym); -+ continue; -+ default: -+ CHECK(secNumber < (uint32_t) oc->n_sections); -+ section = &oc->sections[secNumber-1]; -+ } -+ -+ SymType type; -+ switch (getSymType(oc->info->ch_info, sym)) { -+ case 0x00: type = SYM_TYPE_DATA; break; -+ case 0x20: type = SYM_TYPE_CODE; break; -+ default: -+ debugBelch("Symbol %s has invalid type 0x%x\n", -+ sname, getSymType(oc->info->ch_info, sym)); -+ return 1; -+ } - - if ( secNumber != IMAGE_SYM_UNDEFINED - && secNumber > 0 - && section -- && section->kind != SECTIONKIND_IMPORT_LIBRARY) { -+ /* Skip all BFD import sections. */ -+ && section->kind != SECTIONKIND_IMPORT -+ && section->kind != SECTIONKIND_BFD_IMPORT_LIBRARY -+ && section->kind != SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD) { - /* This symbol is global and defined, viz, exported */ - /* for IMAGE_SYMCLASS_EXTERNAL - && !IMAGE_SYM_UNDEFINED, -@@ -1691,18 +1764,84 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - } - else if (symStorageClass == IMAGE_SYM_CLASS_WEAK_EXTERNAL) { - isWeak = true; -+ CHECK(getSymNumberOfAuxSymbols (info, sym) == 1); -+ CHECK(symValue == 0); -+ COFF_symbol_aux_weak_external *aux = (COFF_symbol_aux_weak_external *) (sym+1); -+ COFF_symbol* targetSym = &oc->info->symbols[aux->TagIndex]; -+ -+ uint32_t targetSecNumber = getSymSectionNumber (info, targetSym); -+ Section *targetSection; -+ switch (targetSecNumber) { -+ case PE_SECTION_UNDEFINED: -+ case PE_SECTION_ABSOLUTE: -+ case PE_SECTION_DEBUG: -+ targetSection = NULL; -+ break; -+ default: -+ // targetSecNumber is a uint32_t, and the 0 case should be caught by PE_SECTION_UNDEFINED. -+ // The compiler should be smart enough to eliminate the guard, we'll keep it in as fail -+ // safe nontheless. -+ targetSection = targetSecNumber > 0 ? &oc->sections[targetSecNumber-1] : NULL; -+ } -+ if(NULL != targetSection) -+ addr = (SymbolAddr*) ((size_t) targetSection->start + getSymValue(info, targetSym)); - } - else if ( secNumber == IMAGE_SYM_UNDEFINED && symValue > 0) { - /* This symbol isn't in any section at all, ie, global bss. - Allocate zeroed space for it from the BSS section */ - addr = bss; - bss = (SymbolAddr*)((StgWord)bss + (StgWord)symValue); -- IF_DEBUG(linker, debugBelch("bss symbol @ %p %u\n", addr, symValue)); -+ IF_DEBUG(linker_verbose, debugBelch("bss symbol @ %p %u\n", addr, symValue)); -+ } -+ else if (section && section->kind == SECTIONKIND_BFD_IMPORT_LIBRARY) { -+ /* Disassembly of section .idata$5: -+ -+ 0000000000000000 <__imp_Insert>: -+ ... -+ 0: IMAGE_REL_AMD64_ADDR32NB .idata$6 -+ -+ The first two bytes contain the ordinal of the function -+ in the format of lowpart highpart. The two bytes combined -+ for the total range of 16 bits which is the function export limit -+ of DLLs. See note [GHC Linking model and import libraries]. */ -+ sname = (SymbolName*)section->start+2; -+ COFF_symbol* sym = &oc->info->symbols[info->numberOfSymbols-1]; -+ addr = get_sym_name( getSymShortName (info, sym), oc); -+ -+ IF_DEBUG(linker, -+ debugBelch("addImportSymbol `%s' => `%s'\n", -+ sname, (char*)addr)); -+ /* We're going to free the any data associated with the import -+ library without copying the sections. So we have to duplicate -+ the symbol name and values before the pointers become invalid. */ -+ sname = strdup (sname); -+ addr = strdup (addr); -+ type = has_code_section ? SYM_TYPE_CODE : SYM_TYPE_DATA; -+ type |= SYM_TYPE_DUP_DISCARD; -+ if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, -+ addr, false, type, oc)) { -+ releaseOcInfo (oc); -+ stgFree (oc->image); -+ oc->image = NULL; -+ return false; -+ } -+ setImportSymbol (oc, sname); -+ -+ /* Don't process this oc any further. Just exit. */ -+ oc->n_symbols = 0; -+ oc->symbols = NULL; -+ stgFree (oc->image); -+ oc->image = NULL; -+ releaseOcInfo (oc); -+ // There is nothing that we need to resolve in this object since we -+ // will never call the import stubs in its text section -+ oc->status = OBJECT_DONT_RESOLVE; -+ return true; - } - else if (secNumber > 0 - && section -- && section->kind == SECTIONKIND_IMPORT_LIBRARY) { -- /* This is an import section. We should load the dll and lookup -+ && section->kind == SECTIONKIND_BFD_IMPORT_LIBRARY_HEAD) { -+ /* This is an Gnu BFD import section. We should load the dll and lookup - the symbols. - See Note [BFD import library]. */ - char* dllName = section->start; -@@ -1716,7 +1855,7 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - sym = &oc->info->symbols[oc->n_symbols-1]; - sname = get_sym_name (getSymShortName (info, sym), oc); - -- IF_DEBUG(linker, -+ IF_DEBUG(linker_verbose, - debugBelch("loading symbol `%s' from dll: '%ls' => `%s'\n", - sname, oc->fileName, dllName)); - -@@ -1758,29 +1897,36 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - sname[size-start]='\0'; - stgFree(tmp); - sname = strdup (sname); -+ if(secNumber == IMAGE_SYM_UNDEFINED) -+ type |= SYM_TYPE_HIDDEN; -+ - if (!ghciInsertSymbolTable(oc->fileName, symhash, sname, -- addr, -- HS_BOOL_FALSE | ((secNumber == IMAGE_SYM_UNDEFINED) << 1), -- oc)) -+ addr, false, type, oc)) - return false; - - break; -+ } else if (secNumber == PE_SECTION_UNDEFINED) { -+ IF_DEBUG(linker, debugBelch("symbol %s is UNDEFINED, skipping...\n", sname)); -+ i += getSymNumberOfAuxSymbols (info, sym); - } - - if ((addr != NULL || isWeak) - && (!section || (section && section->kind != SECTIONKIND_IMPORT))) { - /* debugBelch("addSymbol %p `%s' Weak:%lld \n", addr, sname, isWeak); */ - sname = strdup (sname); -- IF_DEBUG(linker, debugBelch("addSymbol %p `%s'\n", addr, sname)); -+ if(secNumber == IMAGE_SYM_UNDEFINED) -+ type |= SYM_TYPE_HIDDEN; -+ IF_DEBUG(linker_verbose, debugBelch("addSymbol %p `%s'\n", addr, sname)); - ASSERT(i < (uint32_t)oc->n_symbols); - oc->symbols[i].name = sname; - oc->symbols[i].addr = addr; -+ oc->symbols[i].type = type; - if (isWeak) { - setWeakSymbol(oc, sname); - } -+ - if (! ghciInsertSymbolTable(oc->fileName, symhash, sname, addr, -- isWeak | ((secNumber == IMAGE_SYM_UNDEFINED) << 1), -- oc)) -+ isWeak, type, oc)) - return false; - } else { - /* We're skipping the symbol, but if we ever load this -@@ -1797,50 +1943,37 @@ ocGetNames_PEi386 ( ObjectCode* oc ) - - #if defined(x86_64_HOST_ARCH) - --/* We've already reserved a room for symbol extras in loadObj, -- * so simply set correct pointer here. -- */ --bool --ocAllocateExtras_PEi386 ( ObjectCode* oc ) --{ -- /* If the ObjectCode was unloaded we don't need a trampoline, it's likely -- an import library so we're discarding it earlier. */ -- if (!oc->info) -- return false; -- -- const int mask = default_alignment - 1; -- size_t origin = oc->info->trampoline; -- oc->symbol_extras -- = (SymbolExtra*)((uintptr_t)(oc->info->image + origin + mask) & ~mask); -- oc->first_symbol_extra = 0; -- COFF_HEADER_INFO *info = oc->info->ch_info; -- oc->n_symbol_extras = info->numberOfSymbols; -- -- return true; --} -- - static size_t --makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index, size_t s, char* symbol ) -+makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index STG_UNUSED, size_t s, char* symbol STG_UNUSED, SymType type ) - { -- unsigned int curr_thunk; - SymbolExtra *extra; -- curr_thunk = oc->first_symbol_extra + index; -- if (index >= oc->n_symbol_extras) { -- IF_DEBUG(linker, debugBelch("makeSymbolExtra first:%d, num:%lu, member:%s, index:%llu\n", curr_thunk, oc->n_symbol_extras, oc->archiveMemberName, index)); -- barf("Can't allocate thunk for `%s' in `%" PATH_FMT "' with member `%s'", symbol, oc->fileName, oc->archiveMemberName); -- } -- -- extra = oc->symbol_extras + curr_thunk; -- -- if (!extra->addr) -- { -- // jmp *-14(%rip) -- static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; -- extra->addr = (uint64_t)s; -- memcpy(extra->jumpIsland, jmp, 6); -+ switch(type & ~(SYM_TYPE_DUP_DISCARD | SYM_TYPE_HIDDEN)) { -+ case SYM_TYPE_CODE: { -+ // jmp *-14(%rip) -+ extra = m32_alloc(oc->rx_m32, sizeof(SymbolExtra), 8); -+ CHECK(extra); -+ extra->addr = (uint64_t)s; -+ static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; -+ memcpy(extra->jumpIsland, jmp, 6); -+ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(code): %s -> %p\n", symbol, &extra->jumpIsland)); -+ return (size_t)&extra->jumpIsland; -+ } -+ case SYM_TYPE_INDIRECT_DATA: { -+ extra = m32_alloc(oc->rw_m32, sizeof(SymbolExtra), 8); -+ CHECK(extra); -+ void *v = *(void**) s; -+ extra->addr = (uint64_t)v; -+ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(data): %s -> %p\n", symbol, &extra->addr)); -+ return (size_t)&extra->addr; -+ } -+ default: { -+ extra = m32_alloc(oc->rw_m32, sizeof(SymbolExtra), 8); -+ CHECK(extra); -+ extra->addr = (uint64_t)s; -+ IF_DEBUG(linker_verbose, debugBelch("makeSymbolExtra(indirect-data): %s -> %p\n", symbol, &extra->addr)); -+ return (size_t)&extra->addr; -+ } - } -- -- return (size_t)extra->jumpIsland; - } - - void ocProtectExtras(ObjectCode* oc STG_UNUSED) { } -@@ -1860,7 +1993,7 @@ ocResolve_PEi386 ( ObjectCode* oc ) - /* ToDo: should be variable-sized? But is at least safe in the - sense of buffer-overrun-proof. */ - uint8_t symbol[1000]; -- /* debugBelch("resolving for %s\n", oc->fileName); */ -+ /* debugBelch("resolving for %"PATH_FMT "\n", oc->fileName); */ - - /* Such libraries have been partially freed and can't be resolved. */ - if (oc->status == OBJECT_DONT_RESOLVE) -@@ -1874,7 +2007,7 @@ ocResolve_PEi386 ( ObjectCode* oc ) - - /* Ignore sections called which contain stabs debugging information. */ - if (section.kind == SECTIONKIND_DEBUG) -- continue; -+ continue; - - noRelocs = section.info->noRelocs; - for (j = 0; j < noRelocs; j++) { -@@ -1893,30 +2026,46 @@ ocResolve_PEi386 ( ObjectCode* oc ) - uint64_t symIndex = reloc->SymbolTableIndex; - sym = &oc->info->symbols[symIndex]; - -- IF_DEBUG(linker, -+ SymType sym_type; -+ -+ IF_DEBUG(linker_verbose, - debugBelch( -- "reloc sec %2d num %3d: type 0x%-4x " -+ "reloc sec %2d num %3d: P=%p, type 0x%-4x " - "vaddr 0x%-8lx name `", -- i, j, -+ i, j, pP, - reloc->Type, - reloc->VirtualAddress ); - printName (getSymShortName (info, sym), oc); -- debugBelch("'\n" )); -+ debugBelch("'\n" )); - - if (getSymStorageClass (info, sym) == IMAGE_SYM_CLASS_STATIC) { -- Section section = oc->sections[getSymSectionNumber (info, sym)-1]; -+ uint32_t sect_n = getSymSectionNumber (info, sym); -+ switch (sect_n) { -+ case PE_SECTION_UNDEFINED: -+ case PE_SECTION_ABSOLUTE: -+ case PE_SECTION_DEBUG: -+ errorBelch(" | %" PATH_FMT ": symbol `%s' has invalid section number %02x", -+ oc->fileName, symbol, sect_n); -+ return false; -+ default: -+ break; -+ } -+ CHECK(sect_n < (uint32_t) oc->n_sections); -+ Section section = oc->sections[sect_n - 1]; - S = ((size_t)(section.start)) - + ((size_t)(getSymValue (info, sym))); - } else { - copyName ( getSymShortName (info, sym), oc, symbol, - sizeof(symbol)-1 ); -- S = (size_t) lookupDependentSymbol( (char*)symbol, oc ); -+ S = (size_t) lookupDependentSymbol( (char*)symbol, oc, &sym_type ); - if ((void*)S == NULL) { - errorBelch(" | %" PATH_FMT ": unknown symbol `%s'", oc->fileName, symbol); - releaseOcInfo (oc); - return false; - } - } -+ IF_DEBUG(linker_verbose, debugBelch("S=%zx\n", S)); -+ - /* All supported relocations write at least 4 bytes */ - checkProddableBlock(oc, pP, 4); - switch (reloc->Type) { -@@ -1963,27 +2112,46 @@ ocResolve_PEi386 ( ObjectCode* oc ) - break; - } - case 2: /* R_X86_64_32 (ELF constant 10) - IMAGE_REL_AMD64_ADDR32 (PE constant 2) */ -- case 3: /* R_X86_64_32S (ELF constant 11) - IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */ -+ case 3: /* IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */ - case 17: /* R_X86_64_32S ELF constant, no PE mapping. See note [ELF constant in PE file] */ - { - uint64_t v; - v = S + A; -+ -+ /* If IMAGE_REL_AMD64_ADDR32NB then subtract the image base. */ -+ if (reloc->Type == 3) -+ v -= (uint64_t) GetModuleHandleW(NULL); -+ - // N.B. in the case of the sign-extended relocations we must ensure that v - // fits in a signed 32-bit value. See #15808. - if (((int64_t) v > (int64_t) INT32_MAX) || ((int64_t) v < (int64_t) INT32_MIN)) { - copyName (getSymShortName (info, sym), oc, - symbol, sizeof(symbol)-1); -- S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); -+ S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol, sym_type); - /* And retry */ - v = S + A; -+ -+ /* If IMAGE_REL_AMD64_ADDR32NB then subtract the image base. */ -+ if (reloc->Type == 3) -+ v -= (uint64_t) GetModuleHandleW(NULL); -+ - if (((int64_t) v > (int64_t) INT32_MAX) || ((int64_t) v < (int64_t) INT32_MIN)) { -- barf("IMAGE_REL_AMD64_ADDR32[NB]: High bits are set in %zx for %s", -+ barf("IMAGE_REL_AMD64_ADDR32[NB]: High bits are set in 0x%zx for %s", - v, (char *)symbol); - } - } - *(uint32_t *)pP = (uint32_t)v; - break; - } -+ case 14: /* R_X86_64_PC64 (ELF constant 24) - IMAGE_REL_AMD64_SREL32 (PE constant 14) */ -+ { -+ /* mingw will emit this for a pc-rel 64 relocation */ -+ uint64_t A; -+ checkProddableBlock(oc, pP, 8); -+ A = *(uint64_t*)pP; -+ *(uint64_t *)pP = S + A - (intptr_t)pP; -+ break; -+ } - case 4: /* R_X86_64_PC32 (ELF constant 2) - IMAGE_REL_AMD64_REL32 (PE constant 4) */ - { - intptr_t v; -@@ -1992,11 +2160,11 @@ ocResolve_PEi386 ( ObjectCode* oc ) - /* Make the trampoline then */ - copyName (getSymShortName (info, sym), - oc, symbol, sizeof(symbol)-1); -- S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); -+ S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol, sym_type); - /* And retry */ - v = S + (int32_t)A - ((intptr_t)pP) - 4; - if ((v > (int64_t) INT32_MAX) || (v < (int64_t) INT32_MIN)) { -- barf("IMAGE_REL_AMD64_REL32: High bits are set in %zx for %s", -+ barf("IMAGE_REL_AMD64_REL32: High bits are set in 0x%zx for %s", - v, (char *)symbol); - } - } -@@ -2012,15 +2180,45 @@ ocResolve_PEi386 ( ObjectCode* oc ) - } - - } -+ -+ /* Register the exceptions inside this OC. -+ See Note [Exception Unwinding]. */ -+ if (section.kind == SECTIONKIND_EXCEPTION_TABLE) { -+ oc->info->pdata = &oc->sections[i]; -+#if defined(x86_64_HOST_ARCH) -+ unsigned numEntries = section.size / sizeof(RUNTIME_FUNCTION); -+ if (numEntries == 0) -+ continue; -+ -+ /* Now register the exception handler for the range and point it -+ to the unwind data. */ -+ if (!RtlAddFunctionTable (section.start, numEntries, (uintptr_t) GetModuleHandleW(NULL))) { -+ sysErrorBelch("Unable to register Exception handler for %p for " -+ "section %s in %" PATH_FMT " (Win32 error %lu)", -+ section.start, section.info->name, oc->fileName, -+ GetLastError()); -+ releaseOcInfo (oc); -+ return false; -+ } -+#endif /* x86_64_HOST_ARCH. */ -+ } else if (section.kind == SECTIONKIND_EXCEPTION_UNWIND) { -+ oc->info->xdata = &oc->sections[i]; -+ } - } - -+ // We now have no more need of info->ch_info and info->symbols. -+ stgFree(oc->info->ch_info); -+ oc->info->ch_info = NULL; -+ stgFree(oc->info->symbols); -+ oc->info->symbols = NULL; -+ - IF_DEBUG(linker, debugBelch("completed %" PATH_FMT "\n", oc->fileName)); - return true; - } - - /* - Note [ELF constant in PE file] -- -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - For some reason, the PE files produced by GHC contain a linux - relocation constant 17 (0x11) in the object files. As far as I (Phyx-) can tell - this constant doesn't seem like it's coming from GHC, or at least I could not find -@@ -2033,36 +2231,95 @@ ocResolve_PEi386 ( ObjectCode* oc ) - See #9907 - */ - -+/* -+ Note [Exception Unwinding] -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ -+ Exception Unwinding on Windows is handled using two named sections. -+ -+ .pdata: Exception registration tables. -+ -+ The .pdata section contains an array of function table entries (of type -+ RUNTIME_FUNCTION) that are used for exception handling. The entries must be -+ sorted according to the function addresses (the first field in each -+ structure) before being emitted into the final image. It is pointed to by -+ the exception table entry in the image data directory. For x64 each entry -+ contains: -+ -+ Offset Size Field Description -+ 0 4 Begin Address The RVA of the corresponding function. -+ 4 4 End Address The RVA of the end of the function. -+ 8 4 Unwind Information The RVA of the unwind information. -+ -+ Note that these are RVAs even after being resolved by the linker, they are -+ however ImageBase relative rather than PC relative. These are typically -+ filled in by an ADDR32NB relocation. On disk the section looks like: -+ -+ Function Table #6 (4) -+ -+ Begin End Info -+ -+ 00000000 00000000 000001A1 00000000 -+ 0000000C 000001A1 000001BF 00000034 -+ 00000018 000001BF 00000201 00000040 -+ 00000024 00000201 0000021F 0000004C -+ -+ RELOCATIONS #6 -+ Symbol Symbol -+ Offset Type Applied To Index Name -+ -------- ---------------- ----------------- -------- ------ -+ 00000000 ADDR32NB 00000000 E .text -+ 00000004 ADDR32NB 000001A1 E .text -+ 00000008 ADDR32NB 00000000 16 .xdata -+ 0000000C ADDR32NB 000001A1 E .text -+ 00000010 ADDR32NB 000001BF E .text -+ 00000014 ADDR32NB 00000034 16 .xdata -+ 00000018 ADDR32NB 000001BF E .text -+ 0000001C ADDR32NB 00000201 E .text -+ 00000020 ADDR32NB 00000040 16 .xdata -+ 00000024 ADDR32NB 00000201 E .text -+ 00000028 ADDR32NB 0000021F E .text -+ 0000002C ADDR32NB 0000004C 16 .xdata -+ -+ This means that if we leave it up to the relocation processing to -+ do the work we don't need to do anything special here. Note that -+ every single function will have an entry in this table regardless -+ whether they have an unwind code or not. The reason for this is -+ that unwind handlers can be chained, and such another function -+ may have registered an overlapping region. -+ -+ .xdata: Exception unwind codes. -+ -+ This section contains an array of entries telling the unwinder how -+ to do unwinding. They are pointed to by the .pdata table enteries -+ from the Info field. Each entry is very complicated but for now -+ what is important is that the addresses are resolved by the relocs -+ for us. -+ -+ Once we have resolved .pdata and .xdata we can simply pass the -+ content of .pdata on to RtlAddFunctionTable and the OS will do -+ the rest. When we're unloading the object we have to unregister -+ them using RtlDeleteFunctionTable. -+*/ -+ - bool - ocRunInit_PEi386 ( ObjectCode *oc ) - { -- if (!oc || !oc->info || !oc->info->init) { -+ if (oc && oc->info && oc->info->init) { -+ return runInit(&oc->info->init); -+ } - return true; -- } -- -- int argc, envc; -- char **argv, **envv; -- -- getProgArgv(&argc, &argv); -- getProgEnvv(&envc, &envv); -- -- Section section = *oc->info->init; -- ASSERT(SECTIONKIND_INIT_ARRAY == section.kind); -- -- uint8_t *init_startC = section.start; -- init_t *init_start = (init_t*)init_startC; -- init_t *init_end = (init_t*)(init_startC + section.size); -- -- // ctors are run *backwards*! -- for (init_t *init = init_end - 1; init >= init_start; init--) -- (*init)(argc, argv, envv); -+} - -- freeProgEnvv(envc, envv); -- releaseOcInfo (oc); -- return true; -+bool ocRunFini_PEi386( ObjectCode *oc ) -+{ -+ if (oc && oc->info && oc->info->fini) { -+ return runFini(&oc->info->fini); -+ } -+ return true; - } - --SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) -+SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl, ObjectCode *dependent, SymType *type) - { - RtsSymbolInfo *pinfo; - -@@ -2075,26 +2332,21 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) - #if !defined(x86_64_HOST_ARCH) - zapTrailingAtSign ( lbl ); - #endif -- sym = lookupSymbolInDLLs(lbl); -+ if (type) { -+ // Unfortunately we can only assume that this is the case. Ideally -+ // the user would have given us an import library, which would allow -+ // us to determine the symbol type precisely. -+ *type = SYM_TYPE_CODE; -+ } -+ sym = lookupSymbolInDLLs(lbl, dependent); - return sym; // might be NULL if not found - } else { --#if defined(mingw32_HOST_OS) -- // If Windows, perform initialization of uninitialized -- // Symbols from the C runtime which was loaded above. -- // We do this on lookup to prevent the hit when -- // The symbol isn't being used. -- if (pinfo->value == (void*)0xBAADF00D) -- { -- char symBuffer[50]; -- sprintf(symBuffer, "_%s", lbl); -- static HMODULE msvcrt = NULL; -- if (!msvcrt) msvcrt = GetModuleHandle("msvcrt"); -- pinfo->value = GetProcAddress(msvcrt, symBuffer); -- } -- else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) -+ if (type) *type = pinfo->type; -+ -+ if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) - { - /* See Note [BFD import library]. */ -- HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, NULL); -+ HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, type); - if (!dllInstance && pinfo->value) - return pinfo->value; - -@@ -2110,42 +2362,34 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) - pinfo->value = GetProcAddress((HMODULE)dllInstance, lbl); - clearImportSymbol (pinfo->owner, lbl); - return pinfo->value; -+ } else { -+ if (dependent) { -+ // Add dependent as symbol's owner's dependency -+ ObjectCode *owner = pinfo->owner; -+ if (owner) { -+ // TODO: what does it mean for a symbol to not have an owner? -+ insertHashSet(dependent->dependencies, (W_)owner); -+ } -+ } -+ return loadSymbol(lbl, pinfo); - } --#endif -- return loadSymbol(lbl, pinfo); - } - } - - /* ----------------------------------------------------------------------------- -- * Section management. -+ * Debugging operations. - */ - -- /* See Note [Section alignment]. */ --static void --addCopySection (ObjectCode *oc, Section *s, SectionKind kind, -- SectionAlloc alloc, void* start, StgWord size) { -- char* pos = oc->info->image + oc->info->secBytesUsed; -- char* newStart = (char*)getAlignedMemory ((uint8_t*)pos, *s); -- memcpy (newStart, start, size); -- uintptr_t offset = (uintptr_t)newStart - (uintptr_t)oc->info->image; -- oc->info->secBytesUsed = (size_t)offset + size; -- start = newStart; -- -- /* Initially I wanted to apply the right memory protection to the region and -- which would leaved the gaps in between the regions as inaccessible memory -- to prevent exploits. -- The problem is protection is always on page granularity, so we can use -- less memory and be insecure or use more memory and be secure. -- For now, I've chosen lower memory over secure as the first pass, this -- doesn't regress security over the current implementation. After this -- patch I will change to different implementation that will fix the mem -- protection and keep the memory size small. */ -- addSection (s, kind, alloc, start, size, 0, 0, 0); --} -+typedef struct _SymX { SymbolName* name; uintptr_t loc; } SymX; - --/* ----------------------------------------------------------------------------- -- * Debugging operations. -- */ -+static int comp (const void * elem1, const void * elem2) -+{ -+ SymX f = *((SymX*)elem1); -+ SymX s = *((SymX*)elem2); -+ if (f.loc > s.loc) return 1; -+ if (f.loc < s.loc) return -1; -+ return 0; -+} - - pathchar* - resolveSymbolAddr_PEi386 (pathchar* buffer, int size, -@@ -2195,9 +2439,7 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, - wcscat (buffer, WSTR(" ")); - if (oc->archiveMemberName) - { -- pathchar* name = mkPath (oc->archiveMemberName); -- wcscat (buffer, name); -- stgFree (name); -+ wcscat (buffer, oc->archiveMemberName); - } - else - { -@@ -2274,7 +2516,6 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, - else if (obj) - { - /* Try to calculate from information inside the rts. */ -- typedef struct _SymX { SymbolName* name; uintptr_t loc; } SymX; - SymX* locs = stgCallocBytes (sizeof(SymX), obj->n_symbols, - "resolveSymbolAddr"); - int blanks = 0; -@@ -2294,14 +2535,6 @@ resolveSymbolAddr_PEi386 (pathchar* buffer, int size, - locs[i] = sx; - } - } -- int comp (const void * elem1, const void * elem2) -- { -- SymX f = *((SymX*)elem1); -- SymX s = *((SymX*)elem2); -- if (f.loc > s.loc) return 1; -- if (f.loc < s.loc) return -1; -- return 0; -- } - qsort (locs, obj->n_symbols, sizeof (SymX), comp); - uintptr_t key = (uintptr_t)symbol; - SymX* res = NULL; -diff --git a/rts/linker/PEi386.h b/rts/linker/PEi386.h -index 4c33dfd..a3b05e3 100644 ---- a/rts/linker/PEi386.h -+++ b/rts/linker/PEi386.h -@@ -4,7 +4,9 @@ - #include "LinkerInternals.h" - #include "PathUtils.h" - #include -+#include - #include -+#include - - #include "BeginPrivate.h" - -@@ -54,11 +56,11 @@ bool removeLibrarySearchPath_PEi386( HsPtr dll_path_index ); - - bool ocResolve_PEi386 ( ObjectCode* oc ); - bool ocRunInit_PEi386 ( ObjectCode *oc ); -+bool ocRunFini_PEi386 ( ObjectCode *oc ); - bool ocGetNames_PEi386 ( ObjectCode* oc ); - bool ocVerifyImage_PEi386 ( ObjectCode* oc ); --SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl); --bool ocAllocateExtras_PEi386 ( ObjectCode* oc ); --SymbolAddr *lookupSymbolInDLLs ( const SymbolName* lbl ); -+SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl, ObjectCode *dependent, SymType *type); -+ - /* See Note [mingw-w64 name decoration scheme] */ - /* We use myindex to calculate array addresses, rather than - simply doing the normal subscript thing. That's because -@@ -116,6 +118,12 @@ union _COFF_symbol { - COFF_symbol_ex ex; - } COFF_symbol; - -+typedef -+struct { -+ uint32_t TagIndex; -+ uint32_t Characteristics; -+} COFF_symbol_aux_weak_external; -+ - /* A record for storing handles into DLLs. */ - typedef - struct _OpenedDLL { -@@ -124,13 +132,6 @@ struct _OpenedDLL { - HINSTANCE instance; - } OpenedDLL; - --/* A record for storing indirectly linked functions from DLLs. */ --typedef --struct _IndirectAddr { -- SymbolAddr* addr; -- struct _IndirectAddr* next; --} IndirectAddr; -- - /* Some alignment information. */ - typedef - struct _Alignments { -@@ -142,7 +143,7 @@ struct _Alignments { - COFF_OBJ_TYPE getObjectType ( char* image, pathchar* fileName ); - COFF_HEADER_INFO* getHeaderInfo ( ObjectCode* oc ); - size_t getSymbolSize ( COFF_HEADER_INFO *info ); --int32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ); -+uint32_t getSymSectionNumber ( COFF_HEADER_INFO *info, COFF_symbol* sym ); - uint32_t getSymValue ( COFF_HEADER_INFO *info, COFF_symbol* sym ); - uint8_t getSymStorageClass ( COFF_HEADER_INFO *info, COFF_symbol* sym ); - uint8_t getSymNumberOfAuxSymbols ( COFF_HEADER_INFO *info, COFF_symbol* sym ); -@@ -158,7 +159,7 @@ uint8_t* getSymShortName ( COFF_HEADER_INFO *info, COFF_symbol* sym ); - - /* - Note [mingw-w64 name decoration scheme] -- -+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - What's going on with name decoration? Well, original code - have some crufty and ad-hocish paths related mostly to very old - mingw gcc/binutils/runtime combinations. Now mingw-w64 offers pretty -diff --git a/rts/linker/PEi386Types.h b/rts/linker/PEi386Types.h -index 67ea343..573467b 100644 ---- a/rts/linker/PEi386Types.h -+++ b/rts/linker/PEi386Types.h -@@ -4,13 +4,10 @@ - - #include "ghcplatform.h" - #include "PEi386.h" -+#include "linker/InitFini.h" - #include - #include - --/* Some forward declares. */ --struct Section; -- -- - struct SectionFormatInfo { - char* name; - size_t alignment; -@@ -20,16 +17,15 @@ struct SectionFormatInfo { - uint64_t virtualSize; - uint64_t virtualAddr; - }; -+ - struct ObjectCodeFormatInfo { -- size_t secBytesTotal; -- size_t secBytesUsed; -- char* image; -- size_t trampoline; -- Section* init; -- Section* finit; -- COFF_HEADER_INFO* ch_info; -+ struct InitFiniList* init; // Freed by ocRunInit_PEi386 -+ struct InitFiniList* fini; // Freed by ocRunFini_PEi386 -+ Section* pdata; -+ Section* xdata; -+ COFF_HEADER_INFO* ch_info; // Freed by ocResolve_PEi386 -+ COFF_symbol* symbols; // Freed by ocResolve_PEi386 - char* str_tab; -- COFF_symbol* symbols; - }; - - #endif /* OBJFORMAT_PEi386. */ -diff --git a/rts/linker/SymbolExtras.c b/rts/linker/SymbolExtras.c -index 9d4eb89..88192d4 100644 ---- a/rts/linker/SymbolExtras.c -+++ b/rts/linker/SymbolExtras.c -@@ -10,6 +10,7 @@ - */ - - #include "LinkerInternals.h" -+#include "linker/MMap.h" - - #if defined(NEED_SYMBOL_EXTRAS) - #if !defined(x86_64_HOST_ARCH) || !defined(mingw32_HOST_OS) -@@ -85,7 +86,7 @@ int ocAllocateExtras(ObjectCode* oc, int count, int first, int bssSize) - if (new) { - memcpy(new, oc->image, oc->fileSize); - if (oc->imageMapped) { -- munmap(oc->image, n); -+ munmapForLinker(oc->image, n, "ocAllocateExtras"); - } - oc->image = new; - oc->imageMapped = true; -@@ -142,7 +143,7 @@ void ocProtectExtras(ObjectCode* oc) - * non-executable. - */ - } else if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { -- mmapForLinkerMarkExecutable(oc->symbol_extras, sizeof(SymbolExtra) * oc->n_symbol_extras); -+ mprotectForLinker(oc->symbol_extras, sizeof(SymbolExtra) * oc->n_symbol_extras, MEM_READ_EXECUTE); - } else { - /* - * The symbol extras were allocated via m32. They will be protected when -@@ -152,7 +153,7 @@ void ocProtectExtras(ObjectCode* oc) - } - - --#if !defined(arm_HOST_ARCH) -+#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) - SymbolExtra* makeSymbolExtra( ObjectCode const* oc, - unsigned long symbolNumber, - unsigned long target ) -@@ -182,13 +183,15 @@ SymbolExtra* makeSymbolExtra( ObjectCode const* oc, - #if defined(x86_64_HOST_ARCH) - // jmp *-14(%rip) - // 0xFF 25 is opcode + ModRM of near absolute indirect jump -- static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF }; -+ // Two bytes trailing padding, needed for TLSGD GOT entries -+ // See Note [TLSGD relocation] in elf_tlsgd.c -+ static uint8_t jmp[] = { 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xFF, 0x00, 0x00 }; - extra->addr = target; -- memcpy(extra->jumpIsland, jmp, 6); -+ memcpy(extra->jumpIsland, jmp, 8); - #endif /* x86_64_HOST_ARCH */ - - return extra; - } --#endif /* !arm_HOST_ARCH */ -+#endif /* powerpc_HOST_ARCH || x86_64_HOST_ARCH */ - #endif /* !x86_64_HOST_ARCH) || !mingw32_HOST_OS */ - #endif // NEED_SYMBOL_EXTRAS -diff --git a/rts/linker/SymbolExtras.h b/rts/linker/SymbolExtras.h -index 6c05020..9573856 100644 ---- a/rts/linker/SymbolExtras.h -+++ b/rts/linker/SymbolExtras.h -@@ -16,13 +16,12 @@ SymbolExtra* makeArmSymbolExtra( ObjectCode const* oc, - unsigned long target, - bool fromThumb, - bool toThumb ); --#else -+#elif defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) - SymbolExtra* makeSymbolExtra( ObjectCode const* oc, - unsigned long symbolNumber, - unsigned long target ); - --#endif /* arm_HOST_ARCH */ -- -+#endif /* powerpc_HOST_ARCH || x86_64_HOST_ARCH */ - #endif /* NEED_SYMBOL_EXTRAS */ - - #include "EndPrivate.h" -diff --git a/rts/linker/Wasm32Types.h b/rts/linker/Wasm32Types.h -new file mode 100644 -index 0000000..991cda3 ---- /dev/null -+++ b/rts/linker/Wasm32Types.h -@@ -0,0 +1,9 @@ -+#pragma once -+ -+#if defined(OBJFORMAT_WASM32) -+ -+struct SectionFormatInfo { }; -+ -+struct ObjectCodeFormatInfo { }; -+ -+#endif -diff --git a/rts/linker/elf_compat.h b/rts/linker/elf_compat.h -index 424d1d2..9f27802 100644 ---- a/rts/linker/elf_compat.h -+++ b/rts/linker/elf_compat.h -@@ -6,7 +6,7 @@ - // The files in ELFRelocs/ have been taken from - // the LLVM project. See ELFRelocs/LICENSE-LLVM.TXT - // for the University of Illinois Open Source License --// under which it is distrubuted. -+// under which it is distributed. - // - - #pragma once -diff --git a/rts/linker/elf_got.c b/rts/linker/elf_got.c -index 25f5a91..4d0c978 100644 ---- a/rts/linker/elf_got.c -+++ b/rts/linker/elf_got.c -@@ -1,5 +1,6 @@ - #include "Rts.h" - #include "elf_got.h" -+#include "linker/MMap.h" - - #include - -@@ -16,7 +17,7 @@ needGotSlot(Elf_Sym * symbol) { - * STB_WEAK. - * - * Any more restrictive filter here would result -- * in a smaller GOT, which is preferrable. -+ * in a smaller GOT, which is preferable. - */ - return ELF_ST_BIND(symbol->st_info) == STB_GLOBAL - || ELF_ST_BIND(symbol->st_info) == STB_WEAK -@@ -86,12 +87,12 @@ fillGot(ObjectCode * oc) { - if(needGotSlot(symbol->elf_sym)) { - - /* no type are undefined symbols */ -- // Note STT_SECTION symbols should have their addres -+ // Note STT_SECTION symbols should have their address - // set prior to the fillGot call in ocResolve_ELF. - if( STT_NOTYPE == ELF_ST_TYPE(symbol->elf_sym->st_info) - || STB_WEAK == ELF_ST_BIND(symbol->elf_sym->st_info)) { - if(0x0 == symbol->addr) { -- symbol->addr = lookupDependentSymbol(symbol->name, oc); -+ symbol->addr = lookupDependentSymbol(symbol->name, oc, NULL); - if(0x0 == symbol->addr) { - if(0 == strncmp(symbol->name,"_GLOBAL_OFFSET_TABLE_",21)) { - symbol->addr = oc->info->got_start; -@@ -139,10 +140,10 @@ verifyGot(ObjectCode * oc) { - for(size_t i=0; i < symTab->n_symbols; i++) { - ElfSymbol * symbol = &symTab->symbols[i]; - if(symbol->got_addr) { -- ASSERT((void*)(*(void**)symbol->got_addr) -- == (void*)symbol->addr); -+ CHECK((void*)(*(void**)symbol->got_addr) -+ == (void*)symbol->addr); - } -- ASSERT(0 == ((uintptr_t)symbol->addr & 0xffff000000000000)); -+ CHECK(0 == ((uintptr_t)symbol->addr & 0xffff000000000000)); - } - } - return EXIT_SUCCESS; -@@ -150,7 +151,7 @@ verifyGot(ObjectCode * oc) { - - void - freeGot(ObjectCode * oc) { --// munmap(oc->info->got_start, oc->info->got_size); -+// munmapForLinker(oc->info->got_start, oc->info->got_size, "freeGot); - oc->info->got_start = 0x0; - oc->info->got_size = 0; - } -diff --git a/rts/linker/elf_plt_arm.c b/rts/linker/elf_plt_arm.c -index bd21243..5b67bf8 100644 ---- a/rts/linker/elf_plt_arm.c -+++ b/rts/linker/elf_plt_arm.c -@@ -58,7 +58,6 @@ bool makeStubArmThm(Stub * s); - /* - Note [The ARM/Thumb Story] - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -- - Support for the ARM architecture is complicated by the fact that ARM has not - one but several instruction encodings. The two relevant ones here are the - original ARM encoding and Thumb, a more dense variant of ARM supporting only -diff --git a/rts/linker/elf_reloc_aarch64.c b/rts/linker/elf_reloc_aarch64.c -index 0e11585..4743e81 100644 ---- a/rts/linker/elf_reloc_aarch64.c -+++ b/rts/linker/elf_reloc_aarch64.c -@@ -6,7 +6,6 @@ - #include "elf_plt.h" - - #include --#include - - - #if defined(aarch64_HOST_ARCH) -@@ -23,7 +22,7 @@ bool isAdrp(addr_t p); - bool isLoadStore(addr_t p); - bool isAddSub(addr_t p); - bool isVectorOp(addr_t p); --int64_t decodeAddendAarch64(Section * section, Elf_Rel * rel) GNU_ATTRIBUTE(__noreturn__); -+int64_t decodeAddendAarch64(Section * section, Elf_Rel * rel) STG_NORETURN; - bool encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend); - - bool isBranch(addr_t p) { -@@ -52,8 +51,8 @@ bool isVectorOp(addr_t p) { - typedef uint32_t inst_t; - - int64_t --decodeAddendAarch64(Section * section __attribute__((unused)), -- Elf_Rel * rel __attribute__((unused))) -+decodeAddendAarch64(Section * section STG_UNUSED, -+ Elf_Rel * rel STG_UNUSED) - { - abort(/* we don't support Rel locations yet. */); - } -@@ -71,15 +70,17 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { - *(uint64_t*)P = (uint64_t)addend; - break; - case COMPAT_R_AARCH64_ABS32: -- assert(isInt64(32, addend)); -+ CHECK(isInt64(32, addend)); -+ FALLTHROUGH; - case COMPAT_R_AARCH64_PREL32: -- assert(isInt64(32, addend)); -+ CHECK(isInt64(32, addend)); - *(uint32_t*)P = (uint32_t)addend; - break; - case COMPAT_R_AARCH64_ABS16: -- assert(isInt64(16, addend)); -+ CHECK(isInt64(16, addend)); -+ FALLTHROUGH; - case COMPAT_R_AARCH64_PREL16: -- assert(isInt64(16, addend)); -+ CHECK(isInt64(16, addend)); - *(uint16_t*)P = (uint16_t)addend; - break; - /* static aarch64 relocations */ -@@ -95,8 +96,8 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { - // imm64 = SignExtend(hi:lo:0x000,64) - // Range is 21 bits + the 12 page relative bits - // known to be 0. -2^32 <= X < 2^32 -- assert(isInt64(21+12, addend)); -- assert((addend & 0xfff) == 0); /* page relative */ -+ CHECK(isInt64(21+12, addend)); -+ CHECK((addend & 0xfff) == 0); /* page relative */ - - *(inst_t *)P = (*(inst_t *)P & 0x9f00001f) - | (inst_t) (((uint64_t) addend << 17) & 0x60000000) -@@ -106,7 +107,7 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { - /* - control flow relocations */ - case COMPAT_R_AARCH64_JUMP26: /* relocate b ... */ - case COMPAT_R_AARCH64_CALL26: { /* relocate bl ... */ -- assert(isInt64(26+2, addend)); /* X in range */ -+ CHECK(isInt64(26+2, addend)); /* X in range */ - *(inst_t *)P = (*(inst_t *)P & 0xfc000000) /* keep upper 6 (32-6) - * bits */ - | ((uint32_t)(addend >> 2) & 0x03ffffff); -@@ -114,8 +115,8 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { - } - case COMPAT_R_AARCH64_ADR_GOT_PAGE: { - /* range is -2^32 <= X < 2^32 */ -- assert(isInt64(21+12, addend)); /* X in range */ -- assert((addend & 0xfff) == 0); /* page relative */ -+ CHECK(isInt64(21+12, addend)); /* X in range */ -+ CHECK((addend & 0xfff) == 0); /* page relative */ - - *(inst_t *)P = (*(inst_t *)P & 0x9f00001f) - | (inst_t)(((uint64_t)addend << 17) & 0x60000000) // lo -@@ -149,10 +150,10 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { - FALLTHROUGH; - case COMPAT_R_AARCH64_LD64_GOT_LO12_NC: { - if(exp_shift == -1) { -- assert( (addend & 7) == 0 ); -+ CHECK( (addend & 7) == 0 ); - exp_shift = 3; - } -- assert((addend & 0xfff) == addend); -+ CHECK((addend & 0xfff) == addend); - int shift = 0; - if(isLoadStore(P)) { - /* bits 31, 30 encode the size. */ -@@ -161,7 +162,7 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { - shift = 4; - } - } -- assert(addend == 0 || exp_shift == shift); -+ CHECK(addend == 0 || exp_shift == shift); - *(inst_t *)P = (*(inst_t *)P & 0xffc003ff) - | ((inst_t)(addend >> shift << 10) & 0x003ffc00); - break; -@@ -182,18 +183,18 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { - * @return The new computed addend. - */ - static int64_t --computeAddend(ObjectCode * oc, Section * section, Elf_Rel * rel, -+computeAddend(Section * section, Elf_Rel * rel, - ElfSymbol * symbol, int64_t addend) { - - /* Position where something is relocated */ - addr_t P = (addr_t)((uint8_t*)section->start + rel->r_offset); - -- assert(0x0 != P); -- assert((uint64_t)section->start <= P); -- assert(P <= (uint64_t)section->start + section->size); -+ CHECK(0x0 != P); -+ CHECK((uint64_t)section->start <= P); -+ CHECK(P <= (uint64_t)section->start + section->size); - /* Address of the symbol */ - addr_t S = (addr_t) symbol->addr; -- assert(0x0 != S); -+ CHECK(0x0 != S); - /* GOT slot for the symbol */ - addr_t GOT_S = (addr_t) symbol->got_addr; - -@@ -228,6 +229,7 @@ computeAddend(ObjectCode * oc, Section * section, Elf_Rel * rel, - /* note: we are encoding bits [27:2] */ - if(!isInt64(26+2, V)) { - // Note [PC bias aarch64] -+ // ~~~~~~~~~~~~~~~~~~~~~~ - // There is no PC bias to accommodate in the - // relocation of a place containing an instruction - // that formulates a PC-relative address. The program -@@ -243,16 +245,16 @@ computeAddend(ObjectCode * oc, Section * section, Elf_Rel * rel, - } - } - -- assert(0 == (0xffff000000000000 & S)); -+ CHECK(0 == (0xffff000000000000 & S)); - V = S + A - P; -- assert(isInt64(26+2, V)); /* X in range */ -+ CHECK(isInt64(26+2, V)); /* X in range */ - } - return V; - } -- case COMPAT_R_AARCH64_LDST128_ABS_LO12_NC: assert(0 == ((S+A) & 0x0f)); -- case COMPAT_R_AARCH64_LDST64_ABS_LO12_NC: assert(0 == ((S+A) & 0x07)); -- case COMPAT_R_AARCH64_LDST32_ABS_LO12_NC: assert(0 == ((S+A) & 0x03)); -- case COMPAT_R_AARCH64_LDST16_ABS_LO12_NC: assert(0 == ((S+A) & 0x01)); -+ case COMPAT_R_AARCH64_LDST128_ABS_LO12_NC: CHECK(0 == ((S+A) & 0x0f)); FALLTHROUGH; -+ case COMPAT_R_AARCH64_LDST64_ABS_LO12_NC: CHECK(0 == ((S+A) & 0x07)); FALLTHROUGH; -+ case COMPAT_R_AARCH64_LDST32_ABS_LO12_NC: CHECK(0 == ((S+A) & 0x03)); FALLTHROUGH; -+ case COMPAT_R_AARCH64_LDST16_ABS_LO12_NC: CHECK(0 == ((S+A) & 0x01)); FALLTHROUGH; - case COMPAT_R_AARCH64_LDST8_ABS_LO12_NC: - /* type: static, class: aarch64, op: S + A */ - return (S + A) & 0xfff; -@@ -266,18 +268,12 @@ computeAddend(ObjectCode * oc, Section * section, Elf_Rel * rel, - // TODO: fix this story proper, so that the transformation - // makes sense without resorting to: everyone else - // does it like this as well. -- if (0x0 == GOT_S) { -- barf("PAGE: No GOT address for %s in %s for section type: %d and size: %lu.\n", symbol->name, OC_INFORMATIVE_FILENAME(oc), section->kind, section->size); -- } -- assert(0x0 != GOT_S); -+ CHECK(0x0 != GOT_S); - return Page(GOT_S+A) - Page(P); - } - case COMPAT_R_AARCH64_LD64_GOT_LO12_NC: { - // G(GDAT(S+A)) -- if (0x0 == GOT_S) { -- barf("LO12_NC: No GOT address for %s in %s for section type: %d and size: %lu.\n", symbol->name, OC_INFORMATIVE_FILENAME(oc), section->kind, section->size); -- } -- assert(0x0 != GOT_S); -+ CHECK(0x0 != GOT_S); - return (GOT_S + A) & 0xfff; - } - default: -@@ -303,12 +299,12 @@ relocateObjectCodeAarch64(ObjectCode * oc) { - relTab->sectionHeader->sh_link, - ELF64_R_SYM((Elf64_Xword)rel->r_info)); - -- assert(0x0 != symbol); -+ CHECK(0x0 != symbol); - - /* decode implicit addend */ - int64_t addend = decodeAddendAarch64(targetSection, rel); - -- addend = computeAddend(oc, targetSection, rel, symbol, addend); -+ addend = computeAddend(targetSection, rel, symbol, addend); - encodeAddendAarch64(targetSection, rel, addend); - } - } -@@ -329,13 +325,13 @@ relocateObjectCodeAarch64(ObjectCode * oc) { - relaTab->sectionHeader->sh_link, - ELF64_R_SYM((Elf64_Xword)rel->r_info)); - -- assert(0x0 != symbol); -- assert(0x0 != symbol->addr); -+ CHECK(0x0 != symbol); -+ CHECK(0x0 != symbol->addr); - - /* take explicit addend */ - int64_t addend = rel->r_addend; - -- addend = computeAddend(oc, targetSection, (Elf_Rel*)rel, -+ addend = computeAddend(targetSection, (Elf_Rel*)rel, - symbol, addend); - encodeAddendAarch64(targetSection, (Elf_Rel*)rel, addend); - } -diff --git a/rts/linker/elf_tlsgd.c b/rts/linker/elf_tlsgd.c -new file mode 100644 -index 0000000..767d9e7 ---- /dev/null -+++ b/rts/linker/elf_tlsgd.c -@@ -0,0 +1,249 @@ -+#include "Rts.h" -+ -+#if defined(x86_64_HOST_ARCH) && defined(freebsd_HOST_OS) -+ -+/* -+ * Note [TLSGD relocation] -+ * ~~~~~~~~~~~~~~~~~~~~~~~ -+ * Quick background: FreeBSD's is poisoned with static inline code -+ * that gets compiled into every program that uses functions like isdigit(3). -+ * When compiled "-c -fpic" for inclusion in position-independent ".a" files -+ * that are used in GHCi and HLS to load dependent packages at runtime, code -+ * that uses in some FFI ends up with previously unsupported -+ * thread-specific variable (TLSGD) relocations. This module narrowly addresses -+ * the issue for FreeBSD, where one often ends up using thread-local storage -+ * without meaning to. -+ * -+ * In the "General Dynamic" Thread-Local-Storage (TLSGD) model, relocations need -+ * an offset into a block of thread-local data associated with a particular -+ * module in which the given thread-local variable is defined. Such blocks are -+ * not used directly, since after all, the variables are thread-specific. -+ * Rather, each module's initialized thread locals and uninitialised (zeroed) -+ * thread-locals are used to initialise a corresponding block of data in each -+ * thread, possibly on first use by a thread of a variable from a given module. -+ * -+ * A thread that needs the address of a particular TLS variable needs to pass -+ * the module id and offset to __tls_get_addr() (provided by the ELF runtime -+ * linker ld.so, a.k.a. the RTLD, which also manages the loading and unloading -+ * of modules, and dynamic creation of the backing storage for each thread's -+ * dynamic thread-local-storage vector (dtv). -+ * -+ * The data to pass to __tls_get_addr() is found as two consecutive 64-bit -+ * values in the global offset table (GOT) of the object being relocated. -+ * (There are therefore many GOT tables, what's global is the addresses they -+ * point to, which are often outside the current object, not the tables -+ * themselves). -+ * -+ * The module id and offset are not known at compile time, and require -+ * relocation with assistance from the RTLD, because only the RTLD knows the -+ * logical module number for each loaded object (the main executable, and any -+ * shared libraries, such as libc). Fortunately, modern RTLDs provide an -+ * iterator for the currently loaded modules of a program, which exposes -+ * the associated module id and ELF section headers of each loaded object. -+ * (For static executables, this is instead handled by the C library). -+ * -+ * The iterator in question is dl_iterate_phdr(3). It repeatedly invokes -+ * the provided callback for each loaded module until the callback returns -+ * a non-zero value indicating that it has found what it was looking for -+ * and does not need to be called with any further modules. -+ * -+ * The "dlpi_info" structure provided to the callback contains the module -+ * id and a reference to the ELF program header list. In the program header -+ * list the "dynamic" section contains a number of subsections, which include -+ * the symbol table, the string table and either or both the sysv or GNU-style -+ * symbol hash table. -+ * -+ * The size of the symbol table is not directly available, so linear search -+ * through the symbol table is not only inefficient, but in fact not really -+ * possible, since we don't reliably know where the table ends. However, the -+ * hash tables (sysv and/or GNU) do have clear bounds, and substantially speed -+ * up symbol lookup, so we need to have code to use these tables. For now, -+ * only the sysv table is supported, but it should be easy to also support the -+ * GNU table (which could be the only present). On FreeBSD it is rumoured (or -+ * least anecdotally observed) that the tool chains ensure that the sysv table -+ * is always present. -+ * -+ * Thus armed with the symbol, string and hash table for a module, we can use -+ * our wanted symbol's hash to quickly find the relevant hash bucket, and from -+ * there traverse the list of symbols that share that hash, checking that -+ * whether the name is in fact an exact match. -+ * -+ * Note that the name we want may also appear as an undefined entry in the -+ * symbol tables of other modules that also reference it as an external symbol. -+ * Thus the module we're looking for is the one where the symbol's st_value is -+ * non-zero (indicating that it is actually defined in that module). -+ * -+ * Since we're looking for a TLS variable, we just in case also check the type -+ * and avoid erroneous bindings to some other sort of symbol. -+ * -+ * Once the right module is found, we need to push two values into a new slot -+ * in the GOT. This is done via the makeSymbolExtra() function of the GHC RTS. -+ * Our GOT entries must therefore be wide enough to hold two 64-bit values, but -+ * previously their X86_64 incarnation was only 14 bytes wide. It has now been -+ * expanded to 16 bytes, by adding two padding bytes to the jumpIsland slot -+ * that follows the `addr` field field of the original GOT entry. We store the -+ * module id in the `addr` field and the symbol's offset in the expanded -+ * jumpIsland field. The address `S` of the start of the new GOT entry is -+ * then adjusted to form the relative address `S + A - P` which is stored at the -+ * relocation address `P`. -+ * -+ * The magic additional offsets `0x8000` and `0x800` for MIPS, ... and RISC-V, -+ * were suggested by Fangrui Song (a.k.a. @MaskRay) in a comment on the ticket -+ * discussing the motivating FreeBSD issue: -+ * . -+ * His blog at -+ * may shed more light on these. -+ * -+ * Finally, the bad news. This code only works when the target TLS variable is -+ * defined by a preloaded shared object (.SO) that is known to the RTLD, has a -+ * module id, and TLS data and bss segments from which the RTLD initialises -+ * (perhaps lazily just-in-time) the per-thread TLS segments. It is not -+ * presently possible to support TLS variables from runtime loaded ".o" files, -+ * These are not loaded via the RTLD, and don't get a new module id, and -+ * __tls_get_addr() cannot return an appropriate thread-specific address for -+ * these. -+ * -+ * The best solution is probably to deprecate runtime loading of ".o" files, -+ * all runtime loaded objects should be shared objects, loaded via dlopen(), -+ * in which case the RTLD will take of all the TLS relocation details! -+ * Otherwise, packages with FFI code that uses the _Thread_local storage class -+ * will not be runtime loadable in GHCi, Haskell-language-server, and similar -+ * programs that use the GHC RTS runtime linker. As the popularity of such -+ * variables increases, we'll need have a more comprehensive approach to dealing -+ * with them, not limited to just "external references" as supported here. -+ * -+ * A much more complex approach would be to filter calls to __tls_get_addr(), -+ * using GHC-specific code to allocate per-thread storage for TLS variables in -+ * code loaded via ".o" files, delegating just external TLS variables to the -+ * RTLD. It is far from clear how to do that, and likely unwise to even think -+ * about going there. -+ */ -+ -+#include "linker/Elf.h" -+#include "linker/SymbolExtras.h" -+#include -+#include -+ -+/* -+ * Though for now we only get here for X86_64, also handle some other CPUs. -+ */ -+#if defined(__mips__) || defined(__powerpc__) || defined(__powerpc64__) -+#define OFFSUB 0x8000 -+#elif defined(__riscv__) -+#define OFFSUB 0x800 -+#else -+#define OFFSUB 0x0 -+#endif -+ -+static unsigned long -+elfhash(const unsigned char *name) -+{ -+ unsigned long h = 0, g; -+ -+ while (*name) -+ { -+ h = (h << 4) + *name++; -+ if ((g = h & 0xf0000000) != 0) -+ h ^= g >> 24; -+ h &= ~g; -+ } -+ return h; -+} -+ -+typedef struct tls_sym { -+ ObjectCode *tls_sym_object; -+ const char *tls_sym_name; -+ unsigned long tls_sym_indx; -+ unsigned long tls_sym_hash; -+ StgInt64 tls_sym_reloc; -+} tls_sym; -+ -+typedef struct dl_phdr_info dlpi; -+ -+static int -+find_tls_sym(dlpi *info, size_t sz STG_UNUSED, void *data) -+{ -+ tls_sym *wanted = (tls_sym *)data; -+ const Elf_Addr base = info->dlpi_addr; -+ const Elf_Dyn *dyn = NULL; -+ const Elf_Sym *dynsym = NULL; -+ const Elf_Word *dynhash = 0; -+ const char *dynstr = NULL; -+ -+ for (size_t i = 0; i < info->dlpi_phnum; i++) { -+ const Elf_Phdr *phdr = &info->dlpi_phdr[i]; -+ -+ if (phdr->p_type == PT_DYNAMIC) { -+ dyn = (const Elf_Dyn *)(base + phdr->p_vaddr); -+ break; -+ } -+ } -+ if (dyn == NULL) -+ return 0; -+ -+ for (size_t i = 0; dyn[i].d_tag != DT_NULL; ++i) -+ switch (dyn[i].d_tag) { -+ case DT_SYMTAB: -+ dynsym = (const Elf_Sym *)(base + dyn[i].d_un.d_val); -+ break; -+ case DT_STRTAB: -+ dynstr = (const char *)(base + dyn[i].d_un.d_val); -+ break; -+ case DT_HASH: -+ dynhash = (const Elf_Word *)(base + dyn[i].d_un.d_val); -+ break; -+ default: -+ break; -+ } -+ -+ if (dynsym == NULL || dynstr == NULL || dynhash == NULL) -+ return 0; -+ -+ unsigned long nbucket = (unsigned long)dynhash[0]; -+ // unsigned long nchain = (unsigned long)dynhash[1]; -+ const Elf_Word *bucket = &dynhash[2]; -+ const Elf_Word *chain = &dynhash[2+nbucket]; -+ unsigned long h = wanted->tls_sym_hash % nbucket; -+ -+ for (unsigned long i = bucket[h]; i != STN_UNDEF; i = chain[i]) { -+ const Elf_Sym *sym = dynsym+i; -+ const char *symname = dynstr + sym->st_name; -+ -+ /* Ignore undefined or non-TLS symbols */ -+ if (sym->st_value == 0 || ELF_ST_TYPE(sym->st_info) != STT_TLS) -+ continue; -+ -+ if (strcmp(symname, wanted->tls_sym_name) == 0) { -+ unsigned long target = sym->st_value - OFFSUB; -+ /* Store the module id as GOT[0] in a new GOT entry */ -+ SymbolExtra *extra = -+ makeSymbolExtra(wanted->tls_sym_object, -+ wanted->tls_sym_indx, -+ info->dlpi_tls_modid); -+ /* Copy the target address to GOT[1] (a.k.a. jumpIsland) */ -+ memcpy(extra->jumpIsland, &target, sizeof(target)); -+ wanted->tls_sym_reloc = (StgInt64) extra; -+ /* Signal success, no more modules will be tried */ -+ return 1; -+ } -+ } -+ /* Try the next module if any */ -+ return 0; -+} -+ -+StgInt64 -+lookupTlsgdSymbol(const char *symbol, unsigned long symnum, ObjectCode *oc) -+{ -+ tls_sym t; -+ -+ t.tls_sym_object = oc; -+ t.tls_sym_name = symbol; -+ t.tls_sym_indx = symnum; -+ t.tls_sym_hash = elfhash((unsigned char *)symbol); -+ t.tls_sym_reloc = 0; -+ -+ dl_iterate_phdr(find_tls_sym, &t); -+ -+ return t.tls_sym_reloc; -+} -+#endif -diff --git a/rts/linker/macho/plt.c b/rts/linker/macho/plt.c -index 33563f6..ed005ba 100644 ---- a/rts/linker/macho/plt.c -+++ b/rts/linker/macho/plt.c -@@ -84,7 +84,7 @@ freeStubs(Section * section) { - while(last->next != NULL) { - Stub * t = last; - last = last->next; -- free(t); -+ stgFree(t); - } - section->info->stubs = NULL; - section->info->nstubs = 0; --- -2.33.0 - diff --git a/overlays/patches/ghc/0002-Disable-ReportMemoryMap.patch b/overlays/patches/ghc/0002-Disable-ReportMemoryMap.patch deleted file mode 100644 index d989a3b399..0000000000 --- a/overlays/patches/ghc/0002-Disable-ReportMemoryMap.patch +++ /dev/null @@ -1,89 +0,0 @@ -From bac56a912333e4c20fdccc6bfc40bf4f0c9f77fc Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 02:18:05 +0000 -Subject: [PATCH 02/12] Disable ReportMemoryMap - ---- - rts/Linker.c | 2 +- - rts/linker/M32Alloc.c | 6 +++--- - rts/linker/MMap.c | 6 +++--- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/rts/Linker.c b/rts/Linker.c -index 5b0f05a..540daa2 100644 ---- a/rts/Linker.c -+++ b/rts/Linker.c -@@ -34,7 +34,7 @@ - #include "linker/MMap.h" - #include "PathUtils.h" - #include "CheckUnload.h" // createOCSectionIndices --#include "ReportMemoryMap.h" -+// #include "ReportMemoryMap.h" - - #if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H) - #include "posix/Signals.h" -diff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.c -index 17d3d12..1bed5d9 100644 ---- a/rts/linker/M32Alloc.c -+++ b/rts/linker/M32Alloc.c -@@ -11,7 +11,7 @@ - #include "RtsUtils.h" - #include "linker/M32Alloc.h" - #include "linker/MMap.h" --#include "ReportMemoryMap.h" -+// #include "ReportMemoryMap.h" - - #include - #include -@@ -326,7 +326,7 @@ m32_alloc_page(void) - const size_t map_sz = pgsz * M32_MAP_PAGES; - uint8_t *chunk = mmapAnonForLinker(map_sz); - if (! is_okay_address(chunk + map_sz)) { -- reportMemoryMap(); -+ // reportMemoryMap(); - barf("m32_alloc_page: failed to allocate pages within 4GB of program text (got %p)", chunk); - } - IF_DEBUG(sanity, memset(chunk, 0xaa, map_sz)); -@@ -492,7 +492,7 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) - sysErrorBelch("m32_alloc: Failed to map pages for %zd bytes", size); - return NULL; - } else if (! is_okay_address(page)) { -- reportMemoryMap(); -+ // reportMemoryMap(); - barf("m32_alloc: warning: Allocation of %zd bytes resulted in pages above 4GB (%p)", - size, page); - } -diff --git a/rts/linker/MMap.c b/rts/linker/MMap.c -index 30abad1..843cf2c 100644 ---- a/rts/linker/MMap.c -+++ b/rts/linker/MMap.c -@@ -3,7 +3,7 @@ - #include "sm/OSMem.h" - #include "linker/MMap.h" - #include "Trace.h" --#include "ReportMemoryMap.h" -+// #include "ReportMemoryMap.h" - - #if RTS_LINKER_USE_MMAP - #include -@@ -290,7 +290,7 @@ doMmap(void *map_addr, size_t bytes, int prot, uint32_t flags, int fd, int offse - void * result = mmap(map_addr, bytes, prot, flags, fd, offset); - if (result == MAP_FAILED) { - sysErrorBelch("mmap %zx bytes at %p", bytes, map_addr); -- reportMemoryMap(); -+ // reportMemoryMap(); - errorBelch("Try specifying an address with +RTS -xm -RTS"); - return NULL; - } -@@ -350,7 +350,7 @@ mmapInRegion ( - } else if (wrapped) { - // We failed to find a suitable mapping - munmap(result, bytes); -- reportMemoryMap(); -+ // reportMemoryMap(); - errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " - "asked for %zu bytes at %p. " - "Try specifying an address with +RTS -xm -RTS", --- -2.33.0 - diff --git a/overlays/patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch b/overlays/patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch deleted file mode 100644 index 482df463ea..0000000000 --- a/overlays/patches/ghc/0003-StrHashTable-is-really-just-HashTable-facepalm.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 249cf8c13dbbab2a726e4665d8d5e6ddb3bbdd6f Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 02:37:21 +0000 -Subject: [PATCH 03/12] StrHashTable is really just HashTable :facepalm: - ---- - rts/Hash.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/rts/Hash.h b/rts/Hash.h -index bb661bf..a015baa 100644 ---- a/rts/Hash.h -+++ b/rts/Hash.h -@@ -11,6 +11,7 @@ - #include "BeginPrivate.h" - - typedef struct hashtable HashTable; /* abstract */ -+typedef struct hashtable StrHashTable; - - /* Hash table access where the keys are StgWords. - * Values are passed into the hash table and stored as `const void *` values, --- -2.33.0 - diff --git a/overlays/patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch b/overlays/patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch deleted file mode 100644 index 1d4bd78eb1..0000000000 --- a/overlays/patches/ghc/0004-Add-includes-rts-Linker.h-as-well.patch +++ /dev/null @@ -1,53 +0,0 @@ -From b163dcbeddf70a6952445e8c1fe4324f1052cdd9 Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 02:38:50 +0000 -Subject: [PATCH 04/12] Add includes/rts/Linker.h as well. - ---- - includes/rts/Linker.h | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h -index 06c9402..ae463bc 100644 ---- a/includes/rts/Linker.h -+++ b/includes/rts/Linker.h -@@ -41,7 +41,7 @@ void initLinker (void); - */ - void initLinker_ (int retain_cafs); - --/* insert a symbol in the hash table */ -+/* insert a code symbol in the hash table */ - HsInt insertSymbol(pathchar* obj_name, char* key, void* data); - - /* lookup a symbol in the hash table */ -@@ -52,6 +52,7 @@ typedef enum { - OBJECT_LOADED, - OBJECT_NEEDED, - OBJECT_RESOLVED, -+ OBJECT_READY, - OBJECT_UNLOADED, - OBJECT_DONT_RESOLVE, - OBJECT_NOT_LOADED /* The object was either never loaded or has been -@@ -76,6 +77,19 @@ HsInt loadArchive( pathchar *path ); - /* resolve all the currently unlinked objects in memory */ - HsInt resolveObjs( void ); - -+/* Load an .so using the system linker. -+ Returns a handle that can be passed to dlsym() or NULL on error. -+ -+ In the case of error, stores the error message in errmsg. The caller -+ is responsible for freeing it. */ -+void *loadNativeObj( pathchar *path, char **errmsg ); -+ -+/* Mark the .so loaded with the system linker for unloading. -+ The RTS will unload it when all the references to the .so disappear from -+ the heap. -+ Takes the handle returned from loadNativeObj() as an argument. */ -+HsInt unloadNativeObj( void *handle ); -+ - /* load a dynamic library */ - const char *addDLL( pathchar* dll_name ); - --- -2.33.0 - diff --git a/overlays/patches/ghc/0005-Also-need-RtsSymbols.h.patch b/overlays/patches/ghc/0005-Also-need-RtsSymbols.h.patch deleted file mode 100644 index b45c0f0d63..0000000000 --- a/overlays/patches/ghc/0005-Also-need-RtsSymbols.h.patch +++ /dev/null @@ -1,26 +0,0 @@ -From cc35bd8fc67f5ced12fc8800b50210509d1358eb Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 02:41:58 +0000 -Subject: [PATCH 05/12] Also need RtsSymbols.h - ---- - rts/RtsSymbols.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/rts/RtsSymbols.h b/rts/RtsSymbols.h -index b17c56e..4476006 100644 ---- a/rts/RtsSymbols.h -+++ b/rts/RtsSymbols.h -@@ -21,7 +21,8 @@ - typedef struct _RtsSymbolVal { - const SymbolName* lbl; - SymbolAddr* addr; -- bool weak; -+ SymStrength strength; -+ SymType type; - } RtsSymbolVal; - - extern RtsSymbolVal rtsSyms[]; --- -2.33.0 - diff --git a/overlays/patches/ghc/0006-Also-need-pathutils.patch b/overlays/patches/ghc/0006-Also-need-pathutils.patch deleted file mode 100644 index 2fc9b25be4..0000000000 --- a/overlays/patches/ghc/0006-Also-need-pathutils.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 98c7edaad09568127ccc190a4cfd502349ee3ef0 Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 02:47:13 +0000 -Subject: [PATCH 06/12] Also need pathutils. - ---- - rts/PathUtils.h | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/rts/PathUtils.h b/rts/PathUtils.h -index 0b35b21..df4ab3f 100644 ---- a/rts/PathUtils.h -+++ b/rts/PathUtils.h -@@ -8,18 +8,20 @@ - - #pragma once - --#include "BeginPrivate.h" -- - // Use wchar_t for pathnames on Windows (#5697) - #if defined(mingw32_HOST_OS) -+#include "fs_rts.h" -+ - #define pathcmp wcscmp - #define pathlen wcslen --#define pathopen __rts_fwopen --#define pathstat _wstat -+// N.B. Use the Win32-based file routines from utils/fs. -+#define pathopen FS(fwopen) -+#define pathstat FS(_wstat) - #define struct_stat struct _stat - #define open wopen - #define WSTR(s) L##s --#define pathprintf swprintf -+#define pathprintf snwprintf -+#define pathcopy wcscpy - #define pathsize sizeof(wchar_t) - #else - #define pathcmp strcmp -@@ -30,8 +32,11 @@ - #define WSTR(s) s - #define pathprintf snprintf - #define pathsize sizeof(char) -+#define pathcopy strcpy - #endif - -+#include "BeginPrivate.h" -+ - pathchar* pathdup(pathchar *path); - pathchar* pathdir(pathchar *path); - pathchar* mkPath(char* path); --- -2.33.0 - diff --git a/overlays/patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch b/overlays/patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch deleted file mode 100644 index 69ff53f9f4..0000000000 --- a/overlays/patches/ghc/0007-Can-not-have-RtsSymbols.h-without-RtsSymbols.c.patch +++ /dev/null @@ -1,1161 +0,0 @@ -From aa605b8627d6362ba79e97cc2668d6007766fe1f Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 02:47:41 +0000 -Subject: [PATCH 07/12] Can not have RtsSymbols.h without RtsSymbols.c - ---- - rts/RtsSymbols.c | 848 +++++++++++++++++++++++------------------------ - 1 file changed, 420 insertions(+), 428 deletions(-) - -diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c -index 7f3971c..4d12302 100644 ---- a/rts/RtsSymbols.c -+++ b/rts/RtsSymbols.c -@@ -7,17 +7,19 @@ - * ---------------------------------------------------------------------------*/ - - #include "ghcplatform.h" -+#include "Rts.h" - #include "RtsSymbols.h" - --#include "Rts.h" - #include "TopHandler.h" - #include "HsFFI.h" -+#include "CloneStack.h" - - #include "sm/Storage.h" - #include "sm/NonMovingMark.h" -+#include "Arena.h" - #include - --#if !defined(mingw32_HOST_OS) -+#if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H) - #include "posix/Signals.h" - #endif - -@@ -26,12 +28,25 @@ - #include - #include - #include /* SHGetFolderPathW */ -+#include "win32/AsyncWinIO.h" - #endif - - #if defined(openbsd_HOST_OS) - #include /* _DYNAMIC */ - #endif - -+#if defined(HAVE_UNISTD_H) -+#include /* environ */ -+#endif -+ -+#if !HAVE_DECL_ENVIRON -+/* We must provide a prototype for environ since depending upon the libc -+ * version it may or may not be provided by unistd.h. See #20577 and #20861. -+ */ -+extern char **environ; -+#endif -+ -+ - /* ----------------------------------------------------------------------------- - * Symbols to be inserted into the RTS symbol table. - */ -@@ -50,7 +65,7 @@ - SymE_HasProto(libdwPoolRelease) \ - SymE_HasProto(libdwPoolClear) - --#if !defined(mingw32_HOST_OS) -+#if !defined(mingw32_HOST_OS) && !defined(wasm32_HOST_ARCH) - #define RTS_POSIX_ONLY_SYMBOLS \ - SymI_HasProto(__hscore_get_saved_termios) \ - SymI_HasProto(__hscore_set_saved_termios) \ -@@ -58,10 +73,13 @@ - SymI_HasProto(signal_handlers) \ - SymI_HasProto(stg_sig_install) \ - SymI_HasProto(rtsTimerSignal) \ -- SymI_HasProto(atexit) \ - SymI_NeedsDataProto(nocldstop) - #endif - -+#if defined(wasm32_HOST_ARCH) -+#define RTS_POSIX_ONLY_SYMBOLS -+#endif -+ - #if defined(mingw32_HOST_OS) - #define RTS_POSIX_ONLY_SYMBOLS /**/ - -@@ -77,10 +95,27 @@ - #define RTS_WIN64_ONLY(X) /**/ - #endif - -+/* -+ * Note [Strong symbols] -+ * ~~~~~~~~~~~~~~~~~~~~~ -+ * The notion of a *weak* symbol is fairly common in linking: a symbol is weak -+ * if it is declared but not defined, allowing it to be defined by an object -+ * which is loaded later. GHC generalizes this notion, allowing symbol -+ * definitions to be declared as *strong*. A strong symbol is one which will -+ * silently supersede definitions of the same name by later objects. -+ * -+ * This is currently only used in the case of atexit() to workaround an -+ * unfortunate interaction on musl systems (#20350). Specifically, -+ * we include atexit() in RtsSymbols to ensure that it can be used by foreign -+ * code loaded by the RTS linker (see #4456). However, this causes trouble on -+ * statically-linked musl systems since musl's libc.a defines atexit() as a -+ * non-weak symbol, causing it to conflict with the symbol table entry produced -+ * by the RtsSymbols entry. To avoid this we introduce a horrible special case -+ * in `ghciInsertSymbolTable`, ensure that `atexit` is never overridden. -+ */ - /* - * Note [Symbols for MinGW's printf] - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- * - * The printf offered by Microsoft's libc implementation, msvcrt, is quite - * incomplete, lacking support for even %ull. Consequently mingw-w64 offers its - * own implementation which we enable. However, to be thread-safe the -@@ -100,7 +135,6 @@ - */ - /* Note [_iob_func symbol] - * ~~~~~~~~~~~~~~~~~~~~~~~ -- * - * Microsoft in VS2013 to VS2015 transition made a backwards incompatible change - * to the stdio function __iob_func. - * -@@ -133,141 +167,34 @@ - SymI_HasProto(stg_asyncDoProczh) \ - SymI_HasProto(rts_InstallConsoleEvent) \ - SymI_HasProto(rts_ConsoleHandlerDone) \ -- SymI_HasProto(atexit) \ -+ SymI_NeedsProto(__mingw_module_is_dll) \ - RTS_WIN32_ONLY(SymI_NeedsProto(___chkstk_ms)) \ - RTS_WIN64_ONLY(SymI_NeedsProto(___chkstk_ms)) \ -- RTS_WIN32_ONLY(SymI_HasProto(_imp___environ)) \ -- RTS_WIN64_ONLY(SymI_HasProto(__imp__environ)) \ -- RTS_WIN32_ONLY(SymI_HasProto(_imp___iob)) \ -- RTS_WIN64_ONLY(SymI_HasProto(__iob_func)) \ -- RTS_WIN64_ONLY(SymI_HasProto(__acrt_iob_func)) \ -+ RTS_WIN32_ONLY(SymI_HasProto(__stdio_common_vswprintf_s)) \ -+ RTS_WIN32_ONLY(SymI_HasProto(__stdio_common_vswprintf)) \ -+ RTS_WIN64_ONLY(SymI_HasProto(_errno)) \ - /* see Note [Symbols for MinGW's printf] */ \ - SymI_HasProto(_lock_file) \ - SymI_HasProto(_unlock_file) \ - SymI_HasProto(__mingw_vsnwprintf) \ -+ /* ^^ Need to figure out why this is needed. */ \ - /* See Note [_iob_func symbol] */ \ - RTS_WIN64_ONLY(SymI_HasProto_redirect( \ -- __imp___acrt_iob_func, __rts_iob_func, true)) \ -+ __imp___acrt_iob_func, __rts_iob_func, STRENGTH_WEAK, SYM_TYPE_INDIRECT_DATA)) \ - RTS_WIN32_ONLY(SymI_HasProto_redirect( \ -- __imp____acrt_iob_func, __rts_iob_func, true)) \ -+ __imp____acrt_iob_func, __rts_iob_func, STRENGTH_WEAK, SYM_TYPE_INDIRECT_DATA)) \ -+ SymI_HasProto(__mingw_vsnwprintf) \ -+ /* ^^ Need to figure out why this is needed. */ \ -+ SymI_HasProto(__mingw_vfprintf) \ -+ /* ^^ Need to figure out why this is needed. */ \ -+ SymI_HasProto(closure_sizeW_) \ -+ /* ^^ This one needed for cardano-prelude m( */ \ - SymI_NeedsProto(_tzset) \ - /* ^^ This one needed for time, tzset deprecated */\ - SymI_NeedsProto(tzset) \ - /* ^^ This one needed for unix-time */ -- --#define RTS_MINGW_COMPAT_SYMBOLS \ -- SymI_HasProto_deprecated(access) \ -- SymI_HasProto_deprecated(cabs) \ -- SymI_HasProto_deprecated(cgets) \ -- SymI_HasProto_deprecated(chdir) \ -- SymI_HasProto_deprecated(chmod) \ -- SymI_HasProto_deprecated(chsize) \ -- SymI_HasProto_deprecated(close) \ -- SymI_HasProto_deprecated(cprintf) \ -- SymI_HasProto_deprecated(cputs) \ -- SymI_HasProto_deprecated(creat) \ -- SymI_HasProto_deprecated(cscanf) \ -- SymI_HasProto_deprecated(cwait) \ -- SymI_HasProto_deprecated(dup) \ -- SymI_HasProto_deprecated(dup2) \ -- SymI_HasProto_deprecated(ecvt) \ -- SymI_HasProto_deprecated(eof) \ -- SymI_HasProto_deprecated(execl) \ -- SymI_HasProto_deprecated(execle) \ -- SymI_HasProto_deprecated(execlp) \ -- SymI_HasProto_deprecated(execlpe) \ -- SymI_HasProto_deprecated(execv) \ -- SymI_HasProto_deprecated(execve) \ -- SymI_HasProto_deprecated(execvp) \ -- SymI_HasProto_deprecated(execvpe) \ -- SymI_HasProto_deprecated(fcloseall) \ -- SymI_HasProto_deprecated(fcvt) \ -- SymI_HasProto_deprecated(fdopen) \ -- SymI_HasProto_deprecated(fgetchar) \ -- SymI_HasProto_deprecated(filelength) \ -- SymI_HasProto_deprecated(fileno) \ -- SymI_HasProto_deprecated(flushall) \ -- SymI_HasProto_deprecated(fputchar) \ -- SymI_HasProto_deprecated(gcvt) \ -- SymI_HasProto_deprecated(getch) \ -- SymI_HasProto_deprecated(getche) \ -- SymI_HasProto_deprecated(getcwd) \ -- SymI_HasProto_deprecated(getpid) \ -- SymI_HasProto_deprecated(getw) \ -- SymI_HasProto_deprecated(hypot) \ -- SymI_HasProto_deprecated(inp) \ -- SymI_HasProto_deprecated(inpw) \ -- SymI_HasProto_deprecated(isascii) \ -- SymI_HasProto_deprecated(isatty) \ -- SymI_HasProto_deprecated(iscsym) \ -- SymI_HasProto_deprecated(iscsymf) \ -- SymI_HasProto_deprecated(itoa) \ -- SymI_HasProto_deprecated(j0) \ -- SymI_HasProto_deprecated(j1) \ -- SymI_HasProto_deprecated(jn) \ -- SymI_HasProto_deprecated(kbhit) \ -- SymI_HasProto_deprecated(lfind) \ -- SymI_HasProto_deprecated(locking) \ -- SymI_HasProto_deprecated(lsearch) \ -- SymI_HasProto_deprecated(lseek) \ -- SymI_HasProto_deprecated(ltoa) \ -- SymI_HasProto_deprecated(memccpy) \ -- SymI_HasProto_deprecated(memicmp) \ -- SymI_HasProto_deprecated(mkdir) \ -- SymI_HasProto_deprecated(mktemp) \ -- SymI_HasProto_deprecated(open) \ -- SymI_HasProto_deprecated(outp) \ -- SymI_HasProto_deprecated(outpw) \ -- SymI_HasProto_deprecated(putch) \ -- SymI_HasProto_deprecated(putenv) \ -- SymI_HasProto_deprecated(putw) \ -- SymI_HasProto_deprecated(read) \ -- SymI_HasProto_deprecated(rmdir) \ -- SymI_HasProto_deprecated(rmtmp) \ -- SymI_HasProto_deprecated(setmode) \ -- SymI_HasProto_deprecated(sopen) \ -- SymI_HasProto_deprecated(spawnl) \ -- SymI_HasProto_deprecated(spawnle) \ -- SymI_HasProto_deprecated(spawnlp) \ -- SymI_HasProto_deprecated(spawnlpe) \ -- SymI_HasProto_deprecated(spawnv) \ -- SymI_HasProto_deprecated(spawnve) \ -- SymI_HasProto_deprecated(spawnvp) \ -- SymI_HasProto_deprecated(spawnvpe) \ -- SymI_HasProto_deprecated(strcmpi) \ -- SymI_HasProto_deprecated(strdup) \ -- SymI_HasProto_deprecated(stricmp) \ -- SymI_HasProto_deprecated(strlwr) \ -- SymI_HasProto_deprecated(strnicmp) \ -- SymI_HasProto_deprecated(strnset) \ -- SymI_HasProto_deprecated(strrev) \ -- SymI_HasProto_deprecated(strset) \ -- SymI_HasProto_deprecated(strupr) \ -- SymI_HasProto_deprecated(swab) \ -- SymI_HasProto_deprecated(tell) \ -- SymI_HasProto_deprecated(tempnam) \ -- SymI_HasProto_deprecated(toascii) \ -- SymI_HasProto_deprecated(tzset) \ -- SymI_HasProto_deprecated(ultoa) \ -- SymI_HasProto_deprecated(umask) \ -- SymI_HasProto_deprecated(ungetch) \ -- SymI_HasProto_deprecated(unlink) \ -- SymI_HasProto_deprecated(wcsdup) \ -- SymI_HasProto_deprecated(wcsicmp) \ -- SymI_HasProto_deprecated(wcsicoll) \ -- SymI_HasProto_deprecated(wcslwr) \ -- SymI_HasProto_deprecated(wcsnicmp) \ -- SymI_HasProto_deprecated(wcsnset) \ -- SymI_HasProto_deprecated(wcsrev) \ -- SymI_HasProto_deprecated(wcsset) \ -- SymI_HasProto_deprecated(wcsupr) \ -- SymI_HasProto_deprecated(write) \ -- SymI_HasProto_deprecated(y0) \ -- SymI_HasProto_deprecated(y1) \ -- SymI_HasProto_deprecated(yn) - #else - #define RTS_MINGW_ONLY_SYMBOLS /**/ --#define RTS_MINGW_COMPAT_SYMBOLS /**/ - #endif - - -@@ -340,15 +267,18 @@ - SymI_HasProto(setIOManagerControlFd) \ - SymI_HasProto(setTimerManagerControlFd) \ - SymI_HasProto(setIOManagerWakeupFd) \ -- SymI_HasProto(ioManagerWakeup) \ - SymI_HasProto(blockUserSignals) \ - SymI_HasProto(unblockUserSignals) - #else --#define RTS_USER_SIGNALS_SYMBOLS \ -- SymI_HasProto(ioManagerWakeup) \ -- SymI_HasProto(sendIOManagerEvent) \ -- SymI_HasProto(readIOManagerEvent) \ -- SymI_HasProto(getIOManagerEvent) \ -+#define RTS_USER_SIGNALS_SYMBOLS \ -+ SymI_HasProto(registerIOCPHandle) \ -+ SymI_HasProto(getOverlappedEntries) \ -+ SymI_HasProto(completeSynchronousRequest) \ -+ SymI_HasProto(registerAlertableWait) \ -+ SymI_HasProto(sendIOManagerEvent) \ -+ SymI_HasProto(readIOManagerEvent) \ -+ SymI_HasProto(getIOManagerEvent) \ -+ SymI_HasProto(ioManagerFinished) \ - SymI_HasProto(console_handler) - #endif - -@@ -394,7 +324,7 @@ - #endif - - /* Modules compiled with -ticky may mention ticky counters */ --/* This list should marry up with the one in $(TOP)/includes/stg/Ticky.h */ -+/* This list should marry up with the one in $(TOP)/rts/include/stg/Ticky.h */ - #define RTS_TICKY_SYMBOLS \ - SymI_NeedsDataProto(ticky_entry_ctrs) \ - SymI_NeedsDataProto(top_ct) \ -@@ -412,6 +342,7 @@ - SymI_HasProto(ENT_DYN_IND_ctr) \ - SymI_HasProto(ENT_PERM_IND_ctr) \ - SymI_HasProto(ENT_PAP_ctr) \ -+ SymI_HasProto(ENT_CONTINUATION_ctr) \ - SymI_HasProto(ENT_AP_ctr) \ - SymI_HasProto(ENT_AP_STACK_ctr) \ - SymI_HasProto(ENT_BH_ctr) \ -@@ -503,13 +434,19 @@ - SymI_HasProto(ALLOC_PAP_gds) \ - SymI_HasProto(ALLOC_PAP_slp) \ - SymI_HasProto(ALLOC_TSO_ctr) \ -- SymI_HasProto(ALLOC_TSO_adm) \ -- SymI_HasProto(ALLOC_TSO_gds) \ -- SymI_HasProto(ALLOC_TSO_slp) \ -+ SymI_HasProto(ALLOC_TSO_tot) \ -+ SymI_HasProto(ALLOC_STACK_ctr) \ -+ SymI_HasProto(ALLOC_STACK_tot) \ - SymI_HasProto(RET_NEW_ctr) \ - SymI_HasProto(RET_OLD_ctr) \ - SymI_HasProto(RET_UNBOXED_TUP_ctr) \ - SymI_HasProto(RET_SEMI_loads_avoided) \ -+ \ -+ SymI_HasProto(TAG_UNTAGGED_pred) \ -+ SymI_HasProto(TAG_UNTAGGED_miss) \ -+ SymI_HasProto(TAG_TAGGED_pred) \ -+ SymI_HasProto(TAG_TAGGED_miss) \ -+ \ - SymI_HasProto(RET_NEW_hst) \ - SymI_HasProto(RET_OLD_hst) \ - SymI_HasProto(RET_UNBOXED_TUP_hst) -@@ -539,57 +476,49 @@ - SymI_HasProto(mkCostCentre) \ - SymI_HasProto(registerCcList) \ - SymI_HasProto(registerCcsList) \ -- SymI_HasProto(era) -+ SymI_HasProto(era) \ -+ SymI_HasProto(user_era) - #else - #define RTS_PROF_SYMBOLS /* empty */ - #endif - --#if RTS_LINKER_USE_MMAP --#define RTS_LINKER_USE_MMAP_SYMBOLS \ -- SymI_HasProto(allocateWrite) \ -- SymI_HasProto(freeWrite) \ -- SymI_HasProto(markExec) --#else --#define RTS_LINKER_USE_MMAP_SYMBOLS /* empty */ --#endif -- - #define RTS_SYMBOLS \ - Maybe_Stable_Names \ - RTS_TICKY_SYMBOLS \ - RTS_PROF_SYMBOLS \ - RTS_LIBDW_SYMBOLS \ -- RTS_LINKER_USE_MMAP_SYMBOLS \ - SymI_HasProto(StgReturn) \ -- SymI_HasProto(stg_gc_noregs) \ -- SymI_HasProto(stg_ret_v_info) \ -- SymI_HasProto(stg_ret_p_info) \ -- SymI_HasProto(stg_ret_n_info) \ -- SymI_HasProto(stg_ret_f_info) \ -- SymI_HasProto(stg_ret_d_info) \ -- SymI_HasProto(stg_ret_l_info) \ -- SymI_HasProto(stg_ret_t_info) \ -- SymI_HasProto(stg_ctoi_t) \ -- SymI_HasProto(stg_gc_prim_p) \ -- SymI_HasProto(stg_gc_prim_pp) \ -- SymI_HasProto(stg_gc_prim_n) \ -- SymI_HasProto(stg_enter_info) \ -- SymI_HasProto(__stg_gc_enter_1) \ -- SymI_HasProto(stg_gc_unpt_r1) \ -- SymI_HasProto(stg_gc_unbx_r1) \ -- SymI_HasProto(stg_gc_f1) \ -- SymI_HasProto(stg_gc_d1) \ -- SymI_HasProto(stg_gc_l1) \ -- SymI_HasProto(stg_gc_pp) \ -- SymI_HasProto(stg_gc_ppp) \ -- SymI_HasProto(stg_gc_pppp) \ -- SymI_HasProto(__stg_gc_fun) \ -- SymI_HasProto(stg_gc_fun_info) \ -- SymI_HasProto(stg_yield_noregs) \ -- SymI_HasProto(stg_yield_to_interpreter) \ -- SymI_HasProto(stg_block_noregs) \ -- SymI_HasProto(stg_block_takemvar) \ -- SymI_HasProto(stg_block_readmvar) \ -- SymI_HasProto(stg_block_putmvar) \ -+ SymI_HasDataProto(stg_gc_noregs) \ -+ SymI_HasDataProto(stg_ret_v_info) \ -+ SymI_HasDataProto(stg_ret_p_info) \ -+ SymI_HasDataProto(stg_ret_n_info) \ -+ SymI_HasDataProto(stg_ret_f_info) \ -+ SymI_HasDataProto(stg_ret_d_info) \ -+ SymI_HasDataProto(stg_ret_l_info) \ -+ SymI_HasDataProto(stg_ret_t_info) \ -+ SymI_HasDataProto(stg_ctoi_t) \ -+ SymI_HasDataProto(stg_primcall_info) \ -+ SymI_HasDataProto(stg_gc_prim_p) \ -+ SymI_HasDataProto(stg_gc_prim_pp) \ -+ SymI_HasDataProto(stg_gc_prim_n) \ -+ SymI_HasDataProto(stg_enter_info) \ -+ SymI_HasDataProto(__stg_gc_enter_1) \ -+ SymI_HasDataProto(stg_gc_unpt_r1) \ -+ SymI_HasDataProto(stg_gc_unbx_r1) \ -+ SymI_HasDataProto(stg_gc_f1) \ -+ SymI_HasDataProto(stg_gc_d1) \ -+ SymI_HasDataProto(stg_gc_l1) \ -+ SymI_HasDataProto(stg_gc_pp) \ -+ SymI_HasDataProto(stg_gc_ppp) \ -+ SymI_HasDataProto(stg_gc_pppp) \ -+ SymI_HasDataProto(__stg_gc_fun) \ -+ SymI_HasDataProto(stg_gc_fun_info) \ -+ SymI_HasDataProto(stg_yield_noregs) \ -+ SymI_HasDataProto(stg_yield_to_interpreter) \ -+ SymI_HasDataProto(stg_block_noregs) \ -+ SymI_HasDataProto(stg_block_takemvar) \ -+ SymI_HasDataProto(stg_block_readmvar) \ -+ SymI_HasDataProto(stg_block_putmvar) \ - MAIN_CAP_SYM \ - SymI_HasProto(addDLL) \ - SymI_HasProto(addLibrarySearchPath) \ -@@ -599,39 +528,41 @@ - SymI_HasProto(__word_encodeDouble) \ - SymI_HasProto(__int_encodeFloat) \ - SymI_HasProto(__word_encodeFloat) \ -- SymI_HasProto(stg_atomicallyzh) \ -+ SymI_HasDataProto(stg_atomicallyzh) \ - SymI_HasProto(barf) \ -+ SymI_HasProto(flushEventLog) \ - SymI_HasProto(deRefStablePtr) \ - SymI_HasProto(debugBelch) \ - SymI_HasProto(errorBelch) \ - SymI_HasProto(sysErrorBelch) \ -- SymI_HasProto(stg_getMaskingStatezh) \ -- SymI_HasProto(stg_maskAsyncExceptionszh) \ -- SymI_HasProto(stg_maskUninterruptiblezh) \ -- SymI_HasProto(stg_catchzh) \ -- SymI_HasProto(stg_catchRetryzh) \ -- SymI_HasProto(stg_catchSTMzh) \ -- SymI_HasProto(stg_clearCCSzh) \ -- SymI_HasProto(stg_compactAddWithSharingzh) \ -- SymI_HasProto(stg_compactAddzh) \ -- SymI_HasProto(stg_compactNewzh) \ -- SymI_HasProto(stg_compactResizzezh) \ -- SymI_HasProto(stg_compactContainszh) \ -- SymI_HasProto(stg_compactContainsAnyzh) \ -- SymI_HasProto(stg_compactGetFirstBlockzh) \ -- SymI_HasProto(stg_compactGetNextBlockzh) \ -- SymI_HasProto(stg_compactAllocateBlockzh) \ -- SymI_HasProto(stg_compactFixupPointerszh) \ -- SymI_HasProto(stg_compactSizzezh) \ -+ SymI_HasDataProto(stg_getMaskingStatezh) \ -+ SymI_HasDataProto(stg_maskAsyncExceptionszh) \ -+ SymI_HasDataProto(stg_maskUninterruptiblezh) \ -+ SymI_HasDataProto(stg_catchzh) \ -+ SymI_HasDataProto(stg_catchRetryzh) \ -+ SymI_HasDataProto(stg_catchSTMzh) \ -+ SymI_HasDataProto(stg_clearCCSzh) \ -+ SymI_HasDataProto(stg_compactAddWithSharingzh) \ -+ SymI_HasDataProto(stg_compactAddzh) \ -+ SymI_HasDataProto(stg_compactNewzh) \ -+ SymI_HasDataProto(stg_compactResizzezh) \ -+ SymI_HasDataProto(stg_compactContainszh) \ -+ SymI_HasDataProto(stg_compactContainsAnyzh) \ -+ SymI_HasDataProto(stg_compactGetFirstBlockzh) \ -+ SymI_HasDataProto(stg_compactGetNextBlockzh) \ -+ SymI_HasDataProto(stg_compactAllocateBlockzh) \ -+ SymI_HasDataProto(stg_compactFixupPointerszh) \ -+ SymI_HasDataProto(stg_compactSizzezh) \ - SymI_HasProto(closure_flags) \ -+ SymI_HasProto(eq_thread) \ - SymI_HasProto(cmp_thread) \ - SymI_HasProto(createAdjustor) \ -- SymI_HasProto(stg_decodeDoublezu2Intzh) \ -- SymI_HasProto(stg_decodeDoublezuInt64zh) \ -- SymI_HasProto(stg_decodeFloatzuIntzh) \ -- SymI_HasProto(stg_delayzh) \ -- SymI_HasProto(stg_deRefWeakzh) \ -- SymI_HasProto(stg_deRefStablePtrzh) \ -+ SymI_HasDataProto(stg_decodeDoublezu2Intzh) \ -+ SymI_HasDataProto(stg_decodeDoublezuInt64zh) \ -+ SymI_HasDataProto(stg_decodeFloatzuIntzh) \ -+ SymI_HasDataProto(stg_delayzh) \ -+ SymI_HasDataProto(stg_deRefWeakzh) \ -+ SymI_HasDataProto(stg_deRefStablePtrzh) \ - SymI_HasProto(dirty_MUT_VAR) \ - SymI_HasProto(dirty_TVAR) \ - SymI_HasProto(stg_forkzh) \ -@@ -650,11 +581,11 @@ - SymI_HasProto(getOrSetLibHSghcFastStringTable) \ - SymI_HasProto(getRTSStats) \ - SymI_HasProto(getRTSStatsEnabled) \ -- SymI_HasProto(getOrSetLibHSghcPersistentLinkerState) \ -- SymI_HasProto(getOrSetLibHSghcInitLinkerDone) \ -- SymI_HasProto(getOrSetLibHSghcGlobalDynFlags) \ -- SymI_HasProto(GenSymCounter) \ -- SymI_HasProto(GenSymInc) \ -+ SymI_HasProto(getOrSetLibHSghcGlobalHasPprDebug) \ -+ SymI_HasProto(getOrSetLibHSghcGlobalHasNoDebugOutput) \ -+ SymI_HasProto(getOrSetLibHSghcGlobalHasNoStateHack) \ -+ SymI_HasProto(ghc_unique_counter64) \ -+ SymI_HasProto(ghc_unique_inc) \ - SymI_HasProto(genericRaise) \ - SymI_HasProto(getProgArgv) \ - SymI_HasProto(getFullProgArgv) \ -@@ -684,78 +615,92 @@ - SymI_HasProto(defaultRtsConfig) \ - SymI_HasProto(initLinker) \ - SymI_HasProto(initLinker_) \ -- SymI_HasProto(stg_unpackClosurezh) \ -- SymI_HasProto(stg_closureSizzezh) \ -- SymI_HasProto(stg_getApStackValzh) \ -- SymI_HasProto(stg_getSparkzh) \ -- SymI_HasProto(stg_numSparkszh) \ -- SymI_HasProto(stg_isCurrentThreadBoundzh) \ -- SymI_HasProto(stg_isEmptyMVarzh) \ -- SymI_HasProto(stg_killThreadzh) \ -+ SymI_HasDataProto(stg_unpackClosurezh) \ -+ SymI_HasDataProto(stg_closureSizzezh) \ -+ SymI_HasDataProto(stg_whereFromzh) \ -+ SymI_HasDataProto(stg_getApStackValzh) \ -+ SymI_HasDataProto(stg_getSparkzh) \ -+ SymI_HasDataProto(stg_numSparkszh) \ -+ SymI_HasDataProto(stg_isCurrentThreadBoundzh) \ -+ SymI_HasDataProto(stg_isEmptyMVarzh) \ -+ SymI_HasDataProto(stg_killThreadzh) \ -+ SymI_HasDataProto(stg_listThreadszh) \ -+ SymI_HasDataProto(stg_threadLabelzh) \ - SymI_HasProto(loadArchive) \ - SymI_HasProto(loadObj) \ - SymI_HasProto(purgeObj) \ - SymI_HasProto(insertSymbol) \ - SymI_HasProto(lookupSymbol) \ -- SymI_HasProto(stg_makeStablePtrzh) \ -- SymI_HasProto(stg_mkApUpd0zh) \ -- SymI_HasProto(stg_labelThreadzh) \ -- SymI_HasProto(stg_newArrayzh) \ -- SymI_HasProto(stg_copyArrayzh) \ -- SymI_HasProto(stg_copyMutableArrayzh) \ -- SymI_HasProto(stg_copyArrayArrayzh) \ -- SymI_HasProto(stg_copyMutableArrayArrayzh) \ -- SymI_HasProto(stg_cloneArrayzh) \ -- SymI_HasProto(stg_cloneMutableArrayzh) \ -- SymI_HasProto(stg_freezzeArrayzh) \ -- SymI_HasProto(stg_thawArrayzh) \ -- SymI_HasProto(stg_newArrayArrayzh) \ -- SymI_HasProto(stg_casArrayzh) \ -- SymI_HasProto(stg_newSmallArrayzh) \ -- SymI_HasProto(stg_unsafeThawSmallArrayzh) \ -- SymI_HasProto(stg_cloneSmallArrayzh) \ -- SymI_HasProto(stg_cloneSmallMutableArrayzh) \ -- SymI_HasProto(stg_freezzeSmallArrayzh) \ -- SymI_HasProto(stg_thawSmallArrayzh) \ -- SymI_HasProto(stg_copySmallArrayzh) \ -- SymI_HasProto(stg_copySmallMutableArrayzh) \ -- SymI_HasProto(stg_casSmallArrayzh) \ -- SymI_HasProto(stg_copyArray_barrier) \ -- SymI_HasProto(stg_newBCOzh) \ -- SymI_HasProto(stg_newByteArrayzh) \ -- SymI_HasProto(stg_casIntArrayzh) \ -- SymI_HasProto(stg_newMVarzh) \ -- SymI_HasProto(stg_newMutVarzh) \ -- SymI_HasProto(stg_newTVarzh) \ -- SymI_HasProto(stg_noDuplicatezh) \ -- SymI_HasProto(stg_atomicModifyMutVar2zh) \ -- SymI_HasProto(stg_atomicModifyMutVarzuzh) \ -- SymI_HasProto(stg_casMutVarzh) \ -- SymI_HasProto(stg_newPinnedByteArrayzh) \ -- SymI_HasProto(stg_newAlignedPinnedByteArrayzh) \ -- SymI_HasProto(stg_isByteArrayPinnedzh) \ -- SymI_HasProto(stg_isMutableByteArrayPinnedzh) \ -- SymI_HasProto(stg_shrinkMutableByteArrayzh) \ -- SymI_HasProto(stg_resizzeMutableByteArrayzh) \ -- SymI_HasProto(stg_shrinkSmallMutableArrayzh) \ -+ SymI_HasDataProto(stg_makeStablePtrzh) \ -+ SymI_HasDataProto(stg_mkApUpd0zh) \ -+ SymI_HasDataProto(stg_labelThreadzh) \ -+ SymI_HasDataProto(stg_newArrayzh) \ -+ SymI_HasDataProto(stg_copyArrayzh) \ -+ SymI_HasDataProto(stg_copyMutableArrayzh) \ -+ SymI_HasDataProto(stg_cloneArrayzh) \ -+ SymI_HasDataProto(stg_cloneMutableArrayzh) \ -+ SymI_HasDataProto(stg_freezzeArrayzh) \ -+ SymI_HasDataProto(stg_thawArrayzh) \ -+ SymI_HasDataProto(stg_casArrayzh) \ -+ SymI_HasDataProto(stg_newSmallArrayzh) \ -+ SymI_HasDataProto(stg_unsafeThawSmallArrayzh) \ -+ SymI_HasDataProto(stg_cloneSmallArrayzh) \ -+ SymI_HasDataProto(stg_cloneSmallMutableArrayzh) \ -+ SymI_HasDataProto(stg_freezzeSmallArrayzh) \ -+ SymI_HasDataProto(stg_thawSmallArrayzh) \ -+ SymI_HasDataProto(stg_copySmallArrayzh) \ -+ SymI_HasDataProto(stg_copySmallMutableArrayzh) \ -+ SymI_HasDataProto(stg_casSmallArrayzh) \ -+ SymI_HasDataProto(stg_copyArray_barrier) \ -+ SymI_HasDataProto(stg_newBCOzh) \ -+ SymI_HasDataProto(stg_newByteArrayzh) \ -+ SymI_HasDataProto(stg_casIntArrayzh) \ -+ SymI_HasDataProto(stg_casInt8Arrayzh) \ -+ SymI_HasDataProto(stg_casInt16Arrayzh) \ -+ SymI_HasDataProto(stg_casInt32Arrayzh) \ -+ SymI_HasDataProto(stg_casInt64Arrayzh) \ -+ SymI_HasDataProto(stg_newMVarzh) \ -+ SymI_HasDataProto(stg_newMutVarzh) \ -+ SymI_HasDataProto(stg_newTVarzh) \ -+ SymI_HasDataProto(stg_readIOPortzh) \ -+ SymI_HasDataProto(stg_writeIOPortzh) \ -+ SymI_HasDataProto(stg_newIOPortzh) \ -+ SymI_HasDataProto(stg_noDuplicatezh) \ -+ SymI_HasDataProto(stg_atomicModifyMutVar2zh) \ -+ SymI_HasDataProto(stg_atomicModifyMutVarzuzh) \ -+ SymI_HasDataProto(stg_casMutVarzh) \ -+ SymI_HasDataProto(stg_newPinnedByteArrayzh) \ -+ SymI_HasDataProto(stg_newAlignedPinnedByteArrayzh) \ -+ SymI_HasDataProto(stg_isByteArrayPinnedzh) \ -+ SymI_HasDataProto(stg_isMutableByteArrayPinnedzh) \ -+ SymI_HasDataProto(stg_shrinkMutableByteArrayzh) \ -+ SymI_HasDataProto(stg_resizzeMutableByteArrayzh) \ -+ SymI_HasDataProto(stg_shrinkSmallMutableArrayzh) \ - SymI_HasProto(newSpark) \ - SymI_HasProto(updateRemembSetPushThunk) \ - SymI_HasProto(updateRemembSetPushThunk_) \ - SymI_HasProto(updateRemembSetPushClosure_) \ - SymI_HasProto(performGC) \ - SymI_HasProto(performMajorGC) \ -+ SymI_HasProto(performBlockingMajorGC) \ - SymI_HasProto(prog_argc) \ - SymI_HasProto(prog_argv) \ -- SymI_HasProto(stg_putMVarzh) \ -- SymI_HasProto(stg_raisezh) \ -- SymI_HasProto(stg_raiseIOzh) \ -- SymI_HasProto(stg_readTVarzh) \ -- SymI_HasProto(stg_readTVarIOzh) \ -+ SymI_HasDataProto(stg_putMVarzh) \ -+ SymI_HasDataProto(stg_raisezh) \ -+ SymI_HasDataProto(stg_raiseDivZZerozh) \ -+ SymI_HasDataProto(stg_raiseUnderflowzh) \ -+ SymI_HasDataProto(stg_raiseOverflowzh) \ -+ SymI_HasDataProto(stg_raiseIOzh) \ -+ SymI_HasDataProto(stg_keepAlivezh) \ -+ SymI_HasDataProto(stg_paniczh) \ -+ SymI_HasDataProto(stg_absentErrorzh) \ -+ SymI_HasDataProto(stg_readTVarzh) \ -+ SymI_HasDataProto(stg_readTVarIOzh) \ - SymI_HasProto(resumeThread) \ - SymI_HasProto(setNumCapabilities) \ - SymI_HasProto(getNumberOfProcessors) \ - SymI_HasProto(resolveObjs) \ -- SymI_HasProto(stg_retryzh) \ -+ SymI_HasDataProto(stg_retryzh) \ - SymI_HasProto(rts_apply) \ - SymI_HasProto(rts_checkSchedStatus) \ - SymI_HasProto(rts_eval) \ -@@ -764,6 +709,7 @@ - SymI_HasProto(rts_evalStableIOMain) \ - SymI_HasProto(rts_evalStableIO) \ - SymI_HasProto(rts_eval_) \ -+ SymI_HasProto(rts_inCall) \ - SymI_HasProto(rts_getBool) \ - SymI_HasProto(rts_getChar) \ - SymI_HasProto(rts_getDouble) \ -@@ -806,6 +752,9 @@ - SymI_HasProto(rtsSupportsBoundThreads) \ - SymI_HasProto(rts_isProfiled) \ - SymI_HasProto(rts_isDynamic) \ -+ SymI_HasProto(rts_isThreaded) \ -+ SymI_HasProto(rts_isDebugged) \ -+ SymI_HasProto(rts_isTracing) \ - SymI_HasProto(rts_setInCallCapability) \ - SymI_HasProto(rts_enableThreadAllocationLimit) \ - SymI_HasProto(rts_disableThreadAllocationLimit) \ -@@ -818,134 +767,137 @@ - SymI_HasProto(stable_ptr_table) \ - SymI_HasProto(reportStackOverflow) \ - SymI_HasProto(reportHeapOverflow) \ -- SymI_HasProto(stg_CAF_BLACKHOLE_info) \ -- SymI_HasProto(stg_BLACKHOLE_info) \ -- SymI_HasProto(__stg_EAGER_BLACKHOLE_info) \ -- SymI_HasProto(stg_BLOCKING_QUEUE_CLEAN_info) \ -- SymI_HasProto(stg_BLOCKING_QUEUE_DIRTY_info) \ -+ SymI_HasDataProto(stg_CAF_BLACKHOLE_info) \ -+ SymI_HasDataProto(stg_BLACKHOLE_info) \ -+ SymI_HasDataProto(__stg_EAGER_BLACKHOLE_info) \ -+ SymI_HasDataProto(stg_BLOCKING_QUEUE_CLEAN_info) \ -+ SymI_HasDataProto(stg_BLOCKING_QUEUE_DIRTY_info) \ - SymI_HasProto(startTimer) \ -- SymI_HasProto(stg_MVAR_CLEAN_info) \ -- SymI_HasProto(stg_MVAR_DIRTY_info) \ -- SymI_HasProto(stg_TVAR_CLEAN_info) \ -- SymI_HasProto(stg_TVAR_DIRTY_info) \ -- SymI_HasProto(stg_IND_STATIC_info) \ -- SymI_HasProto(stg_ARR_WORDS_info) \ -- SymI_HasProto(stg_MUT_ARR_PTRS_DIRTY_info) \ -- SymI_HasProto(stg_MUT_ARR_PTRS_FROZEN_CLEAN_info) \ -- SymI_HasProto(stg_MUT_ARR_PTRS_FROZEN_DIRTY_info) \ -- SymI_HasProto(stg_SMALL_MUT_ARR_PTRS_DIRTY_info) \ -- SymI_HasProto(stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN_info) \ -- SymI_HasProto(stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY_info) \ -- SymI_HasProto(stg_MUT_VAR_CLEAN_info) \ -- SymI_HasProto(stg_MUT_VAR_DIRTY_info) \ -- SymI_HasProto(stg_WEAK_info) \ -- SymI_HasProto(stg_SRT_1_info) \ -- SymI_HasProto(stg_SRT_2_info) \ -- SymI_HasProto(stg_SRT_3_info) \ -- SymI_HasProto(stg_SRT_4_info) \ -- SymI_HasProto(stg_SRT_5_info) \ -- SymI_HasProto(stg_SRT_6_info) \ -- SymI_HasProto(stg_SRT_7_info) \ -- SymI_HasProto(stg_SRT_8_info) \ -- SymI_HasProto(stg_SRT_9_info) \ -- SymI_HasProto(stg_SRT_10_info) \ -- SymI_HasProto(stg_SRT_11_info) \ -- SymI_HasProto(stg_SRT_12_info) \ -- SymI_HasProto(stg_SRT_13_info) \ -- SymI_HasProto(stg_SRT_14_info) \ -- SymI_HasProto(stg_SRT_15_info) \ -- SymI_HasProto(stg_SRT_16_info) \ -- SymI_HasProto(stg_ap_v_info) \ -- SymI_HasProto(stg_ap_f_info) \ -- SymI_HasProto(stg_ap_d_info) \ -- SymI_HasProto(stg_ap_l_info) \ -- SymI_HasProto(stg_ap_v16_info) \ -- SymI_HasProto(stg_ap_v32_info) \ -- SymI_HasProto(stg_ap_v64_info) \ -- SymI_HasProto(stg_ap_n_info) \ -- SymI_HasProto(stg_ap_p_info) \ -- SymI_HasProto(stg_ap_pv_info) \ -- SymI_HasProto(stg_ap_pp_info) \ -- SymI_HasProto(stg_ap_ppv_info) \ -- SymI_HasProto(stg_ap_ppp_info) \ -- SymI_HasProto(stg_ap_pppv_info) \ -- SymI_HasProto(stg_ap_pppp_info) \ -- SymI_HasProto(stg_ap_ppppp_info) \ -- SymI_HasProto(stg_ap_pppppp_info) \ -- SymI_HasProto(stg_ap_0_fast) \ -- SymI_HasProto(stg_ap_v_fast) \ -- SymI_HasProto(stg_ap_f_fast) \ -- SymI_HasProto(stg_ap_d_fast) \ -- SymI_HasProto(stg_ap_l_fast) \ -- SymI_HasProto(stg_ap_v16_fast) \ -- SymI_HasProto(stg_ap_v32_fast) \ -- SymI_HasProto(stg_ap_v64_fast) \ -- SymI_HasProto(stg_ap_n_fast) \ -- SymI_HasProto(stg_ap_p_fast) \ -- SymI_HasProto(stg_ap_pv_fast) \ -- SymI_HasProto(stg_ap_pp_fast) \ -- SymI_HasProto(stg_ap_ppv_fast) \ -- SymI_HasProto(stg_ap_ppp_fast) \ -- SymI_HasProto(stg_ap_pppv_fast) \ -- SymI_HasProto(stg_ap_pppp_fast) \ -- SymI_HasProto(stg_ap_ppppp_fast) \ -- SymI_HasProto(stg_ap_pppppp_fast) \ -- SymI_HasProto(stg_ap_1_upd_info) \ -- SymI_HasProto(stg_ap_2_upd_info) \ -- SymI_HasProto(stg_ap_3_upd_info) \ -- SymI_HasProto(stg_ap_4_upd_info) \ -- SymI_HasProto(stg_ap_5_upd_info) \ -- SymI_HasProto(stg_ap_6_upd_info) \ -- SymI_HasProto(stg_ap_7_upd_info) \ -- SymI_HasProto(stg_exit) \ -- SymI_HasProto(stg_sel_0_upd_info) \ -- SymI_HasProto(stg_sel_1_upd_info) \ -- SymI_HasProto(stg_sel_2_upd_info) \ -- SymI_HasProto(stg_sel_3_upd_info) \ -- SymI_HasProto(stg_sel_4_upd_info) \ -- SymI_HasProto(stg_sel_5_upd_info) \ -- SymI_HasProto(stg_sel_6_upd_info) \ -- SymI_HasProto(stg_sel_7_upd_info) \ -- SymI_HasProto(stg_sel_8_upd_info) \ -- SymI_HasProto(stg_sel_9_upd_info) \ -- SymI_HasProto(stg_sel_10_upd_info) \ -- SymI_HasProto(stg_sel_11_upd_info) \ -- SymI_HasProto(stg_sel_12_upd_info) \ -- SymI_HasProto(stg_sel_13_upd_info) \ -- SymI_HasProto(stg_sel_14_upd_info) \ -- SymI_HasProto(stg_sel_15_upd_info) \ -- SymI_HasProto(stg_sel_0_noupd_info) \ -- SymI_HasProto(stg_sel_1_noupd_info) \ -- SymI_HasProto(stg_sel_2_noupd_info) \ -- SymI_HasProto(stg_sel_3_noupd_info) \ -- SymI_HasProto(stg_sel_4_noupd_info) \ -- SymI_HasProto(stg_sel_5_noupd_info) \ -- SymI_HasProto(stg_sel_6_noupd_info) \ -- SymI_HasProto(stg_sel_7_noupd_info) \ -- SymI_HasProto(stg_sel_8_noupd_info) \ -- SymI_HasProto(stg_sel_9_noupd_info) \ -- SymI_HasProto(stg_sel_10_noupd_info) \ -- SymI_HasProto(stg_sel_11_noupd_info) \ -- SymI_HasProto(stg_sel_12_noupd_info) \ -- SymI_HasProto(stg_sel_13_noupd_info) \ -- SymI_HasProto(stg_sel_14_noupd_info) \ -- SymI_HasProto(stg_sel_15_noupd_info) \ -- SymI_HasProto(stg_upd_frame_info) \ -- SymI_HasProto(stg_bh_upd_frame_info) \ -- SymI_HasProto(suspendThread) \ -- SymI_HasProto(stg_takeMVarzh) \ -- SymI_HasProto(stg_readMVarzh) \ -- SymI_HasProto(stg_threadStatuszh) \ -- SymI_HasProto(stg_tryPutMVarzh) \ -- SymI_HasProto(stg_tryTakeMVarzh) \ -- SymI_HasProto(stg_tryReadMVarzh) \ -- SymI_HasProto(stg_unmaskAsyncExceptionszh) \ -- SymI_HasProto(unloadObj) \ -- SymI_HasProto(stg_unsafeThawArrayzh) \ -- SymI_HasProto(stg_waitReadzh) \ -- SymI_HasProto(stg_waitWritezh) \ -- SymI_HasProto(stg_writeTVarzh) \ -- SymI_HasProto(stg_yieldzh) \ -+ SymI_HasDataProto(stg_MVAR_CLEAN_info) \ -+ SymI_HasDataProto(stg_MVAR_DIRTY_info) \ -+ SymI_HasDataProto(stg_TVAR_CLEAN_info) \ -+ SymI_HasDataProto(stg_TVAR_DIRTY_info) \ -+ SymI_HasDataProto(stg_IND_STATIC_info) \ -+ SymI_HasDataProto(stg_ARR_WORDS_info) \ -+ SymI_HasDataProto(stg_MUT_ARR_PTRS_DIRTY_info) \ -+ SymI_HasDataProto(stg_MUT_ARR_PTRS_FROZEN_CLEAN_info) \ -+ SymI_HasDataProto(stg_MUT_ARR_PTRS_FROZEN_DIRTY_info) \ -+ SymI_HasDataProto(stg_SMALL_MUT_ARR_PTRS_DIRTY_info) \ -+ SymI_HasDataProto(stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN_info) \ -+ SymI_HasDataProto(stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY_info) \ -+ SymI_HasDataProto(stg_MUT_VAR_CLEAN_info) \ -+ SymI_HasDataProto(stg_MUT_VAR_DIRTY_info) \ -+ SymI_HasDataProto(stg_WEAK_info) \ -+ SymI_HasDataProto(stg_SRT_1_info) \ -+ SymI_HasDataProto(stg_SRT_2_info) \ -+ SymI_HasDataProto(stg_SRT_3_info) \ -+ SymI_HasDataProto(stg_SRT_4_info) \ -+ SymI_HasDataProto(stg_SRT_5_info) \ -+ SymI_HasDataProto(stg_SRT_6_info) \ -+ SymI_HasDataProto(stg_SRT_7_info) \ -+ SymI_HasDataProto(stg_SRT_8_info) \ -+ SymI_HasDataProto(stg_SRT_9_info) \ -+ SymI_HasDataProto(stg_SRT_10_info) \ -+ SymI_HasDataProto(stg_SRT_11_info) \ -+ SymI_HasDataProto(stg_SRT_12_info) \ -+ SymI_HasDataProto(stg_SRT_13_info) \ -+ SymI_HasDataProto(stg_SRT_14_info) \ -+ SymI_HasDataProto(stg_SRT_15_info) \ -+ SymI_HasDataProto(stg_SRT_16_info) \ -+ SymI_HasDataProto(stg_ap_v_info) \ -+ SymI_HasDataProto(stg_ap_f_info) \ -+ SymI_HasDataProto(stg_ap_d_info) \ -+ SymI_HasDataProto(stg_ap_l_info) \ -+ SymI_HasDataProto(stg_ap_v16_info) \ -+ SymI_HasDataProto(stg_ap_v32_info) \ -+ SymI_HasDataProto(stg_ap_v64_info) \ -+ SymI_HasDataProto(stg_ap_n_info) \ -+ SymI_HasDataProto(stg_ap_p_info) \ -+ SymI_HasDataProto(stg_ap_pv_info) \ -+ SymI_HasDataProto(stg_ap_pp_info) \ -+ SymI_HasDataProto(stg_ap_ppv_info) \ -+ SymI_HasDataProto(stg_ap_ppp_info) \ -+ SymI_HasDataProto(stg_ap_pppv_info) \ -+ SymI_HasDataProto(stg_ap_pppp_info) \ -+ SymI_HasDataProto(stg_ap_ppppp_info) \ -+ SymI_HasDataProto(stg_ap_pppppp_info) \ -+ SymI_HasDataProto(stg_ap_0_fast) \ -+ SymI_HasDataProto(stg_ap_v_fast) \ -+ SymI_HasDataProto(stg_ap_f_fast) \ -+ SymI_HasDataProto(stg_ap_d_fast) \ -+ SymI_HasDataProto(stg_ap_l_fast) \ -+ SymI_HasDataProto(stg_ap_v16_fast) \ -+ SymI_HasDataProto(stg_ap_v32_fast) \ -+ SymI_HasDataProto(stg_ap_v64_fast) \ -+ SymI_HasDataProto(stg_ap_n_fast) \ -+ SymI_HasDataProto(stg_ap_p_fast) \ -+ SymI_HasDataProto(stg_ap_pv_fast) \ -+ SymI_HasDataProto(stg_ap_pp_fast) \ -+ SymI_HasDataProto(stg_ap_ppv_fast) \ -+ SymI_HasDataProto(stg_ap_ppp_fast) \ -+ SymI_HasDataProto(stg_ap_pppv_fast) \ -+ SymI_HasDataProto(stg_ap_pppp_fast) \ -+ SymI_HasDataProto(stg_ap_ppppp_fast) \ -+ SymI_HasDataProto(stg_ap_pppppp_fast) \ -+ SymI_HasDataProto(stg_ap_1_upd_info) \ -+ SymI_HasDataProto(stg_ap_2_upd_info) \ -+ SymI_HasDataProto(stg_ap_3_upd_info) \ -+ SymI_HasDataProto(stg_ap_4_upd_info) \ -+ SymI_HasDataProto(stg_ap_5_upd_info) \ -+ SymI_HasDataProto(stg_ap_6_upd_info) \ -+ SymI_HasDataProto(stg_ap_7_upd_info) \ -+ SymI_HasDataProto(stg_exit) \ -+ SymI_HasDataProto(stg_sel_0_upd_info) \ -+ SymI_HasDataProto(stg_sel_1_upd_info) \ -+ SymI_HasDataProto(stg_sel_2_upd_info) \ -+ SymI_HasDataProto(stg_sel_3_upd_info) \ -+ SymI_HasDataProto(stg_sel_4_upd_info) \ -+ SymI_HasDataProto(stg_sel_5_upd_info) \ -+ SymI_HasDataProto(stg_sel_6_upd_info) \ -+ SymI_HasDataProto(stg_sel_7_upd_info) \ -+ SymI_HasDataProto(stg_sel_8_upd_info) \ -+ SymI_HasDataProto(stg_sel_9_upd_info) \ -+ SymI_HasDataProto(stg_sel_10_upd_info) \ -+ SymI_HasDataProto(stg_sel_11_upd_info) \ -+ SymI_HasDataProto(stg_sel_12_upd_info) \ -+ SymI_HasDataProto(stg_sel_13_upd_info) \ -+ SymI_HasDataProto(stg_sel_14_upd_info) \ -+ SymI_HasDataProto(stg_sel_15_upd_info) \ -+ SymI_HasDataProto(stg_sel_0_noupd_info) \ -+ SymI_HasDataProto(stg_sel_1_noupd_info) \ -+ SymI_HasDataProto(stg_sel_2_noupd_info) \ -+ SymI_HasDataProto(stg_sel_3_noupd_info) \ -+ SymI_HasDataProto(stg_sel_4_noupd_info) \ -+ SymI_HasDataProto(stg_sel_5_noupd_info) \ -+ SymI_HasDataProto(stg_sel_6_noupd_info) \ -+ SymI_HasDataProto(stg_sel_7_noupd_info) \ -+ SymI_HasDataProto(stg_sel_8_noupd_info) \ -+ SymI_HasDataProto(stg_sel_9_noupd_info) \ -+ SymI_HasDataProto(stg_sel_10_noupd_info) \ -+ SymI_HasDataProto(stg_sel_11_noupd_info) \ -+ SymI_HasDataProto(stg_sel_12_noupd_info) \ -+ SymI_HasDataProto(stg_sel_13_noupd_info) \ -+ SymI_HasDataProto(stg_sel_14_noupd_info) \ -+ SymI_HasDataProto(stg_sel_15_noupd_info) \ -+ SymI_HasDataProto(stg_unpack_cstring_info) \ -+ SymI_HasDataProto(stg_unpack_cstring_utf8_info) \ -+ SymI_HasDataProto(stg_upd_frame_info) \ -+ SymI_HasDataProto(stg_bh_upd_frame_info) \ -+ SymI_HasDataProto(stg_orig_thunk_info_frame_info) \ -+ SymI_HasProto(suspendThread) \ -+ SymI_HasDataProto(stg_takeMVarzh) \ -+ SymI_HasDataProto(stg_readMVarzh) \ -+ SymI_HasDataProto(stg_threadStatuszh) \ -+ SymI_HasDataProto(stg_tryPutMVarzh) \ -+ SymI_HasDataProto(stg_tryTakeMVarzh) \ -+ SymI_HasDataProto(stg_tryReadMVarzh) \ -+ SymI_HasDataProto(stg_unmaskAsyncExceptionszh) \ -+ SymI_HasProto(unloadObj) \ -+ SymI_HasDataProto(stg_unsafeThawArrayzh) \ -+ SymI_HasDataProto(stg_waitReadzh) \ -+ SymI_HasDataProto(stg_waitWritezh) \ -+ SymI_HasDataProto(stg_writeTVarzh) \ -+ SymI_HasDataProto(stg_yieldzh) \ - SymI_NeedsProto(stg_badAlignment_entry) \ - SymI_NeedsProto(stg_interp_constr1_entry) \ - SymI_NeedsProto(stg_interp_constr2_entry) \ -@@ -954,13 +906,13 @@ - SymI_NeedsProto(stg_interp_constr5_entry) \ - SymI_NeedsProto(stg_interp_constr6_entry) \ - SymI_NeedsProto(stg_interp_constr7_entry) \ -- SymI_HasProto(stg_arg_bitmaps) \ -+ SymI_HasDataProto(stg_arg_bitmaps) \ - SymI_HasProto(large_alloc_lim) \ - SymI_HasProto(g0) \ - SymI_HasProto(allocate) \ -- SymI_HasProto(allocateExec) \ -- SymI_HasProto(flushExec) \ -- SymI_HasProto(freeExec) \ -+ SymI_HasProto(allocateExecPage) \ -+ SymI_HasProto(freezeExecPage) \ -+ SymI_HasProto(freeExecPage) \ - SymI_HasProto(getAllocations) \ - SymI_HasProto(revertCAFs) \ - SymI_HasProto(RtsFlags) \ -@@ -970,17 +922,22 @@ - SymI_HasProto(stopTimer) \ - SymI_HasProto(n_capabilities) \ - SymI_HasProto(enabled_capabilities) \ -- SymI_HasProto(stg_traceCcszh) \ -- SymI_HasProto(stg_traceEventzh) \ -- SymI_HasProto(stg_traceMarkerzh) \ -- SymI_HasProto(stg_traceBinaryEventzh) \ -- SymI_HasProto(stg_getThreadAllocationCounterzh) \ -- SymI_HasProto(stg_setThreadAllocationCounterzh) \ -+ SymI_HasDataProto(stg_traceEventzh) \ -+ SymI_HasDataProto(stg_traceMarkerzh) \ -+ SymI_HasDataProto(stg_traceBinaryEventzh) \ -+ SymI_HasDataProto(stg_getThreadAllocationCounterzh) \ -+ SymI_HasDataProto(stg_setThreadAllocationCounterzh) \ - SymI_HasProto(getMonotonicNSec) \ - SymI_HasProto(lockFile) \ - SymI_HasProto(unlockFile) \ - SymI_HasProto(startProfTimer) \ - SymI_HasProto(stopProfTimer) \ -+ SymI_HasProto(startHeapProfTimer) \ -+ SymI_HasProto(stopHeapProfTimer) \ -+ SymI_HasProto(setUserEra) \ -+ SymI_HasProto(incrementUserEra) \ -+ SymI_HasProto(getUserEra) \ -+ SymI_HasProto(requestHeapCensus) \ - SymI_HasProto(atomic_inc) \ - SymI_HasProto(atomic_dec) \ - SymI_HasProto(hs_spt_lookup) \ -@@ -989,16 +946,32 @@ - SymI_HasProto(hs_spt_remove) \ - SymI_HasProto(hs_spt_keys) \ - SymI_HasProto(hs_spt_key_count) \ -- SymI_HasProto(write_barrier) \ -- SymI_HasProto(store_load_barrier) \ -- SymI_HasProto(load_load_barrier) \ - SymI_HasProto(cas) \ - SymI_HasProto(_assertFail) \ - SymI_HasProto(keepCAFs) \ -+ SymI_HasProto(registerInfoProvList) \ -+ SymI_HasProto(lookupIPE) \ -+ SymI_HasProto(sendCloneStackMessage) \ -+ SymI_HasProto(cloneStack) \ -+ SymI_HasProto(decodeClonedStack) \ -+ SymI_HasProto(stg_newPromptTagzh) \ -+ SymI_HasProto(stg_promptzh) \ -+ SymI_HasProto(stg_control0zh) \ -+ SymI_HasProto(newArena) \ -+ SymI_HasProto(arenaAlloc) \ -+ SymI_HasProto(arenaFree) \ -+ SymI_HasProto(rts_clearMemory) \ -+ SymI_HasProto(setKeepCAFs) \ -+ SymI_HasProto(rtsBadAlignmentBarf) \ -+ SymI_HasProto(rtsOutOfBoundsAccess) \ -+ SymI_HasProto(rtsMemcpyRangeOverlap) \ -+ SymI_HasDataProto(stg_castWord64ToDoublezh) \ -+ SymI_HasDataProto(stg_castDoubleToWord64zh) \ -+ SymI_HasDataProto(stg_castWord32ToFloatzh) \ -+ SymI_HasDataProto(stg_castFloatToWord32zh) \ - RTS_USER_SIGNALS_SYMBOLS \ - RTS_INTCHAR_SYMBOLS - -- - // 64-bit support functions in libgcc.a - #if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32) - #define RTS_LIBGCC_SYMBOLS \ -@@ -1019,6 +992,29 @@ - #define RTS_LIBGCC_SYMBOLS - #endif - -+// Symbols defined by libgcc/compiler-rt for AArch64's outline atomics. -+#if defined(HAVE_ARM_OUTLINE_ATOMICS) -+#include "ARMOutlineAtomicsSymbols.h" -+#else -+#define RTS_ARM_OUTLINE_ATOMIC_SYMBOLS -+#endif -+ -+// Symbols defined by libc -+#define RTS_LIBC_SYMBOLS \ -+ SymI_HasProto_redirect(atexit, atexit, STRENGTH_STRONG, SYM_TYPE_CODE) /* See Note [Strong symbols] */ \ -+ SymI_HasProto(environ) -+ -+#if !defined(DYNAMIC) && defined(linux_HOST_OS) -+// we need these for static musl builds. However when -+// linking shared objects (DLLs) this will fail, hence -+// we do not include them when building with -DDYNAMIC -+#define RTS_FINI_ARRAY_SYMBOLS \ -+ SymI_NeedsProto(__fini_array_start) \ -+ SymI_NeedsProto(__fini_array_end) -+#else -+#define RTS_FINI_ARRAY_SYMBOLS -+#endif -+ - /* entirely bogus claims about types of these symbols */ - #define SymI_NeedsProto(vvv) extern void vvv(void); - #define SymI_NeedsDataProto(vvv) extern StgWord vvv[]; -@@ -1034,37 +1030,42 @@ - #else - #define SymE_NeedsProto(vvv) SymI_NeedsProto(vvv); - #define SymE_NeedsDataProto(vvv) SymI_NeedsDataProto(vvv); --#define SymE_HasProto(vvv) SymI_HasProto(vvv) -+#define SymE_HasProto(vvv) SymI_HasProto(vvv); - #endif - #define SymI_HasProto(vvv) /**/ --#define SymI_HasProto_redirect(vvv,xxx,weak) /**/ --#define SymI_HasProto_deprecated(vvv) /**/ -+#define SymI_HasDataProto(vvv) /**/ -+#define SymI_HasProto_redirect(vvv,xxx,strength,ty) /**/ -+ - RTS_SYMBOLS - RTS_RET_SYMBOLS - RTS_POSIX_ONLY_SYMBOLS - RTS_MINGW_ONLY_SYMBOLS - RTS_DARWIN_ONLY_SYMBOLS - RTS_OPENBSD_ONLY_SYMBOLS -+RTS_LIBC_SYMBOLS - RTS_LIBGCC_SYMBOLS -+RTS_FINI_ARRAY_SYMBOLS - RTS_LIBFFI_SYMBOLS -+RTS_ARM_OUTLINE_ATOMIC_SYMBOLS -+ - #undef SymI_NeedsProto - #undef SymI_NeedsDataProto - #undef SymI_HasProto -+#undef SymI_HasDataProto - #undef SymI_HasProto_redirect --#undef SymI_HasProto_deprecated - #undef SymE_HasProto - #undef SymE_HasDataProto - #undef SymE_NeedsProto - #undef SymE_NeedsDataProto - - #define SymI_HasProto(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ -- (void*)(&(vvv)), false }, --#define SymI_HasDataProto(vvv) \ -- SymI_HasProto(vvv) -+ (void*)(&(vvv)), STRENGTH_NORMAL, SYM_TYPE_CODE }, -+#define SymI_HasDataProto(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ -+ (void*)(&(vvv)), STRENGTH_NORMAL, SYM_TYPE_DATA }, - #define SymE_HasProto(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ -- (void*)DLL_IMPORT_DATA_REF(vvv), false }, --#define SymE_HasDataProto(vvv) \ -- SymE_HasProto(vvv) -+ (void*)DLL_IMPORT_DATA_REF(vvv), STRENGTH_NORMAL, SYM_TYPE_CODE }, -+#define SymE_HasDataProto(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ -+ (void*)DLL_IMPORT_DATA_REF(vvv), STRENGTH_NORMAL, SYM_TYPE_DATA }, - - #define SymI_NeedsProto(vvv) SymI_HasProto(vvv) - #define SymI_NeedsDataProto(vvv) SymI_HasDataProto(vvv) -@@ -1073,36 +1074,27 @@ RTS_LIBFFI_SYMBOLS - - // SymI_HasProto_redirect allows us to redirect references to one symbol to - // another symbol. See newCAF/newRetainedCAF/newGCdCAF for an example. --#define SymI_HasProto_redirect(vvv,xxx,weak) \ -+#define SymI_HasProto_redirect(vvv,xxx,strength,ty) \ - { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \ -- (void*)(&(xxx)), weak }, -- --// SymI_HasProto_deprecated allows us to redirect references from their deprecated --// names to the undeprecated ones. e.g. access -> _access. --// We use the hexspeak for unallocated memory 0xBAADF00D to signal the RTS --// that this needs to be loaded from somewhere else. --// These are inserted as weak symbols to prevent us overriding packages that do --// define them, since on Windows these functions shouldn't be in the top level --// namespace, but we have them for POSIX compatibility. --#define SymI_HasProto_deprecated(vvv) \ -- { #vvv, (void*)0xBAADF00D, true }, -+ (void*)(&(xxx)), strength, ty }, - - RtsSymbolVal rtsSyms[] = { - RTS_SYMBOLS - RTS_RET_SYMBOLS - RTS_POSIX_ONLY_SYMBOLS - RTS_MINGW_ONLY_SYMBOLS -- RTS_MINGW_COMPAT_SYMBOLS - RTS_DARWIN_ONLY_SYMBOLS - RTS_OPENBSD_ONLY_SYMBOLS - RTS_LIBGCC_SYMBOLS -+ RTS_FINI_ARRAY_SYMBOLS - RTS_LIBFFI_SYMBOLS -+ RTS_ARM_OUTLINE_ATOMIC_SYMBOLS - SymI_HasDataProto(nonmoving_write_barrier_enabled) - #if defined(darwin_HOST_OS) && defined(i386_HOST_ARCH) - // dyld stub code contains references to this, - // but it should never be called because we treat - // lazy pointers as nonlazy. -- { "dyld_stub_binding_helper", (void*)0xDEADBEEF, false }, -+ { "dyld_stub_binding_helper", (void*)0xDEADBEEF, STRENGTH_NORMAL }, - #endif -- { 0, 0, false } /* sentinel */ -+ { 0, 0, STRENGTH_NORMAL, SYM_TYPE_CODE } /* sentinel */ - }; --- -2.33.0 - diff --git a/overlays/patches/ghc/0008-Needs-linker_verbose-flag.patch b/overlays/patches/ghc/0008-Needs-linker_verbose-flag.patch deleted file mode 100644 index 4c27bf5ee3..0000000000 --- a/overlays/patches/ghc/0008-Needs-linker_verbose-flag.patch +++ /dev/null @@ -1,48 +0,0 @@ -From ed243586aa6884119dbfd00ac86ea87bed65e3b6 Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 02:57:55 +0000 -Subject: [PATCH 08/12] Needs linker_verbose flag - ---- - includes/rts/Flags.h | 1 + - rts/RtsFlags.c | 5 +++++ - 2 files changed, 6 insertions(+) - -diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h -index 76a3c51..d389dfa 100644 ---- a/includes/rts/Flags.h -+++ b/includes/rts/Flags.h -@@ -104,6 +104,7 @@ typedef struct _DEBUG_FLAGS { - bool stable; /* 't' */ - bool prof; /* 'p' */ - bool linker; /* 'l' the object linker */ -+ bool linker_verbose; /* 'L' the object linker, output which scales with O(# symbols) */ - bool apply; /* 'a' */ - bool stm; /* 'm' */ - bool squeeze; /* 'z' stack squeezing & lazy blackholing */ -diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c -index e56640f..e7be439 100644 ---- a/rts/RtsFlags.c -+++ b/rts/RtsFlags.c -@@ -190,6 +190,7 @@ void initRtsFlagsDefaults(void) - RtsFlags.DebugFlags.prof = false; - RtsFlags.DebugFlags.apply = false; - RtsFlags.DebugFlags.linker = false; -+ RtsFlags.DebugFlags.linker_verbose = false; - RtsFlags.DebugFlags.squeeze = false; - RtsFlags.DebugFlags.hpc = false; - RtsFlags.DebugFlags.sparks = false; -@@ -1962,6 +1963,10 @@ static void read_debug_flags(const char* arg) - case 'l': - RtsFlags.DebugFlags.linker = true; - break; -+ case 'L': -+ RtsFlags.DebugFlags.linker_verbose = true; -+ RtsFlags.DebugFlags.linker = true; -+ break; - case 'a': - RtsFlags.DebugFlags.apply = true; - break; --- -2.33.0 - diff --git a/overlays/patches/ghc/0009-Drop-non-existing-RtsSymbols.patch b/overlays/patches/ghc/0009-Drop-non-existing-RtsSymbols.patch deleted file mode 100644 index 586fde4908..0000000000 --- a/overlays/patches/ghc/0009-Drop-non-existing-RtsSymbols.patch +++ /dev/null @@ -1,253 +0,0 @@ -From 9b023f61b0afe40c412c9de42ff6d57c96381c2d Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 03:12:12 +0000 -Subject: [PATCH 09/12] Drop non-existing RtsSymbols - ---- - rts/RtsSymbols.c | 76 +----------------------------------------------- - 1 file changed, 1 insertion(+), 75 deletions(-) - -diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c -index 4d12302..8b0208c 100644 ---- a/rts/RtsSymbols.c -+++ b/rts/RtsSymbols.c -@@ -12,7 +12,6 @@ - - #include "TopHandler.h" - #include "HsFFI.h" --#include "CloneStack.h" - - #include "sm/Storage.h" - #include "sm/NonMovingMark.h" -@@ -28,7 +27,6 @@ - #include - #include - #include /* SHGetFolderPathW */ --#include "win32/AsyncWinIO.h" - #endif - - #if defined(openbsd_HOST_OS) -@@ -271,14 +269,9 @@ extern char **environ; - SymI_HasProto(unblockUserSignals) - #else - #define RTS_USER_SIGNALS_SYMBOLS \ -- SymI_HasProto(registerIOCPHandle) \ -- SymI_HasProto(getOverlappedEntries) \ -- SymI_HasProto(completeSynchronousRequest) \ -- SymI_HasProto(registerAlertableWait) \ - SymI_HasProto(sendIOManagerEvent) \ - SymI_HasProto(readIOManagerEvent) \ - SymI_HasProto(getIOManagerEvent) \ -- SymI_HasProto(ioManagerFinished) \ - SymI_HasProto(console_handler) - #endif - -@@ -342,7 +335,6 @@ extern char **environ; - SymI_HasProto(ENT_DYN_IND_ctr) \ - SymI_HasProto(ENT_PERM_IND_ctr) \ - SymI_HasProto(ENT_PAP_ctr) \ -- SymI_HasProto(ENT_CONTINUATION_ctr) \ - SymI_HasProto(ENT_AP_ctr) \ - SymI_HasProto(ENT_AP_STACK_ctr) \ - SymI_HasProto(ENT_BH_ctr) \ -@@ -434,19 +426,11 @@ extern char **environ; - SymI_HasProto(ALLOC_PAP_gds) \ - SymI_HasProto(ALLOC_PAP_slp) \ - SymI_HasProto(ALLOC_TSO_ctr) \ -- SymI_HasProto(ALLOC_TSO_tot) \ -- SymI_HasProto(ALLOC_STACK_ctr) \ -- SymI_HasProto(ALLOC_STACK_tot) \ - SymI_HasProto(RET_NEW_ctr) \ - SymI_HasProto(RET_OLD_ctr) \ - SymI_HasProto(RET_UNBOXED_TUP_ctr) \ - SymI_HasProto(RET_SEMI_loads_avoided) \ - \ -- SymI_HasProto(TAG_UNTAGGED_pred) \ -- SymI_HasProto(TAG_UNTAGGED_miss) \ -- SymI_HasProto(TAG_TAGGED_pred) \ -- SymI_HasProto(TAG_TAGGED_miss) \ -- \ - SymI_HasProto(RET_NEW_hst) \ - SymI_HasProto(RET_OLD_hst) \ - SymI_HasProto(RET_UNBOXED_TUP_hst) -@@ -476,8 +460,7 @@ extern char **environ; - SymI_HasProto(mkCostCentre) \ - SymI_HasProto(registerCcList) \ - SymI_HasProto(registerCcsList) \ -- SymI_HasProto(era) \ -- SymI_HasProto(user_era) -+ SymI_HasProto(era) - #else - #define RTS_PROF_SYMBOLS /* empty */ - #endif -@@ -497,7 +480,6 @@ extern char **environ; - SymI_HasDataProto(stg_ret_l_info) \ - SymI_HasDataProto(stg_ret_t_info) \ - SymI_HasDataProto(stg_ctoi_t) \ -- SymI_HasDataProto(stg_primcall_info) \ - SymI_HasDataProto(stg_gc_prim_p) \ - SymI_HasDataProto(stg_gc_prim_pp) \ - SymI_HasDataProto(stg_gc_prim_n) \ -@@ -530,7 +512,6 @@ extern char **environ; - SymI_HasProto(__word_encodeFloat) \ - SymI_HasDataProto(stg_atomicallyzh) \ - SymI_HasProto(barf) \ -- SymI_HasProto(flushEventLog) \ - SymI_HasProto(deRefStablePtr) \ - SymI_HasProto(debugBelch) \ - SymI_HasProto(errorBelch) \ -@@ -554,7 +535,6 @@ extern char **environ; - SymI_HasDataProto(stg_compactFixupPointerszh) \ - SymI_HasDataProto(stg_compactSizzezh) \ - SymI_HasProto(closure_flags) \ -- SymI_HasProto(eq_thread) \ - SymI_HasProto(cmp_thread) \ - SymI_HasProto(createAdjustor) \ - SymI_HasDataProto(stg_decodeDoublezu2Intzh) \ -@@ -581,11 +561,6 @@ extern char **environ; - SymI_HasProto(getOrSetLibHSghcFastStringTable) \ - SymI_HasProto(getRTSStats) \ - SymI_HasProto(getRTSStatsEnabled) \ -- SymI_HasProto(getOrSetLibHSghcGlobalHasPprDebug) \ -- SymI_HasProto(getOrSetLibHSghcGlobalHasNoDebugOutput) \ -- SymI_HasProto(getOrSetLibHSghcGlobalHasNoStateHack) \ -- SymI_HasProto(ghc_unique_counter64) \ -- SymI_HasProto(ghc_unique_inc) \ - SymI_HasProto(genericRaise) \ - SymI_HasProto(getProgArgv) \ - SymI_HasProto(getFullProgArgv) \ -@@ -617,15 +592,12 @@ extern char **environ; - SymI_HasProto(initLinker_) \ - SymI_HasDataProto(stg_unpackClosurezh) \ - SymI_HasDataProto(stg_closureSizzezh) \ -- SymI_HasDataProto(stg_whereFromzh) \ - SymI_HasDataProto(stg_getApStackValzh) \ - SymI_HasDataProto(stg_getSparkzh) \ - SymI_HasDataProto(stg_numSparkszh) \ - SymI_HasDataProto(stg_isCurrentThreadBoundzh) \ - SymI_HasDataProto(stg_isEmptyMVarzh) \ - SymI_HasDataProto(stg_killThreadzh) \ -- SymI_HasDataProto(stg_listThreadszh) \ -- SymI_HasDataProto(stg_threadLabelzh) \ - SymI_HasProto(loadArchive) \ - SymI_HasProto(loadObj) \ - SymI_HasProto(purgeObj) \ -@@ -655,16 +627,9 @@ extern char **environ; - SymI_HasDataProto(stg_newBCOzh) \ - SymI_HasDataProto(stg_newByteArrayzh) \ - SymI_HasDataProto(stg_casIntArrayzh) \ -- SymI_HasDataProto(stg_casInt8Arrayzh) \ -- SymI_HasDataProto(stg_casInt16Arrayzh) \ -- SymI_HasDataProto(stg_casInt32Arrayzh) \ -- SymI_HasDataProto(stg_casInt64Arrayzh) \ - SymI_HasDataProto(stg_newMVarzh) \ - SymI_HasDataProto(stg_newMutVarzh) \ - SymI_HasDataProto(stg_newTVarzh) \ -- SymI_HasDataProto(stg_readIOPortzh) \ -- SymI_HasDataProto(stg_writeIOPortzh) \ -- SymI_HasDataProto(stg_newIOPortzh) \ - SymI_HasDataProto(stg_noDuplicatezh) \ - SymI_HasDataProto(stg_atomicModifyMutVar2zh) \ - SymI_HasDataProto(stg_atomicModifyMutVarzuzh) \ -@@ -682,18 +647,11 @@ extern char **environ; - SymI_HasProto(updateRemembSetPushClosure_) \ - SymI_HasProto(performGC) \ - SymI_HasProto(performMajorGC) \ -- SymI_HasProto(performBlockingMajorGC) \ - SymI_HasProto(prog_argc) \ - SymI_HasProto(prog_argv) \ - SymI_HasDataProto(stg_putMVarzh) \ - SymI_HasDataProto(stg_raisezh) \ -- SymI_HasDataProto(stg_raiseDivZZerozh) \ -- SymI_HasDataProto(stg_raiseUnderflowzh) \ -- SymI_HasDataProto(stg_raiseOverflowzh) \ - SymI_HasDataProto(stg_raiseIOzh) \ -- SymI_HasDataProto(stg_keepAlivezh) \ -- SymI_HasDataProto(stg_paniczh) \ -- SymI_HasDataProto(stg_absentErrorzh) \ - SymI_HasDataProto(stg_readTVarzh) \ - SymI_HasDataProto(stg_readTVarIOzh) \ - SymI_HasProto(resumeThread) \ -@@ -709,7 +667,6 @@ extern char **environ; - SymI_HasProto(rts_evalStableIOMain) \ - SymI_HasProto(rts_evalStableIO) \ - SymI_HasProto(rts_eval_) \ -- SymI_HasProto(rts_inCall) \ - SymI_HasProto(rts_getBool) \ - SymI_HasProto(rts_getChar) \ - SymI_HasProto(rts_getDouble) \ -@@ -752,9 +709,6 @@ extern char **environ; - SymI_HasProto(rtsSupportsBoundThreads) \ - SymI_HasProto(rts_isProfiled) \ - SymI_HasProto(rts_isDynamic) \ -- SymI_HasProto(rts_isThreaded) \ -- SymI_HasProto(rts_isDebugged) \ -- SymI_HasProto(rts_isTracing) \ - SymI_HasProto(rts_setInCallCapability) \ - SymI_HasProto(rts_enableThreadAllocationLimit) \ - SymI_HasProto(rts_disableThreadAllocationLimit) \ -@@ -879,11 +833,8 @@ extern char **environ; - SymI_HasDataProto(stg_sel_13_noupd_info) \ - SymI_HasDataProto(stg_sel_14_noupd_info) \ - SymI_HasDataProto(stg_sel_15_noupd_info) \ -- SymI_HasDataProto(stg_unpack_cstring_info) \ -- SymI_HasDataProto(stg_unpack_cstring_utf8_info) \ - SymI_HasDataProto(stg_upd_frame_info) \ - SymI_HasDataProto(stg_bh_upd_frame_info) \ -- SymI_HasDataProto(stg_orig_thunk_info_frame_info) \ - SymI_HasProto(suspendThread) \ - SymI_HasDataProto(stg_takeMVarzh) \ - SymI_HasDataProto(stg_readMVarzh) \ -@@ -910,9 +861,6 @@ extern char **environ; - SymI_HasProto(large_alloc_lim) \ - SymI_HasProto(g0) \ - SymI_HasProto(allocate) \ -- SymI_HasProto(allocateExecPage) \ -- SymI_HasProto(freezeExecPage) \ -- SymI_HasProto(freeExecPage) \ - SymI_HasProto(getAllocations) \ - SymI_HasProto(revertCAFs) \ - SymI_HasProto(RtsFlags) \ -@@ -932,12 +880,6 @@ extern char **environ; - SymI_HasProto(unlockFile) \ - SymI_HasProto(startProfTimer) \ - SymI_HasProto(stopProfTimer) \ -- SymI_HasProto(startHeapProfTimer) \ -- SymI_HasProto(stopHeapProfTimer) \ -- SymI_HasProto(setUserEra) \ -- SymI_HasProto(incrementUserEra) \ -- SymI_HasProto(getUserEra) \ -- SymI_HasProto(requestHeapCensus) \ - SymI_HasProto(atomic_inc) \ - SymI_HasProto(atomic_dec) \ - SymI_HasProto(hs_spt_lookup) \ -@@ -949,26 +891,10 @@ extern char **environ; - SymI_HasProto(cas) \ - SymI_HasProto(_assertFail) \ - SymI_HasProto(keepCAFs) \ -- SymI_HasProto(registerInfoProvList) \ -- SymI_HasProto(lookupIPE) \ -- SymI_HasProto(sendCloneStackMessage) \ -- SymI_HasProto(cloneStack) \ -- SymI_HasProto(decodeClonedStack) \ -- SymI_HasProto(stg_newPromptTagzh) \ -- SymI_HasProto(stg_promptzh) \ -- SymI_HasProto(stg_control0zh) \ - SymI_HasProto(newArena) \ - SymI_HasProto(arenaAlloc) \ - SymI_HasProto(arenaFree) \ -- SymI_HasProto(rts_clearMemory) \ - SymI_HasProto(setKeepCAFs) \ -- SymI_HasProto(rtsBadAlignmentBarf) \ -- SymI_HasProto(rtsOutOfBoundsAccess) \ -- SymI_HasProto(rtsMemcpyRangeOverlap) \ -- SymI_HasDataProto(stg_castWord64ToDoublezh) \ -- SymI_HasDataProto(stg_castDoubleToWord64zh) \ -- SymI_HasDataProto(stg_castWord32ToFloatzh) \ -- SymI_HasDataProto(stg_castFloatToWord32zh) \ - RTS_USER_SIGNALS_SYMBOLS \ - RTS_INTCHAR_SYMBOLS - --- -2.33.0 - diff --git a/overlays/patches/ghc/0010-One-more-debug-flag-L.patch b/overlays/patches/ghc/0010-One-more-debug-flag-L.patch deleted file mode 100644 index 3b968ff82a..0000000000 --- a/overlays/patches/ghc/0010-One-more-debug-flag-L.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c1b689f73e1085ced75e95593605e31d4d5a0ce4 Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 03:12:32 +0000 -Subject: [PATCH 10/12] One more debug flag (-L) - ---- - includes/dist-derivedconstants/header/DerivedConstants.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/includes/dist-derivedconstants/header/DerivedConstants.h b/includes/dist-derivedconstants/header/DerivedConstants.h -index 7df96e6..8e8ce99 100644 ---- a/includes/dist-derivedconstants/header/DerivedConstants.h -+++ b/includes/dist-derivedconstants/header/DerivedConstants.h -@@ -494,7 +494,7 @@ - #define OFFSET_RtsFlags_ProfFlags_showCCSOnException 285 - #define REP_RtsFlags_ProfFlags_showCCSOnException b8 - #define RtsFlags_ProfFlags_showCCSOnException(__ptr__) REP_RtsFlags_ProfFlags_showCCSOnException[__ptr__+OFFSET_RtsFlags_ProfFlags_showCCSOnException] --#define OFFSET_RtsFlags_DebugFlags_apply 228 -+#define OFFSET_RtsFlags_DebugFlags_apply 229 - #define REP_RtsFlags_DebugFlags_apply b8 - #define RtsFlags_DebugFlags_apply(__ptr__) REP_RtsFlags_DebugFlags_apply[__ptr__+OFFSET_RtsFlags_DebugFlags_apply] - #define OFFSET_RtsFlags_DebugFlags_sanity 223 --- -2.33.0 - diff --git a/overlays/patches/ghc/0011-Add-ENVIRON-check.patch b/overlays/patches/ghc/0011-Add-ENVIRON-check.patch deleted file mode 100644 index 6f82748fb8..0000000000 --- a/overlays/patches/ghc/0011-Add-ENVIRON-check.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b88586d77f1774f1c5da37b8eea09c4a9d6de062 Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 03:23:55 +0000 -Subject: [PATCH 11/12] Add ENVIRON check - ---- - aclocal.m4 | 18 ++++++++++++++++++ - configure.ac | 3 +++ - 2 files changed, 21 insertions(+) - -diff --git a/aclocal.m4 b/aclocal.m4 -index 14adbfa..7ff7e8d 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -2713,4 +2713,22 @@ AC_DEFUN([FIND_PYTHON],[ - AC_SUBST([PythonCmd]) - ]) - -+# FP_CHECK_ENVIRON -+# ----------------- -+AC_DEFUN([FP_CHECK_ENVIRON], -+[ -+ dnl-------------------------------------------------------------------- -+ dnl * Check whether the libc headers provide a declaration for the -+ dnl environ symbol. If not then we will provide one in RtsSymbols.c. -+ dnl See #20512, #20577, #20861. -+ dnl -+ dnl N.B. Windows declares environ in ; most others declare it -+ dnl in . -+ dnl-------------------------------------------------------------------- -+ AC_CHECK_DECLS([environ], [], [], [ -+ #include -+ #include -+ ]) -+]) -+ - # LocalWords: fi -diff --git a/configure.ac b/configure.ac -index 6eac557..ead69d0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -931,6 +931,9 @@ AC_CHECK_HEADERS([sys/cpuset.h], [], [], - #endif - ]]) - -+dnl ** check whether a declaration for `environ` is provided by libc. -+FP_CHECK_ENVIRO -+ - dnl ** check if it is safe to include both and - AC_HEADER_TIME - --- -2.33.0 - diff --git a/overlays/patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch b/overlays/patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch deleted file mode 100644 index 9bcb2948e8..0000000000 --- a/overlays/patches/ghc/0012-fixup-HAVE_DECL_ENVIRON.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 18e6f2630baebd71ef869e06efbf9d8d24291399 Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 03:28:52 +0000 -Subject: [PATCH 12/12] fixup HAVE_DECL_ENVIRON - ---- - libraries/base/include/HsBase.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h -index d588447..243d969 100644 ---- a/libraries/base/include/HsBase.h -+++ b/libraries/base/include/HsBase.h -@@ -552,9 +552,9 @@ INLINE int __hscore_open(char *file, int how, mode_t mode) { - #include - INLINE char **__hscore_environ(void) { return *(_NSGetEnviron()); } - #else --/* ToDo: write a feature test that doesn't assume 'environ' to -- * be in scope at link-time. */ -+#if !HAVE_DECL_ENVIRON - extern char** environ; -+#endif - INLINE char **__hscore_environ(void) { return environ; } - #endif - --- -2.33.0 - diff --git a/overlays/patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch b/overlays/patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch deleted file mode 100644 index fb18bca74f..0000000000 --- a/overlays/patches/ghc/0013-add-STG_NORETURN-to-Stg.h.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e0673a4e134c58044316a07d7d4a21b058eddc7f Mon Sep 17 00:00:00 2001 -From: Moritz Angermann -Date: Thu, 20 Jun 2024 05:22:15 +0000 -Subject: [PATCH] add STG_NORETURN to Stg.h - ---- - includes/Stg.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/includes/Stg.h b/includes/Stg.h -index 46f71c0..bc5cc75 100644 ---- a/includes/Stg.h -+++ b/includes/Stg.h -@@ -215,6 +215,8 @@ - - #define STG_UNUSED GNUC3_ATTRIBUTE(__unused__) - -+#define STG_NORETURN GNU_ATTRIBUTE(__noreturn__) -+ - /* Prevent functions from being optimized. - See Note [Windows Stack allocations] */ - #if defined(__clang__) --- -2.33.0 - diff --git a/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch b/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch deleted file mode 100644 index 94787b4bed..0000000000 --- a/overlays/patches/ghc/ghc-9.2-windows-dll-dependent-symbol-type-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c -index 8622166..531ed4d 100644 ---- a/rts/linker/PEi386.c -+++ b/rts/linker/PEi386.c -@@ -2076,10 +2076,13 @@ - } - else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) - { -- /* See Note [BFD import library]. */ -- HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, NULL); -- if (!dllInstance && pinfo->value) -+ // we only want to _update_ the type, if the dependent symbol is _not_ a dllInstance. -+ SymType depType = 0; -+ HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, dependent, &depType); -+ if (!dllInstance && pinfo->value) { -+ *type = depType; - return pinfo->value; -+ } - - if (!dllInstance) - { From cbf3ebe3ce1781505e6190fc7d1582352a5ebbba Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Jul 2024 12:54:35 +1200 Subject: [PATCH 162/170] Use stable-haskell/iserv-proxy?ref=iserv-syms for ghc <9.4 --- overlays/ghc-packages.nix | 16 ++++------------ overlays/haskell.nix | 8 -------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/overlays/ghc-packages.nix b/overlays/ghc-packages.nix index aca2c2fd56..4b19fcc2b1 100644 --- a/overlays/ghc-packages.nix +++ b/overlays/ghc-packages.nix @@ -75,18 +75,10 @@ let libiserv = "libraries/libiserv"; } // final.lib.optionalAttrs (!final.stdenv.hostPlatform.isGhcjs || builtins.compareVersions ghcVersion "9" > 0) { ghc = "compiler"; - } // ( - if builtins.compareVersions ghcVersion "9.4" < 0 - then { - # As of GHC 9.4 this has been split out of the GHC repo and - # is now in the iserv-proxy flake input - iserv-proxy = "utils/iserv-proxy"; - } - else { - genprimopcode = "utils/genprimopcode"; - deriveConstants = "utils/deriveConstants"; - } - ) // final.lib.optionalAttrs (!final.stdenv.hostPlatform.isGhcjs || builtins.compareVersions ghcVersion "8.10.5" >= 0) { + } // final.lib.optionalAttrs (builtins.compareVersions ghcVersion "9.4" >= 0) { + genprimopcode = "utils/genprimopcode"; + deriveConstants = "utils/deriveConstants"; + } // final.lib.optionalAttrs (!final.stdenv.hostPlatform.isGhcjs || builtins.compareVersions ghcVersion "8.10.5" >= 0) { # Not sure why, but this is missing from older ghcjs versions remote-iserv = "utils/remote-iserv"; } // final.lib.optionalAttrs (builtins.compareVersions ghcVersion "9.0.1" >= 0) { diff --git a/overlays/haskell.nix b/overlays/haskell.nix index c743db93e3..f0fda61379 100644 --- a/overlays/haskell.nix +++ b/overlays/haskell.nix @@ -1035,14 +1035,6 @@ final: prev: { withInputs = final.recurseIntoAttrs; iserv-proxy-exes = __mapAttrs (compiler-nix-name: _ghc: - if __compareVersions final.buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.4" <0 - then { - inherit (final.buildPackages.ghc-extra-packages.${compiler-nix-name}.iserv-proxy.components.exes) iserv-proxy; - # remote-iserv however needs to come from the regular packages as it has to - # run on the target host. - iserv-proxy-interpreter = final.ghc-extra-packages.${compiler-nix-name}.remote-iserv.components.exes.remote-iserv; - } - else let exes = pkgs: (pkgs.haskell-nix.cabalProject' ({pkgs, ...}: { name = "iserv-proxy"; From 0160869265eee879ff099c025791f5c893d11600 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Jul 2024 14:01:42 +1200 Subject: [PATCH 163/170] Enable macOS and ifdLevel 0 --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 07397aa920..e3a9bf6087 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 0; compiler = "ghc928"; config = import ./config.nix; @@ -108,9 +108,9 @@ # systems supported by haskell.nix systems = [ "x86_64-linux" - # "x86_64-darwin" + "x86_64-darwin" "aarch64-linux" - # "aarch64-darwin" + "aarch64-darwin" ]; nixpkgsArgs = { From ed634ee2d8db8a013cb2066b0fcdbc68c8d88a09 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Jul 2024 14:15:13 +1200 Subject: [PATCH 164/170] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index e3a9bf6087..5fcfd6d34a 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 1; compiler = "ghc928"; config = import ./config.nix; From 45b7df8d3cb1eb8825124aa8a9935739c94f11cc Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Jul 2024 14:23:03 +1200 Subject: [PATCH 165/170] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 5fcfd6d34a..570f61392f 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; compiler = "ghc928"; config = import ./config.nix; From dc365a262b147b07844aa9b542150e703e05bc5c Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Jul 2024 14:45:23 +1200 Subject: [PATCH 166/170] Disable failing test --- test/shell-for-setup-deps/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/shell-for-setup-deps/default.nix b/test/shell-for-setup-deps/default.nix index c96e6dc0fd..ada6ff95cd 100644 --- a/test/shell-for-setup-deps/default.nix +++ b/test/shell-for-setup-deps/default.nix @@ -27,7 +27,9 @@ in recurseIntoAttrs ({ meta.disabled = stdenv.buildPlatform != stdenv.hostPlatform || compiler-nix-name == "ghc901" || compiler-nix-name == "ghc902" || # TH breaks for ghc 9.4.3 cross compile for macOS with this test - (stdenv.hostPlatform.isDarwin && __elem compiler-nix-name ["ghc941" "ghc942" "ghc943" "ghc944"]); + (stdenv.hostPlatform.isDarwin && __elem compiler-nix-name ["ghc941" "ghc942" "ghc943" "ghc944"]) || + # Segfaults in ghc-pkg on aarc64-linux for GHC 8.10 + (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64 && compiler-nix-name == "ghc8107"); ifdInputs = { inherit (project) plan-nix; }; From ac1db722a02f4637d35a03a379ef3b00fb6cb371 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Jul 2024 14:45:59 +1200 Subject: [PATCH 167/170] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 570f61392f..ef972b35f8 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; compiler = "ghc928"; config = import ./config.nix; From 1d484a8e1db021554c43880085e478aa13419b8e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 11 Jul 2024 15:10:48 +1200 Subject: [PATCH 168/170] Add macOS back --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index ef972b35f8..a1c02d581e 100644 --- a/flake.nix +++ b/flake.nix @@ -284,12 +284,12 @@ hydraJobs.nix-tools = pkgs.releaseTools.aggregate { name = "nix-tools"; constituents = [ - # "aarch64-darwin.nix-tools.static.zipped.nix-tools-static" - # "x86_64-darwin.nix-tools.static.zipped.nix-tools-static" + "aarch64-darwin.nix-tools.static.zipped.nix-tools-static" + "x86_64-darwin.nix-tools.static.zipped.nix-tools-static" "x86_64-linux.nix-tools.static.zipped.nix-tools-static" "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64" - # "aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" - # "x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" + "aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" + "x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd" "x86_64-linux.nix-tools.static.zipped.nix-tools-static-no-ifd" "x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64-no-ifd" (writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000")) From cfc0aa42a6f83b5288ef7da9340780db159fb310 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 12 Jul 2024 21:58:51 +1200 Subject: [PATCH 169/170] We only need iserv-proxy for cross compilation (so leave it out of native ci) --- ci.nix | 2 -- overlays/haskell.nix | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ci.nix b/ci.nix index cb91d6321d..59727de473 100644 --- a/ci.nix +++ b/ci.nix @@ -125,8 +125,6 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: pinnedNixpkgsSrc: ghc = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name}; } // pkgs.lib.optionalAttrs runTests { inherit (build) tests tools maintainer-scripts maintainer-script-cache; - } // pkgs.lib.optionalAttrs (ifdLevel >= 2) { - inherit (pkgs.haskell-nix.iserv-proxy-exes.${compiler-nix-name}) iserv-proxy; } // pkgs.lib.optionalAttrs (ifdLevel >= 3) { hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; inherit evalPackages compiler-nix-name; }).getComponent "exe:hello"; }); diff --git a/overlays/haskell.nix b/overlays/haskell.nix index f0fda61379..999ef3d0d7 100644 --- a/overlays/haskell.nix +++ b/overlays/haskell.nix @@ -1082,7 +1082,7 @@ final: prev: { inherit (final.buildPackages) nix; } // final.lib.optionalAttrs (final.stdenv.hostPlatform.libc == "glibc") { inherit (final) glibcLocales; - } // final.lib.optionalAttrs (ifdLevel > 0) ({ + } // final.lib.optionalAttrs (ifdLevel > 0) { # Things that require one IFD to build (the inputs should be in level 0) boot-alex = final.buildPackages.haskell-nix.bootstrap.packages.alex; boot-happy = final.buildPackages.haskell-nix.bootstrap.packages.happy; @@ -1090,10 +1090,7 @@ final: prev: { ghc = final.buildPackages.haskell-nix.compiler.${compiler-nix-name}; ghc-boot-packages-nix = final.recurseIntoAttrs final.ghc-boot-packages-nix.${compiler-nix-name}; - } // final.lib.optionalAttrs (__compareVersions final.buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.4" <0) { - # Only needed for older GHC versions (see iserv-proxy-exes) - ghc-extra-projects-nix = final.ghc-extra-projects.${compiler-nix-name}.plan-nix; - }) // final.lib.optionalAttrs (ifdLevel > 1) { + } // final.lib.optionalAttrs (ifdLevel > 1) { # Things that require two levels of IFD to build (inputs should be in level 1) nix-tools-unchecked = final.pkgsBuildBuild.haskell-nix.nix-tools-unchecked; } // final.lib.optionalAttrs (ifdLevel > 1 From e35688d4652c3731688248907ec7bec479558de0 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 12 Jul 2024 22:42:10 +1200 Subject: [PATCH 170/170] Add materialized spdx file --- materialized/spdx-3.24.0/licenses.json | 8275 ++++++++++++++++++++++++ 1 file changed, 8275 insertions(+) create mode 100644 materialized/spdx-3.24.0/licenses.json diff --git a/materialized/spdx-3.24.0/licenses.json b/materialized/spdx-3.24.0/licenses.json new file mode 100644 index 0000000000..9596a3b098 --- /dev/null +++ b/materialized/spdx-3.24.0/licenses.json @@ -0,0 +1,8275 @@ +{ + "licenseListVersion": "3.24.0", + "licenses": [ + { + "reference": "https://spdx.org/licenses/0BSD.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/0BSD.json", + "referenceNumber": 537, + "name": "BSD Zero Clause License", + "licenseId": "0BSD", + "seeAlso": [ + "http://landley.net/toybox/license.html", + "https://opensource.org/licenses/0BSD" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/3D-Slicer-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/3D-Slicer-1.0.json", + "referenceNumber": 200, + "name": "3D Slicer License v1.0", + "licenseId": "3D-Slicer-1.0", + "seeAlso": [ + "https://slicer.org/LICENSE", + "https://github.com/Slicer/Slicer/blob/main/License.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AAL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AAL.json", + "referenceNumber": 406, + "name": "Attribution Assurance License", + "licenseId": "AAL", + "seeAlso": [ + "https://opensource.org/licenses/attribution" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Abstyles.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Abstyles.json", + "referenceNumber": 526, + "name": "Abstyles License", + "licenseId": "Abstyles", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Abstyles" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AdaCore-doc.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AdaCore-doc.json", + "referenceNumber": 382, + "name": "AdaCore Doc License", + "licenseId": "AdaCore-doc", + "seeAlso": [ + "https://github.com/AdaCore/xmlada/blob/master/docs/index.rst", + "https://github.com/AdaCore/gnatcoll-core/blob/master/docs/index.rst", + "https://github.com/AdaCore/gnatcoll-db/blob/master/docs/index.rst" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Adobe-2006.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Adobe-2006.json", + "referenceNumber": 558, + "name": "Adobe Systems Incorporated Source Code License Agreement", + "licenseId": "Adobe-2006", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/AdobeLicense" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Adobe-Display-PostScript.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Adobe-Display-PostScript.json", + "referenceNumber": 431, + "name": "Adobe Display PostScript License", + "licenseId": "Adobe-Display-PostScript", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/COPYING?ref_type\u003dheads#L752" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Adobe-Glyph.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Adobe-Glyph.json", + "referenceNumber": 297, + "name": "Adobe Glyph List License", + "licenseId": "Adobe-Glyph", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/MIT#AdobeGlyph" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Adobe-Utopia.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Adobe-Utopia.json", + "referenceNumber": 532, + "name": "Adobe Utopia Font License", + "licenseId": "Adobe-Utopia", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/font/adobe-utopia-100dpi/-/blob/master/COPYING?ref_type\u003dheads" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ADSL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ADSL.json", + "referenceNumber": 463, + "name": "Amazon Digital Services License", + "licenseId": "ADSL", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/AmazonDigitalServicesLicense" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AFL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AFL-1.1.json", + "referenceNumber": 601, + "name": "Academic Free License v1.1", + "licenseId": "AFL-1.1", + "seeAlso": [ + "http://opensource.linux-mirror.org/licenses/afl-1.1.txt", + "http://wayback.archive.org/web/20021004124254/http://www.opensource.org/licenses/academic.php" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/AFL-1.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AFL-1.2.json", + "referenceNumber": 72, + "name": "Academic Free License v1.2", + "licenseId": "AFL-1.2", + "seeAlso": [ + "http://opensource.linux-mirror.org/licenses/afl-1.2.txt", + "http://wayback.archive.org/web/20021204204652/http://www.opensource.org/licenses/academic.php" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/AFL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AFL-2.0.json", + "referenceNumber": 187, + "name": "Academic Free License v2.0", + "licenseId": "AFL-2.0", + "seeAlso": [ + "http://wayback.archive.org/web/20060924134533/http://www.opensource.org/licenses/afl-2.0.txt" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/AFL-2.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AFL-2.1.json", + "referenceNumber": 383, + "name": "Academic Free License v2.1", + "licenseId": "AFL-2.1", + "seeAlso": [ + "http://opensource.linux-mirror.org/licenses/afl-2.1.txt" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/AFL-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AFL-3.0.json", + "referenceNumber": 369, + "name": "Academic Free License v3.0", + "licenseId": "AFL-3.0", + "seeAlso": [ + "http://www.rosenlaw.com/AFL3.0.htm", + "https://opensource.org/licenses/afl-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Afmparse.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Afmparse.json", + "referenceNumber": 345, + "name": "Afmparse License", + "licenseId": "Afmparse", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Afmparse" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AGPL-1.0.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/AGPL-1.0.json", + "referenceNumber": 221, + "name": "Affero General Public License v1.0", + "licenseId": "AGPL-1.0", + "seeAlso": [ + "http://www.affero.org/oagpl.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/AGPL-1.0-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AGPL-1.0-only.json", + "referenceNumber": 334, + "name": "Affero General Public License v1.0 only", + "licenseId": "AGPL-1.0-only", + "seeAlso": [ + "http://www.affero.org/oagpl.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AGPL-1.0-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AGPL-1.0-or-later.json", + "referenceNumber": 527, + "name": "Affero General Public License v1.0 or later", + "licenseId": "AGPL-1.0-or-later", + "seeAlso": [ + "http://www.affero.org/oagpl.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AGPL-3.0.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/AGPL-3.0.json", + "referenceNumber": 394, + "name": "GNU Affero General Public License v3.0", + "licenseId": "AGPL-3.0", + "seeAlso": [ + "https://www.gnu.org/licenses/agpl.txt", + "https://opensource.org/licenses/AGPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/AGPL-3.0-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AGPL-3.0-only.json", + "referenceNumber": 123, + "name": "GNU Affero General Public License v3.0 only", + "licenseId": "AGPL-3.0-only", + "seeAlso": [ + "https://www.gnu.org/licenses/agpl.txt", + "https://opensource.org/licenses/AGPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/AGPL-3.0-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AGPL-3.0-or-later.json", + "referenceNumber": 105, + "name": "GNU Affero General Public License v3.0 or later", + "licenseId": "AGPL-3.0-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/agpl.txt", + "https://opensource.org/licenses/AGPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Aladdin.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Aladdin.json", + "referenceNumber": 168, + "name": "Aladdin Free Public License", + "licenseId": "Aladdin", + "seeAlso": [ + "http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.01/Public.htm" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/AMD-newlib.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AMD-newlib.json", + "referenceNumber": 222, + "name": "AMD newlib License", + "licenseId": "AMD-newlib", + "seeAlso": [ + "https://sourceware.org/git/?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dnewlib/libc/sys/a29khif/_close.S;h\u003d04f52ae00de1dafbd9055ad8d73c5c697a3aae7f;hb\u003dHEAD" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AMDPLPA.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AMDPLPA.json", + "referenceNumber": 149, + "name": "AMD\u0027s plpa_map.c License", + "licenseId": "AMDPLPA", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/AMD_plpa_map_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AML.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AML.json", + "referenceNumber": 13, + "name": "Apple MIT License", + "licenseId": "AML", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Apple_MIT_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AML-glslang.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AML-glslang.json", + "referenceNumber": 1, + "name": "AML glslang variant License", + "licenseId": "AML-glslang", + "seeAlso": [ + "https://github.com/KhronosGroup/glslang/blob/main/LICENSE.txt#L949", + "https://docs.omniverse.nvidia.com/install-guide/latest/common/licenses.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/AMPAS.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/AMPAS.json", + "referenceNumber": 420, + "name": "Academy of Motion Picture Arts and Sciences BSD", + "licenseId": "AMPAS", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/BSD#AMPASBSD" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ANTLR-PD.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ANTLR-PD.json", + "referenceNumber": 576, + "name": "ANTLR Software Rights Notice", + "licenseId": "ANTLR-PD", + "seeAlso": [ + "http://www.antlr2.org/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ANTLR-PD-fallback.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ANTLR-PD-fallback.json", + "referenceNumber": 194, + "name": "ANTLR Software Rights Notice with license fallback", + "licenseId": "ANTLR-PD-fallback", + "seeAlso": [ + "http://www.antlr2.org/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/any-OSI.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/any-OSI.json", + "referenceNumber": 121, + "name": "Any OSI License", + "licenseId": "any-OSI", + "seeAlso": [ + "https://metacpan.org/pod/Exporter::Tidy#LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Apache-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Apache-1.0.json", + "referenceNumber": 616, + "name": "Apache License 1.0", + "licenseId": "Apache-1.0", + "seeAlso": [ + "http://www.apache.org/licenses/LICENSE-1.0" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Apache-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Apache-1.1.json", + "referenceNumber": 313, + "name": "Apache License 1.1", + "licenseId": "Apache-1.1", + "seeAlso": [ + "http://apache.org/licenses/LICENSE-1.1", + "https://opensource.org/licenses/Apache-1.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Apache-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Apache-2.0.json", + "referenceNumber": 564, + "name": "Apache License 2.0", + "licenseId": "Apache-2.0", + "seeAlso": [ + "https://www.apache.org/licenses/LICENSE-2.0", + "https://opensource.org/licenses/Apache-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/APAFML.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/APAFML.json", + "referenceNumber": 136, + "name": "Adobe Postscript AFM License", + "licenseId": "APAFML", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/AdobePostscriptAFM" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/APL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/APL-1.0.json", + "referenceNumber": 515, + "name": "Adaptive Public License 1.0", + "licenseId": "APL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/APL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/App-s2p.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/App-s2p.json", + "referenceNumber": 470, + "name": "App::s2p License", + "licenseId": "App-s2p", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/App-s2p" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/APSL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/APSL-1.0.json", + "referenceNumber": 39, + "name": "Apple Public Source License 1.0", + "licenseId": "APSL-1.0", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Apple_Public_Source_License_1.0" + ], + "isOsiApproved": true, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/APSL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/APSL-1.1.json", + "referenceNumber": 582, + "name": "Apple Public Source License 1.1", + "licenseId": "APSL-1.1", + "seeAlso": [ + "http://www.opensource.apple.com/source/IOSerialFamily/IOSerialFamily-7/APPLE_LICENSE" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/APSL-1.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/APSL-1.2.json", + "referenceNumber": 628, + "name": "Apple Public Source License 1.2", + "licenseId": "APSL-1.2", + "seeAlso": [ + "http://www.samurajdata.se/opensource/mirror/licenses/apsl.php" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/APSL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/APSL-2.0.json", + "referenceNumber": 144, + "name": "Apple Public Source License 2.0", + "licenseId": "APSL-2.0", + "seeAlso": [ + "http://www.opensource.apple.com/license/apsl/" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Arphic-1999.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Arphic-1999.json", + "referenceNumber": 131, + "name": "Arphic Public License", + "licenseId": "Arphic-1999", + "seeAlso": [ + "http://ftp.gnu.org/gnu/non-gnu/chinese-fonts-truetype/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Artistic-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Artistic-1.0.json", + "referenceNumber": 388, + "name": "Artistic License 1.0", + "licenseId": "Artistic-1.0", + "seeAlso": [ + "https://opensource.org/licenses/Artistic-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/Artistic-1.0-cl8.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Artistic-1.0-cl8.json", + "referenceNumber": 321, + "name": "Artistic License 1.0 w/clause 8", + "licenseId": "Artistic-1.0-cl8", + "seeAlso": [ + "https://opensource.org/licenses/Artistic-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Artistic-1.0-Perl.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Artistic-1.0-Perl.json", + "referenceNumber": 652, + "name": "Artistic License 1.0 (Perl)", + "licenseId": "Artistic-1.0-Perl", + "seeAlso": [ + "http://dev.perl.org/licenses/artistic.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Artistic-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Artistic-2.0.json", + "referenceNumber": 355, + "name": "Artistic License 2.0", + "licenseId": "Artistic-2.0", + "seeAlso": [ + "http://www.perlfoundation.org/artistic_license_2_0", + "https://www.perlfoundation.org/artistic-license-20.html", + "https://opensource.org/licenses/artistic-license-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/ASWF-Digital-Assets-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ASWF-Digital-Assets-1.0.json", + "referenceNumber": 330, + "name": "ASWF Digital Assets License version 1.0", + "licenseId": "ASWF-Digital-Assets-1.0", + "seeAlso": [ + "https://github.com/AcademySoftwareFoundation/foundation/blob/main/digital_assets/aswf_digital_assets_license_v1.0.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ASWF-Digital-Assets-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ASWF-Digital-Assets-1.1.json", + "referenceNumber": 447, + "name": "ASWF Digital Assets License 1.1", + "licenseId": "ASWF-Digital-Assets-1.1", + "seeAlso": [ + "https://github.com/AcademySoftwareFoundation/foundation/blob/main/digital_assets/aswf_digital_assets_license_v1.1.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Baekmuk.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Baekmuk.json", + "referenceNumber": 436, + "name": "Baekmuk License", + "licenseId": "Baekmuk", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing:Baekmuk?rd\u003dLicensing/Baekmuk" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Bahyph.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Bahyph.json", + "referenceNumber": 494, + "name": "Bahyph License", + "licenseId": "Bahyph", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Bahyph" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Barr.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Barr.json", + "referenceNumber": 48, + "name": "Barr License", + "licenseId": "Barr", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Barr" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/bcrypt-Solar-Designer.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/bcrypt-Solar-Designer.json", + "referenceNumber": 27, + "name": "bcrypt Solar Designer License", + "licenseId": "bcrypt-Solar-Designer", + "seeAlso": [ + "https://github.com/bcrypt-ruby/bcrypt-ruby/blob/master/ext/mri/crypt_blowfish.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Beerware.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Beerware.json", + "referenceNumber": 143, + "name": "Beerware License", + "licenseId": "Beerware", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Beerware", + "https://people.freebsd.org/~phk/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Bitstream-Charter.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Bitstream-Charter.json", + "referenceNumber": 560, + "name": "Bitstream Charter Font License", + "licenseId": "Bitstream-Charter", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Charter#License_Text", + "https://raw.githubusercontent.com/blackhole89/notekit/master/data/fonts/Charter%20license.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Bitstream-Vera.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Bitstream-Vera.json", + "referenceNumber": 581, + "name": "Bitstream Vera Font License", + "licenseId": "Bitstream-Vera", + "seeAlso": [ + "https://web.archive.org/web/20080207013128/http://www.gnome.org/fonts/", + "https://docubrain.com/sites/default/files/licenses/bitstream-vera.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BitTorrent-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BitTorrent-1.0.json", + "referenceNumber": 373, + "name": "BitTorrent Open Source License v1.0", + "licenseId": "BitTorrent-1.0", + "seeAlso": [ + "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/licenses/BitTorrent?r1\u003d1.1\u0026r2\u003d1.1.1.1\u0026diff_format\u003ds" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BitTorrent-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BitTorrent-1.1.json", + "referenceNumber": 288, + "name": "BitTorrent Open Source License v1.1", + "licenseId": "BitTorrent-1.1", + "seeAlso": [ + "http://directory.fsf.org/wiki/License:BitTorrentOSL1.1" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/blessing.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/blessing.json", + "referenceNumber": 469, + "name": "SQLite Blessing", + "licenseId": "blessing", + "seeAlso": [ + "https://www.sqlite.org/src/artifact/e33a4df7e32d742a?ln\u003d4-9", + "https://sqlite.org/src/artifact/df5091916dbb40e6" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BlueOak-1.0.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BlueOak-1.0.0.json", + "referenceNumber": 60, + "name": "Blue Oak Model License 1.0.0", + "licenseId": "BlueOak-1.0.0", + "seeAlso": [ + "https://blueoakcouncil.org/license/1.0.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Boehm-GC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Boehm-GC.json", + "referenceNumber": 322, + "name": "Boehm-Demers-Weiser GC License", + "licenseId": "Boehm-GC", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing:MIT#Another_Minimal_variant_(found_in_libatomic_ops)", + "https://github.com/uim/libgcroots/blob/master/COPYING", + "https://github.com/ivmai/libatomic_ops/blob/master/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Borceux.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Borceux.json", + "referenceNumber": 552, + "name": "Borceux license", + "licenseId": "Borceux", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Borceux" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Brian-Gladman-2-Clause.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Brian-Gladman-2-Clause.json", + "referenceNumber": 457, + "name": "Brian Gladman 2-Clause License", + "licenseId": "Brian-Gladman-2-Clause", + "seeAlso": [ + "https://github.com/krb5/krb5/blob/krb5-1.21.2-final/NOTICE#L140-L156", + "https://web.mit.edu/kerberos/krb5-1.21/doc/mitK5license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Brian-Gladman-3-Clause.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Brian-Gladman-3-Clause.json", + "referenceNumber": 409, + "name": "Brian Gladman 3-Clause License", + "licenseId": "Brian-Gladman-3-Clause", + "seeAlso": [ + "https://github.com/SWI-Prolog/packages-clib/blob/master/sha1/brg_endian.h" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-1-Clause.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-1-Clause.json", + "referenceNumber": 567, + "name": "BSD 1-Clause License", + "licenseId": "BSD-1-Clause", + "seeAlso": [ + "https://svnweb.freebsd.org/base/head/include/ifaddrs.h?revision\u003d326823" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/BSD-2-Clause.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause.json", + "referenceNumber": 264, + "name": "BSD 2-Clause \"Simplified\" License", + "licenseId": "BSD-2-Clause", + "seeAlso": [ + "https://opensource.org/licenses/BSD-2-Clause" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/BSD-2-Clause-Darwin.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-Darwin.json", + "referenceNumber": 231, + "name": "BSD 2-Clause - Ian Darwin variant", + "licenseId": "BSD-2-Clause-Darwin", + "seeAlso": [ + "https://github.com/file/file/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-2-Clause-first-lines.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-first-lines.json", + "referenceNumber": 245, + "name": "BSD 2-Clause - first lines requirement", + "licenseId": "BSD-2-Clause-first-lines", + "seeAlso": [ + "https://github.com/krb5/krb5/blob/krb5-1.21.2-final/NOTICE#L664-L690", + "https://web.mit.edu/kerberos/krb5-1.21/doc/mitK5license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-FreeBSD.json", + "referenceNumber": 192, + "name": "BSD 2-Clause FreeBSD License", + "licenseId": "BSD-2-Clause-FreeBSD", + "seeAlso": [ + "http://www.freebsd.org/copyright/freebsd-license.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/BSD-2-Clause-NetBSD.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-NetBSD.json", + "referenceNumber": 449, + "name": "BSD 2-Clause NetBSD License", + "licenseId": "BSD-2-Clause-NetBSD", + "seeAlso": [ + "http://www.netbsd.org/about/redistribution.html#default" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/BSD-2-Clause-Patent.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-Patent.json", + "referenceNumber": 612, + "name": "BSD-2-Clause Plus Patent License", + "licenseId": "BSD-2-Clause-Patent", + "seeAlso": [ + "https://opensource.org/licenses/BSDplusPatent" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/BSD-2-Clause-Views.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-Views.json", + "referenceNumber": 657, + "name": "BSD 2-Clause with views sentence", + "licenseId": "BSD-2-Clause-Views", + "seeAlso": [ + "http://www.freebsd.org/copyright/freebsd-license.html", + "https://people.freebsd.org/~ivoras/wine/patch-wine-nvidia.sh", + "https://github.com/protegeproject/protege/blob/master/license.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause.json", + "referenceNumber": 216, + "name": "BSD 3-Clause \"New\" or \"Revised\" License", + "licenseId": "BSD-3-Clause", + "seeAlso": [ + "https://opensource.org/licenses/BSD-3-Clause", + "https://www.eclipse.org/org/documents/edl-v10.php" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-acpica.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-acpica.json", + "referenceNumber": 408, + "name": "BSD 3-Clause acpica variant", + "licenseId": "BSD-3-Clause-acpica", + "seeAlso": [ + "https://github.com/acpica/acpica/blob/master/source/common/acfileio.c#L119" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-Attribution.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Attribution.json", + "referenceNumber": 14, + "name": "BSD with attribution", + "licenseId": "BSD-3-Clause-Attribution", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/BSD_with_Attribution" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-Clear.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Clear.json", + "referenceNumber": 347, + "name": "BSD 3-Clause Clear License", + "licenseId": "BSD-3-Clause-Clear", + "seeAlso": [ + "http://labs.metacarta.com/license-explanation.html#license" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-flex.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-flex.json", + "referenceNumber": 211, + "name": "BSD 3-Clause Flex variant", + "licenseId": "BSD-3-Clause-flex", + "seeAlso": [ + "https://github.com/westes/flex/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-HP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-HP.json", + "referenceNumber": 210, + "name": "Hewlett-Packard BSD variant license", + "licenseId": "BSD-3-Clause-HP", + "seeAlso": [ + "https://github.com/zdohnal/hplip/blob/master/COPYING#L939" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-LBNL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-LBNL.json", + "referenceNumber": 597, + "name": "Lawrence Berkeley National Labs BSD variant license", + "licenseId": "BSD-3-Clause-LBNL", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/LBNLBSD" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-Modification.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Modification.json", + "referenceNumber": 364, + "name": "BSD 3-Clause Modification", + "licenseId": "BSD-3-Clause-Modification", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing:BSD#Modification_Variant" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Military-License.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Military-License.json", + "referenceNumber": 30, + "name": "BSD 3-Clause No Military License", + "licenseId": "BSD-3-Clause-No-Military-License", + "seeAlso": [ + "https://gitlab.syncad.com/hive/dhive/-/blob/master/LICENSE", + "https://github.com/greymass/swift-eosio/blob/master/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License.json", + "referenceNumber": 21, + "name": "BSD 3-Clause No Nuclear License", + "licenseId": "BSD-3-Clause-No-Nuclear-License", + "seeAlso": [ + "http://download.oracle.com/otn-pub/java/licenses/bsd.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License-2014.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License-2014.json", + "referenceNumber": 543, + "name": "BSD 3-Clause No Nuclear License 2014", + "licenseId": "BSD-3-Clause-No-Nuclear-License-2014", + "seeAlso": [ + "https://java.net/projects/javaeetutorial/pages/BerkeleyLicense" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-Warranty.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-Warranty.json", + "referenceNumber": 402, + "name": "BSD 3-Clause No Nuclear Warranty", + "licenseId": "BSD-3-Clause-No-Nuclear-Warranty", + "seeAlso": [ + "https://jogamp.org/git/?p\u003dgluegen.git;a\u003dblob_plain;f\u003dLICENSE.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-Open-MPI.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Open-MPI.json", + "referenceNumber": 376, + "name": "BSD 3-Clause Open MPI variant", + "licenseId": "BSD-3-Clause-Open-MPI", + "seeAlso": [ + "https://www.open-mpi.org/community/license.php", + "http://www.netlib.org/lapack/LICENSE.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-3-Clause-Sun.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Sun.json", + "referenceNumber": 554, + "name": "BSD 3-Clause Sun Microsystems", + "licenseId": "BSD-3-Clause-Sun", + "seeAlso": [ + "https://github.com/xmlark/msv/blob/b9316e2f2270bc1606952ea4939ec87fbba157f3/xsdlib/src/main/java/com/sun/msv/datatype/regexp/InternalImpl.java" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-4-Clause.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause.json", + "referenceNumber": 650, + "name": "BSD 4-Clause \"Original\" or \"Old\" License", + "licenseId": "BSD-4-Clause", + "seeAlso": [ + "http://directory.fsf.org/wiki/License:BSD_4Clause" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/BSD-4-Clause-Shortened.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause-Shortened.json", + "referenceNumber": 252, + "name": "BSD 4 Clause Shortened", + "licenseId": "BSD-4-Clause-Shortened", + "seeAlso": [ + "https://metadata.ftp-master.debian.org/changelogs//main/a/arpwatch/arpwatch_2.1a15-7_copyright" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-4-Clause-UC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause-UC.json", + "referenceNumber": 117, + "name": "BSD-4-Clause (University of California-Specific)", + "licenseId": "BSD-4-Clause-UC", + "seeAlso": [ + "http://www.freebsd.org/copyright/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-4.3RENO.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-4.3RENO.json", + "referenceNumber": 298, + "name": "BSD 4.3 RENO License", + "licenseId": "BSD-4.3RENO", + "seeAlso": [ + "https://sourceware.org/git/?p\u003dbinutils-gdb.git;a\u003dblob;f\u003dlibiberty/strcasecmp.c;h\u003d131d81c2ce7881fa48c363dc5bf5fb302c61ce0b;hb\u003dHEAD", + "https://git.openldap.org/openldap/openldap/-/blob/master/COPYRIGHT#L55-63" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-4.3TAHOE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-4.3TAHOE.json", + "referenceNumber": 0, + "name": "BSD 4.3 TAHOE License", + "licenseId": "BSD-4.3TAHOE", + "seeAlso": [ + "https://github.com/389ds/389-ds-base/blob/main/ldap/include/sysexits-compat.h#L15", + "https://git.savannah.gnu.org/cgit/indent.git/tree/doc/indent.texi?id\u003da74c6b4ee49397cf330b333da1042bffa60ed14f#n1788" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-Advertising-Acknowledgement.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-Advertising-Acknowledgement.json", + "referenceNumber": 423, + "name": "BSD Advertising Acknowledgement License", + "licenseId": "BSD-Advertising-Acknowledgement", + "seeAlso": [ + "https://github.com/python-excel/xlrd/blob/master/LICENSE#L33" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-Attribution-HPND-disclaimer.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-Attribution-HPND-disclaimer.json", + "referenceNumber": 171, + "name": "BSD with Attribution and HPND disclaimer", + "licenseId": "BSD-Attribution-HPND-disclaimer", + "seeAlso": [ + "https://github.com/cyrusimap/cyrus-sasl/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-Inferno-Nettverk.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-Inferno-Nettverk.json", + "referenceNumber": 401, + "name": "BSD-Inferno-Nettverk", + "licenseId": "BSD-Inferno-Nettverk", + "seeAlso": [ + "https://www.inet.no/dante/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-Protection.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-Protection.json", + "referenceNumber": 403, + "name": "BSD Protection License", + "licenseId": "BSD-Protection", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/BSD_Protection_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-Source-beginning-file.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-Source-beginning-file.json", + "referenceNumber": 97, + "name": "BSD Source Code Attribution - beginning of file variant", + "licenseId": "BSD-Source-beginning-file", + "seeAlso": [ + "https://github.com/lattera/freebsd/blob/master/sys/cam/cam.c#L4" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-Source-Code.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-Source-Code.json", + "referenceNumber": 22, + "name": "BSD Source Code Attribution", + "licenseId": "BSD-Source-Code", + "seeAlso": [ + "https://github.com/robbiehanson/CocoaHTTPServer/blob/master/LICENSE.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-Systemics.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-Systemics.json", + "referenceNumber": 178, + "name": "Systemics BSD variant license", + "licenseId": "BSD-Systemics", + "seeAlso": [ + "https://metacpan.org/release/DPARIS/Crypt-DES-2.07/source/COPYRIGHT" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSD-Systemics-W3Works.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSD-Systemics-W3Works.json", + "referenceNumber": 350, + "name": "Systemics W3Works BSD variant license", + "licenseId": "BSD-Systemics-W3Works", + "seeAlso": [ + "https://metacpan.org/release/DPARIS/Crypt-Blowfish-2.14/source/COPYRIGHT#L7" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/BSL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BSL-1.0.json", + "referenceNumber": 514, + "name": "Boost Software License 1.0", + "licenseId": "BSL-1.0", + "seeAlso": [ + "http://www.boost.org/LICENSE_1_0.txt", + "https://opensource.org/licenses/BSL-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/BUSL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/BUSL-1.1.json", + "referenceNumber": 549, + "name": "Business Source License 1.1", + "licenseId": "BUSL-1.1", + "seeAlso": [ + "https://mariadb.com/bsl11/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/bzip2-1.0.5.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/bzip2-1.0.5.json", + "referenceNumber": 419, + "name": "bzip2 and libbzip2 License v1.0.5", + "licenseId": "bzip2-1.0.5", + "seeAlso": [ + "https://sourceware.org/bzip2/1.0.5/bzip2-manual-1.0.5.html", + "http://bzip.org/1.0.5/bzip2-manual-1.0.5.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/bzip2-1.0.6.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/bzip2-1.0.6.json", + "referenceNumber": 396, + "name": "bzip2 and libbzip2 License v1.0.6", + "licenseId": "bzip2-1.0.6", + "seeAlso": [ + "https://sourceware.org/git/?p\u003dbzip2.git;a\u003dblob;f\u003dLICENSE;hb\u003dbzip2-1.0.6", + "http://bzip.org/1.0.5/bzip2-manual-1.0.5.html", + "https://sourceware.org/cgit/valgrind/tree/mpi/libmpiwrap.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/C-UDA-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/C-UDA-1.0.json", + "referenceNumber": 432, + "name": "Computational Use of Data Agreement v1.0", + "licenseId": "C-UDA-1.0", + "seeAlso": [ + "https://github.com/microsoft/Computational-Use-of-Data-Agreement/blob/master/C-UDA-1.0.md", + "https://cdla.dev/computational-use-of-data-agreement-v1-0/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CAL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CAL-1.0.json", + "referenceNumber": 653, + "name": "Cryptographic Autonomy License 1.0", + "licenseId": "CAL-1.0", + "seeAlso": [ + "http://cryptographicautonomylicense.com/license-text.html", + "https://opensource.org/licenses/CAL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/CAL-1.0-Combined-Work-Exception.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CAL-1.0-Combined-Work-Exception.json", + "referenceNumber": 217, + "name": "Cryptographic Autonomy License 1.0 (Combined Work Exception)", + "licenseId": "CAL-1.0-Combined-Work-Exception", + "seeAlso": [ + "http://cryptographicautonomylicense.com/license-text.html", + "https://opensource.org/licenses/CAL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Caldera.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Caldera.json", + "referenceNumber": 622, + "name": "Caldera License", + "licenseId": "Caldera", + "seeAlso": [ + "http://www.lemis.com/grog/UNIX/ancient-source-all.pdf" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Caldera-no-preamble.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Caldera-no-preamble.json", + "referenceNumber": 585, + "name": "Caldera License (without preamble)", + "licenseId": "Caldera-no-preamble", + "seeAlso": [ + "https://github.com/apache/apr/blob/trunk/LICENSE#L298C6-L298C29" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Catharon.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Catharon.json", + "referenceNumber": 45, + "name": "Catharon License", + "licenseId": "Catharon", + "seeAlso": [ + "https://github.com/scummvm/scummvm/blob/v2.8.0/LICENSES/CatharonLicense.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CATOSL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CATOSL-1.1.json", + "referenceNumber": 193, + "name": "Computer Associates Trusted Open Source License 1.1", + "licenseId": "CATOSL-1.1", + "seeAlso": [ + "https://opensource.org/licenses/CATOSL-1.1" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/CC-BY-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-1.0.json", + "referenceNumber": 37, + "name": "Creative Commons Attribution 1.0 Generic", + "licenseId": "CC-BY-1.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by/1.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-2.0.json", + "referenceNumber": 241, + "name": "Creative Commons Attribution 2.0 Generic", + "licenseId": "CC-BY-2.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by/2.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-2.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-2.5.json", + "referenceNumber": 129, + "name": "Creative Commons Attribution 2.5 Generic", + "licenseId": "CC-BY-2.5", + "seeAlso": [ + "https://creativecommons.org/licenses/by/2.5/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-2.5-AU.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-2.5-AU.json", + "referenceNumber": 583, + "name": "Creative Commons Attribution 2.5 Australia", + "licenseId": "CC-BY-2.5-AU", + "seeAlso": [ + "https://creativecommons.org/licenses/by/2.5/au/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0.json", + "referenceNumber": 302, + "name": "Creative Commons Attribution 3.0 Unported", + "licenseId": "CC-BY-3.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by/3.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-3.0-AT.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-AT.json", + "referenceNumber": 324, + "name": "Creative Commons Attribution 3.0 Austria", + "licenseId": "CC-BY-3.0-AT", + "seeAlso": [ + "https://creativecommons.org/licenses/by/3.0/at/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-3.0-AU.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-AU.json", + "referenceNumber": 342, + "name": "Creative Commons Attribution 3.0 Australia", + "licenseId": "CC-BY-3.0-AU", + "seeAlso": [ + "https://creativecommons.org/licenses/by/3.0/au/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-3.0-DE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-DE.json", + "referenceNumber": 239, + "name": "Creative Commons Attribution 3.0 Germany", + "licenseId": "CC-BY-3.0-DE", + "seeAlso": [ + "https://creativecommons.org/licenses/by/3.0/de/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-3.0-IGO.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-IGO.json", + "referenceNumber": 19, + "name": "Creative Commons Attribution 3.0 IGO", + "licenseId": "CC-BY-3.0-IGO", + "seeAlso": [ + "https://creativecommons.org/licenses/by/3.0/igo/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-3.0-NL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-NL.json", + "referenceNumber": 501, + "name": "Creative Commons Attribution 3.0 Netherlands", + "licenseId": "CC-BY-3.0-NL", + "seeAlso": [ + "https://creativecommons.org/licenses/by/3.0/nl/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-3.0-US.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-US.json", + "referenceNumber": 569, + "name": "Creative Commons Attribution 3.0 United States", + "licenseId": "CC-BY-3.0-US", + "seeAlso": [ + "https://creativecommons.org/licenses/by/3.0/us/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-4.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-4.0.json", + "referenceNumber": 265, + "name": "Creative Commons Attribution 4.0 International", + "licenseId": "CC-BY-4.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by/4.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-1.0.json", + "referenceNumber": 167, + "name": "Creative Commons Attribution Non Commercial 1.0 Generic", + "licenseId": "CC-BY-NC-1.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc/1.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-2.0.json", + "referenceNumber": 92, + "name": "Creative Commons Attribution Non Commercial 2.0 Generic", + "licenseId": "CC-BY-NC-2.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc/2.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-2.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-2.5.json", + "referenceNumber": 253, + "name": "Creative Commons Attribution Non Commercial 2.5 Generic", + "licenseId": "CC-BY-NC-2.5", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc/2.5/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-3.0.json", + "referenceNumber": 199, + "name": "Creative Commons Attribution Non Commercial 3.0 Unported", + "licenseId": "CC-BY-NC-3.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc/3.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-3.0-DE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-3.0-DE.json", + "referenceNumber": 429, + "name": "Creative Commons Attribution Non Commercial 3.0 Germany", + "licenseId": "CC-BY-NC-3.0-DE", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc/3.0/de/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-4.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-4.0.json", + "referenceNumber": 188, + "name": "Creative Commons Attribution Non Commercial 4.0 International", + "licenseId": "CC-BY-NC-4.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc/4.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-ND-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-1.0.json", + "referenceNumber": 365, + "name": "Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic", + "licenseId": "CC-BY-NC-ND-1.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nd-nc/1.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-ND-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-2.0.json", + "referenceNumber": 416, + "name": "Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic", + "licenseId": "CC-BY-NC-ND-2.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-nd/2.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-ND-2.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-2.5.json", + "referenceNumber": 58, + "name": "Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic", + "licenseId": "CC-BY-NC-ND-2.5", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-nd/2.5/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0.json", + "referenceNumber": 213, + "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported", + "licenseId": "CC-BY-NC-ND-3.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-DE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-DE.json", + "referenceNumber": 84, + "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 Germany", + "licenseId": "CC-BY-NC-ND-3.0-DE", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-nd/3.0/de/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-IGO.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-IGO.json", + "referenceNumber": 587, + "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO", + "licenseId": "CC-BY-NC-ND-3.0-IGO", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-nd/3.0/igo/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-ND-4.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-4.0.json", + "referenceNumber": 296, + "name": "Creative Commons Attribution Non Commercial No Derivatives 4.0 International", + "licenseId": "CC-BY-NC-ND-4.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-1.0.json", + "referenceNumber": 170, + "name": "Creative Commons Attribution Non Commercial Share Alike 1.0 Generic", + "licenseId": "CC-BY-NC-SA-1.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/1.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0.json", + "referenceNumber": 484, + "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 Generic", + "licenseId": "CC-BY-NC-SA-2.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/2.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-DE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-DE.json", + "referenceNumber": 184, + "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 Germany", + "licenseId": "CC-BY-NC-SA-2.0-DE", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/2.0/de/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-FR.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-FR.json", + "referenceNumber": 116, + "name": "Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France", + "licenseId": "CC-BY-NC-SA-2.0-FR", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/2.0/fr/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-UK.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-UK.json", + "referenceNumber": 415, + "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales", + "licenseId": "CC-BY-NC-SA-2.0-UK", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/2.0/uk/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.5.json", + "referenceNumber": 106, + "name": "Creative Commons Attribution Non Commercial Share Alike 2.5 Generic", + "licenseId": "CC-BY-NC-SA-2.5", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/2.5/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0.json", + "referenceNumber": 323, + "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 Unported", + "licenseId": "CC-BY-NC-SA-3.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-DE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-DE.json", + "referenceNumber": 150, + "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 Germany", + "licenseId": "CC-BY-NC-SA-3.0-DE", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/3.0/de/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-IGO.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-IGO.json", + "referenceNumber": 295, + "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 IGO", + "licenseId": "CC-BY-NC-SA-3.0-IGO", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/3.0/igo/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-NC-SA-4.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-4.0.json", + "referenceNumber": 351, + "name": "Creative Commons Attribution Non Commercial Share Alike 4.0 International", + "licenseId": "CC-BY-NC-SA-4.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-ND-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-1.0.json", + "referenceNumber": 56, + "name": "Creative Commons Attribution No Derivatives 1.0 Generic", + "licenseId": "CC-BY-ND-1.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nd/1.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-ND-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-2.0.json", + "referenceNumber": 640, + "name": "Creative Commons Attribution No Derivatives 2.0 Generic", + "licenseId": "CC-BY-ND-2.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nd/2.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-ND-2.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-2.5.json", + "referenceNumber": 276, + "name": "Creative Commons Attribution No Derivatives 2.5 Generic", + "licenseId": "CC-BY-ND-2.5", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nd/2.5/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-ND-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-3.0.json", + "referenceNumber": 173, + "name": "Creative Commons Attribution No Derivatives 3.0 Unported", + "licenseId": "CC-BY-ND-3.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nd/3.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-ND-3.0-DE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-3.0-DE.json", + "referenceNumber": 525, + "name": "Creative Commons Attribution No Derivatives 3.0 Germany", + "licenseId": "CC-BY-ND-3.0-DE", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nd/3.0/de/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-ND-4.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-4.0.json", + "referenceNumber": 328, + "name": "Creative Commons Attribution No Derivatives 4.0 International", + "licenseId": "CC-BY-ND-4.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-nd/4.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-1.0.json", + "referenceNumber": 453, + "name": "Creative Commons Attribution Share Alike 1.0 Generic", + "licenseId": "CC-BY-SA-1.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/1.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.0.json", + "referenceNumber": 174, + "name": "Creative Commons Attribution Share Alike 2.0 Generic", + "licenseId": "CC-BY-SA-2.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/2.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-2.0-UK.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.0-UK.json", + "referenceNumber": 387, + "name": "Creative Commons Attribution Share Alike 2.0 England and Wales", + "licenseId": "CC-BY-SA-2.0-UK", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/2.0/uk/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-2.1-JP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.1-JP.json", + "referenceNumber": 471, + "name": "Creative Commons Attribution Share Alike 2.1 Japan", + "licenseId": "CC-BY-SA-2.1-JP", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/2.1/jp/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-2.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.5.json", + "referenceNumber": 461, + "name": "Creative Commons Attribution Share Alike 2.5 Generic", + "licenseId": "CC-BY-SA-2.5", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/2.5/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0.json", + "referenceNumber": 621, + "name": "Creative Commons Attribution Share Alike 3.0 Unported", + "licenseId": "CC-BY-SA-3.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/3.0/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-3.0-AT.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0-AT.json", + "referenceNumber": 31, + "name": "Creative Commons Attribution Share Alike 3.0 Austria", + "licenseId": "CC-BY-SA-3.0-AT", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/3.0/at/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-3.0-DE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0-DE.json", + "referenceNumber": 325, + "name": "Creative Commons Attribution Share Alike 3.0 Germany", + "licenseId": "CC-BY-SA-3.0-DE", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/3.0/de/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-3.0-IGO.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0-IGO.json", + "referenceNumber": 20, + "name": "Creative Commons Attribution-ShareAlike 3.0 IGO", + "licenseId": "CC-BY-SA-3.0-IGO", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/3.0/igo/legalcode" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC-BY-SA-4.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-4.0.json", + "referenceNumber": 155, + "name": "Creative Commons Attribution Share Alike 4.0 International", + "licenseId": "CC-BY-SA-4.0", + "seeAlso": [ + "https://creativecommons.org/licenses/by-sa/4.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CC-PDDC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC-PDDC.json", + "referenceNumber": 349, + "name": "Creative Commons Public Domain Dedication and Certification", + "licenseId": "CC-PDDC", + "seeAlso": [ + "https://creativecommons.org/licenses/publicdomain/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CC0-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CC0-1.0.json", + "referenceNumber": 70, + "name": "Creative Commons Zero v1.0 Universal", + "licenseId": "CC0-1.0", + "seeAlso": [ + "https://creativecommons.org/publicdomain/zero/1.0/legalcode" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CDDL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CDDL-1.0.json", + "referenceNumber": 282, + "name": "Common Development and Distribution License 1.0", + "licenseId": "CDDL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/cddl1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CDDL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CDDL-1.1.json", + "referenceNumber": 130, + "name": "Common Development and Distribution License 1.1", + "licenseId": "CDDL-1.1", + "seeAlso": [ + "http://glassfish.java.net/public/CDDL+GPL_1_1.html", + "https://javaee.github.io/glassfish/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CDL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CDL-1.0.json", + "referenceNumber": 592, + "name": "Common Documentation License 1.0", + "licenseId": "CDL-1.0", + "seeAlso": [ + "http://www.opensource.apple.com/cdl/", + "https://fedoraproject.org/wiki/Licensing/Common_Documentation_License", + "https://www.gnu.org/licenses/license-list.html#ACDL" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CDLA-Permissive-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CDLA-Permissive-1.0.json", + "referenceNumber": 551, + "name": "Community Data License Agreement Permissive 1.0", + "licenseId": "CDLA-Permissive-1.0", + "seeAlso": [ + "https://cdla.io/permissive-1-0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CDLA-Permissive-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CDLA-Permissive-2.0.json", + "referenceNumber": 319, + "name": "Community Data License Agreement Permissive 2.0", + "licenseId": "CDLA-Permissive-2.0", + "seeAlso": [ + "https://cdla.dev/permissive-2-0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CDLA-Sharing-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CDLA-Sharing-1.0.json", + "referenceNumber": 445, + "name": "Community Data License Agreement Sharing 1.0", + "licenseId": "CDLA-Sharing-1.0", + "seeAlso": [ + "https://cdla.io/sharing-1-0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CECILL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CECILL-1.0.json", + "referenceNumber": 219, + "name": "CeCILL Free Software License Agreement v1.0", + "licenseId": "CECILL-1.0", + "seeAlso": [ + "http://www.cecill.info/licences/Licence_CeCILL_V1-fr.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CECILL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CECILL-1.1.json", + "referenceNumber": 38, + "name": "CeCILL Free Software License Agreement v1.1", + "licenseId": "CECILL-1.1", + "seeAlso": [ + "http://www.cecill.info/licences/Licence_CeCILL_V1.1-US.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CECILL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CECILL-2.0.json", + "referenceNumber": 73, + "name": "CeCILL Free Software License Agreement v2.0", + "licenseId": "CECILL-2.0", + "seeAlso": [ + "http://www.cecill.info/licences/Licence_CeCILL_V2-en.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CECILL-2.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CECILL-2.1.json", + "referenceNumber": 393, + "name": "CeCILL Free Software License Agreement v2.1", + "licenseId": "CECILL-2.1", + "seeAlso": [ + "http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/CECILL-B.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CECILL-B.json", + "referenceNumber": 354, + "name": "CeCILL-B Free Software License Agreement", + "licenseId": "CECILL-B", + "seeAlso": [ + "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CECILL-C.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CECILL-C.json", + "referenceNumber": 271, + "name": "CeCILL-C Free Software License Agreement", + "licenseId": "CECILL-C", + "seeAlso": [ + "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CERN-OHL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CERN-OHL-1.1.json", + "referenceNumber": 32, + "name": "CERN Open Hardware Licence v1.1", + "licenseId": "CERN-OHL-1.1", + "seeAlso": [ + "https://www.ohwr.org/project/licenses/wikis/cern-ohl-v1.1" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CERN-OHL-1.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CERN-OHL-1.2.json", + "referenceNumber": 95, + "name": "CERN Open Hardware Licence v1.2", + "licenseId": "CERN-OHL-1.2", + "seeAlso": [ + "https://www.ohwr.org/project/licenses/wikis/cern-ohl-v1.2" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CERN-OHL-P-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CERN-OHL-P-2.0.json", + "referenceNumber": 198, + "name": "CERN Open Hardware Licence Version 2 - Permissive", + "licenseId": "CERN-OHL-P-2.0", + "seeAlso": [ + "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/CERN-OHL-S-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CERN-OHL-S-2.0.json", + "referenceNumber": 370, + "name": "CERN Open Hardware Licence Version 2 - Strongly Reciprocal", + "licenseId": "CERN-OHL-S-2.0", + "seeAlso": [ + "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/CERN-OHL-W-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CERN-OHL-W-2.0.json", + "referenceNumber": 82, + "name": "CERN Open Hardware Licence Version 2 - Weakly Reciprocal", + "licenseId": "CERN-OHL-W-2.0", + "seeAlso": [ + "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/CFITSIO.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CFITSIO.json", + "referenceNumber": 96, + "name": "CFITSIO License", + "licenseId": "CFITSIO", + "seeAlso": [ + "https://heasarc.gsfc.nasa.gov/docs/software/fitsio/c/f_user/node9.html", + "https://heasarc.gsfc.nasa.gov/docs/software/ftools/fv/doc/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/check-cvs.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/check-cvs.json", + "referenceNumber": 521, + "name": "check-cvs License", + "licenseId": "check-cvs", + "seeAlso": [ + "http://cvs.savannah.gnu.org/viewvc/cvs/ccvs/contrib/check_cvs.in?revision\u003d1.1.4.3\u0026view\u003dmarkup\u0026pathrev\u003dcvs1-11-23#l2" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/checkmk.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/checkmk.json", + "referenceNumber": 272, + "name": "Checkmk License", + "licenseId": "checkmk", + "seeAlso": [ + "https://github.com/libcheck/check/blob/master/checkmk/checkmk.in" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ClArtistic.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ClArtistic.json", + "referenceNumber": 66, + "name": "Clarified Artistic License", + "licenseId": "ClArtistic", + "seeAlso": [ + "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/", + "http://www.ncftp.com/ncftp/doc/LICENSE.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Clips.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Clips.json", + "referenceNumber": 450, + "name": "Clips License", + "licenseId": "Clips", + "seeAlso": [ + "https://github.com/DrItanium/maya/blob/master/LICENSE.CLIPS" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CMU-Mach.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CMU-Mach.json", + "referenceNumber": 410, + "name": "CMU Mach License", + "licenseId": "CMU-Mach", + "seeAlso": [ + "https://www.cs.cmu.edu/~410/licenses.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CMU-Mach-nodoc.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CMU-Mach-nodoc.json", + "referenceNumber": 111, + "name": "CMU Mach - no notices-in-documentation variant", + "licenseId": "CMU-Mach-nodoc", + "seeAlso": [ + "https://github.com/krb5/krb5/blob/krb5-1.21.2-final/NOTICE#L718-L728", + "https://web.mit.edu/kerberos/krb5-1.21/doc/mitK5license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CNRI-Jython.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CNRI-Jython.json", + "referenceNumber": 509, + "name": "CNRI Jython License", + "licenseId": "CNRI-Jython", + "seeAlso": [ + "http://www.jython.org/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CNRI-Python.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CNRI-Python.json", + "referenceNumber": 611, + "name": "CNRI Python License", + "licenseId": "CNRI-Python", + "seeAlso": [ + "https://opensource.org/licenses/CNRI-Python" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/CNRI-Python-GPL-Compatible.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CNRI-Python-GPL-Compatible.json", + "referenceNumber": 504, + "name": "CNRI Python Open Source GPL Compatible License Agreement", + "licenseId": "CNRI-Python-GPL-Compatible", + "seeAlso": [ + "http://www.python.org/download/releases/1.6.1/download_win/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/COIL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/COIL-1.0.json", + "referenceNumber": 286, + "name": "Copyfree Open Innovation License", + "licenseId": "COIL-1.0", + "seeAlso": [ + "https://coil.apotheon.org/plaintext/01.0.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Community-Spec-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Community-Spec-1.0.json", + "referenceNumber": 631, + "name": "Community Specification License 1.0", + "licenseId": "Community-Spec-1.0", + "seeAlso": [ + "https://github.com/CommunitySpecification/1.0/blob/master/1._Community_Specification_License-v1.md" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Condor-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Condor-1.1.json", + "referenceNumber": 251, + "name": "Condor Public License v1.1", + "licenseId": "Condor-1.1", + "seeAlso": [ + "http://research.cs.wisc.edu/condor/license.html#condor", + "http://web.archive.org/web/20111123062036/http://research.cs.wisc.edu/condor/license.html#condor" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/copyleft-next-0.3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/copyleft-next-0.3.0.json", + "referenceNumber": 421, + "name": "copyleft-next 0.3.0", + "licenseId": "copyleft-next-0.3.0", + "seeAlso": [ + "https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/copyleft-next-0.3.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/copyleft-next-0.3.1.json", + "referenceNumber": 119, + "name": "copyleft-next 0.3.1", + "licenseId": "copyleft-next-0.3.1", + "seeAlso": [ + "https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.1" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Cornell-Lossless-JPEG.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Cornell-Lossless-JPEG.json", + "referenceNumber": 632, + "name": "Cornell Lossless JPEG License", + "licenseId": "Cornell-Lossless-JPEG", + "seeAlso": [ + "https://android.googlesource.com/platform/external/dng_sdk/+/refs/heads/master/source/dng_lossless_jpeg.cpp#16", + "https://www.mssl.ucl.ac.uk/~mcrw/src/20050920/proto.h", + "https://gitlab.freedesktop.org/libopenraw/libopenraw/blob/master/lib/ljpegdecompressor.cpp#L32" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CPAL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CPAL-1.0.json", + "referenceNumber": 315, + "name": "Common Public Attribution License 1.0", + "licenseId": "CPAL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/CPAL-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CPL-1.0.json", + "referenceNumber": 135, + "name": "Common Public License 1.0", + "licenseId": "CPL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/CPL-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/CPOL-1.02.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CPOL-1.02.json", + "referenceNumber": 479, + "name": "Code Project Open License 1.02", + "licenseId": "CPOL-1.02", + "seeAlso": [ + "http://www.codeproject.com/info/cpol10.aspx" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/Cronyx.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Cronyx.json", + "referenceNumber": 377, + "name": "Cronyx License", + "licenseId": "Cronyx", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/font/alias/-/blob/master/COPYING", + "https://gitlab.freedesktop.org/xorg/font/cronyx-cyrillic/-/blob/master/COPYING", + "https://gitlab.freedesktop.org/xorg/font/misc-cyrillic/-/blob/master/COPYING", + "https://gitlab.freedesktop.org/xorg/font/screen-cyrillic/-/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Crossword.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Crossword.json", + "referenceNumber": 340, + "name": "Crossword License", + "licenseId": "Crossword", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Crossword" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CrystalStacker.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CrystalStacker.json", + "referenceNumber": 593, + "name": "CrystalStacker License", + "licenseId": "CrystalStacker", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing:CrystalStacker?rd\u003dLicensing/CrystalStacker" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/CUA-OPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/CUA-OPL-1.0.json", + "referenceNumber": 553, + "name": "CUA Office Public License v1.0", + "licenseId": "CUA-OPL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/CUA-OPL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Cube.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Cube.json", + "referenceNumber": 404, + "name": "Cube License", + "licenseId": "Cube", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Cube" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/curl.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/curl.json", + "referenceNumber": 604, + "name": "curl License", + "licenseId": "curl", + "seeAlso": [ + "https://github.com/bagder/curl/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/cve-tou.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/cve-tou.json", + "referenceNumber": 306, + "name": "Common Vulnerability Enumeration ToU License", + "licenseId": "cve-tou", + "seeAlso": [ + "https://www.cve.org/Legal/TermsOfUse" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/D-FSL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/D-FSL-1.0.json", + "referenceNumber": 154, + "name": "Deutsche Freie Software Lizenz", + "licenseId": "D-FSL-1.0", + "seeAlso": [ + "http://www.dipp.nrw.de/d-fsl/lizenzen/", + "http://www.dipp.nrw.de/d-fsl/index_html/lizenzen/de/D-FSL-1_0_de.txt", + "http://www.dipp.nrw.de/d-fsl/index_html/lizenzen/en/D-FSL-1_0_en.txt", + "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl", + "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/deutsche-freie-software-lizenz", + "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/german-free-software-license", + "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/D-FSL-1_0_de.txt/at_download/file", + "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/D-FSL-1_0_en.txt/at_download/file" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/DEC-3-Clause.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/DEC-3-Clause.json", + "referenceNumber": 15, + "name": "DEC 3-Clause License", + "licenseId": "DEC-3-Clause", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/COPYING?ref_type\u003dheads#L239" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/diffmark.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/diffmark.json", + "referenceNumber": 292, + "name": "diffmark license", + "licenseId": "diffmark", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/diffmark" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/DL-DE-BY-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/DL-DE-BY-2.0.json", + "referenceNumber": 225, + "name": "Data licence Germany – attribution – version 2.0", + "licenseId": "DL-DE-BY-2.0", + "seeAlso": [ + "https://www.govdata.de/dl-de/by-2-0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/DL-DE-ZERO-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/DL-DE-ZERO-2.0.json", + "referenceNumber": 341, + "name": "Data licence Germany – zero – version 2.0", + "licenseId": "DL-DE-ZERO-2.0", + "seeAlso": [ + "https://www.govdata.de/dl-de/zero-2-0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/DOC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/DOC.json", + "referenceNumber": 397, + "name": "DOC License", + "licenseId": "DOC", + "seeAlso": [ + "http://www.cs.wustl.edu/~schmidt/ACE-copying.html", + "https://www.dre.vanderbilt.edu/~schmidt/ACE-copying.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Dotseqn.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Dotseqn.json", + "referenceNumber": 132, + "name": "Dotseqn License", + "licenseId": "Dotseqn", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Dotseqn" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/DRL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/DRL-1.0.json", + "referenceNumber": 16, + "name": "Detection Rule License 1.0", + "licenseId": "DRL-1.0", + "seeAlso": [ + "https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/DRL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/DRL-1.1.json", + "referenceNumber": 278, + "name": "Detection Rule License 1.1", + "licenseId": "DRL-1.1", + "seeAlso": [ + "https://github.com/SigmaHQ/Detection-Rule-License/blob/6ec7fbde6101d101b5b5d1fcb8f9b69fbc76c04a/LICENSE.Detection.Rules.md" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/DSDP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/DSDP.json", + "referenceNumber": 485, + "name": "DSDP License", + "licenseId": "DSDP", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/DSDP" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/dtoa.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/dtoa.json", + "referenceNumber": 358, + "name": "David M. Gay dtoa License", + "licenseId": "dtoa", + "seeAlso": [ + "https://github.com/SWI-Prolog/swipl-devel/blob/master/src/os/dtoa.c", + "https://sourceware.org/git/?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dnewlib/libc/stdlib/mprec.h;hb\u003dHEAD" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/dvipdfm.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/dvipdfm.json", + "referenceNumber": 100, + "name": "dvipdfm License", + "licenseId": "dvipdfm", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/dvipdfm" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ECL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ECL-1.0.json", + "referenceNumber": 124, + "name": "Educational Community License v1.0", + "licenseId": "ECL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/ECL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/ECL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ECL-2.0.json", + "referenceNumber": 361, + "name": "Educational Community License v2.0", + "licenseId": "ECL-2.0", + "seeAlso": [ + "https://opensource.org/licenses/ECL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/eCos-2.0.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/eCos-2.0.json", + "referenceNumber": 372, + "name": "eCos license version 2.0", + "licenseId": "eCos-2.0", + "seeAlso": [ + "https://www.gnu.org/licenses/ecos-license.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/EFL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EFL-1.0.json", + "referenceNumber": 335, + "name": "Eiffel Forum License v1.0", + "licenseId": "EFL-1.0", + "seeAlso": [ + "http://www.eiffel-nice.org/license/forum.txt", + "https://opensource.org/licenses/EFL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/EFL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EFL-2.0.json", + "referenceNumber": 88, + "name": "Eiffel Forum License v2.0", + "licenseId": "EFL-2.0", + "seeAlso": [ + "http://www.eiffel-nice.org/license/eiffel-forum-license-2.html", + "https://opensource.org/licenses/EFL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/eGenix.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/eGenix.json", + "referenceNumber": 261, + "name": "eGenix.com Public License 1.1.0", + "licenseId": "eGenix", + "seeAlso": [ + "http://www.egenix.com/products/eGenix.com-Public-License-1.1.0.pdf", + "https://fedoraproject.org/wiki/Licensing/eGenix.com_Public_License_1.1.0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Elastic-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Elastic-2.0.json", + "referenceNumber": 147, + "name": "Elastic License 2.0", + "licenseId": "Elastic-2.0", + "seeAlso": [ + "https://www.elastic.co/licensing/elastic-license", + "https://github.com/elastic/elasticsearch/blob/master/licenses/ELASTIC-LICENSE-2.0.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Entessa.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Entessa.json", + "referenceNumber": 546, + "name": "Entessa Public License v1.0", + "licenseId": "Entessa", + "seeAlso": [ + "https://opensource.org/licenses/Entessa" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/EPICS.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EPICS.json", + "referenceNumber": 120, + "name": "EPICS Open License", + "licenseId": "EPICS", + "seeAlso": [ + "https://epics.anl.gov/license/open.php" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/EPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EPL-1.0.json", + "referenceNumber": 500, + "name": "Eclipse Public License 1.0", + "licenseId": "EPL-1.0", + "seeAlso": [ + "http://www.eclipse.org/legal/epl-v10.html", + "https://opensource.org/licenses/EPL-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/EPL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EPL-2.0.json", + "referenceNumber": 407, + "name": "Eclipse Public License 2.0", + "licenseId": "EPL-2.0", + "seeAlso": [ + "https://www.eclipse.org/legal/epl-2.0", + "https://www.opensource.org/licenses/EPL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/ErlPL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ErlPL-1.1.json", + "referenceNumber": 466, + "name": "Erlang Public License v1.1", + "licenseId": "ErlPL-1.1", + "seeAlso": [ + "http://www.erlang.org/EPLICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/etalab-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/etalab-2.0.json", + "referenceNumber": 636, + "name": "Etalab Open License 2.0", + "licenseId": "etalab-2.0", + "seeAlso": [ + "https://github.com/DISIC/politique-de-contribution-open-source/blob/master/LICENSE.pdf", + "https://raw.githubusercontent.com/DISIC/politique-de-contribution-open-source/master/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/EUDatagrid.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EUDatagrid.json", + "referenceNumber": 228, + "name": "EU DataGrid Software License", + "licenseId": "EUDatagrid", + "seeAlso": [ + "http://eu-datagrid.web.cern.ch/eu-datagrid/license.html", + "https://opensource.org/licenses/EUDatagrid" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/EUPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EUPL-1.0.json", + "referenceNumber": 227, + "name": "European Union Public License 1.0", + "licenseId": "EUPL-1.0", + "seeAlso": [ + "http://ec.europa.eu/idabc/en/document/7330.html", + "http://ec.europa.eu/idabc/servlets/Doc027f.pdf?id\u003d31096" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/EUPL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EUPL-1.1.json", + "referenceNumber": 266, + "name": "European Union Public License 1.1", + "licenseId": "EUPL-1.1", + "seeAlso": [ + "https://joinup.ec.europa.eu/software/page/eupl/licence-eupl", + "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl1.1.-licence-en_0.pdf", + "https://opensource.org/licenses/EUPL-1.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/EUPL-1.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/EUPL-1.2.json", + "referenceNumber": 559, + "name": "European Union Public License 1.2", + "licenseId": "EUPL-1.2", + "seeAlso": [ + "https://joinup.ec.europa.eu/page/eupl-text-11-12", + "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl_v1.2_en.pdf", + "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt", + "https://joinup.ec.europa.eu/sites/default/files/inline-files/EUPL%20v1_2%20EN(1).txt", + "http://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri\u003dCELEX:32017D0863", + "https://opensource.org/licenses/EUPL-1.2" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Eurosym.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Eurosym.json", + "referenceNumber": 63, + "name": "Eurosym License", + "licenseId": "Eurosym", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Eurosym" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Fair.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Fair.json", + "referenceNumber": 570, + "name": "Fair License", + "licenseId": "Fair", + "seeAlso": [ + "https://web.archive.org/web/20150926120323/http://fairlicense.org/", + "https://opensource.org/licenses/Fair" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/FBM.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FBM.json", + "referenceNumber": 175, + "name": "Fuzzy Bitmap License", + "licenseId": "FBM", + "seeAlso": [ + "https://github.com/SWI-Prolog/packages-xpce/blob/161a40cd82004f731ba48024f9d30af388a7edf5/src/img/gifwrite.c#L21-L26" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/FDK-AAC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FDK-AAC.json", + "referenceNumber": 49, + "name": "Fraunhofer FDK AAC Codec Library", + "licenseId": "FDK-AAC", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/FDK-AAC", + "https://directory.fsf.org/wiki/License:Fdk" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Ferguson-Twofish.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Ferguson-Twofish.json", + "referenceNumber": 617, + "name": "Ferguson Twofish License", + "licenseId": "Ferguson-Twofish", + "seeAlso": [ + "https://github.com/wernerd/ZRTPCPP/blob/6b3cd8e6783642292bad0c21e3e5e5ce45ff3e03/cryptcommon/twofish.c#L113C3-L127" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Frameworx-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Frameworx-1.0.json", + "referenceNumber": 259, + "name": "Frameworx Open License 1.0", + "licenseId": "Frameworx-1.0", + "seeAlso": [ + "https://opensource.org/licenses/Frameworx-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/FreeBSD-DOC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FreeBSD-DOC.json", + "referenceNumber": 333, + "name": "FreeBSD Documentation License", + "licenseId": "FreeBSD-DOC", + "seeAlso": [ + "https://www.freebsd.org/copyright/freebsd-doc-license/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/FreeImage.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FreeImage.json", + "referenceNumber": 181, + "name": "FreeImage Public License v1.0", + "licenseId": "FreeImage", + "seeAlso": [ + "http://freeimage.sourceforge.net/freeimage-license.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/FSFAP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FSFAP.json", + "referenceNumber": 36, + "name": "FSF All Permissive License", + "licenseId": "FSFAP", + "seeAlso": [ + "https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/FSFAP-no-warranty-disclaimer.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FSFAP-no-warranty-disclaimer.json", + "referenceNumber": 536, + "name": "FSF All Permissive License (without Warranty)", + "licenseId": "FSFAP-no-warranty-disclaimer", + "seeAlso": [ + "https://git.savannah.gnu.org/cgit/wget.git/tree/util/trunc.c?h\u003dv1.21.3\u0026id\u003d40747a11e44ced5a8ac628a41f879ced3e2ebce9#n6" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/FSFUL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FSFUL.json", + "referenceNumber": 454, + "name": "FSF Unlimited License", + "licenseId": "FSFUL", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/FSF_Unlimited_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/FSFULLR.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FSFULLR.json", + "referenceNumber": 422, + "name": "FSF Unlimited License (with License Retention)", + "licenseId": "FSFULLR", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/FSF_Unlimited_License#License_Retention_Variant" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/FSFULLRWD.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FSFULLRWD.json", + "referenceNumber": 197, + "name": "FSF Unlimited License (With License Retention and Warranty Disclaimer)", + "licenseId": "FSFULLRWD", + "seeAlso": [ + "https://lists.gnu.org/archive/html/autoconf/2012-04/msg00061.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/FTL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/FTL.json", + "referenceNumber": 438, + "name": "Freetype Project License", + "licenseId": "FTL", + "seeAlso": [ + "http://freetype.fis.uniroma2.it/FTL.TXT", + "http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT", + "http://gitlab.freedesktop.org/freetype/freetype/-/raw/master/docs/FTL.TXT" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Furuseth.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Furuseth.json", + "referenceNumber": 380, + "name": "Furuseth License", + "licenseId": "Furuseth", + "seeAlso": [ + "https://git.openldap.org/openldap/openldap/-/blob/master/COPYRIGHT?ref_type\u003dheads#L39-51" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/fwlw.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/fwlw.json", + "referenceNumber": 529, + "name": "fwlw License", + "licenseId": "fwlw", + "seeAlso": [ + "https://mirrors.nic.cz/tex-archive/macros/latex/contrib/fwlw/README" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GCR-docs.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GCR-docs.json", + "referenceNumber": 115, + "name": "Gnome GCR Documentation License", + "licenseId": "GCR-docs", + "seeAlso": [ + "https://github.com/GNOME/gcr/blob/master/docs/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GD.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GD.json", + "referenceNumber": 291, + "name": "GD License", + "licenseId": "GD", + "seeAlso": [ + "https://libgd.github.io/manuals/2.3.0/files/license-txt.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.1.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.1.json", + "referenceNumber": 589, + "name": "GNU Free Documentation License v1.1", + "licenseId": "GFDL-1.1", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.1-invariants-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-invariants-only.json", + "referenceNumber": 307, + "name": "GNU Free Documentation License v1.1 only - invariants", + "licenseId": "GFDL-1.1-invariants-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.1-invariants-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-invariants-or-later.json", + "referenceNumber": 98, + "name": "GNU Free Documentation License v1.1 or later - invariants", + "licenseId": "GFDL-1.1-invariants-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.1-no-invariants-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-no-invariants-only.json", + "referenceNumber": 47, + "name": "GNU Free Documentation License v1.1 only - no invariants", + "licenseId": "GFDL-1.1-no-invariants-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.json", + "referenceNumber": 273, + "name": "GNU Free Documentation License v1.1 or later - no invariants", + "licenseId": "GFDL-1.1-no-invariants-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.1-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-only.json", + "referenceNumber": 626, + "name": "GNU Free Documentation License v1.1 only", + "licenseId": "GFDL-1.1-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.1-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-or-later.json", + "referenceNumber": 644, + "name": "GNU Free Documentation License v1.1 or later", + "licenseId": "GFDL-1.1-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.2.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.2.json", + "referenceNumber": 520, + "name": "GNU Free Documentation License v1.2", + "licenseId": "GFDL-1.2", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.2-invariants-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-invariants-only.json", + "referenceNumber": 495, + "name": "GNU Free Documentation License v1.2 only - invariants", + "licenseId": "GFDL-1.2-invariants-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.2-invariants-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-invariants-or-later.json", + "referenceNumber": 6, + "name": "GNU Free Documentation License v1.2 or later - invariants", + "licenseId": "GFDL-1.2-invariants-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.2-no-invariants-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-no-invariants-only.json", + "referenceNumber": 77, + "name": "GNU Free Documentation License v1.2 only - no invariants", + "licenseId": "GFDL-1.2-no-invariants-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.2-no-invariants-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-no-invariants-or-later.json", + "referenceNumber": 279, + "name": "GNU Free Documentation License v1.2 or later - no invariants", + "licenseId": "GFDL-1.2-no-invariants-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.2-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-only.json", + "referenceNumber": 648, + "name": "GNU Free Documentation License v1.2 only", + "licenseId": "GFDL-1.2-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.2-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-or-later.json", + "referenceNumber": 318, + "name": "GNU Free Documentation License v1.2 or later", + "licenseId": "GFDL-1.2-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.3.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.3.json", + "referenceNumber": 287, + "name": "GNU Free Documentation License v1.3", + "licenseId": "GFDL-1.3", + "seeAlso": [ + "https://www.gnu.org/licenses/fdl-1.3.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.3-invariants-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-invariants-only.json", + "referenceNumber": 289, + "name": "GNU Free Documentation License v1.3 only - invariants", + "licenseId": "GFDL-1.3-invariants-only", + "seeAlso": [ + "https://www.gnu.org/licenses/fdl-1.3.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.3-invariants-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-invariants-or-later.json", + "referenceNumber": 497, + "name": "GNU Free Documentation License v1.3 or later - invariants", + "licenseId": "GFDL-1.3-invariants-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/fdl-1.3.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.3-no-invariants-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-no-invariants-only.json", + "referenceNumber": 254, + "name": "GNU Free Documentation License v1.3 only - no invariants", + "licenseId": "GFDL-1.3-no-invariants-only", + "seeAlso": [ + "https://www.gnu.org/licenses/fdl-1.3.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.3-no-invariants-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-no-invariants-or-later.json", + "referenceNumber": 207, + "name": "GNU Free Documentation License v1.3 or later - no invariants", + "licenseId": "GFDL-1.3-no-invariants-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/fdl-1.3.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.3-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-only.json", + "referenceNumber": 635, + "name": "GNU Free Documentation License v1.3 only", + "licenseId": "GFDL-1.3-only", + "seeAlso": [ + "https://www.gnu.org/licenses/fdl-1.3.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GFDL-1.3-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-or-later.json", + "referenceNumber": 448, + "name": "GNU Free Documentation License v1.3 or later", + "licenseId": "GFDL-1.3-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/fdl-1.3.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Giftware.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Giftware.json", + "referenceNumber": 172, + "name": "Giftware License", + "licenseId": "Giftware", + "seeAlso": [ + "http://liballeg.org/license.html#allegro-4-the-giftware-license" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GL2PS.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GL2PS.json", + "referenceNumber": 434, + "name": "GL2PS License", + "licenseId": "GL2PS", + "seeAlso": [ + "http://www.geuz.org/gl2ps/COPYING.GL2PS" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Glide.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Glide.json", + "referenceNumber": 189, + "name": "3dfx Glide License", + "licenseId": "Glide", + "seeAlso": [ + "http://www.users.on.net/~triforce/glidexp/COPYING.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Glulxe.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Glulxe.json", + "referenceNumber": 85, + "name": "Glulxe License", + "licenseId": "Glulxe", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Glulxe" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GLWTPL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GLWTPL.json", + "referenceNumber": 190, + "name": "Good Luck With That Public License", + "licenseId": "GLWTPL", + "seeAlso": [ + "https://github.com/me-shaon/GLWTPL/commit/da5f6bc734095efbacb442c0b31e33a65b9d6e85" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/gnuplot.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/gnuplot.json", + "referenceNumber": 110, + "name": "gnuplot License", + "licenseId": "gnuplot", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Gnuplot" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-1.0.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-1.0.json", + "referenceNumber": 630, + "name": "GNU General Public License v1.0 only", + "licenseId": "GPL-1.0", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-1.0+.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-1.0+.json", + "referenceNumber": 26, + "name": "GNU General Public License v1.0 or later", + "licenseId": "GPL-1.0+", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-1.0-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GPL-1.0-only.json", + "referenceNumber": 12, + "name": "GNU General Public License v1.0 only", + "licenseId": "GPL-1.0-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-1.0-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GPL-1.0-or-later.json", + "referenceNumber": 642, + "name": "GNU General Public License v1.0 or later", + "licenseId": "GPL-1.0-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0.json", + "referenceNumber": 524, + "name": "GNU General Public License v2.0 only", + "licenseId": "GPL-2.0", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "https://opensource.org/licenses/GPL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0+.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0+.json", + "referenceNumber": 25, + "name": "GNU General Public License v2.0 or later", + "licenseId": "GPL-2.0+", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "https://opensource.org/licenses/GPL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0-only.json", + "referenceNumber": 618, + "name": "GNU General Public License v2.0 only", + "licenseId": "GPL-2.0-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt", + "https://opensource.org/licenses/GPL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0-or-later.json", + "referenceNumber": 164, + "name": "GNU General Public License v2.0 or later", + "licenseId": "GPL-2.0-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "https://opensource.org/licenses/GPL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0-with-autoconf-exception.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-autoconf-exception.json", + "referenceNumber": 146, + "name": "GNU General Public License v2.0 w/Autoconf exception", + "licenseId": "GPL-2.0-with-autoconf-exception", + "seeAlso": [ + "http://ac-archive.sourceforge.net/doc/copyright.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0-with-bison-exception.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-bison-exception.json", + "referenceNumber": 374, + "name": "GNU General Public License v2.0 w/Bison exception", + "licenseId": "GPL-2.0-with-bison-exception", + "seeAlso": [ + "http://git.savannah.gnu.org/cgit/bison.git/tree/data/yacc.c?id\u003d193d7c7054ba7197b0789e14965b739162319b5e#n141" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0-with-classpath-exception.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-classpath-exception.json", + "referenceNumber": 331, + "name": "GNU General Public License v2.0 w/Classpath exception", + "licenseId": "GPL-2.0-with-classpath-exception", + "seeAlso": [ + "https://www.gnu.org/software/classpath/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0-with-font-exception.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-font-exception.json", + "referenceNumber": 542, + "name": "GNU General Public License v2.0 w/Font exception", + "licenseId": "GPL-2.0-with-font-exception", + "seeAlso": [ + "https://www.gnu.org/licenses/gpl-faq.html#FontException" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-2.0-with-GCC-exception.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-GCC-exception.json", + "referenceNumber": 68, + "name": "GNU General Public License v2.0 w/GCC Runtime Library exception", + "licenseId": "GPL-2.0-with-GCC-exception", + "seeAlso": [ + "https://gcc.gnu.org/git/?p\u003dgcc.git;a\u003dblob;f\u003dgcc/libgcc1.c;h\u003d762f5143fc6eed57b6797c82710f3538aa52b40b;hb\u003dcb143a3ce4fb417c68f5fa2691a1b1b1053dfba9#l10" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-3.0.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-3.0.json", + "referenceNumber": 442, + "name": "GNU General Public License v3.0 only", + "licenseId": "GPL-3.0", + "seeAlso": [ + "https://www.gnu.org/licenses/gpl-3.0-standalone.html", + "https://opensource.org/licenses/GPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-3.0+.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-3.0+.json", + "referenceNumber": 270, + "name": "GNU General Public License v3.0 or later", + "licenseId": "GPL-3.0+", + "seeAlso": [ + "https://www.gnu.org/licenses/gpl-3.0-standalone.html", + "https://opensource.org/licenses/GPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-3.0-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GPL-3.0-only.json", + "referenceNumber": 133, + "name": "GNU General Public License v3.0 only", + "licenseId": "GPL-3.0-only", + "seeAlso": [ + "https://www.gnu.org/licenses/gpl-3.0-standalone.html", + "https://opensource.org/licenses/GPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-3.0-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/GPL-3.0-or-later.json", + "referenceNumber": 390, + "name": "GNU General Public License v3.0 or later", + "licenseId": "GPL-3.0-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/gpl-3.0-standalone.html", + "https://opensource.org/licenses/GPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/GPL-3.0-with-autoconf-exception.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-3.0-with-autoconf-exception.json", + "referenceNumber": 458, + "name": "GNU General Public License v3.0 w/Autoconf exception", + "licenseId": "GPL-3.0-with-autoconf-exception", + "seeAlso": [ + "https://www.gnu.org/licenses/autoconf-exception-3.0.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/GPL-3.0-with-GCC-exception.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/GPL-3.0-with-GCC-exception.json", + "referenceNumber": 356, + "name": "GNU General Public License v3.0 w/GCC Runtime Library exception", + "licenseId": "GPL-3.0-with-GCC-exception", + "seeAlso": [ + "https://www.gnu.org/licenses/gcc-exception-3.1.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Graphics-Gems.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Graphics-Gems.json", + "referenceNumber": 574, + "name": "Graphics Gems License", + "licenseId": "Graphics-Gems", + "seeAlso": [ + "https://github.com/erich666/GraphicsGems/blob/master/LICENSE.md" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/gSOAP-1.3b.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/gSOAP-1.3b.json", + "referenceNumber": 655, + "name": "gSOAP Public License v1.3b", + "licenseId": "gSOAP-1.3b", + "seeAlso": [ + "http://www.cs.fsu.edu/~engelen/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/gtkbook.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/gtkbook.json", + "referenceNumber": 237, + "name": "gtkbook License", + "licenseId": "gtkbook", + "seeAlso": [ + "https://github.com/slogan621/gtkbook", + "https://github.com/oetiker/rrdtool-1.x/blob/master/src/plbasename.c#L8-L11" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Gutmann.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Gutmann.json", + "referenceNumber": 441, + "name": "Gutmann License", + "licenseId": "Gutmann", + "seeAlso": [ + "https://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HaskellReport.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HaskellReport.json", + "referenceNumber": 625, + "name": "Haskell Language Report License", + "licenseId": "HaskellReport", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Haskell_Language_Report_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/hdparm.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/hdparm.json", + "referenceNumber": 81, + "name": "hdparm License", + "licenseId": "hdparm", + "seeAlso": [ + "https://github.com/Distrotech/hdparm/blob/4517550db29a91420fb2b020349523b1b4512df2/LICENSE.TXT" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Hippocratic-2.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Hippocratic-2.1.json", + "referenceNumber": 299, + "name": "Hippocratic License 2.1", + "licenseId": "Hippocratic-2.1", + "seeAlso": [ + "https://firstdonoharm.dev/version/2/1/license.html", + "https://github.com/EthicalSource/hippocratic-license/blob/58c0e646d64ff6fbee275bfe2b9492f914e3ab2a/LICENSE.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HP-1986.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HP-1986.json", + "referenceNumber": 277, + "name": "Hewlett-Packard 1986 License", + "licenseId": "HP-1986", + "seeAlso": [ + "https://sourceware.org/git/?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dnewlib/libc/machine/hppa/memchr.S;h\u003d1cca3e5e8867aa4bffef1f75a5c1bba25c0c441e;hb\u003dHEAD#l2" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HP-1989.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HP-1989.json", + "referenceNumber": 639, + "name": "Hewlett-Packard 1989 License", + "licenseId": "HP-1989", + "seeAlso": [ + "https://github.com/bleargh45/Data-UUID/blob/master/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND.json", + "referenceNumber": 281, + "name": "Historical Permission Notice and Disclaimer", + "licenseId": "HPND", + "seeAlso": [ + "https://opensource.org/licenses/HPND", + "http://lists.opensource.org/pipermail/license-discuss_lists.opensource.org/2002-November/006304.html" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/HPND-DEC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-DEC.json", + "referenceNumber": 577, + "name": "Historical Permission Notice and Disclaimer - DEC variant", + "licenseId": "HPND-DEC", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/app/xkbcomp/-/blob/master/COPYING?ref_type\u003dheads#L69" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-doc.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-doc.json", + "referenceNumber": 391, + "name": "Historical Permission Notice and Disclaimer - documentation variant", + "licenseId": "HPND-doc", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/lib/libxext/-/blob/master/COPYING?ref_type\u003dheads#L185-197", + "https://gitlab.freedesktop.org/xorg/lib/libxtst/-/blob/master/COPYING?ref_type\u003dheads#L70-77" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-doc-sell.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-doc-sell.json", + "referenceNumber": 163, + "name": "Historical Permission Notice and Disclaimer - documentation sell variant", + "licenseId": "HPND-doc-sell", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/lib/libxtst/-/blob/master/COPYING?ref_type\u003dheads#L108-117", + "https://gitlab.freedesktop.org/xorg/lib/libxext/-/blob/master/COPYING?ref_type\u003dheads#L153-162" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-export-US.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-export-US.json", + "referenceNumber": 214, + "name": "HPND with US Government export control warning", + "licenseId": "HPND-export-US", + "seeAlso": [ + "https://www.kermitproject.org/ck90.html#source" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-export-US-acknowledgement.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-export-US-acknowledgement.json", + "referenceNumber": 610, + "name": "HPND with US Government export control warning and acknowledgment", + "licenseId": "HPND-export-US-acknowledgement", + "seeAlso": [ + "https://github.com/krb5/krb5/blob/krb5-1.21.2-final/NOTICE#L831-L852", + "https://web.mit.edu/kerberos/krb5-1.21/doc/mitK5license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-export-US-modify.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-export-US-modify.json", + "referenceNumber": 498, + "name": "HPND with US Government export control warning and modification rqmt", + "licenseId": "HPND-export-US-modify", + "seeAlso": [ + "https://github.com/krb5/krb5/blob/krb5-1.21.2-final/NOTICE#L1157-L1182", + "https://github.com/pythongssapi/k5test/blob/v0.10.3/K5TEST-LICENSE.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-export2-US.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-export2-US.json", + "referenceNumber": 33, + "name": "HPND with US Government export control and 2 disclaimers", + "licenseId": "HPND-export2-US", + "seeAlso": [ + "https://github.com/krb5/krb5/blob/krb5-1.21.2-final/NOTICE#L111-L133", + "https://web.mit.edu/kerberos/krb5-1.21/doc/mitK5license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-Fenneberg-Livingston.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-Fenneberg-Livingston.json", + "referenceNumber": 145, + "name": "Historical Permission Notice and Disclaimer - Fenneberg-Livingston variant", + "licenseId": "HPND-Fenneberg-Livingston", + "seeAlso": [ + "https://github.com/FreeRADIUS/freeradius-client/blob/master/COPYRIGHT#L32", + "https://github.com/radcli/radcli/blob/master/COPYRIGHT#L34" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-INRIA-IMAG.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-INRIA-IMAG.json", + "referenceNumber": 614, + "name": "Historical Permission Notice and Disclaimer - INRIA-IMAG variant", + "licenseId": "HPND-INRIA-IMAG", + "seeAlso": [ + "https://github.com/ppp-project/ppp/blob/master/pppd/ipv6cp.c#L75-L83" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-Intel.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-Intel.json", + "referenceNumber": 195, + "name": "Historical Permission Notice and Disclaimer - Intel variant", + "licenseId": "HPND-Intel", + "seeAlso": [ + "https://sourceware.org/git/?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dnewlib/libc/machine/i960/memcpy.S;hb\u003dHEAD" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-Kevlin-Henney.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-Kevlin-Henney.json", + "referenceNumber": 428, + "name": "Historical Permission Notice and Disclaimer - Kevlin Henney variant", + "licenseId": "HPND-Kevlin-Henney", + "seeAlso": [ + "https://github.com/mruby/mruby/blob/83d12f8d52522cdb7c8cc46fad34821359f453e6/mrbgems/mruby-dir/src/Win/dirent.c#L127-L140" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-Markus-Kuhn.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-Markus-Kuhn.json", + "referenceNumber": 8, + "name": "Historical Permission Notice and Disclaimer - Markus Kuhn variant", + "licenseId": "HPND-Markus-Kuhn", + "seeAlso": [ + "https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c", + "https://sourceware.org/git/?p\u003dbinutils-gdb.git;a\u003dblob;f\u003dreadline/readline/support/wcwidth.c;h\u003d0f5ec995796f4813abbcf4972aec0378ab74722a;hb\u003dHEAD#l55" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-merchantability-variant.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-merchantability-variant.json", + "referenceNumber": 540, + "name": "Historical Permission Notice and Disclaimer - merchantability variant", + "licenseId": "HPND-merchantability-variant", + "seeAlso": [ + "https://sourceware.org/git/?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dnewlib/libc/misc/fini.c;hb\u003dHEAD" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-MIT-disclaimer.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-MIT-disclaimer.json", + "referenceNumber": 185, + "name": "Historical Permission Notice and Disclaimer with MIT disclaimer", + "licenseId": "HPND-MIT-disclaimer", + "seeAlso": [ + "https://metacpan.org/release/NLNETLABS/Net-DNS-SEC-1.22/source/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-Pbmplus.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-Pbmplus.json", + "referenceNumber": 603, + "name": "Historical Permission Notice and Disclaimer - Pbmplus variant", + "licenseId": "HPND-Pbmplus", + "seeAlso": [ + "https://sourceforge.net/p/netpbm/code/HEAD/tree/super_stable/netpbm.c#l8" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-sell-MIT-disclaimer-xserver.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-sell-MIT-disclaimer-xserver.json", + "referenceNumber": 125, + "name": "Historical Permission Notice and Disclaimer - sell xserver variant with MIT disclaimer", + "licenseId": "HPND-sell-MIT-disclaimer-xserver", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/COPYING?ref_type\u003dheads#L1781" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-sell-regexpr.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-sell-regexpr.json", + "referenceNumber": 633, + "name": "Historical Permission Notice and Disclaimer - sell regexpr variant", + "licenseId": "HPND-sell-regexpr", + "seeAlso": [ + "https://gitlab.com/bacula-org/bacula/-/blob/Branch-11.0/bacula/LICENSE-FOSS?ref_type\u003dheads#L245" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-sell-variant.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-sell-variant.json", + "referenceNumber": 344, + "name": "Historical Permission Notice and Disclaimer - sell variant", + "licenseId": "HPND-sell-variant", + "seeAlso": [ + "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/sunrpc/auth_gss/gss_generic_token.c?h\u003dv4.19" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-sell-variant-MIT-disclaimer.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-sell-variant-MIT-disclaimer.json", + "referenceNumber": 160, + "name": "HPND sell variant with MIT disclaimer", + "licenseId": "HPND-sell-variant-MIT-disclaimer", + "seeAlso": [ + "https://github.com/sigmavirus24/x11-ssh-askpass/blob/master/README" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-sell-variant-MIT-disclaimer-rev.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-sell-variant-MIT-disclaimer-rev.json", + "referenceNumber": 609, + "name": "HPND sell variant with MIT disclaimer - reverse", + "licenseId": "HPND-sell-variant-MIT-disclaimer-rev", + "seeAlso": [ + "https://github.com/sigmavirus24/x11-ssh-askpass/blob/master/dynlist.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-UC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-UC.json", + "referenceNumber": 386, + "name": "Historical Permission Notice and Disclaimer - University of California variant", + "licenseId": "HPND-UC", + "seeAlso": [ + "https://core.tcl-lang.org/tk/file?name\u003dcompat/unistd.h" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HPND-UC-export-US.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HPND-UC-export-US.json", + "referenceNumber": 118, + "name": "Historical Permission Notice and Disclaimer - University of California, US export warning", + "licenseId": "HPND-UC-export-US", + "seeAlso": [ + "https://github.com/RTimothyEdwards/magic/blob/master/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/HTMLTIDY.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/HTMLTIDY.json", + "referenceNumber": 134, + "name": "HTML Tidy License", + "licenseId": "HTMLTIDY", + "seeAlso": [ + "https://github.com/htacg/tidy-html5/blob/next/README/LICENSE.md" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/IBM-pibs.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/IBM-pibs.json", + "referenceNumber": 102, + "name": "IBM PowerPC Initialization and Boot Software", + "licenseId": "IBM-pibs", + "seeAlso": [ + "http://git.denx.de/?p\u003du-boot.git;a\u003dblob;f\u003darch/powerpc/cpu/ppc4xx/miiphy.c;h\u003d297155fdafa064b955e53e9832de93bfb0cfb85b;hb\u003d9fab4bf4cc077c21e43941866f3f2c196f28670d" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ICU.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ICU.json", + "referenceNumber": 67, + "name": "ICU License", + "licenseId": "ICU", + "seeAlso": [ + "http://source.icu-project.org/repos/icu/icu/trunk/license.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/IEC-Code-Components-EULA.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/IEC-Code-Components-EULA.json", + "referenceNumber": 359, + "name": "IEC Code Components End-user licence agreement", + "licenseId": "IEC-Code-Components-EULA", + "seeAlso": [ + "https://www.iec.ch/webstore/custserv/pdf/CC-EULA.pdf", + "https://www.iec.ch/CCv1", + "https://www.iec.ch/copyright" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/IJG.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/IJG.json", + "referenceNumber": 641, + "name": "Independent JPEG Group License", + "licenseId": "IJG", + "seeAlso": [ + "http://dev.w3.org/cvsweb/Amaya/libjpeg/Attic/README?rev\u003d1.2" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/IJG-short.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/IJG-short.json", + "referenceNumber": 615, + "name": "Independent JPEG Group License - short", + "licenseId": "IJG-short", + "seeAlso": [ + "https://sourceforge.net/p/xmedcon/code/ci/master/tree/libs/ljpg/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ImageMagick.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ImageMagick.json", + "referenceNumber": 478, + "name": "ImageMagick License", + "licenseId": "ImageMagick", + "seeAlso": [ + "http://www.imagemagick.org/script/license.php" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/iMatix.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/iMatix.json", + "referenceNumber": 327, + "name": "iMatix Standard Function Library Agreement", + "licenseId": "iMatix", + "seeAlso": [ + "http://legacy.imatix.com/html/sfl/sfl4.htm#license" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Imlib2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Imlib2.json", + "referenceNumber": 169, + "name": "Imlib2 License", + "licenseId": "Imlib2", + "seeAlso": [ + "http://trac.enlightenment.org/e/browser/trunk/imlib2/COPYING", + "https://git.enlightenment.org/legacy/imlib2.git/tree/COPYING" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Info-ZIP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Info-ZIP.json", + "referenceNumber": 269, + "name": "Info-ZIP License", + "licenseId": "Info-ZIP", + "seeAlso": [ + "http://www.info-zip.org/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Inner-Net-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Inner-Net-2.0.json", + "referenceNumber": 572, + "name": "Inner Net License v2.0", + "licenseId": "Inner-Net-2.0", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Inner_Net_License", + "https://sourceware.org/git/?p\u003dglibc.git;a\u003dblob;f\u003dLICENSES;h\u003d530893b1dc9ea00755603c68fb36bd4fc38a7be8;hb\u003dHEAD#l207" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Intel.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Intel.json", + "referenceNumber": 623, + "name": "Intel Open Source License", + "licenseId": "Intel", + "seeAlso": [ + "https://opensource.org/licenses/Intel" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Intel-ACPI.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Intel-ACPI.json", + "referenceNumber": 571, + "name": "Intel ACPI Software License Agreement", + "licenseId": "Intel-ACPI", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Intel_ACPI_Software_License_Agreement" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Interbase-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Interbase-1.0.json", + "referenceNumber": 654, + "name": "Interbase Public License v1.0", + "licenseId": "Interbase-1.0", + "seeAlso": [ + "https://web.archive.org/web/20060319014854/http://info.borland.com/devsupport/interbase/opensource/IPL.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/IPA.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/IPA.json", + "referenceNumber": 94, + "name": "IPA Font License", + "licenseId": "IPA", + "seeAlso": [ + "https://opensource.org/licenses/IPA" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/IPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/IPL-1.0.json", + "referenceNumber": 332, + "name": "IBM Public License v1.0", + "licenseId": "IPL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/IPL-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/ISC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ISC.json", + "referenceNumber": 488, + "name": "ISC License", + "licenseId": "ISC", + "seeAlso": [ + "https://www.isc.org/licenses/", + "https://www.isc.org/downloads/software-support-policy/isc-license/", + "https://opensource.org/licenses/ISC" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/ISC-Veillard.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ISC-Veillard.json", + "referenceNumber": 513, + "name": "ISC Veillard variant", + "licenseId": "ISC-Veillard", + "seeAlso": [ + "https://raw.githubusercontent.com/GNOME/libxml2/4c2e7c651f6c2f0d1a74f350cbda95f7df3e7017/hash.c", + "https://github.com/GNOME/libxml2/blob/master/dict.c", + "https://sourceforge.net/p/ctrio/git/ci/master/tree/README" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Jam.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Jam.json", + "referenceNumber": 108, + "name": "Jam License", + "licenseId": "Jam", + "seeAlso": [ + "https://www.boost.org/doc/libs/1_35_0/doc/html/jam.html", + "https://web.archive.org/web/20160330173339/https://swarm.workshop.perforce.com/files/guest/perforce_software/jam/src/README" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/JasPer-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/JasPer-2.0.json", + "referenceNumber": 487, + "name": "JasPer License", + "licenseId": "JasPer-2.0", + "seeAlso": [ + "http://www.ece.uvic.ca/~mdadams/jasper/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/JPL-image.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/JPL-image.json", + "referenceNumber": 363, + "name": "JPL Image Use Policy", + "licenseId": "JPL-image", + "seeAlso": [ + "https://www.jpl.nasa.gov/jpl-image-use-policy" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/JPNIC.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/JPNIC.json", + "referenceNumber": 83, + "name": "Japan Network Information Center License", + "licenseId": "JPNIC", + "seeAlso": [ + "https://gitlab.isc.org/isc-projects/bind9/blob/master/COPYRIGHT#L366" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/JSON.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/JSON.json", + "referenceNumber": 65, + "name": "JSON License", + "licenseId": "JSON", + "seeAlso": [ + "http://www.json.org/license.html" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/Kastrup.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Kastrup.json", + "referenceNumber": 226, + "name": "Kastrup License", + "licenseId": "Kastrup", + "seeAlso": [ + "https://ctan.math.utah.edu/ctan/tex-archive/macros/generic/kastrup/binhex.dtx" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Kazlib.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Kazlib.json", + "referenceNumber": 232, + "name": "Kazlib License", + "licenseId": "Kazlib", + "seeAlso": [ + "http://git.savannah.gnu.org/cgit/kazlib.git/tree/except.c?id\u003d0062df360c2d17d57f6af19b0e444c51feb99036" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Knuth-CTAN.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Knuth-CTAN.json", + "referenceNumber": 290, + "name": "Knuth CTAN License", + "licenseId": "Knuth-CTAN", + "seeAlso": [ + "https://ctan.org/license/knuth" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LAL-1.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LAL-1.2.json", + "referenceNumber": 165, + "name": "Licence Art Libre 1.2", + "licenseId": "LAL-1.2", + "seeAlso": [ + "http://artlibre.org/licence/lal/licence-art-libre-12/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LAL-1.3.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LAL-1.3.json", + "referenceNumber": 600, + "name": "Licence Art Libre 1.3", + "licenseId": "LAL-1.3", + "seeAlso": [ + "https://artlibre.org/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Latex2e.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Latex2e.json", + "referenceNumber": 439, + "name": "Latex2e License", + "licenseId": "Latex2e", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Latex2e" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Latex2e-translated-notice.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Latex2e-translated-notice.json", + "referenceNumber": 620, + "name": "Latex2e with translated notice permission", + "licenseId": "Latex2e-translated-notice", + "seeAlso": [ + "https://git.savannah.gnu.org/cgit/indent.git/tree/doc/indent.texi?id\u003da74c6b4ee49397cf330b333da1042bffa60ed14f#n74" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Leptonica.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Leptonica.json", + "referenceNumber": 103, + "name": "Leptonica License", + "licenseId": "Leptonica", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Leptonica" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LGPL-2.0.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/LGPL-2.0.json", + "referenceNumber": 353, + "name": "GNU Library General Public License v2 only", + "licenseId": "LGPL-2.0", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-2.0+.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/LGPL-2.0+.json", + "referenceNumber": 62, + "name": "GNU Library General Public License v2 or later", + "licenseId": "LGPL-2.0+", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-2.0-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LGPL-2.0-only.json", + "referenceNumber": 519, + "name": "GNU Library General Public License v2 only", + "licenseId": "LGPL-2.0-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-2.0-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LGPL-2.0-or-later.json", + "referenceNumber": 366, + "name": "GNU Library General Public License v2 or later", + "licenseId": "LGPL-2.0-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-2.1.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/LGPL-2.1.json", + "referenceNumber": 656, + "name": "GNU Lesser General Public License v2.1 only", + "licenseId": "LGPL-2.1", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html", + "https://opensource.org/licenses/LGPL-2.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-2.1+.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/LGPL-2.1+.json", + "referenceNumber": 64, + "name": "GNU Lesser General Public License v2.1 or later", + "licenseId": "LGPL-2.1+", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html", + "https://opensource.org/licenses/LGPL-2.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-2.1-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LGPL-2.1-only.json", + "referenceNumber": 177, + "name": "GNU Lesser General Public License v2.1 only", + "licenseId": "LGPL-2.1-only", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html", + "https://opensource.org/licenses/LGPL-2.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-2.1-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LGPL-2.1-or-later.json", + "referenceNumber": 24, + "name": "GNU Lesser General Public License v2.1 or later", + "licenseId": "LGPL-2.1-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html", + "https://opensource.org/licenses/LGPL-2.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-3.0.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/LGPL-3.0.json", + "referenceNumber": 578, + "name": "GNU Lesser General Public License v3.0 only", + "licenseId": "LGPL-3.0", + "seeAlso": [ + "https://www.gnu.org/licenses/lgpl-3.0-standalone.html", + "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt", + "https://opensource.org/licenses/LGPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-3.0+.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/LGPL-3.0+.json", + "referenceNumber": 233, + "name": "GNU Lesser General Public License v3.0 or later", + "licenseId": "LGPL-3.0+", + "seeAlso": [ + "https://www.gnu.org/licenses/lgpl-3.0-standalone.html", + "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt", + "https://opensource.org/licenses/LGPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-3.0-only.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LGPL-3.0-only.json", + "referenceNumber": 3, + "name": "GNU Lesser General Public License v3.0 only", + "licenseId": "LGPL-3.0-only", + "seeAlso": [ + "https://www.gnu.org/licenses/lgpl-3.0-standalone.html", + "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt", + "https://opensource.org/licenses/LGPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LGPL-3.0-or-later.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LGPL-3.0-or-later.json", + "referenceNumber": 262, + "name": "GNU Lesser General Public License v3.0 or later", + "licenseId": "LGPL-3.0-or-later", + "seeAlso": [ + "https://www.gnu.org/licenses/lgpl-3.0-standalone.html", + "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt", + "https://opensource.org/licenses/LGPL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LGPLLR.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LGPLLR.json", + "referenceNumber": 477, + "name": "Lesser General Public License For Linguistic Resources", + "licenseId": "LGPLLR", + "seeAlso": [ + "http://www-igm.univ-mlv.fr/~unitex/lgpllr.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Libpng.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Libpng.json", + "referenceNumber": 186, + "name": "libpng License", + "licenseId": "Libpng", + "seeAlso": [ + "http://www.libpng.org/pub/png/src/libpng-LICENSE.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/libpng-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/libpng-2.0.json", + "referenceNumber": 257, + "name": "PNG Reference Library version 2", + "licenseId": "libpng-2.0", + "seeAlso": [ + "http://www.libpng.org/pub/png/src/libpng-LICENSE.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/libselinux-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/libselinux-1.0.json", + "referenceNumber": 556, + "name": "libselinux public domain notice", + "licenseId": "libselinux-1.0", + "seeAlso": [ + "https://github.com/SELinuxProject/selinux/blob/master/libselinux/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/libtiff.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/libtiff.json", + "referenceNumber": 392, + "name": "libtiff License", + "licenseId": "libtiff", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/libtiff" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/libutil-David-Nugent.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/libutil-David-Nugent.json", + "referenceNumber": 400, + "name": "libutil David Nugent License", + "licenseId": "libutil-David-Nugent", + "seeAlso": [ + "http://web.mit.edu/freebsd/head/lib/libutil/login_ok.3", + "https://cgit.freedesktop.org/libbsd/tree/man/setproctitle.3bsd" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LiLiQ-P-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LiLiQ-P-1.1.json", + "referenceNumber": 43, + "name": "Licence Libre du Québec – Permissive version 1.1", + "licenseId": "LiLiQ-P-1.1", + "seeAlso": [ + "https://forge.gouv.qc.ca/licence/fr/liliq-v1-1/", + "http://opensource.org/licenses/LiLiQ-P-1.1" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/LiLiQ-R-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LiLiQ-R-1.1.json", + "referenceNumber": 74, + "name": "Licence Libre du Québec – Réciprocité version 1.1", + "licenseId": "LiLiQ-R-1.1", + "seeAlso": [ + "https://www.forge.gouv.qc.ca/participez/licence-logicielle/licence-libre-du-quebec-liliq-en-francais/licence-libre-du-quebec-reciprocite-liliq-r-v1-1/", + "http://opensource.org/licenses/LiLiQ-R-1.1" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/LiLiQ-Rplus-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LiLiQ-Rplus-1.1.json", + "referenceNumber": 40, + "name": "Licence Libre du Québec – Réciprocité forte version 1.1", + "licenseId": "LiLiQ-Rplus-1.1", + "seeAlso": [ + "https://www.forge.gouv.qc.ca/participez/licence-logicielle/licence-libre-du-quebec-liliq-en-francais/licence-libre-du-quebec-reciprocite-forte-liliq-r-v1-1/", + "http://opensource.org/licenses/LiLiQ-Rplus-1.1" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Linux-man-pages-1-para.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Linux-man-pages-1-para.json", + "referenceNumber": 339, + "name": "Linux man-pages - 1 paragraph", + "licenseId": "Linux-man-pages-1-para", + "seeAlso": [ + "https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man2/getcpu.2#n4" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Linux-man-pages-copyleft.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Linux-man-pages-copyleft.json", + "referenceNumber": 590, + "name": "Linux man-pages Copyleft", + "licenseId": "Linux-man-pages-copyleft", + "seeAlso": [ + "https://www.kernel.org/doc/man-pages/licenses.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Linux-man-pages-copyleft-2-para.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Linux-man-pages-copyleft-2-para.json", + "referenceNumber": 86, + "name": "Linux man-pages Copyleft - 2 paragraphs", + "licenseId": "Linux-man-pages-copyleft-2-para", + "seeAlso": [ + "https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man2/move_pages.2#n5", + "https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man2/migrate_pages.2#n8" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Linux-man-pages-copyleft-var.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Linux-man-pages-copyleft-var.json", + "referenceNumber": 337, + "name": "Linux man-pages Copyleft Variant", + "licenseId": "Linux-man-pages-copyleft-var", + "seeAlso": [ + "https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man2/set_mempolicy.2#n5" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Linux-OpenIB.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Linux-OpenIB.json", + "referenceNumber": 613, + "name": "Linux Kernel Variant of OpenIB.org license", + "licenseId": "Linux-OpenIB", + "seeAlso": [ + "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/infiniband/core/sa.h" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LOOP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LOOP.json", + "referenceNumber": 607, + "name": "Common Lisp LOOP License", + "licenseId": "LOOP", + "seeAlso": [ + "https://gitlab.com/embeddable-common-lisp/ecl/-/blob/develop/src/lsp/loop.lsp", + "http://git.savannah.gnu.org/cgit/gcl.git/tree/gcl/lsp/gcl_loop.lsp?h\u003dVersion_2_6_13pre", + "https://sourceforge.net/p/sbcl/sbcl/ci/master/tree/src/code/loop.lisp", + "https://github.com/cl-adams/adams/blob/master/LICENSE.md", + "https://github.com/blakemcbride/eclipse-lisp/blob/master/lisp/loop.lisp", + "https://gitlab.common-lisp.net/cmucl/cmucl/-/blob/master/src/code/loop.lisp" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LPD-document.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LPD-document.json", + "referenceNumber": 522, + "name": "LPD Documentation License", + "licenseId": "LPD-document", + "seeAlso": [ + "https://github.com/Cyan4973/xxHash/blob/dev/doc/xxhash_spec.md", + "https://www.ietf.org/rfc/rfc1952.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LPL-1.0.json", + "referenceNumber": 196, + "name": "Lucent Public License Version 1.0", + "licenseId": "LPL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/LPL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/LPL-1.02.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LPL-1.02.json", + "referenceNumber": 69, + "name": "Lucent Public License v1.02", + "licenseId": "LPL-1.02", + "seeAlso": [ + "http://plan9.bell-labs.com/plan9/license.html", + "https://opensource.org/licenses/LPL-1.02" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LPPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LPPL-1.0.json", + "referenceNumber": 215, + "name": "LaTeX Project Public License v1.0", + "licenseId": "LPPL-1.0", + "seeAlso": [ + "http://www.latex-project.org/lppl/lppl-1-0.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LPPL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LPPL-1.1.json", + "referenceNumber": 114, + "name": "LaTeX Project Public License v1.1", + "licenseId": "LPPL-1.1", + "seeAlso": [ + "http://www.latex-project.org/lppl/lppl-1-1.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LPPL-1.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LPPL-1.2.json", + "referenceNumber": 435, + "name": "LaTeX Project Public License v1.2", + "licenseId": "LPPL-1.2", + "seeAlso": [ + "http://www.latex-project.org/lppl/lppl-1-2.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LPPL-1.3a.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LPPL-1.3a.json", + "referenceNumber": 18, + "name": "LaTeX Project Public License v1.3a", + "licenseId": "LPPL-1.3a", + "seeAlso": [ + "http://www.latex-project.org/lppl/lppl-1-3a.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/LPPL-1.3c.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LPPL-1.3c.json", + "referenceNumber": 240, + "name": "LaTeX Project Public License v1.3c", + "licenseId": "LPPL-1.3c", + "seeAlso": [ + "http://www.latex-project.org/lppl/lppl-1-3c.txt", + "https://opensource.org/licenses/LPPL-1.3c" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/lsof.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/lsof.json", + "referenceNumber": 605, + "name": "lsof License", + "licenseId": "lsof", + "seeAlso": [ + "https://github.com/lsof-org/lsof/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Lucida-Bitmap-Fonts.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Lucida-Bitmap-Fonts.json", + "referenceNumber": 399, + "name": "Lucida Bitmap Fonts License", + "licenseId": "Lucida-Bitmap-Fonts", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/font/bh-100dpi/-/blob/master/COPYING?ref_type\u003dheads" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LZMA-SDK-9.11-to-9.20.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LZMA-SDK-9.11-to-9.20.json", + "referenceNumber": 430, + "name": "LZMA SDK License (versions 9.11 to 9.20)", + "licenseId": "LZMA-SDK-9.11-to-9.20", + "seeAlso": [ + "https://www.7-zip.org/sdk.html", + "https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/LZMA-SDK-9.22.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/LZMA-SDK-9.22.json", + "referenceNumber": 244, + "name": "LZMA SDK License (versions 9.22 and beyond)", + "licenseId": "LZMA-SDK-9.22", + "seeAlso": [ + "https://www.7-zip.org/sdk.html", + "https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Mackerras-3-Clause.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Mackerras-3-Clause.json", + "referenceNumber": 59, + "name": "Mackerras 3-Clause License", + "licenseId": "Mackerras-3-Clause", + "seeAlso": [ + "https://github.com/ppp-project/ppp/blob/master/pppd/chap_ms.c#L6-L28" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Mackerras-3-Clause-acknowledgment.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Mackerras-3-Clause-acknowledgment.json", + "referenceNumber": 598, + "name": "Mackerras 3-Clause - acknowledgment variant", + "licenseId": "Mackerras-3-Clause-acknowledgment", + "seeAlso": [ + "https://github.com/ppp-project/ppp/blob/master/pppd/auth.c#L6-L28" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/magaz.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/magaz.json", + "referenceNumber": 516, + "name": "magaz License", + "licenseId": "magaz", + "seeAlso": [ + "https://mirrors.nic.cz/tex-archive/macros/latex/contrib/magaz/magaz.tex" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/mailprio.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/mailprio.json", + "referenceNumber": 179, + "name": "mailprio License", + "licenseId": "mailprio", + "seeAlso": [ + "https://fossies.org/linux/sendmail/contrib/mailprio" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MakeIndex.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MakeIndex.json", + "referenceNumber": 206, + "name": "MakeIndex License", + "licenseId": "MakeIndex", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/MakeIndex" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Martin-Birgmeier.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Martin-Birgmeier.json", + "referenceNumber": 535, + "name": "Martin Birgmeier License", + "licenseId": "Martin-Birgmeier", + "seeAlso": [ + "https://github.com/Perl/perl5/blob/blead/util.c#L6136" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/McPhee-slideshow.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/McPhee-slideshow.json", + "referenceNumber": 492, + "name": "McPhee Slideshow License", + "licenseId": "McPhee-slideshow", + "seeAlso": [ + "https://mirror.las.iastate.edu/tex-archive/graphics/metapost/contrib/macros/slideshow/slideshow.mp" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/metamail.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/metamail.json", + "referenceNumber": 437, + "name": "metamail License", + "licenseId": "metamail", + "seeAlso": [ + "https://github.com/Dual-Life/mime-base64/blob/master/Base64.xs#L12" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Minpack.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Minpack.json", + "referenceNumber": 512, + "name": "Minpack License", + "licenseId": "Minpack", + "seeAlso": [ + "http://www.netlib.org/minpack/disclaimer", + "https://gitlab.com/libeigen/eigen/-/blob/master/COPYING.MINPACK" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MirOS.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MirOS.json", + "referenceNumber": 183, + "name": "The MirOS Licence", + "licenseId": "MirOS", + "seeAlso": [ + "https://opensource.org/licenses/MirOS" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/MIT.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT.json", + "referenceNumber": 608, + "name": "MIT License", + "licenseId": "MIT", + "seeAlso": [ + "https://opensource.org/license/mit/" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/MIT-0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-0.json", + "referenceNumber": 395, + "name": "MIT No Attribution", + "licenseId": "MIT-0", + "seeAlso": [ + "https://github.com/aws/mit-0", + "https://romanrm.net/mit-zero", + "https://github.com/awsdocs/aws-cloud9-user-guide/blob/master/LICENSE-SAMPLECODE" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/MIT-advertising.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-advertising.json", + "referenceNumber": 293, + "name": "Enlightenment License (e16)", + "licenseId": "MIT-advertising", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/MIT_With_Advertising" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MIT-CMU.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-CMU.json", + "referenceNumber": 575, + "name": "CMU License", + "licenseId": "MIT-CMU", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing:MIT?rd\u003dLicensing/MIT#CMU_Style", + "https://github.com/python-pillow/Pillow/blob/fffb426092c8db24a5f4b6df243a8a3c01fb63cd/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MIT-enna.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-enna.json", + "referenceNumber": 638, + "name": "enna License", + "licenseId": "MIT-enna", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/MIT#enna" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MIT-feh.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-feh.json", + "referenceNumber": 53, + "name": "feh License", + "licenseId": "MIT-feh", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/MIT#feh" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MIT-Festival.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-Festival.json", + "referenceNumber": 317, + "name": "MIT Festival Variant", + "licenseId": "MIT-Festival", + "seeAlso": [ + "https://github.com/festvox/flite/blob/master/COPYING", + "https://github.com/festvox/speech_tools/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MIT-Khronos-old.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-Khronos-old.json", + "referenceNumber": 249, + "name": "MIT Khronos - old variant", + "licenseId": "MIT-Khronos-old", + "seeAlso": [ + "https://github.com/KhronosGroup/SPIRV-Cross/blob/main/LICENSES/LicenseRef-KhronosFreeUse.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MIT-Modern-Variant.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-Modern-Variant.json", + "referenceNumber": 424, + "name": "MIT License Modern Variant", + "licenseId": "MIT-Modern-Variant", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing:MIT#Modern_Variants", + "https://ptolemy.berkeley.edu/copyright.htm", + "https://pirlwww.lpl.arizona.edu/resources/guide/software/PerlTk/Tixlic.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/MIT-open-group.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-open-group.json", + "referenceNumber": 283, + "name": "MIT Open Group variant", + "licenseId": "MIT-open-group", + "seeAlso": [ + "https://gitlab.freedesktop.org/xorg/app/iceauth/-/blob/master/COPYING", + "https://gitlab.freedesktop.org/xorg/app/xvinfo/-/blob/master/COPYING", + "https://gitlab.freedesktop.org/xorg/app/xsetroot/-/blob/master/COPYING", + "https://gitlab.freedesktop.org/xorg/app/xauth/-/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MIT-testregex.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-testregex.json", + "referenceNumber": 427, + "name": "MIT testregex Variant", + "licenseId": "MIT-testregex", + "seeAlso": [ + "https://github.com/dotnet/runtime/blob/55e1ac7c07df62c4108d4acedf78f77574470ce5/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/AttRegexTests.cs#L12-L28" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MIT-Wu.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MIT-Wu.json", + "referenceNumber": 459, + "name": "MIT Tom Wu Variant", + "licenseId": "MIT-Wu", + "seeAlso": [ + "https://github.com/chromium/octane/blob/master/crypto.js" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MITNFA.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MITNFA.json", + "referenceNumber": 157, + "name": "MIT +no-false-attribs license", + "licenseId": "MITNFA", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/MITNFA" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MMIXware.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MMIXware.json", + "referenceNumber": 474, + "name": "MMIXware License", + "licenseId": "MMIXware", + "seeAlso": [ + "https://gitlab.lrz.de/mmix/mmixware/-/blob/master/boilerplate.w" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Motosoto.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Motosoto.json", + "referenceNumber": 627, + "name": "Motosoto License", + "licenseId": "Motosoto", + "seeAlso": [ + "https://opensource.org/licenses/Motosoto" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/MPEG-SSG.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MPEG-SSG.json", + "referenceNumber": 417, + "name": "MPEG Software Simulation", + "licenseId": "MPEG-SSG", + "seeAlso": [ + "https://sourceforge.net/p/netpbm/code/HEAD/tree/super_stable/converter/ppm/ppmtompeg/jrevdct.c#l1189" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/mpi-permissive.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/mpi-permissive.json", + "referenceNumber": 80, + "name": "mpi Permissive License", + "licenseId": "mpi-permissive", + "seeAlso": [ + "https://sources.debian.org/src/openmpi/4.1.0-10/ompi/debuggers/msgq_interface.h/?hl\u003d19#L19" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/mpich2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/mpich2.json", + "referenceNumber": 482, + "name": "mpich2 License", + "licenseId": "mpich2", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/MIT" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MPL-1.0.json", + "referenceNumber": 28, + "name": "Mozilla Public License 1.0", + "licenseId": "MPL-1.0", + "seeAlso": [ + "http://www.mozilla.org/MPL/MPL-1.0.html", + "https://opensource.org/licenses/MPL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/MPL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MPL-1.1.json", + "referenceNumber": 619, + "name": "Mozilla Public License 1.1", + "licenseId": "MPL-1.1", + "seeAlso": [ + "http://www.mozilla.org/MPL/MPL-1.1.html", + "https://opensource.org/licenses/MPL-1.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/MPL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MPL-2.0.json", + "referenceNumber": 263, + "name": "Mozilla Public License 2.0", + "licenseId": "MPL-2.0", + "seeAlso": [ + "https://www.mozilla.org/MPL/2.0/", + "https://opensource.org/licenses/MPL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/MPL-2.0-no-copyleft-exception.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MPL-2.0-no-copyleft-exception.json", + "referenceNumber": 455, + "name": "Mozilla Public License 2.0 (no copyleft exception)", + "licenseId": "MPL-2.0-no-copyleft-exception", + "seeAlso": [ + "https://www.mozilla.org/MPL/2.0/", + "https://opensource.org/licenses/MPL-2.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/mplus.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/mplus.json", + "referenceNumber": 541, + "name": "mplus Font License", + "licenseId": "mplus", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing:Mplus?rd\u003dLicensing/mplus" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MS-LPL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MS-LPL.json", + "referenceNumber": 528, + "name": "Microsoft Limited Public License", + "licenseId": "MS-LPL", + "seeAlso": [ + "https://www.openhub.net/licenses/mslpl", + "https://github.com/gabegundy/atlserver/blob/master/License.txt", + "https://en.wikipedia.org/wiki/Shared_Source_Initiative#Microsoft_Limited_Public_License_(Ms-LPL)" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MS-PL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MS-PL.json", + "referenceNumber": 499, + "name": "Microsoft Public License", + "licenseId": "MS-PL", + "seeAlso": [ + "http://www.microsoft.com/opensource/licenses.mspx", + "https://opensource.org/licenses/MS-PL" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/MS-RL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MS-RL.json", + "referenceNumber": 343, + "name": "Microsoft Reciprocal License", + "licenseId": "MS-RL", + "seeAlso": [ + "http://www.microsoft.com/opensource/licenses.mspx", + "https://opensource.org/licenses/MS-RL" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/MTLL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MTLL.json", + "referenceNumber": 137, + "name": "Matrix Template Library License", + "licenseId": "MTLL", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Matrix_Template_Library_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MulanPSL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MulanPSL-1.0.json", + "referenceNumber": 107, + "name": "Mulan Permissive Software License, Version 1", + "licenseId": "MulanPSL-1.0", + "seeAlso": [ + "https://license.coscl.org.cn/MulanPSL/", + "https://github.com/yuwenlong/longphp/blob/25dfb70cc2a466dc4bb55ba30901cbce08d164b5/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/MulanPSL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/MulanPSL-2.0.json", + "referenceNumber": 490, + "name": "Mulan Permissive Software License, Version 2", + "licenseId": "MulanPSL-2.0", + "seeAlso": [ + "https://license.coscl.org.cn/MulanPSL2" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Multics.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Multics.json", + "referenceNumber": 573, + "name": "Multics License", + "licenseId": "Multics", + "seeAlso": [ + "https://opensource.org/licenses/Multics" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Mup.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Mup.json", + "referenceNumber": 440, + "name": "Mup License", + "licenseId": "Mup", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Mup" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NAIST-2003.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NAIST-2003.json", + "referenceNumber": 104, + "name": "Nara Institute of Science and Technology License (2003)", + "licenseId": "NAIST-2003", + "seeAlso": [ + "https://enterprise.dejacode.com/licenses/public/naist-2003/#license-text", + "https://github.com/nodejs/node/blob/4a19cc8947b1bba2b2d27816ec3d0edf9b28e503/LICENSE#L343" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NASA-1.3.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NASA-1.3.json", + "referenceNumber": 127, + "name": "NASA Open Source Agreement 1.3", + "licenseId": "NASA-1.3", + "seeAlso": [ + "http://ti.arc.nasa.gov/opensource/nosa/", + "https://opensource.org/licenses/NASA-1.3" + ], + "isOsiApproved": true, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/Naumen.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Naumen.json", + "referenceNumber": 128, + "name": "Naumen Public License", + "licenseId": "Naumen", + "seeAlso": [ + "https://opensource.org/licenses/Naumen" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/NBPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NBPL-1.0.json", + "referenceNumber": 41, + "name": "Net Boolean Public License v1", + "licenseId": "NBPL-1.0", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d37b4b3f6cc4bf34e1d3dec61e69914b9819d8894" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NCBI-PD.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NCBI-PD.json", + "referenceNumber": 362, + "name": "NCBI Public Domain Notice", + "licenseId": "NCBI-PD", + "seeAlso": [ + "https://github.com/ncbi/sra-tools/blob/e8e5b6af4edc460156ad9ce5902d0779cffbf685/LICENSE", + "https://github.com/ncbi/datasets/blob/0ea4cd16b61e5b799d9cc55aecfa016d6c9bd2bf/LICENSE.md", + "https://github.com/ncbi/gprobe/blob/de64d30fee8b4c4013094d7d3139ea89b5dd1ace/LICENSE", + "https://github.com/ncbi/egapx/blob/08930b9dec0c69b2d1a05e5153c7b95ef0a3eb0f/LICENSE", + "https://github.com/ncbi/datasets/blob/master/LICENSE.md" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NCGL-UK-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NCGL-UK-2.0.json", + "referenceNumber": 320, + "name": "Non-Commercial Government Licence", + "licenseId": "NCGL-UK-2.0", + "seeAlso": [ + "http://www.nationalarchives.gov.uk/doc/non-commercial-government-licence/version/2/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NCL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NCL.json", + "referenceNumber": 153, + "name": "NCL Source Code License", + "licenseId": "NCL", + "seeAlso": [ + "https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/modules/module-filter-chain/pffft.c?ref_type\u003dheads#L1-52" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NCSA.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NCSA.json", + "referenceNumber": 557, + "name": "University of Illinois/NCSA Open Source License", + "licenseId": "NCSA", + "seeAlso": [ + "http://otm.illinois.edu/uiuc_openSource", + "https://opensource.org/licenses/NCSA" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Net-SNMP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Net-SNMP.json", + "referenceNumber": 234, + "name": "Net-SNMP License", + "licenseId": "Net-SNMP", + "seeAlso": [ + "http://net-snmp.sourceforge.net/about/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NetCDF.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NetCDF.json", + "referenceNumber": 503, + "name": "NetCDF license", + "licenseId": "NetCDF", + "seeAlso": [ + "http://www.unidata.ucar.edu/software/netcdf/copyright.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Newsletr.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Newsletr.json", + "referenceNumber": 412, + "name": "Newsletr License", + "licenseId": "Newsletr", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Newsletr" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NGPL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NGPL.json", + "referenceNumber": 275, + "name": "Nethack General Public License", + "licenseId": "NGPL", + "seeAlso": [ + "https://opensource.org/licenses/NGPL" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/NICTA-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NICTA-1.0.json", + "referenceNumber": 311, + "name": "NICTA Public Software License, Version 1.0", + "licenseId": "NICTA-1.0", + "seeAlso": [ + "https://opensource.apple.com/source/mDNSResponder/mDNSResponder-320.10/mDNSPosix/nss_ReadMe.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NIST-PD.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NIST-PD.json", + "referenceNumber": 309, + "name": "NIST Public Domain Notice", + "licenseId": "NIST-PD", + "seeAlso": [ + "https://github.com/tcheneau/simpleRPL/blob/e645e69e38dd4e3ccfeceb2db8cba05b7c2e0cd3/LICENSE.txt", + "https://github.com/tcheneau/Routing/blob/f09f46fcfe636107f22f2c98348188a65a135d98/README.md" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NIST-PD-fallback.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NIST-PD-fallback.json", + "referenceNumber": 34, + "name": "NIST Public Domain Notice with license fallback", + "licenseId": "NIST-PD-fallback", + "seeAlso": [ + "https://github.com/usnistgov/jsip/blob/59700e6926cbe96c5cdae897d9a7d2656b42abe3/LICENSE", + "https://github.com/usnistgov/fipy/blob/86aaa5c2ba2c6f1be19593c5986071cf6568cc34/LICENSE.rst" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NIST-Software.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NIST-Software.json", + "referenceNumber": 76, + "name": "NIST Software License", + "licenseId": "NIST-Software", + "seeAlso": [ + "https://github.com/open-quantum-safe/liboqs/blob/40b01fdbb270f8614fde30e65d30e9da18c02393/src/common/rand/rand_nist.c#L1-L15" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NLOD-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NLOD-1.0.json", + "referenceNumber": 565, + "name": "Norwegian Licence for Open Government Data (NLOD) 1.0", + "licenseId": "NLOD-1.0", + "seeAlso": [ + "http://data.norge.no/nlod/en/1.0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NLOD-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NLOD-2.0.json", + "referenceNumber": 483, + "name": "Norwegian Licence for Open Government Data (NLOD) 2.0", + "licenseId": "NLOD-2.0", + "seeAlso": [ + "http://data.norge.no/nlod/en/2.0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NLPL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NLPL.json", + "referenceNumber": 71, + "name": "No Limit Public License", + "licenseId": "NLPL", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/NLPL" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Nokia.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Nokia.json", + "referenceNumber": 44, + "name": "Nokia Open Source License", + "licenseId": "Nokia", + "seeAlso": [ + "https://opensource.org/licenses/nokia" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/NOSL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NOSL.json", + "referenceNumber": 126, + "name": "Netizen Open Source License", + "licenseId": "NOSL", + "seeAlso": [ + "http://bits.netizen.com.au/licenses/NOSL/nosl.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Noweb.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Noweb.json", + "referenceNumber": 534, + "name": "Noweb License", + "licenseId": "Noweb", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Noweb" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NPL-1.0.json", + "referenceNumber": 346, + "name": "Netscape Public License v1.0", + "licenseId": "NPL-1.0", + "seeAlso": [ + "http://www.mozilla.org/MPL/NPL/1.0/" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/NPL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NPL-1.1.json", + "referenceNumber": 418, + "name": "Netscape Public License v1.1", + "licenseId": "NPL-1.1", + "seeAlso": [ + "http://www.mozilla.org/MPL/NPL/1.1/" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/NPOSL-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NPOSL-3.0.json", + "referenceNumber": 579, + "name": "Non-Profit Open Software License 3.0", + "licenseId": "NPOSL-3.0", + "seeAlso": [ + "https://opensource.org/licenses/NOSL3.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/NRL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NRL.json", + "referenceNumber": 230, + "name": "NRL License", + "licenseId": "NRL", + "seeAlso": [ + "http://web.mit.edu/network/isakmp/nrllicense.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/NTP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NTP.json", + "referenceNumber": 547, + "name": "NTP License", + "licenseId": "NTP", + "seeAlso": [ + "https://opensource.org/licenses/NTP" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/NTP-0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/NTP-0.json", + "referenceNumber": 460, + "name": "NTP No Attribution", + "licenseId": "NTP-0", + "seeAlso": [ + "https://github.com/tytso/e2fsprogs/blob/master/lib/et/et_name.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Nunit.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/Nunit.json", + "referenceNumber": 634, + "name": "Nunit License", + "licenseId": "Nunit", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Nunit" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/O-UDA-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/O-UDA-1.0.json", + "referenceNumber": 191, + "name": "Open Use of Data Agreement v1.0", + "licenseId": "O-UDA-1.0", + "seeAlso": [ + "https://github.com/microsoft/Open-Use-of-Data-Agreement/blob/v1.0/O-UDA-1.0.md", + "https://cdla.dev/open-use-of-data-agreement-v1-0/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OAR.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OAR.json", + "referenceNumber": 4, + "name": "OAR License", + "licenseId": "OAR", + "seeAlso": [ + "https://sourceware.org/git/?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dnewlib/libc/string/strsignal.c;hb\u003dHEAD#l35" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OCCT-PL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OCCT-PL.json", + "referenceNumber": 596, + "name": "Open CASCADE Technology Public License", + "licenseId": "OCCT-PL", + "seeAlso": [ + "http://www.opencascade.com/content/occt-public-license" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OCLC-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OCLC-2.0.json", + "referenceNumber": 308, + "name": "OCLC Research Public License 2.0", + "licenseId": "OCLC-2.0", + "seeAlso": [ + "http://www.oclc.org/research/activities/software/license/v2final.htm", + "https://opensource.org/licenses/OCLC-2.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/ODbL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ODbL-1.0.json", + "referenceNumber": 243, + "name": "Open Data Commons Open Database License v1.0", + "licenseId": "ODbL-1.0", + "seeAlso": [ + "http://www.opendatacommons.org/licenses/odbl/1.0/", + "https://opendatacommons.org/licenses/odbl/1-0/" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/ODC-By-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ODC-By-1.0.json", + "referenceNumber": 7, + "name": "Open Data Commons Attribution License v1.0", + "licenseId": "ODC-By-1.0", + "seeAlso": [ + "https://opendatacommons.org/licenses/by/1.0/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OFFIS.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OFFIS.json", + "referenceNumber": 238, + "name": "OFFIS License", + "licenseId": "OFFIS", + "seeAlso": [ + "https://sourceforge.net/p/xmedcon/code/ci/master/tree/libs/dicom/README" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OFL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OFL-1.0.json", + "referenceNumber": 475, + "name": "SIL Open Font License 1.0", + "licenseId": "OFL-1.0", + "seeAlso": [ + "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OFL-1.0-no-RFN.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OFL-1.0-no-RFN.json", + "referenceNumber": 23, + "name": "SIL Open Font License 1.0 with no Reserved Font Name", + "licenseId": "OFL-1.0-no-RFN", + "seeAlso": [ + "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OFL-1.0-RFN.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OFL-1.0-RFN.json", + "referenceNumber": 11, + "name": "SIL Open Font License 1.0 with Reserved Font Name", + "licenseId": "OFL-1.0-RFN", + "seeAlso": [ + "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OFL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OFL-1.1.json", + "referenceNumber": 248, + "name": "SIL Open Font License 1.1", + "licenseId": "OFL-1.1", + "seeAlso": [ + "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web", + "https://opensource.org/licenses/OFL-1.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OFL-1.1-no-RFN.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OFL-1.1-no-RFN.json", + "referenceNumber": 550, + "name": "SIL Open Font License 1.1 with no Reserved Font Name", + "licenseId": "OFL-1.1-no-RFN", + "seeAlso": [ + "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web", + "https://opensource.org/licenses/OFL-1.1" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/OFL-1.1-RFN.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OFL-1.1-RFN.json", + "referenceNumber": 507, + "name": "SIL Open Font License 1.1 with Reserved Font Name", + "licenseId": "OFL-1.1-RFN", + "seeAlso": [ + "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web", + "https://opensource.org/licenses/OFL-1.1" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/OGC-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OGC-1.0.json", + "referenceNumber": 166, + "name": "OGC Software License, Version 1.0", + "licenseId": "OGC-1.0", + "seeAlso": [ + "https://www.ogc.org/ogc/software/1.0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OGDL-Taiwan-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OGDL-Taiwan-1.0.json", + "referenceNumber": 468, + "name": "Taiwan Open Government Data License, version 1.0", + "licenseId": "OGDL-Taiwan-1.0", + "seeAlso": [ + "https://data.gov.tw/license" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OGL-Canada-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OGL-Canada-2.0.json", + "referenceNumber": 464, + "name": "Open Government Licence - Canada", + "licenseId": "OGL-Canada-2.0", + "seeAlso": [ + "https://open.canada.ca/en/open-government-licence-canada" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OGL-UK-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OGL-UK-1.0.json", + "referenceNumber": 489, + "name": "Open Government Licence v1.0", + "licenseId": "OGL-UK-1.0", + "seeAlso": [ + "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/1/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OGL-UK-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OGL-UK-2.0.json", + "referenceNumber": 467, + "name": "Open Government Licence v2.0", + "licenseId": "OGL-UK-2.0", + "seeAlso": [ + "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/2/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OGL-UK-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OGL-UK-3.0.json", + "referenceNumber": 151, + "name": "Open Government Licence v3.0", + "licenseId": "OGL-UK-3.0", + "seeAlso": [ + "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OGTSL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OGTSL.json", + "referenceNumber": 367, + "name": "Open Group Test Suite License", + "licenseId": "OGTSL", + "seeAlso": [ + "http://www.opengroup.org/testing/downloads/The_Open_Group_TSL.txt", + "https://opensource.org/licenses/OGTSL" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/OLDAP-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-1.1.json", + "referenceNumber": 180, + "name": "Open LDAP Public License v1.1", + "licenseId": "OLDAP-1.1", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d806557a5ad59804ef3a44d5abfbe91d706b0791f" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-1.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-1.2.json", + "referenceNumber": 229, + "name": "Open LDAP Public License v1.2", + "licenseId": "OLDAP-1.2", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d42b0383c50c299977b5893ee695cf4e486fb0dc7" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-1.3.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-1.3.json", + "referenceNumber": 224, + "name": "Open LDAP Public License v1.3", + "licenseId": "OLDAP-1.3", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003de5f8117f0ce088d0bd7a8e18ddf37eaa40eb09b1" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-1.4.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-1.4.json", + "referenceNumber": 255, + "name": "Open LDAP Public License v1.4", + "licenseId": "OLDAP-1.4", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dc9f95c2f3f2ffb5e0ae55fe7388af75547660941" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.0.json", + "referenceNumber": 208, + "name": "Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)", + "licenseId": "OLDAP-2.0", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dcbf50f4e1185a21abd4c0a54d3f4341fe28f36ea" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.0.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.0.1.json", + "referenceNumber": 79, + "name": "Open LDAP Public License v2.0.1", + "licenseId": "OLDAP-2.0.1", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003db6d68acd14e51ca3aab4428bf26522aa74873f0e" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.1.json", + "referenceNumber": 360, + "name": "Open LDAP Public License v2.1", + "licenseId": "OLDAP-2.1", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003db0d176738e96a0d3b9f85cb51e140a86f21be715" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.json", + "referenceNumber": 316, + "name": "Open LDAP Public License v2.2", + "licenseId": "OLDAP-2.2", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d470b0c18ec67621c85881b2733057fecf4a1acc3" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.2.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.1.json", + "referenceNumber": 426, + "name": "Open LDAP Public License v2.2.1", + "licenseId": "OLDAP-2.2.1", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d4bc786f34b50aa301be6f5600f58a980070f481e" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.2.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.2.json", + "referenceNumber": 384, + "name": "Open LDAP Public License 2.2.2", + "licenseId": "OLDAP-2.2.2", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003ddf2cc1e21eb7c160695f5b7cffd6296c151ba188" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.3.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.3.json", + "referenceNumber": 381, + "name": "Open LDAP Public License v2.3", + "licenseId": "OLDAP-2.3", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dd32cf54a32d581ab475d23c810b0a7fbaf8d63c3" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.4.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.4.json", + "referenceNumber": 93, + "name": "Open LDAP Public License v2.4", + "licenseId": "OLDAP-2.4", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dcd1284c4a91a8a380d904eee68d1583f989ed386" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.5.json", + "referenceNumber": 651, + "name": "Open LDAP Public License v2.5", + "licenseId": "OLDAP-2.5", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d6852b9d90022e8593c98205413380536b1b5a7cf" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.6.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.6.json", + "referenceNumber": 568, + "name": "Open LDAP Public License v2.6", + "licenseId": "OLDAP-2.6", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d1cae062821881f41b73012ba816434897abf4205" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.7.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.7.json", + "referenceNumber": 220, + "name": "Open LDAP Public License v2.7", + "licenseId": "OLDAP-2.7", + "seeAlso": [ + "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d47c2415c1df81556eeb39be6cad458ef87c534a2" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OLDAP-2.8.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLDAP-2.8.json", + "referenceNumber": 5, + "name": "Open LDAP Public License v2.8", + "licenseId": "OLDAP-2.8", + "seeAlso": [ + "http://www.openldap.org/software/release/license.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/OLFL-1.3.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OLFL-1.3.json", + "referenceNumber": 142, + "name": "Open Logistics Foundation License Version 1.3", + "licenseId": "OLFL-1.3", + "seeAlso": [ + "https://openlogisticsfoundation.org/licenses/", + "https://opensource.org/license/olfl-1-3/" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/OML.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OML.json", + "referenceNumber": 375, + "name": "Open Market License", + "licenseId": "OML", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Open_Market_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OpenPBS-2.3.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OpenPBS-2.3.json", + "referenceNumber": 314, + "name": "OpenPBS v2.3 Software License", + "licenseId": "OpenPBS-2.3", + "seeAlso": [ + "https://github.com/adaptivecomputing/torque/blob/master/PBS_License.txt", + "https://www.mcs.anl.gov/research/projects/openpbs/PBS_License.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OpenSSL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OpenSSL.json", + "referenceNumber": 303, + "name": "OpenSSL License", + "licenseId": "OpenSSL", + "seeAlso": [ + "http://www.openssl.org/source/license.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OpenSSL-standalone.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OpenSSL-standalone.json", + "referenceNumber": 602, + "name": "OpenSSL License - standalone", + "licenseId": "OpenSSL-standalone", + "seeAlso": [ + "https://library.netapp.com/ecm/ecm_download_file/ECMP1196395", + "https://hstechdocs.helpsystems.com/manuals/globalscape/archive/cuteftp6/open_ssl_license_agreement.htm" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OpenVision.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OpenVision.json", + "referenceNumber": 588, + "name": "OpenVision License", + "licenseId": "OpenVision", + "seeAlso": [ + "https://github.com/krb5/krb5/blob/krb5-1.21.2-final/NOTICE#L66-L98", + "https://web.mit.edu/kerberos/krb5-1.21/doc/mitK5license.html", + "https://fedoraproject.org/wiki/Licensing:MIT#OpenVision_Variant" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OPL-1.0.json", + "referenceNumber": 91, + "name": "Open Public License v1.0", + "licenseId": "OPL-1.0", + "seeAlso": [ + "http://old.koalateam.com/jackaroo/OPL_1_0.TXT", + "https://fedoraproject.org/wiki/Licensing/Open_Public_License" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/OPL-UK-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OPL-UK-3.0.json", + "referenceNumber": 480, + "name": "United Kingdom Open Parliament Licence v3.0", + "licenseId": "OPL-UK-3.0", + "seeAlso": [ + "https://www.parliament.uk/site-information/copyright-parliament/open-parliament-licence/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OPUBL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OPUBL-1.0.json", + "referenceNumber": 329, + "name": "Open Publication License v1.0", + "licenseId": "OPUBL-1.0", + "seeAlso": [ + "http://opencontent.org/openpub/", + "https://www.debian.org/opl", + "https://www.ctan.org/license/opl" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/OSET-PL-2.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OSET-PL-2.1.json", + "referenceNumber": 517, + "name": "OSET Public License version 2.1", + "licenseId": "OSET-PL-2.1", + "seeAlso": [ + "http://www.osetfoundation.org/public-license", + "https://opensource.org/licenses/OPL-2.1" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/OSL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OSL-1.0.json", + "referenceNumber": 162, + "name": "Open Software License 1.0", + "licenseId": "OSL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/OSL-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OSL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OSL-1.1.json", + "referenceNumber": 586, + "name": "Open Software License 1.1", + "licenseId": "OSL-1.1", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/OSL1.1" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OSL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OSL-2.0.json", + "referenceNumber": 531, + "name": "Open Software License 2.0", + "licenseId": "OSL-2.0", + "seeAlso": [ + "http://web.archive.org/web/20041020171434/http://www.rosenlaw.com/osl2.0.html" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OSL-2.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OSL-2.1.json", + "referenceNumber": 138, + "name": "Open Software License 2.1", + "licenseId": "OSL-2.1", + "seeAlso": [ + "http://web.archive.org/web/20050212003940/http://www.rosenlaw.com/osl21.htm", + "https://opensource.org/licenses/OSL-2.1" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/OSL-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/OSL-3.0.json", + "referenceNumber": 300, + "name": "Open Software License 3.0", + "licenseId": "OSL-3.0", + "seeAlso": [ + "https://web.archive.org/web/20120101081418/http://rosenlaw.com:80/OSL3.0.htm", + "https://opensource.org/licenses/OSL-3.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/PADL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PADL.json", + "referenceNumber": 113, + "name": "PADL License", + "licenseId": "PADL", + "seeAlso": [ + "https://git.openldap.org/openldap/openldap/-/blob/master/libraries/libldap/os-local.c?ref_type\u003dheads#L19-23" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Parity-6.0.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Parity-6.0.0.json", + "referenceNumber": 246, + "name": "The Parity Public License 6.0.0", + "licenseId": "Parity-6.0.0", + "seeAlso": [ + "https://paritylicense.com/versions/6.0.0.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Parity-7.0.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Parity-7.0.0.json", + "referenceNumber": 212, + "name": "The Parity Public License 7.0.0", + "licenseId": "Parity-7.0.0", + "seeAlso": [ + "https://paritylicense.com/versions/7.0.0.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/PDDL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PDDL-1.0.json", + "referenceNumber": 493, + "name": "Open Data Commons Public Domain Dedication \u0026 License 1.0", + "licenseId": "PDDL-1.0", + "seeAlso": [ + "http://opendatacommons.org/licenses/pddl/1.0/", + "https://opendatacommons.org/licenses/pddl/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/PHP-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PHP-3.0.json", + "referenceNumber": 584, + "name": "PHP License v3.0", + "licenseId": "PHP-3.0", + "seeAlso": [ + "http://www.php.net/license/3_0.txt", + "https://opensource.org/licenses/PHP-3.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/PHP-3.01.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PHP-3.01.json", + "referenceNumber": 538, + "name": "PHP License v3.01", + "licenseId": "PHP-3.01", + "seeAlso": [ + "http://www.php.net/license/3_01.txt" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Pixar.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Pixar.json", + "referenceNumber": 204, + "name": "Pixar License", + "licenseId": "Pixar", + "seeAlso": [ + "https://github.com/PixarAnimationStudios/OpenSubdiv/raw/v3_5_0/LICENSE.txt", + "https://graphics.pixar.com/opensubdiv/docs/license.html", + "https://github.com/PixarAnimationStudios/OpenSubdiv/blob/v3_5_0/opensubdiv/version.cpp#L2-L22" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/pkgconf.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/pkgconf.json", + "referenceNumber": 389, + "name": "pkgconf License", + "licenseId": "pkgconf", + "seeAlso": [ + "https://github.com/pkgconf/pkgconf/blob/master/cli/main.c#L8" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Plexus.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Plexus.json", + "referenceNumber": 141, + "name": "Plexus Classworlds License", + "licenseId": "Plexus", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Plexus_Classworlds_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/pnmstitch.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/pnmstitch.json", + "referenceNumber": 158, + "name": "pnmstitch License", + "licenseId": "pnmstitch", + "seeAlso": [ + "https://sourceforge.net/p/netpbm/code/HEAD/tree/super_stable/editor/pnmstitch.c#l2" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/PolyForm-Noncommercial-1.0.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PolyForm-Noncommercial-1.0.0.json", + "referenceNumber": 54, + "name": "PolyForm Noncommercial License 1.0.0", + "licenseId": "PolyForm-Noncommercial-1.0.0", + "seeAlso": [ + "https://polyformproject.org/licenses/noncommercial/1.0.0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/PolyForm-Small-Business-1.0.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PolyForm-Small-Business-1.0.0.json", + "referenceNumber": 594, + "name": "PolyForm Small Business License 1.0.0", + "licenseId": "PolyForm-Small-Business-1.0.0", + "seeAlso": [ + "https://polyformproject.org/licenses/small-business/1.0.0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/PostgreSQL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PostgreSQL.json", + "referenceNumber": 643, + "name": "PostgreSQL License", + "licenseId": "PostgreSQL", + "seeAlso": [ + "http://www.postgresql.org/about/licence", + "https://opensource.org/licenses/PostgreSQL" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/PPL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PPL.json", + "referenceNumber": 580, + "name": "Peer Production License", + "licenseId": "PPL", + "seeAlso": [ + "https://wiki.p2pfoundation.net/Peer_Production_License", + "http://www.networkcultures.org/_uploads/%233notebook_telekommunist.pdf" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/PSF-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/PSF-2.0.json", + "referenceNumber": 55, + "name": "Python Software Foundation License 2.0", + "licenseId": "PSF-2.0", + "seeAlso": [ + "https://opensource.org/licenses/Python-2.0" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/psfrag.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/psfrag.json", + "referenceNumber": 555, + "name": "psfrag License", + "licenseId": "psfrag", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/psfrag" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/psutils.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/psutils.json", + "referenceNumber": 260, + "name": "psutils License", + "licenseId": "psutils", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/psutils" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Python-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Python-2.0.json", + "referenceNumber": 285, + "name": "Python License 2.0", + "licenseId": "Python-2.0", + "seeAlso": [ + "https://opensource.org/licenses/Python-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Python-2.0.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Python-2.0.1.json", + "referenceNumber": 201, + "name": "Python License 2.0.1", + "licenseId": "Python-2.0.1", + "seeAlso": [ + "https://www.python.org/download/releases/2.0.1/license/", + "https://docs.python.org/3/license.html", + "https://github.com/python/cpython/blob/main/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/python-ldap.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/python-ldap.json", + "referenceNumber": 446, + "name": "Python ldap License", + "licenseId": "python-ldap", + "seeAlso": [ + "https://github.com/python-ldap/python-ldap/blob/main/LICENCE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Qhull.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Qhull.json", + "referenceNumber": 326, + "name": "Qhull License", + "licenseId": "Qhull", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Qhull" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/QPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/QPL-1.0.json", + "referenceNumber": 413, + "name": "Q Public License 1.0", + "licenseId": "QPL-1.0", + "seeAlso": [ + "http://doc.qt.nokia.com/3.3/license.html", + "https://opensource.org/licenses/QPL-1.0", + "https://doc.qt.io/archives/3.3/license.html" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/QPL-1.0-INRIA-2004.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/QPL-1.0-INRIA-2004.json", + "referenceNumber": 486, + "name": "Q Public License 1.0 - INRIA 2004 variant", + "licenseId": "QPL-1.0-INRIA-2004", + "seeAlso": [ + "https://github.com/maranget/hevea/blob/master/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/radvd.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/radvd.json", + "referenceNumber": 433, + "name": "radvd License", + "licenseId": "radvd", + "seeAlso": [ + "https://github.com/radvd-project/radvd/blob/master/COPYRIGHT" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Rdisc.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Rdisc.json", + "referenceNumber": 50, + "name": "Rdisc License", + "licenseId": "Rdisc", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Rdisc_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/RHeCos-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/RHeCos-1.1.json", + "referenceNumber": 99, + "name": "Red Hat eCos Public License v1.1", + "licenseId": "RHeCos-1.1", + "seeAlso": [ + "http://ecos.sourceware.org/old-license.html" + ], + "isOsiApproved": false, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/RPL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/RPL-1.1.json", + "referenceNumber": 205, + "name": "Reciprocal Public License 1.1", + "licenseId": "RPL-1.1", + "seeAlso": [ + "https://opensource.org/licenses/RPL-1.1" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/RPL-1.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/RPL-1.5.json", + "referenceNumber": 52, + "name": "Reciprocal Public License 1.5", + "licenseId": "RPL-1.5", + "seeAlso": [ + "https://opensource.org/licenses/RPL-1.5" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/RPSL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/RPSL-1.0.json", + "referenceNumber": 637, + "name": "RealNetworks Public Source License v1.0", + "licenseId": "RPSL-1.0", + "seeAlso": [ + "https://helixcommunity.org/content/rpsl", + "https://opensource.org/licenses/RPSL-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/RSA-MD.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/RSA-MD.json", + "referenceNumber": 496, + "name": "RSA Message-Digest License", + "licenseId": "RSA-MD", + "seeAlso": [ + "http://www.faqs.org/rfcs/rfc1321.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/RSCPL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/RSCPL.json", + "referenceNumber": 235, + "name": "Ricoh Source Code Public License", + "licenseId": "RSCPL", + "seeAlso": [ + "http://wayback.archive.org/web/20060715140826/http://www.risource.org/RPL/RPL-1.0A.shtml", + "https://opensource.org/licenses/RSCPL" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Ruby.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Ruby.json", + "referenceNumber": 223, + "name": "Ruby License", + "licenseId": "Ruby", + "seeAlso": [ + "https://www.ruby-lang.org/en/about/license.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/SAX-PD.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SAX-PD.json", + "referenceNumber": 301, + "name": "Sax Public Domain Notice", + "licenseId": "SAX-PD", + "seeAlso": [ + "http://www.saxproject.org/copying.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SAX-PD-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SAX-PD-2.0.json", + "referenceNumber": 561, + "name": "Sax Public Domain Notice 2.0", + "licenseId": "SAX-PD-2.0", + "seeAlso": [ + "http://www.saxproject.org/copying.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Saxpath.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Saxpath.json", + "referenceNumber": 109, + "name": "Saxpath License", + "licenseId": "Saxpath", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Saxpath_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SCEA.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SCEA.json", + "referenceNumber": 35, + "name": "SCEA Shared Source License", + "licenseId": "SCEA", + "seeAlso": [ + "http://research.scea.com/scea_shared_source_license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SchemeReport.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SchemeReport.json", + "referenceNumber": 425, + "name": "Scheme Language Report License", + "licenseId": "SchemeReport", + "seeAlso": [], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Sendmail.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Sendmail.json", + "referenceNumber": 274, + "name": "Sendmail License", + "licenseId": "Sendmail", + "seeAlso": [ + "http://www.sendmail.com/pdfs/open_source/sendmail_license.pdf", + "https://web.archive.org/web/20160322142305/https://www.sendmail.com/pdfs/open_source/sendmail_license.pdf" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Sendmail-8.23.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Sendmail-8.23.json", + "referenceNumber": 247, + "name": "Sendmail License 8.23", + "licenseId": "Sendmail-8.23", + "seeAlso": [ + "https://www.proofpoint.com/sites/default/files/sendmail-license.pdf", + "https://web.archive.org/web/20181003101040/https://www.proofpoint.com/sites/default/files/sendmail-license.pdf" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SGI-B-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SGI-B-1.0.json", + "referenceNumber": 476, + "name": "SGI Free Software License B v1.0", + "licenseId": "SGI-B-1.0", + "seeAlso": [ + "http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.1.0.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SGI-B-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SGI-B-1.1.json", + "referenceNumber": 456, + "name": "SGI Free Software License B v1.1", + "licenseId": "SGI-B-1.1", + "seeAlso": [ + "http://oss.sgi.com/projects/FreeB/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SGI-B-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SGI-B-2.0.json", + "referenceNumber": 405, + "name": "SGI Free Software License B v2.0", + "licenseId": "SGI-B-2.0", + "seeAlso": [ + "http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/SGI-OpenGL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SGI-OpenGL.json", + "referenceNumber": 629, + "name": "SGI OpenGL License", + "licenseId": "SGI-OpenGL", + "seeAlso": [ + "https://gitlab.freedesktop.org/mesa/glw/-/blob/master/README?ref_type\u003dheads" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SGP4.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SGP4.json", + "referenceNumber": 336, + "name": "SGP4 Permission Notice", + "licenseId": "SGP4", + "seeAlso": [ + "https://celestrak.org/publications/AIAA/2006-6753/faq.php" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SHL-0.5.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SHL-0.5.json", + "referenceNumber": 338, + "name": "Solderpad Hardware License v0.5", + "licenseId": "SHL-0.5", + "seeAlso": [ + "https://solderpad.org/licenses/SHL-0.5/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SHL-0.51.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SHL-0.51.json", + "referenceNumber": 29, + "name": "Solderpad Hardware License, Version 0.51", + "licenseId": "SHL-0.51", + "seeAlso": [ + "https://solderpad.org/licenses/SHL-0.51/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SimPL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SimPL-2.0.json", + "referenceNumber": 444, + "name": "Simple Public License 2.0", + "licenseId": "SimPL-2.0", + "seeAlso": [ + "https://opensource.org/licenses/SimPL-2.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/SISSL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SISSL.json", + "referenceNumber": 268, + "name": "Sun Industry Standards Source License v1.1", + "licenseId": "SISSL", + "seeAlso": [ + "http://www.openoffice.org/licenses/sissl_license.html", + "https://opensource.org/licenses/SISSL" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/SISSL-1.2.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SISSL-1.2.json", + "referenceNumber": 502, + "name": "Sun Industry Standards Source License v1.2", + "licenseId": "SISSL-1.2", + "seeAlso": [ + "http://gridscheduler.sourceforge.net/Gridengine_SISSL_license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SL.json", + "referenceNumber": 645, + "name": "SL License", + "licenseId": "SL", + "seeAlso": [ + "https://github.com/mtoyoda/sl/blob/master/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Sleepycat.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Sleepycat.json", + "referenceNumber": 182, + "name": "Sleepycat License", + "licenseId": "Sleepycat", + "seeAlso": [ + "https://opensource.org/licenses/Sleepycat" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/SMLNJ.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SMLNJ.json", + "referenceNumber": 148, + "name": "Standard ML of New Jersey License", + "licenseId": "SMLNJ", + "seeAlso": [ + "https://www.smlnj.org/license.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/SMPPL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SMPPL.json", + "referenceNumber": 250, + "name": "Secure Messaging Protocol Public License", + "licenseId": "SMPPL", + "seeAlso": [ + "https://github.com/dcblake/SMP/blob/master/Documentation/License.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SNIA.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SNIA.json", + "referenceNumber": 518, + "name": "SNIA Public License 1.1", + "licenseId": "SNIA", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/SNIA_Public_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/snprintf.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/snprintf.json", + "referenceNumber": 161, + "name": "snprintf License", + "licenseId": "snprintf", + "seeAlso": [ + "https://github.com/openssh/openssh-portable/blob/master/openbsd-compat/bsd-snprintf.c#L2" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/softSurfer.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/softSurfer.json", + "referenceNumber": 523, + "name": "softSurfer License", + "licenseId": "softSurfer", + "seeAlso": [ + "https://github.com/mm2/Little-CMS/blob/master/src/cmssm.c#L207", + "https://fedoraproject.org/wiki/Licensing/softSurfer" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Soundex.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Soundex.json", + "referenceNumber": 368, + "name": "Soundex License", + "licenseId": "Soundex", + "seeAlso": [ + "https://metacpan.org/release/RJBS/Text-Soundex-3.05/source/Soundex.pm#L3-11" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Spencer-86.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Spencer-86.json", + "referenceNumber": 472, + "name": "Spencer License 86", + "licenseId": "Spencer-86", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Henry_Spencer_Reg-Ex_Library_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Spencer-94.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Spencer-94.json", + "referenceNumber": 378, + "name": "Spencer License 94", + "licenseId": "Spencer-94", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Henry_Spencer_Reg-Ex_Library_License", + "https://metacpan.org/release/KNOK/File-MMagic-1.30/source/COPYING#L28" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Spencer-99.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Spencer-99.json", + "referenceNumber": 139, + "name": "Spencer License 99", + "licenseId": "Spencer-99", + "seeAlso": [ + "http://www.opensource.apple.com/source/tcl/tcl-5/tcl/generic/regfronts.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SPL-1.0.json", + "referenceNumber": 280, + "name": "Sun Public License v1.0", + "licenseId": "SPL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/SPL-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/ssh-keyscan.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ssh-keyscan.json", + "referenceNumber": 294, + "name": "ssh-keyscan License", + "licenseId": "ssh-keyscan", + "seeAlso": [ + "https://github.com/openssh/openssh-portable/blob/master/LICENCE#L82" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SSH-OpenSSH.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SSH-OpenSSH.json", + "referenceNumber": 506, + "name": "SSH OpenSSH license", + "licenseId": "SSH-OpenSSH", + "seeAlso": [ + "https://github.com/openssh/openssh-portable/blob/1b11ea7c58cd5c59838b5fa574cd456d6047b2d4/LICENCE#L10" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SSH-short.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SSH-short.json", + "referenceNumber": 563, + "name": "SSH short notice", + "licenseId": "SSH-short", + "seeAlso": [ + "https://github.com/openssh/openssh-portable/blob/1b11ea7c58cd5c59838b5fa574cd456d6047b2d4/pathnames.h", + "http://web.mit.edu/kolya/.f/root/athena.mit.edu/sipb.mit.edu/project/openssh/OldFiles/src/openssh-2.9.9p2/ssh-add.1", + "https://joinup.ec.europa.eu/svn/lesoll/trunk/italc/lib/src/dsa_key.cpp" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SSLeay-standalone.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SSLeay-standalone.json", + "referenceNumber": 591, + "name": "SSLeay License - standalone", + "licenseId": "SSLeay-standalone", + "seeAlso": [ + "https://www.tq-group.com/filedownloads/files/software-license-conditions/OriginalSSLeay/OriginalSSLeay.pdf" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SSPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SSPL-1.0.json", + "referenceNumber": 17, + "name": "Server Side Public License, v 1", + "licenseId": "SSPL-1.0", + "seeAlso": [ + "https://www.mongodb.com/licensing/server-side-public-license" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/StandardML-NJ.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/StandardML-NJ.json", + "referenceNumber": 658, + "name": "Standard ML of New Jersey License", + "licenseId": "StandardML-NJ", + "seeAlso": [ + "https://www.smlnj.org/license.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/SugarCRM-1.1.3.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SugarCRM-1.1.3.json", + "referenceNumber": 42, + "name": "SugarCRM Public License v1.1.3", + "licenseId": "SugarCRM-1.1.3", + "seeAlso": [ + "http://www.sugarcrm.com/crm/SPL" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Sun-PPP.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Sun-PPP.json", + "referenceNumber": 385, + "name": "Sun PPP License", + "licenseId": "Sun-PPP", + "seeAlso": [ + "https://github.com/ppp-project/ppp/blob/master/pppd/eap.c#L7-L16" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Sun-PPP-2000.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Sun-PPP-2000.json", + "referenceNumber": 310, + "name": "Sun PPP License (2000)", + "licenseId": "Sun-PPP-2000", + "seeAlso": [ + "https://github.com/ppp-project/ppp/blob/master/modules/ppp_ahdlc.c#L7-L19" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SunPro.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SunPro.json", + "referenceNumber": 57, + "name": "SunPro License", + "licenseId": "SunPro", + "seeAlso": [ + "https://github.com/freebsd/freebsd-src/blob/main/lib/msun/src/e_acosh.c", + "https://github.com/freebsd/freebsd-src/blob/main/lib/msun/src/e_lgammal.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/SWL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/SWL.json", + "referenceNumber": 649, + "name": "Scheme Widget Library (SWL) Software License Agreement", + "licenseId": "SWL", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/SWL" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/swrule.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/swrule.json", + "referenceNumber": 90, + "name": "swrule License", + "licenseId": "swrule", + "seeAlso": [ + "https://ctan.math.utah.edu/ctan/tex-archive/macros/generic/misc/swrule.sty" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Symlinks.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Symlinks.json", + "referenceNumber": 414, + "name": "Symlinks License", + "licenseId": "Symlinks", + "seeAlso": [ + "https://www.mail-archive.com/debian-bugs-rc@lists.debian.org/msg11494.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TAPR-OHL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TAPR-OHL-1.0.json", + "referenceNumber": 242, + "name": "TAPR Open Hardware License v1.0", + "licenseId": "TAPR-OHL-1.0", + "seeAlso": [ + "https://www.tapr.org/OHL" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TCL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TCL.json", + "referenceNumber": 2, + "name": "TCL/TK License", + "licenseId": "TCL", + "seeAlso": [ + "http://www.tcl.tk/software/tcltk/license.html", + "https://fedoraproject.org/wiki/Licensing/TCL" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TCP-wrappers.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TCP-wrappers.json", + "referenceNumber": 9, + "name": "TCP Wrappers License", + "licenseId": "TCP-wrappers", + "seeAlso": [ + "http://rc.quest.com/topics/openssh/license.php#tcpwrappers" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TermReadKey.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TermReadKey.json", + "referenceNumber": 256, + "name": "TermReadKey License", + "licenseId": "TermReadKey", + "seeAlso": [ + "https://github.com/jonathanstowe/TermReadKey/blob/master/README#L9-L10" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TGPPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TGPPL-1.0.json", + "referenceNumber": 101, + "name": "Transitive Grace Period Public Licence 1.0", + "licenseId": "TGPPL-1.0", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/TGPPL", + "https://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/COPYING.TGPPL.rst" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/threeparttable.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/threeparttable.json", + "referenceNumber": 398, + "name": "threeparttable License", + "licenseId": "threeparttable", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Threeparttable" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TMate.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TMate.json", + "referenceNumber": 539, + "name": "TMate Open Source License", + "licenseId": "TMate", + "seeAlso": [ + "http://svnkit.com/license.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TORQUE-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TORQUE-1.1.json", + "referenceNumber": 61, + "name": "TORQUE v2.5+ Software License v1.1", + "licenseId": "TORQUE-1.1", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/TORQUEv1.1" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TOSL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TOSL.json", + "referenceNumber": 267, + "name": "Trusster Open Source License", + "licenseId": "TOSL", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/TOSL" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TPDL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TPDL.json", + "referenceNumber": 75, + "name": "Time::ParseDate License", + "licenseId": "TPDL", + "seeAlso": [ + "https://metacpan.org/pod/Time::ParseDate#LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TPL-1.0.json", + "referenceNumber": 508, + "name": "THOR Public License 1.0", + "licenseId": "TPL-1.0", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing:ThorPublicLicense" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TTWL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TTWL.json", + "referenceNumber": 87, + "name": "Text-Tabs+Wrap License", + "licenseId": "TTWL", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/TTWL", + "https://github.com/ap/Text-Tabs/blob/master/lib.modern/Text/Tabs.pm#L148" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TTYP0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TTYP0.json", + "referenceNumber": 451, + "name": "TTYP0 License", + "licenseId": "TTYP0", + "seeAlso": [ + "https://people.mpi-inf.mpg.de/~uwe/misc/uw-ttyp0/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TU-Berlin-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TU-Berlin-1.0.json", + "referenceNumber": 159, + "name": "Technische Universitaet Berlin License 1.0", + "licenseId": "TU-Berlin-1.0", + "seeAlso": [ + "https://github.com/swh/ladspa/blob/7bf6f3799fdba70fda297c2d8fd9f526803d9680/gsm/COPYRIGHT" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/TU-Berlin-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/TU-Berlin-2.0.json", + "referenceNumber": 624, + "name": "Technische Universitaet Berlin License 2.0", + "licenseId": "TU-Berlin-2.0", + "seeAlso": [ + "https://github.com/CorsixTH/deps/blob/fd339a9f526d1d9c9f01ccf39e438a015da50035/licences/libgsm.txt" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/UCAR.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/UCAR.json", + "referenceNumber": 78, + "name": "UCAR License", + "licenseId": "UCAR", + "seeAlso": [ + "https://github.com/Unidata/UDUNITS-2/blob/master/COPYRIGHT" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/UCL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/UCL-1.0.json", + "referenceNumber": 646, + "name": "Upstream Compatibility License v1.0", + "licenseId": "UCL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/UCL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/ulem.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ulem.json", + "referenceNumber": 566, + "name": "ulem License", + "licenseId": "ulem", + "seeAlso": [ + "https://mirrors.ctan.org/macros/latex/contrib/ulem/README" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/UMich-Merit.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/UMich-Merit.json", + "referenceNumber": 505, + "name": "Michigan/Merit Networks License", + "licenseId": "UMich-Merit", + "seeAlso": [ + "https://github.com/radcli/radcli/blob/master/COPYRIGHT#L64" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Unicode-3.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Unicode-3.0.json", + "referenceNumber": 46, + "name": "Unicode License v3", + "licenseId": "Unicode-3.0", + "seeAlso": [ + "https://www.unicode.org/license.txt" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Unicode-DFS-2015.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Unicode-DFS-2015.json", + "referenceNumber": 647, + "name": "Unicode License Agreement - Data Files and Software (2015)", + "licenseId": "Unicode-DFS-2015", + "seeAlso": [ + "https://web.archive.org/web/20151224134844/http://unicode.org/copyright.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Unicode-DFS-2016.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Unicode-DFS-2016.json", + "referenceNumber": 152, + "name": "Unicode License Agreement - Data Files and Software (2016)", + "licenseId": "Unicode-DFS-2016", + "seeAlso": [ + "https://www.unicode.org/license.txt", + "http://web.archive.org/web/20160823201924/http://www.unicode.org/copyright.html#License", + "http://www.unicode.org/copyright.html" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/Unicode-TOU.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Unicode-TOU.json", + "referenceNumber": 606, + "name": "Unicode Terms of Use", + "licenseId": "Unicode-TOU", + "seeAlso": [ + "http://web.archive.org/web/20140704074106/http://www.unicode.org/copyright.html", + "http://www.unicode.org/copyright.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/UnixCrypt.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/UnixCrypt.json", + "referenceNumber": 462, + "name": "UnixCrypt License", + "licenseId": "UnixCrypt", + "seeAlso": [ + "https://foss.heptapod.net/python-libs/passlib/-/blob/branch/stable/LICENSE#L70", + "https://opensource.apple.com/source/JBoss/JBoss-737/jboss-all/jetty/src/main/org/mortbay/util/UnixCrypt.java.auto.html", + "https://archive.eclipse.org/jetty/8.0.1.v20110908/xref/org/eclipse/jetty/http/security/UnixCrypt.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Unlicense.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Unlicense.json", + "referenceNumber": 411, + "name": "The Unlicense", + "licenseId": "Unlicense", + "seeAlso": [ + "https://unlicense.org/" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/UPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/UPL-1.0.json", + "referenceNumber": 511, + "name": "Universal Permissive License v1.0", + "licenseId": "UPL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/UPL" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/URT-RLE.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/URT-RLE.json", + "referenceNumber": 443, + "name": "Utah Raster Toolkit Run Length Encoded License", + "licenseId": "URT-RLE", + "seeAlso": [ + "https://sourceforge.net/p/netpbm/code/HEAD/tree/super_stable/converter/other/pnmtorle.c", + "https://sourceforge.net/p/netpbm/code/HEAD/tree/super_stable/converter/other/rletopnm.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Vim.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Vim.json", + "referenceNumber": 371, + "name": "Vim License", + "licenseId": "Vim", + "seeAlso": [ + "http://vimdoc.sourceforge.net/htmldoc/uganda.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/VOSTROM.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/VOSTROM.json", + "referenceNumber": 122, + "name": "VOSTROM Public License for Open Source", + "licenseId": "VOSTROM", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/VOSTROM" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/VSL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/VSL-1.0.json", + "referenceNumber": 510, + "name": "Vovida Software License v1.0", + "licenseId": "VSL-1.0", + "seeAlso": [ + "https://opensource.org/licenses/VSL-1.0" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/W3C.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/W3C.json", + "referenceNumber": 284, + "name": "W3C Software Notice and License (2002-12-31)", + "licenseId": "W3C", + "seeAlso": [ + "http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.html", + "https://opensource.org/licenses/W3C" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/W3C-19980720.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/W3C-19980720.json", + "referenceNumber": 156, + "name": "W3C Software Notice and License (1998-07-20)", + "licenseId": "W3C-19980720", + "seeAlso": [ + "http://www.w3.org/Consortium/Legal/copyright-software-19980720.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/W3C-20150513.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/W3C-20150513.json", + "referenceNumber": 452, + "name": "W3C Software Notice and Document License (2015-05-13)", + "licenseId": "W3C-20150513", + "seeAlso": [ + "https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document", + "https://www.w3.org/copyright/software-license-2015/", + "https://www.w3.org/copyright/software-license-2023/" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/w3m.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/w3m.json", + "referenceNumber": 202, + "name": "w3m License", + "licenseId": "w3m", + "seeAlso": [ + "https://github.com/tats/w3m/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Watcom-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Watcom-1.0.json", + "referenceNumber": 533, + "name": "Sybase Open Watcom Public License 1.0", + "licenseId": "Watcom-1.0", + "seeAlso": [ + "https://opensource.org/licenses/Watcom-1.0" + ], + "isOsiApproved": true, + "isFsfLibre": false + }, + { + "reference": "https://spdx.org/licenses/Widget-Workshop.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Widget-Workshop.json", + "referenceNumber": 548, + "name": "Widget Workshop License", + "licenseId": "Widget-Workshop", + "seeAlso": [ + "https://github.com/novnc/noVNC/blob/master/core/crypto/des.js#L24" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Wsuipa.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Wsuipa.json", + "referenceNumber": 305, + "name": "Wsuipa License", + "licenseId": "Wsuipa", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Wsuipa" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/WTFPL.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/WTFPL.json", + "referenceNumber": 176, + "name": "Do What The F*ck You Want To Public License", + "licenseId": "WTFPL", + "seeAlso": [ + "http://www.wtfpl.net/about/", + "http://sam.zoy.org/wtfpl/COPYING" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/wxWindows.html", + "isDeprecatedLicenseId": true, + "detailsUrl": "https://spdx.org/licenses/wxWindows.json", + "referenceNumber": 258, + "name": "wxWindows Library License", + "licenseId": "wxWindows", + "seeAlso": [ + "https://opensource.org/licenses/WXwindows" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/X11.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/X11.json", + "referenceNumber": 203, + "name": "X11 License", + "licenseId": "X11", + "seeAlso": [ + "http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/X11-distribute-modifications-variant.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/X11-distribute-modifications-variant.json", + "referenceNumber": 112, + "name": "X11 License Distribution Modification Variant", + "licenseId": "X11-distribute-modifications-variant", + "seeAlso": [ + "https://github.com/mirror/ncurses/blob/master/COPYING" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Xdebug-1.03.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Xdebug-1.03.json", + "referenceNumber": 10, + "name": "Xdebug License v 1.03", + "licenseId": "Xdebug-1.03", + "seeAlso": [ + "https://github.com/xdebug/xdebug/blob/master/LICENSE" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Xerox.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Xerox.json", + "referenceNumber": 595, + "name": "Xerox License", + "licenseId": "Xerox", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Xerox" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Xfig.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Xfig.json", + "referenceNumber": 89, + "name": "Xfig License", + "licenseId": "Xfig", + "seeAlso": [ + "https://github.com/Distrotech/transfig/blob/master/transfig/transfig.c", + "https://fedoraproject.org/wiki/Licensing:MIT#Xfig_Variant", + "https://sourceforge.net/p/mcj/xfig/ci/master/tree/src/Makefile.am" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/XFree86-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/XFree86-1.1.json", + "referenceNumber": 562, + "name": "XFree86 License 1.1", + "licenseId": "XFree86-1.1", + "seeAlso": [ + "http://www.xfree86.org/current/LICENSE4.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/xinetd.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/xinetd.json", + "referenceNumber": 465, + "name": "xinetd License", + "licenseId": "xinetd", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Xinetd_License" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/xkeyboard-config-Zinoviev.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/xkeyboard-config-Zinoviev.json", + "referenceNumber": 140, + "name": "xkeyboard-config Zinoviev License", + "licenseId": "xkeyboard-config-Zinoviev", + "seeAlso": [ + "https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/master/COPYING?ref_type\u003dheads#L178" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/xlock.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/xlock.json", + "referenceNumber": 357, + "name": "xlock License", + "licenseId": "xlock", + "seeAlso": [ + "https://fossies.org/linux/tiff/contrib/ras/ras2tif.c" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Xnet.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Xnet.json", + "referenceNumber": 236, + "name": "X.Net License", + "licenseId": "Xnet", + "seeAlso": [ + "https://opensource.org/licenses/Xnet" + ], + "isOsiApproved": true + }, + { + "reference": "https://spdx.org/licenses/xpp.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/xpp.json", + "referenceNumber": 312, + "name": "XPP License", + "licenseId": "xpp", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/xpp" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/XSkat.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/XSkat.json", + "referenceNumber": 544, + "name": "XSkat License", + "licenseId": "XSkat", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/XSkat_License" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/xzoom.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/xzoom.json", + "referenceNumber": 530, + "name": "xzoom License", + "licenseId": "xzoom", + "seeAlso": [ + "https://metadata.ftp-master.debian.org/changelogs//main/x/xzoom/xzoom_0.3-27_copyright" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/YPL-1.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/YPL-1.0.json", + "referenceNumber": 491, + "name": "Yahoo! Public License v1.0", + "licenseId": "YPL-1.0", + "seeAlso": [ + "http://www.zimbra.com/license/yahoo_public_license_1.0.html" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/YPL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/YPL-1.1.json", + "referenceNumber": 473, + "name": "Yahoo! Public License v1.1", + "licenseId": "YPL-1.1", + "seeAlso": [ + "http://www.zimbra.com/license/yahoo_public_license_1.1.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Zed.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Zed.json", + "referenceNumber": 599, + "name": "Zed License", + "licenseId": "Zed", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/Zed" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Zeeff.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Zeeff.json", + "referenceNumber": 218, + "name": "Zeeff License", + "licenseId": "Zeeff", + "seeAlso": [ + "ftp://ftp.tin.org/pub/news/utils/newsx/newsx-1.6.tar.gz" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Zend-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Zend-2.0.json", + "referenceNumber": 481, + "name": "Zend License v2.0", + "licenseId": "Zend-2.0", + "seeAlso": [ + "https://web.archive.org/web/20130517195954/http://www.zend.com/license/2_00.txt" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Zimbra-1.3.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Zimbra-1.3.json", + "referenceNumber": 379, + "name": "Zimbra Public License v1.3", + "licenseId": "Zimbra-1.3", + "seeAlso": [ + "http://web.archive.org/web/20100302225219/http://www.zimbra.com/license/zimbra-public-license-1-3.html" + ], + "isOsiApproved": false, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/Zimbra-1.4.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Zimbra-1.4.json", + "referenceNumber": 304, + "name": "Zimbra Public License v1.4", + "licenseId": "Zimbra-1.4", + "seeAlso": [ + "http://www.zimbra.com/legal/zimbra-public-license-1-4" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/Zlib.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/Zlib.json", + "referenceNumber": 209, + "name": "zlib License", + "licenseId": "Zlib", + "seeAlso": [ + "http://www.zlib.net/zlib_license.html", + "https://opensource.org/licenses/Zlib" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/zlib-acknowledgement.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/zlib-acknowledgement.json", + "referenceNumber": 348, + "name": "zlib/libpng License with Acknowledgement", + "licenseId": "zlib-acknowledgement", + "seeAlso": [ + "https://fedoraproject.org/wiki/Licensing/ZlibWithAcknowledgement" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ZPL-1.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ZPL-1.1.json", + "referenceNumber": 545, + "name": "Zope Public License 1.1", + "licenseId": "ZPL-1.1", + "seeAlso": [ + "http://old.zope.org/Resources/License/ZPL-1.1" + ], + "isOsiApproved": false + }, + { + "reference": "https://spdx.org/licenses/ZPL-2.0.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ZPL-2.0.json", + "referenceNumber": 51, + "name": "Zope Public License 2.0", + "licenseId": "ZPL-2.0", + "seeAlso": [ + "http://old.zope.org/Resources/License/ZPL-2.0", + "https://opensource.org/licenses/ZPL-2.0" + ], + "isOsiApproved": true, + "isFsfLibre": true + }, + { + "reference": "https://spdx.org/licenses/ZPL-2.1.html", + "isDeprecatedLicenseId": false, + "detailsUrl": "https://spdx.org/licenses/ZPL-2.1.json", + "referenceNumber": 352, + "name": "Zope Public License 2.1", + "licenseId": "ZPL-2.1", + "seeAlso": [ + "http://old.zope.org/Resources/ZPL/" + ], + "isOsiApproved": true, + "isFsfLibre": true + } + ], + "releaseDate": "2024-05-22" +} \ No newline at end of file