Merge pull request #179211 from NixOS/haskell-updates

haskellPackages: update stackage and hackage
This commit is contained in:
Dennis Gosnell 2022-07-07 21:17:59 +09:00 committed by GitHub
commit b2b431c2f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 1116 additions and 666 deletions

View File

@ -1,6 +1,6 @@
{ {
"commit": "c87d8bf669c0f5da46e44dece7a851e2f9d8c3e9", "commit": "e304e8df4de976f80d5d58e47cf560be91055799",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/c87d8bf669c0f5da46e44dece7a851e2f9d8c3e9.tar.gz", "url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/e304e8df4de976f80d5d58e47cf560be91055799.tar.gz",
"sha256": "0m1ahg2knm136g2gr66asicsqcy9n80lmszs70nkz550ll51vq8v", "sha256": "10xws4lazlx8bx26xc8h6c7ab7gkzc01an7nwip3bghc1h92zr4m",
"msg": "Update from Hackage at 2022-06-23T03:01:47Z" "msg": "Update from Hackage at 2022-07-02T15:59:48Z"
} }

View File

@ -194,6 +194,14 @@ stdenv.mkDerivation (rec {
# when adding new GHC releases in nixpkgs. # when adding new GHC releases in nixpkgs.
./respect-ar-path.patch ./respect-ar-path.patch
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
extraPrefix = "utils/haddock/";
stripLen = 1;
})
# cabal passes incorrect --host= when cross-compiling # cabal passes incorrect --host= when cross-compiling
# https://github.com/haskell/cabal/issues/5887 # https://github.com/haskell/cabal/issues/5887
(fetchpatch { (fetchpatch {

View File

@ -187,6 +187,14 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "doc" ]; outputs = [ "out" "doc" ];
patches = [ patches = [
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
extraPrefix = "utils/haddock/";
stripLen = 1;
})
# Add flag that fixes C++ exception handling; opt-in. Merged in 9.4 and 9.2.2. # Add flag that fixes C++ exception handling; opt-in. Merged in 9.4 and 9.2.2.
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7423 # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7423
(fetchpatch { (fetchpatch {

View File

@ -188,6 +188,16 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "doc" ]; outputs = [ "out" "doc" ];
patches = [
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
extraPrefix = "utils/haddock/";
stripLen = 1;
})
];
postPatch = "patchShebangs ."; postPatch = "patchShebangs .";
# GHC needs the locale configured during the Haddock phase. # GHC needs the locale configured during the Haddock phase.

View File

@ -99,7 +99,7 @@ self: super: {
name = "git-annex-${super.git-annex.version}-src"; name = "git-annex-${super.git-annex.version}-src";
url = "git://git-annex.branchable.com/"; url = "git://git-annex.branchable.com/";
rev = "refs/tags/" + super.git-annex.version; rev = "refs/tags/" + super.git-annex.version;
sha256 = "0a0jnahljd46vzjgcwlzjhrrjgn40s0zfjklh63aa9w9x0zkvbin"; sha256 = "0pr2fnaq3fa6lcly39xssl89v65h0wa26ikv5g30fm8y6z5rkqqd";
# delete android and Android directories which cause issues on # delete android and Android directories which cause issues on
# darwin (case insensitive directory). Since we don't need them # darwin (case insensitive directory). Since we don't need them
# during the build process, we can delete it to prevent a hash # during the build process, we can delete it to prevent a hash
@ -353,7 +353,10 @@ self: super: {
matplotlib = dontCheck super.matplotlib; matplotlib = dontCheck super.matplotlib;
# https://github.com/matterhorn-chat/matterhorn/issues/679 they do not want to be on stackage # https://github.com/matterhorn-chat/matterhorn/issues/679 they do not want to be on stackage
matterhorn = doJailbreak super.matterhorn; # Needs brick ^>= 0.70
matterhorn = doJailbreak (super.matterhorn.overrideScope (self: super: {
brick = self.brick_0_70_1;
}));
memcache = dontCheck super.memcache; memcache = dontCheck super.memcache;
metrics = dontCheck super.metrics; metrics = dontCheck super.metrics;
@ -379,6 +382,7 @@ self: super: {
posix-pty = dontCheck super.posix-pty; # https://github.com/merijn/posix-pty/issues/12 posix-pty = dontCheck super.posix-pty; # https://github.com/merijn/posix-pty/issues/12
postgresql-binary = dontCheck super.postgresql-binary; # needs a running postgresql server postgresql-binary = dontCheck super.postgresql-binary; # needs a running postgresql server
postgresql-simple-migration = dontCheck super.postgresql-simple-migration; postgresql-simple-migration = dontCheck super.postgresql-simple-migration;
powerdns = dontCheck super.powerdns; # Tests require networking and external services
process-streaming = dontCheck super.process-streaming; process-streaming = dontCheck super.process-streaming;
punycode = dontCheck super.punycode; punycode = dontCheck super.punycode;
pwstore-cli = dontCheck super.pwstore-cli; pwstore-cli = dontCheck super.pwstore-cli;
@ -2348,12 +2352,6 @@ self: super: {
# https://github.com/kuribas/mfsolve/issues/8 # https://github.com/kuribas/mfsolve/issues/8
mfsolve = dontCheck super.mfsolve; mfsolve = dontCheck super.mfsolve;
# compatibility with random-fu 0.3 https://github.com/mokus0/misfortune/pull/5
misfortune = appendPatch ./patches/misfortune-ghc9.patch (overrideCabal (drv: {
revision = null;
editedCabalFile = null;
}) super.misfortune);
# GHC 9 support https://github.com/lambdabot/dice/pull/2 # GHC 9 support https://github.com/lambdabot/dice/pull/2
dice = appendPatch (fetchpatch { dice = appendPatch (fetchpatch {
name = "dice-ghc9.patch"; name = "dice-ghc9.patch";
@ -2556,14 +2554,31 @@ self: super: {
# has been resolved. # has been resolved.
lucid-htmx = doJailbreak super.lucid-htmx; lucid-htmx = doJailbreak super.lucid-htmx;
lsp_1_5_0_0 = doDistribute (super.lsp_1_5_0_0.override {
lsp-types = self.lsp-types_1_5_0_0;
});
# A delay between futhark package uploads caused us to end up with conflicting
# versions of futhark and futhark-manifest
futhark = assert super.futhark.version == "0.21.12"; overrideCabal (drv: {
editedCabalFile = null;
revision = null;
version = "0.21.13";
sha256 = "0bzqlsaaqbbi47zvmvv7hd6hcz54hzw676rh9nxcjxgff3hzqb08";
libraryHaskellDepends = drv.libraryHaskellDepends or [] ++ [
self.fgl
self.fgl-visualize
self.co-log-core
];
}) (super.futhark.override {
lsp = self.lsp_1_5_0_0;
});
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super // (let } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super // (let
# We need to build purescript with these dependencies and thus also its reverse # We need to build purescript with these dependencies and thus also its reverse
# dependencies to avoid version mismatches in their dependency closure. # dependencies to avoid version mismatches in their dependency closure.
# TODO(@cdepillabout): maybe unify with the spago overlay in configuration-nix.nix? # TODO(@cdepillabout): maybe unify with the spago overlay in configuration-nix.nix?
purescriptOverlay = self: super: { purescriptOverlay = self: super: {
# Purescript targets Stackage LTS 18, so we need to downgrade a few things
aeson = self.aeson_1_5_6_0;
bower-json = self.bower-json_1_0_0_1;
# As of 2021-11-08, the latest release of `language-javascript` is 0.7.1.0, # As of 2021-11-08, the latest release of `language-javascript` is 0.7.1.0,
# but it has a problem with parsing the `async` keyword. It doesn't allow # but it has a problem with parsing the `async` keyword. It doesn't allow
# `async` to be used as an object key: # `async` to be used as an object key:
@ -2571,11 +2586,20 @@ self: super: {
language-javascript = self.language-javascript_0_7_0_0; language-javascript = self.language-javascript_0_7_0_0;
}; };
# Doesn't support GHC >= 9.0 (something related to instance resolution and TH) # Don't support GHC >= 9.0 yet and need aeson 1.5.*
purescriptBrokenFlag = drv: purescriptStOverride = drv:
let
overlayed = drv.overrideScope (
lib.composeExtensions
purescriptOverlay
(self: super: {
aeson = self.aeson_1_5_6_0;
})
);
in
if lib.versionAtLeast self.ghc.version "9.0" if lib.versionAtLeast self.ghc.version "9.0"
then dontDistribute (markBroken drv) then dontDistribute (markBroken overlayed)
else drv; else overlayed;
in { in {
purescript = purescript =
lib.pipe lib.pipe
@ -2591,13 +2615,11 @@ in {
doJailbreak doJailbreak
# Generate shell completions # Generate shell completions
(generateOptparseApplicativeCompletion "purs") (generateOptparseApplicativeCompletion "purs")
purescriptBrokenFlag
]; ];
purescript-cst = purescriptBrokenFlag (super.purescript-cst.overrideScope purescriptOverlay); purescript-cst = purescriptStOverride super.purescript-cst;
purescript-ast = purescriptBrokenFlag (super.purescript-ast.overrideScope purescriptOverlay); purescript-ast = purescriptStOverride super.purescript-ast;
purenix = super.purenix.overrideScope purescriptOverlay; purenix = purescriptStOverride super.purenix;
}) })

View File

@ -281,7 +281,16 @@ self: super: ({
# https://github.com/fpco/unliftio/issues/87 # https://github.com/fpco/unliftio/issues/87
unliftio = dontCheck super.unliftio; unliftio = dontCheck super.unliftio;
# This is the same issue as above; the rio tests call functions in unliftio
# that have issues as tracked in the GitHub issue above. Once the unliftio
# tests are fixed, we can remove this as well.
#
# We skip just the problematic tests by replacing 'it' with 'xit'.
rio = overrideCabal (drv: {
preConfigure = ''
sed -i 's/\bit /xit /g' test/RIO/FileSpec.hs
'';
}) super.rio;
# https://github.com/haskell-crypto/cryptonite/issues/360 # https://github.com/haskell-crypto/cryptonite/issues/360
cryptonite = appendPatch ./patches/cryptonite-remove-argon2.patch super.cryptonite; cryptonite = appendPatch ./patches/cryptonite-remove-argon2.patch super.cryptonite;

View File

@ -262,6 +262,7 @@ broken-packages:
- authenticate-ldap - authenticate-ldap
- authinfo-hs - authinfo-hs
- auto - auto
- autodocodec-yaml
- autom - autom
- autonix-deps - autonix-deps
- autopack - autopack
@ -1134,6 +1135,7 @@ broken-packages:
- direct-plugins - direct-plugins
- direm - direm
- dirtree - dirtree
- discord-haskell
- discordian-calendar - discordian-calendar
- discord-types - discord-types
- discrete - discrete
@ -1314,6 +1316,7 @@ broken-packages:
- enum-text - enum-text
- enum-utf8 - enum-utf8
- envelope - envelope
- env-extra
- env-parser - env-parser
- envstatus - envstatus
- epanet-haskell - epanet-haskell
@ -1417,6 +1420,7 @@ broken-packages:
- fast-nats - fast-nats
- fastpbkdf2 - fastpbkdf2
- FastPush - FastPush
- fast-tags
- FastxPipe - FastxPipe
- fathead-util - fathead-util
- fb - fb
@ -1659,6 +1663,7 @@ broken-packages:
- gentlemark - gentlemark
- geocode-google - geocode-google
- GeocoderOpenCage - GeocoderOpenCage
- geodetics
- geodetic-types - geodetic-types
- GeoIp - GeoIp
- geojson-types - geojson-types
@ -2843,6 +2848,7 @@ broken-packages:
- khph - khph
- kickass-torrents-dump-parser - kickass-torrents-dump-parser
- kickchan - kickchan
- ki-unlifted
- kleene-list - kleene-list
- kmonad - kmonad
- kmp-dfa - kmp-dfa
@ -4014,7 +4020,6 @@ broken-packages:
- postmaster - postmaster
- potato-tool - potato-tool
- potoki-core - potoki-core
- powerdns
- powermate - powermate
- powerpc - powerpc
- powerqueue-levelmem - powerqueue-levelmem
@ -4110,6 +4115,7 @@ broken-packages:
- provenience - provenience
- proxy-kindness - proxy-kindness
- proxy-mapping - proxy-mapping
- psc-ide
- pseudo-trie - pseudo-trie
- PSQueue - PSQueue
- PTQ - PTQ
@ -4127,6 +4133,7 @@ broken-packages:
- pure-io - pure-io
- purenix - purenix
- pure-priority-queue - pure-priority-queue
- purescript-tsd-gen
- pure-zlib - pure-zlib
- pushbullet - pushbullet
- pushbullet-types - pushbullet-types
@ -4418,6 +4425,7 @@ broken-packages:
- ruin - ruin
- runhs - runhs
- runmany - runmany
- rustls
- rws - rws
- RxHaskell - RxHaskell
- rz-pipe - rz-pipe
@ -5838,6 +5846,7 @@ broken-packages:
- zendesk-api - zendesk-api
- zeno - zeno
- zeolite-lang - zeolite-lang
- zephyr
- zeromq4-clone-pattern - zeromq4-clone-pattern
- zeromq4-conduit - zeromq4-conduit
- zeromq4-patterns - zeromq4-patterns

View File

@ -87,6 +87,10 @@ default-package-overrides:
- dhall-nix < 1.1.24 - dhall-nix < 1.1.24
# Temporarily forbid distribution-nixpkgs updates until cabal2nix supports the new version # Temporarily forbid distribution-nixpkgs updates until cabal2nix supports the new version
- distribution-nixpkgs < 1.7.0 - distribution-nixpkgs < 1.7.0
# patch is primarily used by reflex packages not all of which are patch 0.0.7 compatible yet
- patch < 0.0.7
- reflex < 0.8.2.1
- reflex-dom-core < 0.7.0.2
extra-packages: extra-packages:
- aeson < 2 # required by pantry-0.5.2 - aeson < 2 # required by pantry-0.5.2

View File

@ -1,4 +1,4 @@
# Stackage LTS 19.12 # Stackage LTS 19.13
# This file is auto-generated by # This file is auto-generated by
# maintainers/scripts/haskell/update-stackage.sh # maintainers/scripts/haskell/update-stackage.sh
default-package-overrides: default-package-overrides:
@ -192,7 +192,7 @@ default-package-overrides:
- bits ==0.6 - bits ==0.6
- bitset-word8 ==0.1.1.2 - bitset-word8 ==0.1.1.2
- bits-extra ==0.0.2.3 - bits-extra ==0.0.2.3
- bitvec ==1.1.2.0 - bitvec ==1.1.3.0
- bitwise-enum ==1.0.1.0 - bitwise-enum ==1.0.1.0
- blake2 ==0.3.0 - blake2 ==0.3.0
- blanks ==0.5.0 - blanks ==0.5.0
@ -429,9 +429,9 @@ default-package-overrides:
- convertible ==1.1.1.1 - convertible ==1.1.1.1
- cookie ==0.4.5 - cookie ==0.4.5
- copr-api ==0.1.0 - copr-api ==0.1.0
- core-data ==0.3.3.1 - core-data ==0.3.4.0
- core-program ==0.4.6.4 - core-program ==0.4.6.4
- core-text ==0.3.7.2 - core-text ==0.3.8.0
- countable ==1.0 - countable ==1.0
- covariance ==0.1.0.6 - covariance ==0.1.0.6
- cpphs ==1.20.9.1 - cpphs ==1.20.9.1
@ -543,7 +543,7 @@ default-package-overrides:
- Decimal ==0.5.2 - Decimal ==0.5.2
- declarative ==0.5.4 - declarative ==0.5.4
- deepseq-generics ==0.2.0.0 - deepseq-generics ==0.2.0.0
- deferred-folds ==0.9.18.1 - deferred-folds ==0.9.18.2
- dejafu ==2.4.0.3 - dejafu ==2.4.0.3
- dense-linear-algebra ==0.1.0.0 - dense-linear-algebra ==0.1.0.0
- dependent-map ==0.4.0.0 - dependent-map ==0.4.0.0
@ -626,7 +626,7 @@ default-package-overrides:
- dual ==0.1.1.1 - dual ==0.1.1.1
- dual-tree ==0.2.3.0 - dual-tree ==0.2.3.0
- dublincore-xml-conduit ==0.1.0.2 - dublincore-xml-conduit ==0.1.0.2
- dunai ==0.8.2 - dunai ==0.8.3
- duration ==0.2.0.0 - duration ==0.2.0.0
- dvorak ==0.1.0.0 - dvorak ==0.1.0.0
- dynamic-state ==0.3.1 - dynamic-state ==0.3.1
@ -1004,13 +1004,13 @@ default-package-overrides:
- haskintex ==0.8.0.0 - haskintex ==0.8.0.0
- haskoin-core ==0.21.2 - haskoin-core ==0.21.2
- hasktags ==0.72.0 - hasktags ==0.72.0
- hasql ==1.5.0.3 - hasql ==1.5.0.4
- hasql-migration ==0.3.0 - hasql-migration ==0.3.0
- hasql-notifications ==0.2.0.1 - hasql-notifications ==0.2.0.1
- hasql-optparse-applicative ==0.3.0.9 - hasql-optparse-applicative ==0.3.0.9
- hasql-pool ==0.5.2.2 - hasql-pool ==0.5.2.2
- hasql-queue ==1.2.0.2 - hasql-queue ==1.2.0.2
- hasql-th ==0.4.0.14 - hasql-th ==0.4.0.15
- hasql-transaction ==1.0.1.1 - hasql-transaction ==1.0.1.1
- has-transformers ==0.1.0.4 - has-transformers ==0.1.0.4
- hasty-hamiltonian ==1.3.4 - hasty-hamiltonian ==1.3.4
@ -1238,7 +1238,7 @@ default-package-overrides:
- hxt-regex-xmlschema ==9.2.0.7 - hxt-regex-xmlschema ==9.2.0.7
- hxt-tagsoup ==9.1.4 - hxt-tagsoup ==9.1.4
- hxt-unicode ==9.0.2.4 - hxt-unicode ==9.0.2.4
- hybrid-vectors ==0.2.2 - hybrid-vectors ==0.2.3
- hyper ==0.2.1.1 - hyper ==0.2.1.1
- hyperloglog ==0.4.6 - hyperloglog ==0.4.6
- hyphenation ==0.8.2 - hyphenation ==0.8.2
@ -1417,7 +1417,7 @@ default-package-overrides:
- lift-generics ==0.2.1 - lift-generics ==0.2.1
- lift-type ==0.1.0.1 - lift-type ==0.1.0.1
- line ==4.0.1 - line ==4.0.1
- linear ==1.21.9 - linear ==1.21.10
- linear-base ==0.1.0 - linear-base ==0.1.0
- linear-circuit ==0.1.0.4 - linear-circuit ==0.1.0.4
- linebreak ==1.1.0.1 - linebreak ==1.1.0.1
@ -1873,7 +1873,7 @@ default-package-overrides:
- posix-paths ==0.3.0.0 - posix-paths ==0.3.0.0
- possibly ==1.0.0.0 - possibly ==1.0.0.0
- postgres-options ==0.2.0.0 - postgres-options ==0.2.0.0
- postgresql-binary ==0.12.4.3 - postgresql-binary ==0.12.4.4
- postgresql-libpq ==0.9.4.3 - postgresql-libpq ==0.9.4.3
- postgresql-libpq-notify ==0.2.0.0 - postgresql-libpq-notify ==0.2.0.0
- postgresql-migration ==0.2.1.3 - postgresql-migration ==0.2.1.3
@ -1886,7 +1886,7 @@ default-package-overrides:
- postgresql-typed ==0.6.2.1 - postgresql-typed ==0.6.2.1
- post-mess-age ==0.2.1.0 - post-mess-age ==0.2.1.0
- pptable ==0.3.0.0 - pptable ==0.3.0.0
- pqueue ==1.4.1.4 - pqueue ==1.4.2.0
- prefix-units ==0.2.0 - prefix-units ==0.2.0
- prelude-compat ==0.0.0.2 - prelude-compat ==0.0.0.2
- prelude-safeenum ==0.1.1.3 - prelude-safeenum ==0.1.1.3
@ -1910,7 +1910,7 @@ default-package-overrides:
- primitive ==0.7.3.0 - primitive ==0.7.3.0
- primitive-addr ==0.1.0.2 - primitive-addr ==0.1.0.2
- PrimitiveArray ==0.10.1.1 - PrimitiveArray ==0.10.1.1
- primitive-extras ==0.10.1.4 - primitive-extras ==0.10.1.5
- primitive-offset ==0.2.0.0 - primitive-offset ==0.2.0.0
- primitive-unaligned ==0.1.1.1 - primitive-unaligned ==0.1.1.1
- primitive-unlifted ==0.1.3.1 - primitive-unlifted ==0.1.3.1
@ -2036,7 +2036,7 @@ default-package-overrides:
- reform-happstack ==0.2.5.5 - reform-happstack ==0.2.5.5
- RefSerialize ==0.4.0 - RefSerialize ==0.4.0
- ref-tf ==0.5.0.1 - ref-tf ==0.5.0.1
- regex ==1.1.0.1 - regex ==1.1.0.2
- regex-applicative ==0.3.4 - regex-applicative ==0.3.4
- regex-applicative-text ==0.1.0.1 - regex-applicative-text ==0.1.0.1
- regex-base ==0.94.0.2 - regex-base ==0.94.0.2
@ -2046,7 +2046,7 @@ default-package-overrides:
- regex-posix ==0.96.0.1 - regex-posix ==0.96.0.1
- regex-posix-clib ==2.7 - regex-posix-clib ==2.7
- regex-tdfa ==1.3.1.2 - regex-tdfa ==1.3.1.2
- regex-with-pcre ==1.1.0.1 - regex-with-pcre ==1.1.0.2
- reinterpret-cast ==0.1.0 - reinterpret-cast ==0.1.0
- rel8 ==1.3.1.0 - rel8 ==1.3.1.0
- reliable-io ==0.0.2 - reliable-io ==0.0.2
@ -2075,8 +2075,6 @@ default-package-overrides:
- rfc5051 ==0.2 - rfc5051 ==0.2
- rg ==1.4.0.0 - rg ==1.4.0.0
- rhbzquery ==0.4.4 - rhbzquery ==0.4.4
- rhine ==0.7.1
- rhine-gloss ==0.7.1
- riak-protobuf ==0.25.0.0 - riak-protobuf ==0.25.0.0
- rio ==0.1.22.0 - rio ==0.1.22.0
- rio-orphans ==0.1.2.0 - rio-orphans ==0.1.2.0
@ -2228,7 +2226,7 @@ default-package-overrides:
- silently ==1.2.5.2 - silently ==1.2.5.2
- simple-affine-space ==0.1.1 - simple-affine-space ==0.1.1
- simple-cabal ==0.1.3 - simple-cabal ==0.1.3
- simple-cmd ==0.2.6 - simple-cmd ==0.2.7
- simple-cmd-args ==0.1.7 - simple-cmd-args ==0.1.7
- simple-log ==0.9.12 - simple-log ==0.9.12
- simple-media-timestamp ==0.2.0.0 - simple-media-timestamp ==0.2.0.0
@ -2288,7 +2286,7 @@ default-package-overrides:
- speedy-slice ==0.3.2 - speedy-slice ==0.3.2
- Spintax ==0.3.6 - Spintax ==0.3.6
- splice ==0.6.1.1 - splice ==0.6.1.1
- splint ==1.0.1.5 - splint ==1.0.2.0
- split ==0.2.3.4 - split ==0.2.3.4
- splitmix ==0.1.0.4 - splitmix ==0.1.0.4
- splitmix-distributions ==0.9.0.0 - splitmix-distributions ==0.9.0.0
@ -2687,7 +2685,7 @@ default-package-overrides:
- vector-algorithms ==0.8.0.4 - vector-algorithms ==0.8.0.4
- vector-binary-instances ==0.2.5.2 - vector-binary-instances ==0.2.5.2
- vector-buffer ==0.4.1 - vector-buffer ==0.4.1
- vector-builder ==0.3.8.3 - vector-builder ==0.3.8.4
- vector-bytes-instances ==0.1.1 - vector-bytes-instances ==0.1.1
- vector-circular ==0.1.4 - vector-circular ==0.1.4
- vector-instances ==3.4 - vector-instances ==3.4

View File

@ -1026,6 +1026,7 @@ dont-distribute-packages:
- commsec-keyexchange - commsec-keyexchange
- comonad-random - comonad-random
- compact-mutable - compact-mutable
- compactable
- compdata-automata - compdata-automata
- compdata-dags - compdata-dags
- compdata-param - compdata-param
@ -1431,6 +1432,7 @@ dont-distribute-packages:
- feed-translator - feed-translator
- feed2lj - feed2lj
- feed2twitter - feed2twitter
- feedback
- fei-base - fei-base
- fei-dataiter - fei-dataiter
- fei-datasets - fei-datasets
@ -1558,6 +1560,11 @@ dont-distribute-packages:
- geniconvert - geniconvert
- geniserver - geniserver
- genvalidity-mergeful - genvalidity-mergeful
- genvalidity-sydtest
- genvalidity-sydtest-aeson
- genvalidity-sydtest-hashable
- genvalidity-sydtest-lens
- genvalidity-sydtest-persistent
- geodetic - geodetic
- geolite-csv - geolite-csv
- getemx - getemx
@ -1937,6 +1944,7 @@ dont-distribute-packages:
- hascat-setup - hascat-setup
- hascat-system - hascat-system
- hashable-accelerate - hashable-accelerate
- hashes
- hashflare - hashflare
- hask-home - hask-home
- haskades - haskades
@ -2248,6 +2256,7 @@ dont-distribute-packages:
- hts - hts
- htsn-import - htsn-import
- http-client-auth - http-client-auth
- http-client-rustls
- http-enumerator - http-enumerator
- http-pony - http-pony
- http2-client-exe - http2-client-exe
@ -3174,7 +3183,6 @@ dont-distribute-packages:
- proto3-wire - proto3-wire
- protobuf-native - protobuf-native
- protocol-buffers-descriptor-fork - protocol-buffers-descriptor-fork
- psc-ide
- psql - psql
- ptera - ptera
- ptera-core - ptera-core
@ -3187,7 +3195,6 @@ dont-distribute-packages:
- pure-cdb - pure-cdb
- pure-priority-queue-tests - pure-priority-queue-tests
- purescript-iso - purescript-iso
- purescript-tsd-gen
- pursuit-client - pursuit-client
- push-notify - push-notify
- push-notify-apn - push-notify-apn
@ -3426,6 +3433,9 @@ dont-distribute-packages:
- runtime-arbitrary - runtime-arbitrary
- rv - rv
- s-expression - s-expression
- safe-coloured-text-gen
- safe-coloured-text-layout
- safe-coloured-text-layout-gen
- safe-coupling - safe-coupling
- safe-plugins - safe-plugins
- safer-file-handles - safer-file-handles
@ -3549,6 +3559,7 @@ dont-distribute-packages:
- shady-graphics - shady-graphics
- shake-ats - shake-ats
- shake-bindist - shake-bindist
- shake-futhark
- shake-minify-css - shake-minify-css
- shake-plus-extended - shake-plus-extended
- shakebook - shakebook
@ -3745,7 +3756,17 @@ dont-distribute-packages:
- sweet-egison - sweet-egison
- switch - switch
- syb-with-class-instances-text - syb-with-class-instances-text
- sydtest
- sydtest-aeson
- sydtest-amqp - sydtest-amqp
- sydtest-hedgehog
- sydtest-hspec
- sydtest-persistent
- sydtest-persistent-sqlite
- sydtest-process
- sydtest-servant
- sydtest-typed-process
- sydtest-wai
- sydtest-webdriver - sydtest-webdriver
- sydtest-webdriver-screenshot - sydtest-webdriver-screenshot
- sydtest-webdriver-yesod - sydtest-webdriver-yesod
@ -3851,6 +3872,7 @@ dont-distribute-packages:
- to-string-instances - to-string-instances
- toboggan - toboggan
- todos - todos
- token-limiter-concurrent
- toktok - toktok
- tomlcheck - tomlcheck
- tonatona - tonatona
@ -4202,7 +4224,6 @@ dont-distribute-packages:
- yuuko - yuuko
- z85 - z85
- zasni-gerna - zasni-gerna
- zephyr
- zephyr-copilot - zephyr-copilot
- zeromq3-conduit - zeromq3-conduit
- zeromq3-haskell - zeromq3-haskell

View File

@ -845,14 +845,14 @@ self: super: builtins.intersectAttrs super {
rel8 = addTestToolDepend pkgs.postgresql super.rel8; rel8 = addTestToolDepend pkgs.postgresql super.rel8;
cachix = generateOptparseApplicativeCompletion "cachix" (super.cachix.override { nix = pkgs.nixVersions.nix_2_7; }); cachix = generateOptparseApplicativeCompletion "cachix" (super.cachix.override { nix = pkgs.nixVersions.nix_2_9; });
hercules-ci-agent = super.hercules-ci-agent.override { nix = pkgs.nixVersions.nix_2_7; }; hercules-ci-agent = super.hercules-ci-agent.override { nix = pkgs.nixVersions.nix_2_9; };
hercules-ci-cnix-expr = hercules-ci-cnix-expr =
addTestToolDepend pkgs.git ( addTestToolDepend pkgs.git (
super.hercules-ci-cnix-expr.override { nix = pkgs.nixVersions.nix_2_7; } super.hercules-ci-cnix-expr.override { nix = pkgs.nixVersions.nix_2_9; }
); );
hercules-ci-cnix-store = super.hercules-ci-cnix-store.override { nix = pkgs.nixVersions.nix_2_7; }; hercules-ci-cnix-store = super.hercules-ci-cnix-store.override { nix = pkgs.nixVersions.nix_2_9; };
# Enable extra optimisations which increase build time, but also # Enable extra optimisations which increase build time, but also
# later compiler performance, so we should do this for user's benefit. # later compiler performance, so we should do this for user's benefit.

File diff suppressed because it is too large Load Diff

View File

@ -1,70 +0,0 @@
diff --git a/misfortune.cabal b/misfortune.cabal
index f5d0dd3..faa5794 100644
--- a/misfortune.cabal
+++ b/misfortune.cabal
@@ -113,7 +113,8 @@ Library
directory,
filepath,
knob,
- random-fu >= 0.2.2,
+ random,
+ random-fu >= 0.3,
semigroups,
text,
utf8-string,
diff --git a/src/Data/Fortune.hs b/src/Data/Fortune.hs
index 16d221e..ffbc970 100644
--- a/src/Data/Fortune.hs
+++ b/src/Data/Fortune.hs
@@ -64,6 +64,7 @@ import Paths_misfortune
import System.Directory
import System.Environment
import System.FilePath
+import System.Random.Stateful (newIOGenM, newStdGen)
-- |The number of fortune strings in the index
numFortunes :: S.FortuneStats -> Int
@@ -233,9 +234,10 @@ randomFortune paths = withFortuneFiles '%' False paths $ \fs -> do
-- random fortune from that file (unformly).
randomFortuneFromRandomFile :: RVar FortuneFile -> IO String
randomFortuneFromRandomFile file = do
- f <- sample file
+ gen <- newStdGen >>= newIOGenM
+ f <- sampleFrom gen file
n <- getNumFortunes f
- i <- sample (uniform 0 (n-1))
+ i <- sampleFrom gen (uniform 0 (n-1))
T.unpack <$> getFortune f i
-- |Given a list of 'FortuneFile's, compute a distrubution over them weighted by the number
diff --git a/src/Fortune.hs b/src/Fortune.hs
index 5a27578..d6ffb74 100644
--- a/src/Fortune.hs
+++ b/src/Fortune.hs
@@ -21,6 +21,7 @@ import System.Environment
import System.Exit
import System.FilePath
import System.IO
+import System.Random.Stateful (newIOGenM, newStdGen)
import Text.Printf
import Text.Regex.Base
import Text.Regex.PCRE
@@ -200,6 +201,7 @@ main = do
fortunes <- filterM (filterFile args) (fortuneFiles args)
dist <- getDist args fortunes
+ gen <- newStdGen >>= newIOGenM
when (numEvents dist == 0) $ do
hPutStrLn stderr "No fortunes matched the filter criteria"
@@ -225,8 +227,8 @@ main = do
, let pctStr = printf "(%.2f%%)" (100 * weight / totalWeight dist) :: String
]
else do
- (file, fortuneDist) <- sample dist
- fortune <- sample fortuneDist
+ (file, fortuneDist) <- sampleFrom gen dist
+ fortune <- sampleFrom gen fortuneDist
putStrLn . T.unpack =<< getFortune file fortune
getDist :: Args -> [FortuneFile] -> IO (Categorical Float (FortuneFile, Categorical Float Int))

View File

@ -381,9 +381,6 @@ let
compilerNames.ghc902 compilerNames.ghc902
compilerNames.ghc923 compilerNames.ghc923
]; ];
purescript = [
compilerNames.ghc8107
];
purescript-cst = [ purescript-cst = [
compilerNames.ghc8107 compilerNames.ghc8107
]; ];